# ONLYOFFICE Docs 8.0 for developers: API and Doc Builder updates

**URL:** https://community.onlyoffice.com/t/onlyoffice-docs-8-0-for-developers-api-and-doc-builder-updates/7821
**Category:** News
**Created:** [5 February 2024 13:01 UTC](https://community.onlyoffice.com/t/onlyoffice-docs-8-0-for-developers-api-and-doc-builder-updates/7821 "2024-02-05T13:01:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ONLYOFFICE\_team](https://community.onlyoffice.com/user_avatar/community.onlyoffice.com/onlyoffice_team/32/431_2.png) [@ONLYOFFICE\_team](https://community.onlyoffice.com/u/ONLYOFFICE_team)
#### Post date: [5 February 2024 13:01 UTC](https://community.onlyoffice.com/t/onlyoffice-docs-8-0-for-developers-api-and-doc-builder-updates/7821/1 "2024-02-05T13:01:38Z")

</div>

Originally published at: [ONLYOFFICE Docs 8.0 for developers: API and Doc Builder updates | ONLYOFFICE Blog](https://www.onlyoffice.com/blog/2024/02/onlyoffice-docs-8-0-for-developers/)

Along with the release of the new features in [version 8.0](https://www.onlyoffice.com/blog/2024/01/onlyoffice-docs-8-0-released?utm_source=blog&utm_medium=social&utm_campaign=docs_80_devs), we updated API for the editors, Document Builder, and plugins. Check all the details below.

![ONLYOFFICE Docs 8.0 for developers: API and Doc Builder updates](https://static-blog.onlyoffice.com/wp-content/uploads/2024/01/31154838/Blog-8.0_For-developers.png)

## PDF support

We added the _pdf_ document type to the [documentType](https://api.onlyoffice.com/editors/config/#documentType) parameter. This means that PDF files\*, including those containing fillable fields, are now fully supported and can be opened for annotating and filling in ONLYOFFICE PDF Editor (earlier such files were recognized as documents and opened in the document editor).

```
var docEditor = new DocsAPI.DocEditor("placeholder", {     
    "documentType": "pdf",
```

_\*Also_ _DjVu__,_ _OXPS_ _and XPS_

## API for working with forms

The [formsdataurl](https://api.onlyoffice.com/editors/callback#formsdataurl) parameter added to the _Callback handler_ allows defining the URL to the JSON file with the submitted form data. This file contains the following parameters:

- key
- tag
- value
- type _( __text, checkBox, picture, comboBox, dropDownList, dateTime, radio__ )_

Moreover, you will find new form methods in the [DocBuilder API](https://api.onlyoffice.com/docbuilder/basic):

- [ApiDocument/GetFormsData](https://api.onlyoffice.com/docbuilder/textdocumentapi/apidocument/getformsdata) which returns the data from all forms present in the current document;
- [ApiDocument/SetFormsData](https://api.onlyoffice.com/docbuilder/textdocumentapi/apidocument/setformsdata) which sets the data to the specified forms.

```
builder.CreateFile("docx"); 
var oDocument = Api.GetDocument(); 
var oParagraph1 = oDocument.GetElement(0); 
var oCheckBox = Api.CreateCheckBoxForm({"key": "BestCompany"}); 
oParagraph1.Push(oCheckBox); 
var oTextForm = Api.CreateTextForm({"key": "CompanyName"}); 
oParagraph1.Push(oTextForm); 
oDocument.SetFormsData([    
   {"key": "BestCompany", "value": true},     
   {"key": "CompanyName", "value": "ONLYOFFICE"} 
]); 
builder.SaveFile("docx", "SetFormsData.docx"); 
builder.CloseFile();
```

## Enhanced WOPI support

The latest release brings the [**WOPISrc**](https://api.onlyoffice.com/editors/wopi/#wopisrc) **query parameter** which is added to the requests from the browser to the server. This allows you to create several independent instances of ONLYOFFICE. Load balancing requests with `WOPISrc` ensure that collaborative editing works correctly: all users editing the same document are served by the same server.

For WOPI, the parameter sent by the integrator is used. For the Docs API, the [document.key](https://api.onlyoffice.com/editors/config/document#key) parameter is written to `WOPISrc`.

## Conversion API

The [watermark](https://api.onlyoffice.com/editors/conversionapi#watermark) field added to the conversion request defines a JSON object containing the [properties](https://api.onlyoffice.com/plugin/global#watermark_on_draw) of a watermark which is inserted into the PDF and image files during conversion.

```
"async": false,    
"filetype": "docx",     
"key": "Khirz6zTPdfd7",     
"outputtype": "pdf",     
"title": "Example Document Title.docx",     
"url": "https://example.com/url-to-example-document.docx",     
"watermark": {         
  "align": 1,         
  "fill": [255, 0, 0],        
  "height": 100,        
  "margins": [10, 10, 10, 10],
  ...
```

## Support for Oracle and Microsoft SQL Server databases

Among the supported databases there are now also Oracle and Microsoft SQL Server. To connect it, change the database type to `oracle / mssql`. For Docker, you will need to adjust the **DB\_TYPE** [parameter](https://github.com/ONLYOFFICE/Docker-Docs#available-%D1%81onfiguration-parameters).

Besides, you can use:

- Advanced connection [settings](https://node-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#connection-strings) for oracle – `oracleExtraOptions `
- Advanced connection [settings](https://github.com/tediousjs/node-mssql#tedious) for mssql – `msSqlExtraOptions`

## User avatars

Starting from version 8.0, it’s possible to add user avatars to be displayed in the editors for better team visualization.

Thus, the `info` operation type is added to the [setUsers](https://api.onlyoffice.com/editors/methods#setUsers) method and [onRequestUsers](https://api.onlyoffice.com/editors/config/events#onRequestUsers) event to set the avatars for the users with the IDs specified in the `data.id` parameter. And the newly added `users.image` field defines the path to the user avatar.

```
var onRequestUsers = function (event) {     
   var c = event.data.c;     
   var id = event.data.id;    
   ...      
docEditor.setUsers({         
   "c": event.data.c,         
   "users": [             
     {                 
     "email": "john@example.com",                 
     "id": "78e1e841",                 
     "image": "https://example.com/url-to-user-avatar1.png",                 
     "name": "John Smith"             
     },
```

Besides, the [editorConfig.user](https://api.onlyoffice.com/editors/config/editor#user) parameter now contains the _image_ field to define the path to the user avatar:

```
var docEditor = new DocsAPI.DocEditor("placeholder", {    
"editorConfig": {
...
    "user": {             
    "group": "Group1",             
    "id": "78e1e841",             
    "image": "https://example.com/url-to-user-avatar.png",             
    "name": "John Smith"         
     }
```

## More API updates for the editors

- The [editorConfig.customization.mobileForceView](https://api.onlyoffice.com/editors/config/editor/customization#mobileForceView) parameter to define if the mobile document editor is opened in the view/edit mode on launch. The default value is _true_.
- The _link_ field in the _d __a__ ta_ object which is sent to the [events.onRequestReferenceData](https://api.onlyoffice.com/editors/config/events#onRequestReferenceData) event.

Get the latest version of ONLYOFFICE Docs Developer:

[DOWNLOAD NOW](https://www.onlyoffice.com/download-docs.aspx?utm_source=blog&utm_medium=social&utm_campaign=docs_80_devs#docs-developer)

## API enhancements for plugins

The newly added plugin methods allow launching and managing slideshows:

- [EndSlideShow](https://api.onlyoffice.com/plugin/executemethod/slide/endslideshow)
- [GoToNextSlideInSlideShow](https://api.onlyoffice.com/plugin/executemethod/slide/gotonextslideinslideshow)
- [GoToPreviousSlideInSlideShow](https://api.onlyoffice.com/plugin/executemethod/slide/gotopreviousslideinslideshow)
- [GoToSlideInSlideShow](https://api.onlyoffice.com/plugin/executemethod/slide/gotoslideinslideshow)
- [PauseSlideShow](https://api.onlyoffice.com/plugin/executemethod/slide/pauseslideshow)
- [ResumeSlideShow](https://api.onlyoffice.com/plugin/executemethod/slide/resumeslideshow)
- [StartSlideShow](https://api.onlyoffice.com/plugin/executemethod/slide/startslideshow)

Find below several code samples:

`window.Asc.plugin.executeMethod ("StartSlideShow");`

`window.Asc.plugin.executeMethod ("GoToSlideInSlideShow", [2]);`

`window.Asc.plugin.executeMethod ("EndSlideShow");`

## Further API updates for Document Builder

In the [DocBuilder API](https://api.onlyoffice.com/docbuilder/basic), we also added multiple freeze panes and comment methods, and some others, including the following ones:

- [ApiFreezePanes/GetLocation](https://api.onlyoffice.com/docbuilder/spreadsheetapi/apifreezepanes/getlocation) which returns a range that describes the frozen cells in the active worksheet view.
- [ApiBlockLvlSdt/AddComment](https://api.onlyoffice.com/docbuilder/textdocumentapi/apiblocklvlsdt/addcomment) which adds a comment to the current block content control.
- [ApiSection/GetPageHeight](https://api.onlyoffice.com/docbuilder/textdocumentapi/apisection/getpageheight) which gets page height for current section.
- [ApiDocument/AddDrawingToPage](https://api.onlyoffice.com/docbuilder/textdocumentapi/apidocument/adddrawingtopage) which adds a shape to the specified page.

Check the [full list](https://api.onlyoffice.com/docbuilder/changelog#80) of new methods.

[DOWNLOAD BUILDER](https://www.onlyoffice.com/download-builder.aspx?utm_source=blog&utm_medium=social&utm_campaign=docs_80_devs)

### Useful links

What’s new in ONLYOFFICE Docs 8.0: [blog](https://www.onlyoffice.com/blog/2024/01/onlyoffice-docs-8-0-released?utm_source=blog&utm_medium=social&utm_campaign=docs_80_devs) / [webinar](https://youtu.be/AKX3EHWojpk)

[ONLYOFFICE for developers](https://www.onlyoffice.com/developer-edition.aspx?utm_source=blog&utm_medium=social&utm_campaign=docs_80_devs)

[ONLYOFFICE Document Builder](https://www.onlyoffice.com/document-builder.aspx?utm_source=blog&utm_medium=social&utm_campaign=docs_80_devs)

[API documentation](https://api.onlyoffice.com/?utm_source=blog&utm_medium=social&utm_campaign=docs_80_devs)

[Docs API changelog](https://api.onlyoffice.com/editors/changelog?utm_source=blog&utm_medium=social&utm_campaign=docs_80_devs)

[Plugins & macros changelog](https://api.onlyoffice.com/plugin/changelog?utm_source=blog&utm_medium=social&utm_campaign=docs_80_devs)

[DocBuilder changelog](https://api.onlyoffice.com/docbuilder/changelog?utm_source=blog&utm_medium=social&utm_campaign=docs_80_devs)
