From d11143aef19d7dbdf7dd52307452c655a4fc6f3d Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Fri, 13 Dec 2024 17:47:08 +0300 Subject: [PATCH] docs: fix key in referenceData --- packages/document-server-types/lib/types.d.ts | 11 +++--- site/config.yml | 4 -- .../Additional API/Signature/Browser/index.md | 12 +++--- .../Inserting external data/index.md | 7 ++-- .../More Information/Changelog/index.md | 2 +- .../Usage API/Advanced parameters/index.md | 1 - .../Usage API/Config/Document/index.md | 12 +----- .../Docs API/Usage API/Config/Events/index.md | 4 +- .../Docs/Docs API/Usage API/Methods/index.md | 38 ++++++++++--------- 9 files changed, 38 insertions(+), 53 deletions(-) diff --git a/packages/document-server-types/lib/types.d.ts b/packages/document-server-types/lib/types.d.ts index d9bbb49aa..b5a8db5b3 100644 --- a/packages/document-server-types/lib/types.d.ts +++ b/packages/document-server-types/lib/types.d.ts @@ -276,11 +276,11 @@ export interface DocEditorMailMergeRecipient { export interface DocEditorReferenceData { error?: string fileType?: string + key: string path: string referenceData?: { fileKey: string instanceId: string - key: string } token?: string url: string @@ -289,11 +289,11 @@ export interface DocEditorReferenceData { export interface DocEditorReferenceSource { error?: string fileType?: string + key: string path: string referenceData?: { fileKey: string instanceId: string - key: string } token?: string url: string @@ -430,7 +430,6 @@ export interface DocEditorConfigDocument { export interface DocEditorConfigDocumentReferenceData { fileKey: string instanceId: string - key: string } /** @@ -1245,11 +1244,11 @@ export interface DocEditorRequestInsertImageEvent { export interface DocEditorRequestOpenEvent { data: { + key: string path: string referenceData: { fileKey: string instanceId: string - key: string } windowName: string } @@ -1257,23 +1256,23 @@ export interface DocEditorRequestOpenEvent { export interface DocEditorRequestReferenceDataEvent { data: { + key: string link: string path: string referenceData: { fileKey: string instanceId: string - key: string } } } export interface DocEditorRequestReferenceSourceEvent { data: { + key: string path: string referenceData: { fileKey: string instanceId: string - key: string } } } diff --git a/site/config.yml b/site/config.yml index cc52b5539..676353e2f 100644 --- a/site/config.yml +++ b/site/config.yml @@ -51,10 +51,6 @@ playground: href: docs/docs-api/usage-api/config/document/referenceData/#instanceId type: string - - path: document.referenceData.key - href: docs/docs-api/usage-api/config/document/referenceData/#key - type: string - - path: document.title href: docs/docs-api/usage-api/config/document/#title type: string diff --git a/site/pages/Docs/Docs API/Additional API/Signature/Browser/index.md b/site/pages/Docs/Docs API/Additional API/Signature/Browser/index.md index b7a84b7d8..22b11563d 100644 --- a/site/pages/Docs/Docs API/Additional API/Signature/Browser/index.md +++ b/site/pages/Docs/Docs API/Additional API/Signature/Browser/index.md @@ -146,11 +146,11 @@ The `payload` for the JWT token in the JSON format must have the same structure ``` json { "fileType": "xlsx", + "key": "Khirz6zTPdfd7", "path": "sample.xlsx", "referenceData": { "fileKey": "BCFA2CED", - "instanceId": "https://example.com", - "key": "Khirz6zTPdfd7" + "instanceId": "https://example.com" }, "url": "https://example.com/url-to-example-document.xlsx" } @@ -162,7 +162,7 @@ Sample token: ``` json { - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmaWxlVHlwZSI6Inhsc3giLCJwYXRoIjoic2FtcGxlLnhsc3giLCJyZWZlcmVuY2VEYXRhIjp7ImZpbGVLZXkiOiJCQ0ZBMkNFRCIsImluc3RhbmNlSWQiOiJodHRwczovL2V4YW1wbGUuY29tIn0sInVybCI6Imh0dHBzOi8vZXhhbXBsZS5jb20vdXJsLXRvLWV4YW1wbGUtZG9jdW1lbnQueGxzeCJ9.UXosmM-E_Cu9j9QGSlcj9FEoSu5m-zCS4b6FxO_2k7w" + "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmaWxlVHlwZSI6Inhsc3giLCJrZXkiOiJLaGlyejZ6VFBkZmQ3IiwicGF0aCI6InNhbXBsZS54bHN4IiwicmVmZXJlbmNlRGF0YSI6eyJmaWxlS2V5IjoiQkNGQTJDRUQiLCJpbnN0YW5jZUlkIjoiaHR0cHM6Ly9leGFtcGxlLmNvbSJ9LCJ1cmwiOiJodHRwczovL2V4YW1wbGUuY29tL3VybC10by1leGFtcGxlLWRvY3VtZW50Lnhsc3gifQ.US2wsI__77B0ApzMOIUGIU49cUAORvdzGZ4V49BO4Dc" } ``` @@ -175,11 +175,11 @@ The `payload` for the JWT token in the JSON format must have the same structure ``` json { "fileType": "xlsx", + "key": "Khirz6zTPdfd7", "path": "sample.xlsx", "referenceData": { "fileKey": "BCFA2CED", - "instanceId": "https://example.com", - "key": "Khirz6zTPdfd7" + "instanceId": "https://example.com" }, "url": "https://example.com/url-to-example-document.xlsx" } @@ -191,7 +191,7 @@ Sample token: ``` json { - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmaWxlVHlwZSI6Inhsc3giLCJwYXRoIjoic2FtcGxlLnhsc3giLCJyZWZlcmVuY2VEYXRhIjp7ImZpbGVLZXkiOiJCQ0ZBMkNFRCIsImluc3RhbmNlSWQiOiJodHRwczovL2V4YW1wbGUuY29tIn0sInVybCI6Imh0dHBzOi8vZXhhbXBsZS5jb20vdXJsLXRvLWV4YW1wbGUtZG9jdW1lbnQueGxzeCJ9.UXosmM-E_Cu9j9QGSlcj9FEoSu5m-zCS4b6FxO_2k7w" + "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmaWxlVHlwZSI6Inhsc3giLCJrZXkiOiJLaGlyejZ6VFBkZmQ3IiwicGF0aCI6InNhbXBsZS54bHN4IiwicmVmZXJlbmNlRGF0YSI6eyJmaWxlS2V5IjoiQkNGQTJDRUQiLCJpbnN0YW5jZUlkIjoiaHR0cHM6Ly9leGFtcGxlLmNvbSJ9LCJ1cmwiOiJodHRwczovL2V4YW1wbGUuY29tL3VybC10by1leGFtcGxlLWRvY3VtZW50Lnhsc3gifQ.US2wsI__77B0ApzMOIUGIU49cUAORvdzGZ4V49BO4Dc" } ``` diff --git a/site/pages/Docs/Docs API/Get Started/How It Works/Inserting external data/index.md b/site/pages/Docs/Docs API/Get Started/How It Works/Inserting external data/index.md index 9b4d9caf1..d4c2af5ea 100644 --- a/site/pages/Docs/Docs API/Get Started/How It Works/Inserting external data/index.md +++ b/site/pages/Docs/Docs API/Get Started/How It Works/Inserting external data/index.md @@ -25,8 +25,7 @@ The steps below explain the process of inserting data into the spreadsheet by an document: { referenceData: { fileKey: "BCFA2CED", - instanceId: "https://example.com", - key: "Khirz6zTPdfd7", + instanceId: "https://example.com" }, }, }) @@ -91,11 +90,11 @@ The steps below explain the process of inserting data into the spreadsheet by an ``` ts docEditor.setReferenceData({ fileType: "xlsx", + key: "Khirz6zTPdfd7", path: "sample.xlsx", referenceData: { fileKey: "BCFA2CED", instanceId: "https://example.com", - key: "Khirz6zTPdfd7", }, token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmaWxlVHlwZSI6Inhsc3giLCJwYXRoIjoic2FtcGxlLnhsc3giLCJyZWZlcmVuY2VEYXRhIjp7ImZpbGVLZXkiOiJCQ0ZBMkNFRCIsImluc3RhbmNlSWQiOiJodHRwczovL2V4YW1wbGUuY29tIn0sInVybCI6Imh0dHBzOi8vZXhhbXBsZS5jb20vdXJsLXRvLWV4YW1wbGUtZG9jdW1lbnQueGxzeCJ9.UXosmM-E_Cu9j9QGSlcj9FEoSu5m-zCS4b6FxO_2k7w", url: "https://example.com/url-to-example-document.xlsx", @@ -155,11 +154,11 @@ The steps below explain the process of inserting data into the spreadsheet by an docEditor.setReferenceSource({ fileType: "xlsx", + key: "Khirz6zTPdfd7", path: "sample.xlsx", referenceData: { fileKey: "BCFA2CED", instanceId: "https://example.com", - key: "Khirz6zTPdfd7", }, token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmaWxlVHlwZSI6Inhsc3giLCJwYXRoIjoic2FtcGxlLnhsc3giLCJyZWZlcmVuY2VEYXRhIjp7ImZpbGVLZXkiOiJCQ0ZBMkNFRCIsImluc3RhbmNlSWQiOiJodHRwczovL2V4YW1wbGUuY29tIn0sInVybCI6Imh0dHBzOi8vZXhhbXBsZS5jb20vdXJsLXRvLWV4YW1wbGUtZG9jdW1lbnQueGxzeCJ9.UXosmM-E_Cu9j9QGSlcj9FEoSu5m-zCS4b6FxO_2k7w", url: "https://example.com/url-to-example-document.xlsx", diff --git a/site/pages/Docs/Docs API/More Information/Changelog/index.md b/site/pages/Docs/Docs API/More Information/Changelog/index.md index ae6446d5f..84ac00803 100644 --- a/site/pages/Docs/Docs API/More Information/Changelog/index.md +++ b/site/pages/Docs/Docs API/More Information/Changelog/index.md @@ -58,7 +58,7 @@ The list of changes of ONLYOFFICE Docs API. - Added the [setReferenceSource](../../Usage%20API/Methods/index.md#setreferencesource) method. - Added the [events.onRequestReferenceSource](../../Usage%20API/Config/Events/index.md#onrequestreferencesource) event. - Added the [-9 error code](../../Additional%20API/Conversion%20API/Error%20codes/index.md) to the Conversion API. -- Added the *key* field to the [document.referenceData](../../Usage%20API/Config/Document/index.md#referencedata) parameter. +- Added the *key* field to the [setReferenceData](../../Usage%20API/Methods/index.md#setreferencedata) method. - The [events.onRequestCompareFile](../../Usage%20API/Config/Events/index.md#onrequestcomparefile) event is deprecated, please use the [events.onRequestSelectDocument](../../Usage%20API/Config/Events/index.md#onrequestselectdocument) event instead. - The [setRevisedFile](../../Usage%20API/Methods/index.md#setrevisedfile) method is deprecated, please use the [setRequestedDocument](../../Usage%20API/Methods/index.md#setrequesteddocument) method instead. - Added the [events.onRequestOpen](../../Usage%20API/Config/Events/index.md#onrequestopen) event. diff --git a/site/pages/Docs/Docs API/Usage API/Advanced parameters/index.md b/site/pages/Docs/Docs API/Usage API/Advanced parameters/index.md index 2a9e7db72..386149151 100644 --- a/site/pages/Docs/Docs API/Usage API/Advanced parameters/index.md +++ b/site/pages/Docs/Docs API/Usage API/Advanced parameters/index.md @@ -68,7 +68,6 @@ const config = { referenceData: { fileKey: "BCFA2CED", instanceId: "https://example.com", - key: "Khirz6zTPdfd7", }, title: "Example Document Title.docx", url: "https://example.com/url-to-example-document.docx", diff --git a/site/pages/Docs/Docs API/Usage API/Config/Document/index.md b/site/pages/Docs/Docs API/Usage API/Config/Document/index.md index c19f2fe44..96d740635 100644 --- a/site/pages/Docs/Docs API/Usage API/Config/Document/index.md +++ b/site/pages/Docs/Docs API/Usage API/Config/Document/index.md @@ -35,8 +35,7 @@ Type: object ``` json { "fileKey": "BCFA2CED", - "instanceId": "https://example.com", - "key": "Khirz6zTPdfd7" + "instanceId": "https://example.com" } ``` @@ -56,14 +55,6 @@ Type: string Example: `https://example.com` -### referenceData.key - -Defines the unique document identifier used by the service to take the data from the co-editing session. In case the known key is sent, the document will be taken from the cache. Every time the document is edited and saved, the key must be generated anew. The document url can be used as the **key** but without the special characters and the length is limited to 128 symbols. - -Type: string - -Example: "Khirz6zTPdfd7" - ## title Defines the desired file name for the viewed or edited document which will also be used as file name when the document is downloaded. The length is limited to 128 symbols. @@ -94,7 +85,6 @@ const docEditor = new DocsAPI.DocEditor("placeholder", { referenceData: { fileKey: "BCFA2CED", instanceId: "https://example.com", - key: "Khirz6zTPdfd7", }, title: "Example Title", url: "https://example.com/url-to-example-document.xlsx", diff --git a/site/pages/Docs/Docs API/Usage API/Config/Events/index.md b/site/pages/Docs/Docs API/Usage API/Config/Events/index.md index 5f4753a43..6136d4f74 100644 --- a/site/pages/Docs/Docs API/Usage API/Config/Events/index.md +++ b/site/pages/Docs/Docs API/Usage API/Config/Events/index.md @@ -533,11 +533,11 @@ function onRequestReferenceData() { docEditor.setReferenceData({ fileType: "xlsx", + key: "Khirz6zTPdfd7", path: "sample.xlsx", referenceData: { fileKey: "BCFA2CED", instanceId: "https://example.com", - key: "Khirz6zTPdfd7", }, token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmaWxlVHlwZSI6Inhsc3giLCJwYXRoIjoic2FtcGxlLnhsc3giLCJyZWZlcmVuY2VEYXRhIjp7ImZpbGVLZXkiOiJCQ0ZBMkNFRCIsImluc3RhbmNlSWQiOiJodHRwczovL2V4YW1wbGUuY29tIn0sInVybCI6Imh0dHBzOi8vZXhhbXBsZS5jb20vdXJsLXRvLWV4YW1wbGUtZG9jdW1lbnQueGxzeCJ9.UXosmM-E_Cu9j9QGSlcj9FEoSu5m-zCS4b6FxO_2k7w", url: "https://example.com/url-to-example-document.xlsx", @@ -572,11 +572,11 @@ function onRequestReferenceSource() { docEditor.setReferenceSource({ fileType: "xlsx", + key: "Khirz6zTPdfd7", path: "sample.xlsx", referenceData: { fileKey: "BCFA2CED", instanceId: "https://example.com", - key: "Khirz6zTPdfd7", }, token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmaWxlVHlwZSI6Inhsc3giLCJwYXRoIjoic2FtcGxlLnhsc3giLCJyZWZlcmVuY2VEYXRhIjp7ImZpbGVLZXkiOiJCQ0ZBMkNFRCIsImluc3RhbmNlSWQiOiJodHRwczovL2V4YW1wbGUuY29tIn0sInVybCI6Imh0dHBzOi8vZXhhbXBsZS5jb20vdXJsLXRvLWV4YW1wbGUtZG9jdW1lbnQueGxzeCJ9.UXosmM-E_Cu9j9QGSlcj9FEoSu5m-zCS4b6FxO_2k7w", url: "https://example.com/url-to-example-document.xlsx", diff --git a/site/pages/Docs/Docs API/Usage API/Methods/index.md b/site/pages/Docs/Docs API/Usage API/Methods/index.md index bb6ade5df..ded3e67bc 100644 --- a/site/pages/Docs/Docs API/Usage API/Methods/index.md +++ b/site/pages/Docs/Docs API/Usage API/Methods/index.md @@ -326,11 +326,11 @@ Refresh data by a link to a file which is specified with the *referenceData*, *p ``` ts docEditor.setReferenceData({ fileType: "xlsx", + key: "Khirz6zTPdfd7", path: "sample.xlsx", referenceData: { fileKey: "BCFA2CED", instanceId: "https://example.com", - key: "Khirz6zTPdfd7", }, token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmaWxlVHlwZSI6Inhsc3giLCJwYXRoIjoic2FtcGxlLnhsc3giLCJyZWZlcmVuY2VEYXRhIjp7ImZpbGVLZXkiOiJCQ0ZBMkNFRCIsImluc3RhbmNlSWQiOiJodHRwczovL2V4YW1wbGUuY29tIn0sInVybCI6Imh0dHBzOi8vZXhhbXBsZS5jb20vdXJsLXRvLWV4YW1wbGUtZG9jdW1lbnQueGxzeCJ9.UXosmM-E_Cu9j9QGSlcj9FEoSu5m-zCS4b6FxO_2k7w", url: "https://example.com/url-to-example-document.xlsx", @@ -347,14 +347,15 @@ Show an error message explaining if any error occurred: }) ``` -| Parameter | Type | Presence | Description | -| ------------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| error | string | optional | Defines the error message text. | -| fileType | string | optional | Defines an extension of the document specified with the *url* parameter. | -| path | string | required | Defines the file name or relative path for the formula editor. It is used to identify a file when the [onRequestReferenceData](../Config/Events/index.md#onrequestreferencedata) event is executed. | -| referenceData | object | optional | Defines an object that is generated by the integrator to uniquely identify a file in its system. This data must be the same as in the [document.referenceData](../Config/Document/index.md#referencedata) config parameter:

**fileKey** - the unique document identifier used by the service to get a link to the file. It must not be changed when the document is edited and saved (i.e. it is not equal to the [document.key](../Config/Document/index.md#key) parameter),
**type**: string,
**example**: "BCFA2CED";

**instanceId** - the unique system identifier. If the data was copied from a file on one system, and inserted into a file on another, then pasting by link will not be available and there will be no corresponding button in the context menu,
**type**: string,
**example**: `https://example.com`;

**key** - defines the unique document identifier used by the service to take the data from the co-editing session. In case the known key is sent, the document will be taken from the cache. Every time the document is edited and saved, the key must be generated anew. The document url can be used as the **key** but without the special characters and the length is limited to 128 symbol,
**type**: string,
**example**: "Khirz6zTPdfd7". | -| token | string | optional | Defines the encrypted signature added to the parameter in the form of a [token](../../Additional%20API/Signature/Browser/index.md#setreferencedata). | -| url | string | required | Defines the URL address to download the current file. | +| Parameter | Type | Presence | Description | +| ------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| error | string | optional | Defines the error message text. | +| fileType | string | optional | Defines an extension of the document specified with the *url* parameter. | +| key | string | optional | Defines the unique document identifier used by the service to take the data from the co-editing session. In case the known key is sent, the document will be taken from the cache. Every time the document is edited and saved, the key must be generated anew. The document url can be used as the **key** but without the special characters and the length is limited to 128 symbol. | +| path | string | required | Defines the file name or relative path for the formula editor. It is used to identify a file when the [onRequestReferenceData](../Config/Events/index.md#onrequestreferencedata) event is executed. | +| referenceData | object | optional | Defines an object that is generated by the integrator to uniquely identify a file in its system. This data must be the same as in the [document.referenceData](../Config/Document/index.md#referencedata) config parameter:

**fileKey** - the unique document identifier used by the service to get a link to the file. It must not be changed when the document is edited and saved (i.e. it is not equal to the [document.key](../Config/Document/index.md#key) parameter),
**type**: string,
**example**: "BCFA2CED";

**instanceId** - the unique system identifier. If the data was copied from a file on one system, and inserted into a file on another, then pasting by link will not be available and there will be no corresponding button in the context menu,
**type**: string,
**example**: `https://example.com`. | +| token | string | optional | Defines the encrypted signature added to the parameter in the form of a [token](../../Additional%20API/Signature/Browser/index.md#setreferencedata). | +| url | string | required | Defines the URL address to download the current file. | ## setReferenceSource @@ -365,11 +366,11 @@ Change a source of the external data. This method can be called after the [onReq ``` ts docEditor.setReferenceSource({ fileType: "xlsx", + key: "Khirz6zTPdfd7", path: "sample.xlsx", referenceData: { fileKey: "BCFA2CED", instanceId: "https://example.com", - key: "Khirz6zTPdfd7", }, token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmaWxlVHlwZSI6Inhsc3giLCJwYXRoIjoic2FtcGxlLnhsc3giLCJyZWZlcmVuY2VEYXRhIjp7ImZpbGVLZXkiOiJCQ0ZBMkNFRCIsImluc3RhbmNlSWQiOiJodHRwczovL2V4YW1wbGUuY29tIn0sInVybCI6Imh0dHBzOi8vZXhhbXBsZS5jb20vdXJsLXRvLWV4YW1wbGUtZG9jdW1lbnQueGxzeCJ9.UXosmM-E_Cu9j9QGSlcj9FEoSu5m-zCS4b6FxO_2k7w", url: "https://example.com/url-to-example-document.xlsx", @@ -386,14 +387,15 @@ Show an error message explaining if any error occurred: }) ``` -| Parameter | Type | Presence | Description | -| ------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| error | string | optional | Defines the error message text. | -| fileType | string | optional | Defines an extension of the document specified with the *url* parameter. | -| path | string | required | Defines the file name or relative path for the formula editor. It is used to identify a file when the [onRequestReferenceSource](../Config/Events/index.md#onrequestreferencesource) event is executed. | -| referenceData | object | optional | Defines an object that is generated by the integrator to uniquely identify a file in its system. This data must be the same as in the [document.referenceData](../Config/Document/index.md#referencedata) config parameter:

**fileKey** - the unique document identifier used by the service to get a link to the file. It must not be changed when the document is edited and saved (i.e. it is not equal to the [document.key](../Config/Document/index.md#key) parameter),
**type**: string,
**example**: "BCFA2CED";

**instanceId** - the unique system identifier. If the data was copied from a file on one system, and inserted into a file on another, then pasting by link will not be available and there will be no corresponding button in the context menu,
**type**: string,
**example**: `https://example.com`;

**key** - defines the unique document identifier used by the service to take the data from the co-editing session. In case the known key is sent, the document will be taken from the cache. Every time the document is edited and saved, the key must be generated anew. The document url can be used as the **key** but without the special characters and the length is limited to 128 symbols,
**type**: string,
**example**: "Khirz6zTPdfd7". | -| token | string | optional | Defines the encrypted signature added to the parameter in the form of a [token](../../Additional%20API/Signature/Browser/index.md#setreferencesource). | -| url | string | required | Defines the URL address to download the current file. | +| Parameter | Type | Presence | Description | +| ------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| error | string | optional | Defines the error message text. | +| fileType | string | optional | Defines an extension of the document specified with the *url* parameter. | +| key | string | optional | Defines the unique document identifier used by the service to take the data from the co-editing session. In case the known key is sent, the document will be taken from the cache. Every time the document is edited and saved, the key must be generated anew. The document url can be used as the **key** but without the special characters and the length is limited to 128 symbol. | +| path | string | required | Defines the file name or relative path for the formula editor. It is used to identify a file when the [onRequestReferenceSource](../Config/Events/index.md#onrequestreferencesource) event is executed. | +| referenceData | object | optional | Defines an object that is generated by the integrator to uniquely identify a file in its system. This data must be the same as in the [document.referenceData](../Config/Document/index.md#referencedata) config parameter:

**fileKey** - the unique document identifier used by the service to get a link to the file. It must not be changed when the document is edited and saved (i.e. it is not equal to the [document.key](../Config/Document/index.md#key) parameter),
**type**: string,
**example**: "BCFA2CED";

**instanceId** - the unique system identifier. If the data was copied from a file on one system, and inserted into a file on another, then pasting by link will not be available and there will be no corresponding button in the context menu,
**type**: string,
**example**: `https://example.com`. | +| token | string | optional | Defines the encrypted signature added to the parameter in the form of a [token](../../Additional%20API/Signature/Browser/index.md#setreferencesource). | +| url | string | required | Defines the URL address to download the current file. | ## setRequestedDocument