Skip to main content

CheckFileInfo

GET /wopi/files/(file_id)

The CheckFileInfo operation must be implemented for all WOPI actions. It returns information about the file, the user's permissions on the file, and general information about the WOPI host capabilities for the file. Some CheckFileInfo properties can also affect the appearance and behavior of the WOPI client.

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-SessionContextstringOptionalSession context (if provided on the initial WOPI action URL).

Required response properties

Note: the default value for any response string value is an empty string.

NameTypeExampleDescription
BaseFileNamestring"Example File Name.docx"File name (without path). Used for UI display and to determine the file extension.
OwnerIdstring"uid-1"A string that uniquely identifies the file owner. Typically, the user who uploaded or created the file is considered the owner.
Sizeinteger100File size in bytes (64-bit signed integer).
Versionstring"Khirz6zTPdfd7"Current file version. Must change on each edit/save, and versions must not repeat for a given file.

Other miscellaneous properties

NameTypeExampleDescription
ProtectInClientbooleantrueWhether the WOPI client should take measures to prevent copying and printing (helps enforce IRM).
DisablePrintbooleantrueWhether the WOPI client should disable all printing features.
LastModifiedTimestring"2009-06-15T13:45:30.0000000Z"Last modified time of the file. Must be UTC and in ISO 8601 round-trip format.
SHA256stringBase64-encoded SHA-256 hash of the file content, used for WOPI client caching.

User metadata properties

NameTypeExampleDescription
UserFriendlyNamestring"John Smith"Display name of the user.
UserIdstring"uid-1"Unique identifier for the current user accessing the file.

User permissions properties

NameTypeExampleDescription
ReadOnlybooleantrueWhether the current user cannot modify the file.
UserCanWritebooleantrueWhether the user is allowed to modify the file.
RestrictedWebViewOnlybooleantrueWhether the WOPI client must not allow downloading the file or opening it in a separate application.