WOPI operations (anonymous) (IRPCWOPIOperationsPublic)
File, lock and session operations for Office for the web (WOPI), authorized by a WOPI access token instead of an M-Files session.
| gRPC service | MFiles.IRPCWOPIOperationsPublic |
|---|---|
| Book and level | Server integration API, specialized |
| Methods | 15 |
| Proto file | mfiles/IRPCWOPIOperationsPublic.proto |
Overview
For M-Files components only. The M-Files WOPI service, the WOPI host that Office for the web and the Office mobile apps talk to, calls these methods with the access token it received from Office. M-Files Web also calls a few of them. Applications should not call this service.
- No session. Every method is called without
mfiles-session-id-bin. The token in the request names the vault (it holds the vault GUID) and maps to the M-Files session that created it with CreateWOPIUserSession or CreateContainerAccessToken. The method then runs in that session, with that user's permissions; it fails with access denied when the token is malformed, unknown or expired, or when that session has ended. - Token kinds: a WOPI user session token (most methods), a one-time token (only
GetWOPIUserSessionKey), and a
container access token (GetContainerInfo,
GetContainerContent, and
GetWOPIUserSession with
WOPITOKEN_TYPE_WOPICONTAINER_TOKEN). - Tasks:
- Open the editor: GetWOPIUserSessionKey (M-Files Web exchanges a one-time token from the URL) and GetWOPIUserSession.
- File content: WOPIDownloadFile_Begin, WOPIDownloadFile_ReadBlock, WOPIUploadFile, WOPIUploadFileCommit.
- WOPI locks: GetLockForWOPI, SetLockForWOPI, RemoveLockForWOPI.
- Check-out and check-in: WOPIFileCheckOut, WOPIFileCheckIn.
- Co-authoring: GetActiveParticipants.
- End: EndWOPIUserSession.
- Office mobile apps browsing: GetContainerInfo, GetContainerContent.
- Errors: invalid tokens fail with plain "Access denied." (0x800407E4); a token for a vault that does not exist on the server answers after a delay of about 0.5 s.
- Cloud: an M-Files Cloud server answers these methods anonymously (a made-up token fails with "Access denied.").
Methods
| Method | Summary | Facts |
|---|---|---|
| EndWOPIUserSession | Ends a WOPI user session: its token stops working at once. | internal: not for applications write no session |
| GetActiveParticipants | Lists the other users who currently have an open co-authoring session on the same file. | internal: not for applications write no session |
| GetContainerContent | Lists the subcontainers and files of the vault location (container) of a container access token. | internal: not for applications write no session |
| GetContainerInfo | Gets the name and path of the vault location (container) of a container access token. | internal: not for applications write no session |
| GetLockForWOPI | Gets the WOPI lock string of the file of a WOPI user session. | internal: not for applications write no session |
| GetWOPIUserSession | Gets the details of a WOPI user session: the shared object and file version, the action, the user and whether editing is allowed. | internal: not for applications write no session |
| GetWOPIUserSessionKey | Exchanges a one-time token for the WOPI user session token it stands for. | internal: not for applications write no session |
| RemoveLockForWOPI | Removes the WOPI lock string of the file of a WOPI user session. | internal: not for applications write no session |
| SetLockForWOPI | Sets the WOPI lock string of the file of a WOPI user session. | internal: not for applications write no session |
| WOPIDownloadFile_Begin | Starts downloading the file of a WOPI user session and returns its size and MD5 checksum. | internal: not for applications write no session |
| WOPIDownloadFile_ReadBlock | Reads a block of the file of a WOPI download session. | internal: not for applications write no session |
| WOPIFileCheckIn | Checks in the object of a WOPI user session. | internal: not for applications write no session |
| WOPIFileCheckOut | Checks out the object of a read-only WOPI user session and turns the session into an editing session. | internal: not for applications write no session |
| WOPIUploadFile | Uploads a block of the new content of the file of a WOPI editing or co-authoring session. | internal: not for applications write no session |
| WOPIUploadFileCommit | Stores an upload made with WOPIUploadFile as the new content of the file of the WOPI session. | internal: not for applications write no session |