3.3.5.1.3 Lock

Office

Take a lock for editing a file.

HTTP Verb: POST

URI: HTTP://server/<...>/wopi*/files/<id>?access_token=<token>

The request message for this operation contains the following HTTP headers.

Request header

Usage

Value

X-WOPI-Override

A string specifying the requested operation from the WOPI server. Required.

The string "LOCK".

X-WOPI-Lock

A string provided by the WOPI client that the WOPI server MUST use to identify the lock on the file. Required.

A string.

The response message for this operation can contain the following HTTP headers.

Response header

Usage

Value

X-WOPI-Lock

A string provided by the WOPI client that the WOPI server MUST use to identify the lock on the file. This header MUST be included when responding with the 409 status code. This header SHOULD NOT be included when responding with the 200 status code.

A string.

X-WOPI-LockFailureReason

A string indicating why the operation failed. There is no standard for how this string is to be formatted. This string MUST NOT be used for anything other than logging. This header MAY only be included when responding with the 409 status code.

A string.

X-WOPI-LockedByOtherInterface

A string indicating that the file is currently locked by another client. This header MAY only be included when responding with the 409 status code.

The string "true".

The response message for this operation can result in the following status codes.

Status code

Description

200

Success

401

Token is invalid

404

File unknown/User unauthorized

409

Lock mismatch/locked by another interface; an X-WOPI-Lock response header containing the value of the current lock on the file MUST be included when using this response code

500

Server error

501

Unsupported

Show: