GetFile

GET /wopi/files/(file_id)/contents

Retrieves a file from a host for the HTTP://server/<...>/wopi*/files/<id>/contents operation.

Parameters

NameTypeDescription
file_idstringThe file ID that must be URL safe.

Query parameters

NameTypeDescription
access_tokenstringAn access token that the host uses to determine whether the request is authorized.

Request headers

NameTypePresenceDescription
X-WOPI-MaxExpectedSizeintegeroptionalThe upper bound of the expected size of the file being requested. The host should use the maximum value of a 4-byte integer if this value isn't set in the request. If the file requested is larger than this value, the host must respond with a 412 Precondition Failed.

Response headers

NameTypePresenceDescription
X-WOPI-ItemVersionstringoptionalThe file version.

Response body

The response body must be the full binary contents of the file.

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).