From 8d26ebc7e9c2797353faa45f1645d033fe35128b Mon Sep 17 00:00:00 2001 From: Natalia Date: Fri, 19 Jul 2024 12:07:32 +0300 Subject: [PATCH] Docs api: fixes for REST API methods pages --- .../WOPI REST API/CheckFileInfo/index.md | 432 ++++++++++++++---- .../Using WOPI/WOPI REST API/GetFile/index.md | 12 +- .../Using WOPI/WOPI REST API/Lock/index.md | 8 +- .../Using WOPI/WOPI REST API/PutFile/index.md | 14 +- .../WOPI REST API/PutRelativeFile/index.md | 22 +- .../WOPI REST API/RefreshLock/index.md | 10 +- .../WOPI REST API/RenameFile/index.md | 10 +- .../Using WOPI/WOPI REST API/Unlock/index.md | 8 +- 8 files changed, 390 insertions(+), 126 deletions(-) diff --git a/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/CheckFileInfo/index.md b/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/CheckFileInfo/index.md index cddc41001..d642f0006 100644 --- a/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/CheckFileInfo/index.md +++ b/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/CheckFileInfo/index.md @@ -2,102 +2,366 @@ Returns information about the file properties, access rights and editor settings. -Parameters +### Parameters | Name | Description | Type | | -------- | ---------------------------------- | ------ | | file\_id | The file ID that must be URL safe. | string | -Query parameters +### Query parameters | Name | Description | Type | | ------------- | -------------------------------------------------------------------------------------- | ------ | | access\_token | An access token that the host will use to determine whether the request is authorized. | string | -Request headers +### Request headers | Name | Description | Type | Presence | | --------------------- | ----------------------------------------------------------------- | ------ | -------- | | X-WOPI-SessionContext | Session context if it is provided on the initial WOPI action URL. | string | optional | -Required response properties - -| Name | Description | Type | Example | -| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------------------------ | -| BaseFileName | A file name without a path that is displayed in the user interface (UI) and determines the file extension. | string | "Example File Name.docx" | -| Version | The current version of the file based on the server file version schema. Every time the document is edited and saved, the version must be changed. The version values must never repeat for a given file. | string | "Khirz6zTPdfd7" | - -Breadcrumb properties - -| Name | Description | Type | Example | -| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------- | -| BreadcrumbBrandName | A name that the WOPI client displays to the user to indicate the brand name of the WOPI server. | string | "Example Brand Name" | -| BreadcrumbBrandUrl | URL to a web page that the WOPI client navigates to when the user clicks the UI displaying [BreadcrumbBrandName](#BreadcrumbBrandName). | string | "https\://example.com/url-to-breadcrumb-brand-page.com" | -| BreadcrumbDocName | A file name that the WOPI client displays to the user. If this parameter is not specified, then the [BaseFileName](#BaseFileName) parameter is used. | string | "Example Breadcrumb File Name.docx" | -| BreadcrumbFolderName | A name that the WOPI client displays to the user that indicates the name of the folder that contains the file. | string | "Example Folder Name" | -| BreadcrumbFolderUrl | URL to a web page that the WOPI client navigates to when the user clicks the UI displaying [BreadcrumbFolderName](#BreadcrumbFolderName). | string | "https\://example.com/url-to-breadcrumb-brand-folder" | - -PostMessage properties - -| Name | Description | Type | Example | -| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- | ---------------------------- | -| ClosePostMessage | Specifies if the WOPI client should notify the WOPI server in case the user closes the rendering or editing client currently using this file. The host expects to receive the [UI\_Close](/editors/wopi/postmessage#UI_Close) PostMessage when the *Close* UI in the online office is activated. | boolean | true | -| EditModePostMessage | Specifies if the WOPI client should notify the WOPI server in case the user tries to edit a file. The host expects to receive the [UI\_Edit](/editors/wopi/postmessage#UI_Edit) PostMessage when the *Edit* UI in the online office is activated. | boolean | true | -| EditNotificationPostMessage | Specifies if the WOPI client should notify the WOPI server in case the user tries to edit a file. The host expects to receive the [Edit\_Notification](/editors/wopi/postmessage#Edit_Notification) PostMessage. | boolean | true | -| FileSharingPostMessage | Specifies if the WOPI client should notify the WOPI server in case the user tries to share a file. The host expects to receive the [UI\_Sharing](/editors/wopi/postmessage#UI_Sharing) PostMessage when the *Share* UI in the online office is activated. | boolean | true | -| FileVersionPostMessage | Specifies if the WOPI client will notify the WOPI server in case the user tries to navigate to the previous file version. The host expects to receive the [UI\_FileVersions](/editors/wopi/postmessage#UI_FileVersions) PostMessage when the *Previous Versions* UI in the online office is activated. | boolean | true | -| PostMessageOrigin | A domain that the WOPI client must use as the [targetOrigin](/editors/wopi/postmessage#targetOrigin) parameter when sending messages as described in [\[W3C-HTML5WEBMSG\]](https://html.spec.whatwg.org/multipage/web-messaging.html#posting-messages). | string | "https\://exampledomain.com" | - -File URL properties - -| Name | Description | Type | Example | -| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------- | -| CloseUrl | URL to a web page that the implementer deems useful to the user in case the user closes the rendering or editing client currently using this file. | string | "https\://example.com/url-to-close-page.com" | -| FileSharingUrl | URL to the location that allows the user to share a file. | string | "https\://example.com/url-to-sharing-page.com" | -| FileVersionUrl | URL to the location that allows the user to view the previous file version. | string | "https\://example.com/url-to-previous-version-page.com" | -| HostEditUrl | URL to a web page where a file can be edited using the WOPI client. | string | "https\://example.com/url-to-host-page.com" | - -Other miscellaneous properties - -| Name | Description | Type | Example | -| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------------------------------ | -| CopyPasteRestrictions | Specifies if the WOPI client must disable the **Copy and Paste** functionality within the application. By default, all **Copy and Paste** functionality is enabled, i.e. the setting has no effect. Possible property values:- **BlockAll** - the **Copy and Paste** functionality is completely disabled within the application; -- **CurrentDocumentOnly** - the **Copy and Paste** functionality is enabled but content can only be copied and pasted within the file currently open in the application. | string | "BlockAll" | -| DisablePrint | Specifies if the WOPI client must disable any print functionality under its control. | boolean | true | -| FileExtension | A file extension which must begin with a ".". | string | ".docx" | -| FileNameMaxLength | The maximum length of a file name, including the file extension, supported by the WOPI server. | integer | 20 | -| LastModifiedTime | The last time when the file was modified. This time must always be a UTC time, and must be formatted in ISO 8601 round-trip format. This property can be specified as an alternative to the [Version](#Version) property. | string | "2009-06-15T13:45:30.0000000Z" | - -User metadata properties - -| Name | Description | Type | Example | -| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------------ | -| IsAnonymousUser | Specifies if the user is anonymous. | boolean | true | -| UserFriendlyName | A user name. If it is undefined, the WOPI client may be configured to use a placeholder string in some scenarios, or to show no name at all. | string | "John Smith" | -| UserId | A unique user identifier that is specified by the WOPI server. | string | "uid-1" | - -User permissions properties - -| Name | Description | Type | Example | -| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------- | -| ReadOnly | Specifies if a file cannot be changed by the current user. | boolean | true | -| UserCanNotWriteRelative | Specifies if the user has permissions to create new files on the WOPI server or not. The **true** value means that the [PutRelativeFile](/editors/wopi/restapi/putrelativefile) execution will fail for this user on the current file. By default, this parameter is **false** and the *PutRelativeFile* operation is executed. | boolean | false | -| UserCanRename | Specifies if the user has permissions to rename a file. | boolean | true | -| UserCanReview | Specifies if the user has permissions to review a file. | boolean | true | -| UserCanWrite | Specifies if the user has permissions to edit a file. | boolean | true | - -WOPI host capabilities properties - -| Name | Description | Type | Example | -| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------- | -| SupportsLocks | Specifies if the WOPI server supports the [Lock](/editors/wopi/restapi/lock), [Unlock](/editors/wopi/restapi/unlock), and [RefreshLock](/editors/wopi/restapi/refreshlock) operations. | boolean | true | -| SupportsRename | Specifies if the WOPI server supports the renaming permission. | boolean | true | -| SupportsReviewing | Specifies if the WOPI server supports the review permission. | boolean | true | -| SupportsUpdate | Specifies if the WOPI server supports the [PutFile](/editors/wopi/restapi/putfile) and [PutRelativeFile](/editors/wopi/restapi/putrelativefile) operations. | boolean | true | - -Nextcloud/Collabora/Seafile properties - -| Name | Description | Type | Example | -| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------- | -| EnableInsertRemoteImage | Specifies whether to enable the menu entry and toolbar item which call the [UI\_InsertGraphic](/editors/wopi/postmessage#UI_InsertGraphic) message. This property is used to display a user interface element (for example, a dialog) allowing the user to pick an image from the integration. The integration is supposed to provide a temporary URL that may be downloaded once, and return it back via the [Action\_InsertGraphic](/editors/wopi/postmessage#Action_InsertGraphic) message with *Values* set to the temporary URL. | boolean | true | -| HidePrintOption | Specifies if the WOPI server hides the print option from the file menu bar in the UI. | boolean | false | + +# Required response properties + +## BaseFileName + +A file name without a path that is displayed in the user interface (UI) and determines the file extension. + +**Type**: string + +**Example**: "Example File Name.docx" + + +## Version + +The current version of the file based on the server file version schema. Every time the document is edited and saved, the version must be changed. The version values must never repeat for a given file. + +**Type**: string + +**Example**: "Khirz6zTPdfd7" + + +# Breadcrumb properties + +## BreadcrumbBrandName + +A name that the WOPI client displays to the user to indicate the brand name of the WOPI server. + +**Type**: string + +**Example**: "Example Brand Name" + + +## BreadcrumbBrandUrl + +URL to a web page that the WOPI client navigates to when the user clicks the UI displaying [BreadcrumbBrandName](#breadcrumbbrandname). + +**Type**: string + +**Example**: `https://example.com/url-to-breadcrumb-brand-page.com` + + +## BreadcrumbDocName + +A file name that the WOPI client displays to the user. If this parameter is not specified, then the [BaseFileName](#basefilename) parameter is used. + +**Type**: string + +**Example**: "Example Breadcrumb File Name.docx" + + +## BreadcrumbFolderName + +A name that the WOPI client displays to the user that indicates the name of the folder that contains the file. + +**Type**: string + +**Example**: "Example Folder Name" + + +## BreadcrumbFolderUrl + +URL to a web page that the WOPI client navigates to when the user clicks the UI displaying [BreadcrumbFolderName](#breadcrumbfoldername). + +**Type**: string + +**Example**: `https://example.com/url-to-breadcrumb-brand-folder` + + +# PostMessage properties + +## ClosePostMessage + +Specifies if the WOPI client should notify the WOPI server in case the user closes the rendering or editing client currently using this file. The host expects to receive the [UI\_Close](../../PostMessage/index.md#ui_close) PostMessage when the *Close* UI in the online office is activated. + +**Type**: boolean + +**Example**: true + + +## EditModePostMessage + +Specifies if the WOPI client should notify the WOPI server in case the user tries to edit a file. The host expects to receive the [UI\_Edit](../../PostMessage/index.md#ui_edit) PostMessage when the *Edit* UI in the online office is activated. + +**Type**: boolean + +**Example**: true + + +## EditNotificationPostMessage + +Specifies if the WOPI client should notify the WOPI server in case the user tries to edit a file. The host expects to receive the [Edit\_Notification](../../PostMessage/index.md#edit_notification) PostMessage. + +**Type**: boolean + +**Example**: true + + +## FileSharingPostMessage + +Specifies if the WOPI client should notify the WOPI server in case the user tries to share a file. The host expects to receive the [UI\_Sharing](../../PostMessage/index.md#ui_sharing) PostMessage when the *Share* UI in the online office is activated. + +**Type**: boolean + +**Example**: true + + +## FileVersionPostMessage + +Specifies if the WOPI client will notify the WOPI server in case the user tries to navigate to the previous file version. The host expects to receive the [UI\_FileVersions](../../PostMessage/index.md#ui_fileversions) PostMessage when the *Previous Versions* UI in the online office is activated. + +**Type**: boolean + +**Example**: true + + +## PostMessageOrigin + +A domain that the WOPI client must use as the [targetOrigin](../../PostMessage/index.md#parameters) parameter when sending messages as described in [\[W3C-HTML5WEBMSG\]](https://html.spec.whatwg.org/multipage/web-messaging.html#posting-messages). + +**Type**: string + +**Example**: `https://exampledomain.com` + + +# File URL properties + +## CloseUrl + +URL to a web page that the implementer deems useful to the user in case the user closes the rendering or editing client currently using this file. + +**Type**: string + +**Example**: `https://example.com/url-to-close-page.com` + + +## FileSharingUrl + +URL to the location that allows the user to share a file. + +**Type**: string + +**Example**: `https://example.com/url-to-sharing-page.com` + + +## FileVersionUrl + +URL to the location that allows the user to view the previous file version. + +**Type**: string + +**Example**: `https://example.com/url-to-previous-version-page.com` + + +## HostEditUrl + +URL to a web page where a file can be edited using the WOPI client. + +**Type**: string + +**Example**: `https://example.com/url-to-host-page.com` + + +# Other miscellaneous properties + + +## CopyPasteRestrictions + +Specifies if the WOPI client must disable the **Copy and Paste** functionality within the application. By default, all **Copy and Paste** functionality is enabled, i.e. the setting has no effect. Possible property values: + +* **BlockAll** - the **Copy and Paste** functionality is completely disabled within the application; +* **CurrentDocumentOnly** - the **Copy and Paste** functionality is enabled but content can only be copied and pasted within the file currently open in the application. + +**Type**: string + +**Example**: "BlockAll" + + +## DisablePrint + +Specifies if the WOPI client must disable any print functionality under its control. + +**Type**: boolean + +**Example**: true + + +## FileExtension + +A file extension which must begin with a ".". + +**Type**: string + +**Example**: ".docx" + + +## FileNameMaxLength + +The maximum length of a file name, including the file extension, supported by the WOPI server. + +**Type**: integer + +**Example**: 20 + + +## LastModifiedTime + +The last time when the file was modified. This time must always be a UTC time, and must be formatted in ISO 8601 round-trip format. This property can be specified as an alternative to the [Version](#version) property. + +**Type**: string + +**Example**: "2009-06-15T13:45:30.0000000Z" + + +# User metadata properties + +## IsAnonymousUser + +Specifies if the user is anonymous. + +**Type**: boolean + +**Example**: true + + +## UserFriendlyName + +A user name. If it is undefined, the WOPI client may be configured to use a placeholder string in some scenarios, or to show no name at all. + +**Type**: string + +**Example**: "John Smith" + + +## UserId + +A unique user identifier that is specified by the WOPI server. + +**Type**: string + +**Example**: "uid-1" + + +# User permissions properties + +## ReadOnly + +Specifies if a file cannot be changed by the current user. + +**Type**: boolean + +**Example**: true + + +## UserCanNotWriteRelative + +Specifies if the user has permissions to create new files on the WOPI server or not. The **true** value means that the [PutRelativeFile](../PutRelativeFile/index.md) execution will fail for this user on the current file. By default, this parameter is **false** and the *PutRelativeFile* operation is executed. + +**Type**: boolean + +**Example**: false + + +## UserCanRename + +Specifies if the user has permissions to rename a file. + +**Type**: boolean + +**Example**: true + + +## UserCanReview + +Specifies if the user has permissions to review a file. + +**Type**: boolean + +**Example**: true + + +## UserCanWrite + +Specifies if the user has permissions to edit a file. + +**Type**: boolean + +**Example**: true + + +# WOPI host capabilities properties + +## SupportsLocks + +Specifies if the WOPI server supports the [Lock](../Lock/index.md), [Unlock](/editors/wopi/restapi/unlock), and [RefreshLock](../RefreshLock/index.md) operations. + +**Type**: boolean + +**Example**: true + + +## SupportsRename + +Specifies if the WOPI server supports the renaming permission. + +**Type**: boolean + +**Example**: true + + +## SupportsReviewing + +Specifies if the WOPI server supports the review permission. + +**Type**: boolean + +**Example**: true + + +## SupportsUpdate + +Specifies if the WOPI server supports the [PutFile](../PutFile/index.md) and [PutRelativeFile](../PutRelativeFile/index.md) operations. + +**Type**: boolean + +**Example**: true + + +# Nextcloud/Collabora/Seafile properties + +## EnableInsertRemoteImage + +Specifies whether to enable the menu entry and toolbar item which call the [UI\_InsertGraphic](../../PostMessage/index.md#ui_insertgraphic) message. This property is used to display a user interface element (for example, a dialog) allowing the user to pick an image from the integration. The integration is supposed to provide a temporary URL that may be downloaded once, and return it back via the [Action\_InsertGraphic](../../PostMessage/index.md#action_insertgraphic) message with *Values* set to the temporary URL. + +**Type**: boolean + +**Example**: true + + +## HidePrintOption + +Specifies if the WOPI server hides the print option from the file menu bar in the UI. + +**Type**: boolean + +**Example**: false diff --git a/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/GetFile/index.md b/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/GetFile/index.md index f6ca1e846..990f821fe 100644 --- a/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/GetFile/index.md +++ b/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/GetFile/index.md @@ -1,33 +1,33 @@ **GET /wopi/files/*(file\_id)*/contents** -Requests a message to retrieve a file for the *HTTP://server/<...>/wopi\*/files/\/contents* operation. +Requests a message to retrieve a file for the `HTTP://server/<...>/wopi*/files//contents` operation. The response body must contain the full file contents in the binary format. -Parameters +### Parameters | Name | Description | Type | | -------- | ---------------------------------- | ------ | | file\_id | The file ID that must be URL safe. | string | -Query parameters +### Query parameters | Name | Description | Type | | ------------- | -------------------------------------------------------------------------------------- | ------ | | access\_token | An access token that the host will use to determine whether the request is authorized. | string | -Request headers +### Request headers | Name | Description | Type | Presence | | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- | -------- | | X-WOPI-MaxExpectedSize | The maximum expected size of the file being requested. The host should use the maximum value of a 4-byte integer if this value is not set in the request. If the file requested is larger than this value, the host must respond with **412 Precondition Failed**. | integer | optional | -Response headers +### Response headers | Name | Description | Type | Presence | | ------------------ | ----------------- | ------ | -------- | | X-WOPI-ItemVersion | The file version. | string | optional | -Response body +### Response body The response body must be the full binary contents of the file. diff --git a/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/Lock/index.md b/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/Lock/index.md index 22e613f98..c5a7318ac 100644 --- a/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/Lock/index.md +++ b/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/Lock/index.md @@ -10,26 +10,26 @@ This operation works as follows: 4. In all other cases, the host must return **409 Conflict** (*"lock mismatch"*) and include the **X-WOPI-Lock** response header containing the value of the current lock on the file. 5. In the case where the file is locked by a third-party client, hosts should still always include the current lock ID in the **X-WOPI-Lock** response header. -Parameters +### Parameters | Name | Description | Type | | -------- | ---------------------------------- | ------ | | file\_id | The file ID that must be URL safe. | string | -Query parameters +### Query parameters | Name | Description | Type | | ------------- | -------------------------------------------------------------------------------------- | ------ | | access\_token | An access token that the host will use to determine whether the request is authorized. | string | -Request headers +### Request headers | Name | Description | Type | Presence | | --------------- | -------------------------------------------------------------------- | ------ | -------- | | X-WOPI-Override | The requested operation from the WOPI server (*LOCK*). | string | required | | X-WOPI-Lock | The lock ID that the host must use to identify the lock on the file. | string | required | -Response headers +### Response headers | Name | Description | Type | Presence | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- | diff --git a/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/PutFile/index.md b/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/PutFile/index.md index dc611034a..737703646 100644 --- a/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/PutFile/index.md +++ b/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/PutFile/index.md @@ -1,6 +1,6 @@ **POST /wopi/files/*(file\_id)*/contents** -Requests a message to update a file for the *HTTP://server/<...>/wopi\*/files/\/contents* operation. +Requests a message to update a file for the `HTTP://server/<...>/wopi*/files//contents` operation. The request body must contain the full file contents in the binary format. @@ -11,34 +11,34 @@ This operation works as follows: 3. If the file is **unlocked**, the host must check the current size of the file. If it is 0 bytes, the **PutFile** request should be considered valid and should proceed. If it is any value other than 0 bytes, or is missing altogether, the host should respond with **409 Conflict**. 4. In the case where the file is locked by a third-party client, hosts should still always include the current lock ID in the **X-WOPI-Lock** response header. -Parameters +### Parameters | Name | Description | Type | | -------- | ---------------------------------- | ------ | | file\_id | The file ID that must be URL safe. | string | -Query parameters +### Query parameters | Name | Description | Type | | ------------- | -------------------------------------------------------------------------------------- | ------ | | access\_token | An access token that the host will use to determine whether the request is authorized. | string | -Request headers +### Request headers | Name | Description | Type | Presence | | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- | | X-WOPI-Override | The requested operation from the WOPI server (*PUT*). | string | required | | X-WOPI-Lock | The lock ID that the host must use to identify the lock on the file. | string | optional | -| X-WOPI-Editors | All the users who contributed changes to the document in this **PutFile** request ([UserId](/editors/wopi/restapi/checkfileinfo#UserId) values delimited by commas). | string | optional | +| X-WOPI-Editors | All the users who contributed changes to the document in this **PutFile** request ([UserId](../CheckFileInfo/index.md#userid) values delimited by commas). | string | optional | | X-LOOL-WOPI-IsModifiedByUser | Indicates whether the user has modified the document before the save (**"true"**), or if they just pressed the **Save** button without any modification (**"false"**). | string | optional | | X-LOOL-WOPI-IsAutosave | Indicates whether the **PutFile** is triggered by autosave (**"true"**) or by explicit user operation (**Save** button or menu entry) (**"false"**). | string | optional | | X-LOOL-WOPI-IsExitSave | Indicates whether an automatic save will be triggered when the document gets cleaned up from memory (e.g. when all users disconnect) (**"true"**) or not (**"false"**). | string | optional | -Request body +### Request body The request body must be the full binary contents of the file. -Response headers +### Response headers | Name | Description | Type | Presence | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- | diff --git a/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/PutRelativeFile/index.md b/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/PutRelativeFile/index.md index 2231b5743..415b7ab99 100644 --- a/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/PutRelativeFile/index.md +++ b/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/PutRelativeFile/index.md @@ -15,51 +15,51 @@ This operation works as follows: 4. Finally, the host creates a new file that has a legal name and does not overwrite any existing files, while preserving the file extension. -Parameters +### Parameters | Name | Description | Type | | -------- | ---------------------------------- | ------ | | file\_id | The file ID that must be URL safe. | string | -Query parameters +### Query parameters | Name | Description | Type | | ------------- | -------------------------------------------------------------------------------------- | ------ | | access\_token | An access token that the host will use to determine whether the request is authorized. | string | -Request headers +### Request headers | Name | Description | Type | Presence | | ---------------------- | --------------------------------------------------------------------------------------------------------------------- | ------- | -------- | | X-WOPI-Override | The requested operation from the WOPI server (*PUT\_RELATIVE*). | string | required | | X-WOPI-SuggestedTarget | A file extension or a full file name, including the file extension in the format of the UTF-7 encoded string. | string | required | | X-WOPI-Size | The size of the file in bytes. | integer | optional | -| X-WOPI-FileConversion | Indicates that the request is being made in the context of [binary document conversion](/editors/wopi/editingbinary). | boolean | optional | +| X-WOPI-FileConversion | Indicates that the request is being made in the context of [binary document conversion](../../Editing%20binary%20documents/index.md). | boolean | optional | -Request body +### Request body The request body must contain the full file contents in the binary format. -Response headers +### Response headers | Name | Description | Type | Presence | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- | | X-WOPI-Lock | The lock ID identifying the current lock on the file. This header must always be included when responding to the request with **409 Conflict**. It should not be included when responding to the request with **200 OK**. | string | optional | | X-WOPI-LockFailureReason | The cause of the lock failure. This header may be included when responding to the request with **409 Conflict**. It must only be used for logging purposes. | string | optional | -Response body +### Response body | Name | Description | Type | Presence | | ----------- | --------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- | | Name | The file name, including extension, without a path. | string | required | | Url | URI of the form *http\://server/<...>/wopi/files/(file\_id)?access\_token=(access token)*, of the newly created file on the host. | string | required | -| HostViewUrl | URI to a host page that loads the [view](/editors/wopi/discovery#view) WOPI action for the newly created file. | string | optional | -| HostEditUrl | URI to a host page that loads [edit](/editors/wopi/discovery#edit) action for the newly created file. | string | optional | +| HostViewUrl | URI to a host page that loads the [view](../../WOPI%20discovery/index.md#wopi-actions) WOPI action for the newly created file. | string | optional | +| HostEditUrl | URI to a host page that loads [edit](../../WOPI%20discovery/index.md#wopi-actions) action for the newly created file. | string | optional | ## Save Copy As -Starting from version 8.1, the *Save Copy As* functionality is added to the WOPI protocol through the *PutRelativeFile* operation. In the ONLYOFFICE Docs API, this action is implemented as the [onRequestSaveAs](/editors/config/events#onRequestSaveAs) event. +Starting from version 8.1, the *Save Copy As* functionality is added to the WOPI protocol through the *PutRelativeFile* operation. In the ONLYOFFICE Docs API, this action is implemented as the [onRequestSaveAs](../../../Usage%20API/Config/Events/index.md#onrequestsaveas) event. When the *PutRelativeFile* operation is executed to save a copy of the current file, the *X-WOPI-FileConversion* header is not sent in the request. -To restrict the *Save Copy As* functionality, set the [UserCanNotWriteRelative](/editors/wopi/restapi/checkfileinfo#UserCanNotWriteRelative) property in *CheckFileInfo* to *true*. +To restrict the *Save Copy As* functionality, set the [UserCanNotWriteRelative](../CheckFileInfo/index.md#usercannotwriterelative) property in *CheckFileInfo* to *true*. diff --git a/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/RefreshLock/index.md b/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/RefreshLock/index.md index 9c9900979..bb010b81f 100644 --- a/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/RefreshLock/index.md +++ b/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/RefreshLock/index.md @@ -1,6 +1,6 @@ **POST /wopi/files/*(file\_id)*** -Refreshes the lock on a file by resetting its automatic expiration timer to 30 minutes. This lock will expire automatically after 30 minutes unless it is changed by the [Unlock](/editors/wopi/restapi/unlock) or another *RefreshLock* operations. +Refreshes the lock on a file by resetting its automatic expiration timer to 30 minutes. This lock will expire automatically after 30 minutes unless it is changed by the [Unlock](../Unlock/index.md) or another *RefreshLock* operations. This operation works as follows: @@ -8,26 +8,26 @@ This operation works as follows: 2. If the file is **unlocked**, or if the file is currently **locked** and the **X-WOPI-Lock** value does not match the lock currently on the file, the host must return **409 Conflict** (*"lock mismatch"*) and include the **X-WOPI-Lock** response header containing the value of the current lock on the file. In the case where the file is unlocked, the host must set **X-WOPI-Lock** to the empty string. 3. In the case where the file is locked by a third-party client, hosts should still always include the current lock ID in the **X-WOPI-Lock** response header. -Parameters +### Parameters | Name | Description | Type | | -------- | ---------------------------------- | ------ | | file\_id | The file ID that must be URL safe. | string | -Query parameters +### Query parameters | Name | Description | Type | | ------------- | -------------------------------------------------------------------------------------- | ------ | | access\_token | An access token that the host will use to determine whether the request is authorized. | string | -Request headers +### Request headers | Name | Description | Type | Presence | | --------------- | -------------------------------------------------------------------- | ------ | -------- | | X-WOPI-Override | The requested operation from the WOPI server (*REFRESH\_LOCK*). | string | required | | X-WOPI-Lock | The lock ID that the host must use to identify the lock on the file. | string | required | -Response headers +### Response headers | Name | Description | Type | Presence | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- | diff --git a/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/RenameFile/index.md b/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/RenameFile/index.md index b0ae505b1..8be41ba56 100644 --- a/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/RenameFile/index.md +++ b/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/RenameFile/index.md @@ -10,19 +10,19 @@ This operation works as follows: 4. If the host cannot rename the file because the name requested is invalid or conflicts with the existing file, the host should try to generate a different name based on the requested name that meets the file name requirements. 5. If the host cannot generate a different name, it should return **400 Bad Request**. The response must include the **X-WOPI-InvalidFileNameError** header that describes why the file name was invalid. -Parameters +### Parameters | Name | Description | Type | | -------- | ---------------------------------- | ------ | | file\_id | The file ID that must be URL safe. | string | -Query parameters +### Query parameters | Name | Description | Type | | ------------- | -------------------------------------------------------------------------------------- | ------ | | access\_token | An access token that the host will use to determine whether the request is authorized. | string | -Request headers +### Request headers | Name | Description | Type | Presence | | -------------------- | -------------------------------------------------------------------- | ------ | -------- | @@ -30,7 +30,7 @@ Request headers | X-WOPI-Lock | The lock ID that the host must use to identify the lock on the file. | string | optional | | X-WOPI-RequestedName | A file name, not including the file extension (in the UTF-7 format). | string | optional | -Response headers +### Response headers | Name | Description | Type | Presence | | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- | @@ -38,7 +38,7 @@ Response headers | X-WOPI-Lock | The lock ID identifying the current lock on the file. This header must always be included when responding to the request with **409 Conflict**. It should not be included when responding to the request with **200 OK**. | string | optional | | X-WOPI-LockFailureReason | The cause of the lock failure. This header may be included when responding to the request with **409 Conflict**. It must only be used for logging purposes. | string | optional | -Response body +### Response body | Name | Description | Type | Presence | | ---- | ------------------------------------------------------- | ------ | -------- | diff --git a/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/Unlock/index.md b/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/Unlock/index.md index d604b6ded..0b39eaa64 100644 --- a/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/Unlock/index.md +++ b/site/pages/Docs/Docs API/Using WOPI/WOPI REST API/Unlock/index.md @@ -8,26 +8,26 @@ This operation works as follows: 2. If the file is **unlocked**, or if the file is currently **locked** and the **X-WOPI-Lock** value does not match the lock currently on the file, the host must return **409 Conflict** (*"lock mismatch"*) and include the **X-WOPI-Lock** response header containing the value of the current lock on the file. In the case where the file is unlocked, the host must set **X-WOPI-Lock** to the empty string. 3. In the case where the file is locked by a third-party client, hosts should still always include the current lock ID in the **X-WOPI-Lock** response header. -Parameters +### Parameters | Name | Description | Type | | -------- | ---------------------------------- | ------ | | file\_id | The file ID that must be URL safe. | string | -Query parameters +### Query parameters | Name | Description | Type | | ------------- | -------------------------------------------------------------------------------------- | ------ | | access\_token | An access token that the host will use to determine whether the request is authorized. | string | -Request headers +### Request headers | Name | Description | Type | Presence | | --------------- | -------------------------------------------------------------------- | ------ | -------- | | X-WOPI-Override | The requested operation from the WOPI server (*UNLOCK*). | string | required | | X-WOPI-Lock | The lock ID that the host must use to identify the lock on the file. | string | required | -Response headers +### Response headers | Name | Description | Type | Presence | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- |