Skip to main content

GetFile

GET /wopi/files/(file_id)/contents

The GetFile operation retrieves a file from the host.

Parameters

NameTypeDescription
file_idstringThe file ID. The ID must be URL-safe.

Query parameters

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

Request headers

NameTypeRequiredDescription
X-WOPI-MaxExpectedSizeintegerOptionalMaximum expected size of the requested file. If not set, the host should use the maximum value of a 4-byte integer. If the requested file is larger than this value, the host must respond with 412 Precondition Failed.

Response headers

NameTypeRequiredDescription
X-WOPI-ItemVersionstringOptionalFile version.

Response body

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