Resource functions
Collection functions
Search functions
IIIF
Metadata functions
User functions
System
Message functions
Plugin functions
Share functions
Tab functions
Dash functions

update_resource_lock

Lock or unlock a resource using the update_resource_lock API call.

Access checking is always enabled. Existing resource editing and locking permissions apply. Users can unlock their own locks; administrators can also unlock resources locked by other users.

Variable Description Data type
$ref * The resource ID. int
$lockaction * The action: 1 to lock the resource, or 0 to unlock it. int
$newlockuser The user ID to assign the lock to. Defaults to the authenticated API user if omitted or null. Only used when locking. int

* Required parameter.

Return values

Returns true on success, or false if the operation is denied or the parameters are invalid. Integer values and strings representing integers are accepted; other types and non-integer strings return false.

When using native API authentication, a POST request is required. Other request methods return an API failure response.