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
| Name | Type | Description |
|---|
| file_id | string | The file ID. The ID must be URL-safe. |
Query parameters
| Name | Type | Description |
|---|
| access_token | string | The access token the host uses to determine whether the request is authorized. |
| Name | Type | Required | Description |
|---|
| X-WOPI-SessionContext | string | Optional | Session 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.
| Name | Type | Example | Description |
|---|
| BaseFileName | string | "Example File Name.docx" | File name (without path). Used for UI display and to determine the file extension. |
| OwnerId | string | "uid-1" | A string that uniquely identifies the file owner. Typically, the user who uploaded or created the file is considered the owner. |
| Size | integer | 100 | File size in bytes (64-bit signed integer). |
| Version | string | "Khirz6zTPdfd7" | Current file version. Must change on each edit/save, and versions must not repeat for a given file. |
Other miscellaneous properties
| Name | Type | Example | Description |
|---|
| ProtectInClient | boolean | true | Whether the WOPI client should take measures to prevent copying and printing (helps enforce IRM). |
| DisablePrint | boolean | true | Whether the WOPI client should disable all printing features. |
| LastModifiedTime | string | "2009-06-15T13:45:30.0000000Z" | Last modified time of the file. Must be UTC and in ISO 8601 round-trip format. |
| SHA256 | string | | Base64-encoded SHA-256 hash of the file content, used for WOPI client caching. |
User metadata properties
| Name | Type | Example | Description |
|---|
| UserFriendlyName | string | "John Smith" | Display name of the user. |
| UserId | string | "uid-1" | Unique identifier for the current user accessing the file. |
User permissions properties
| Name | Type | Example | Description |
|---|
| ReadOnly | boolean | true | Whether the current user cannot modify the file. |
| UserCanWrite | boolean | true | Whether the user is allowed to modify the file. |
| RestrictedWebViewOnly | boolean | true | Whether the WOPI client must not allow downloading the file or opening it in a separate application. |