Deletion locks [VC 21.3 GEN]
Manage deletion locks.
New in version 4.15.
In the following reference, {lock-entity} is one of the following:
-
/collection -
/collection/(collection-id) -
/item -
/item/(item-id) -
{storage-resource}/file -
{file-resource}
Manage deletion locks
List all locks
-
GET/deletion-lock Retrieves a list of deletion locks.
Query Parameters: -
onlyEffective (boolean) –
-
true- Only return the effective lock of the entity. -
false(default) - Return all deletion locks applied on the entity.
-
-
first (integer) – Return locks starting from the specified offset. Default is
1, the first lock. -
number (integer) – Return at most the specified number of locks. Default is
100. -
metadata (string[]) –
Filter out only the locks that has metadata according to the filter criteria.
-
key
=value - Multiple query parameters can be specified.
Note that
=is part of the query parameter, and has to be encoded (%3d). -
-
username (string) – Comma-separated user names. Filter only locks created by the specified user(s).
-
range (string) – Filter out locks whose expiry time is within the specified range. The range format is
[d..d],(d..d),[d..d),(d..d],(*..d],[d..*), or(*..*).dis a date and time in the ISO 8601 format. -
entityTypes (string) –
Comma-separated list. Only return locks set explicitly on the specified entity type(s).
Valid values are:
item,collection,file, andall(default).
Produces: -
application/xml, application/json – DeletionLockListDocument
Role: _deletion_lock_read
-
GET /deletion-lock?user=testuser
&metadata=workflow=production
&metadata=group=movie
&expiry=(*..2020-10-05T16:42:34.693%2B02:00]
Retrieve a lock
-
GET/deletion-lock/(lock-id) Returns a specific lock.
Produces: -
application/xml, application/json – XML/JSON, schema DeletionLockDocument
Role: _deletion_lock_read
-
List all locks for an entity
-
GET{lock-entity}/deletion-lock Retrieves a list of deletion locks on the entity.
Query Parameters: -
onlyEffective (boolean) –
-
true- Only return the effective lock of the entity. -
false(default) - Return all deletion locks applied on the entity.
-
-
first (integer) – Return locks starting from the specified offset. Default is
1, the first lock. -
number (integer) – Return at most the specified number of locks. Default is
100. -
metadata (string[]) –
Filter out only the locks that has metadata according to the filter criteria.
-
key
=value - Multiple query parameters can be specified.
Note that
=is part of the query parameter, and has to be encoded (%3d). -
-
username (string) – Comma-separated user names. Filter only locks created by the specified user(s).
-
range (string) – Filter out locks whose expiry time is within the specified range. The range format is
[d..d],(d..d),[d..d),(d..d],(*..d],[d..*), or(*..*).dis a date and time in the ISO 8601 format.
Produces: -
application/xml, application/json – DeletionLockListDocument
Role: _deletion_lock_read
-
Retrieve a lock for an entity
-
GET{lock-entity}/deletion-lock/(lock-id) Returns a specific lock.
Produces: -
application/xml, application/json – XML/JSON, schema DeletionLockDocument
Role: _deletion_lock_read
-
Managing Deletion Locks
Create a lock
-
POST{lock-entity}/deletion-lock Creates new deletion lock based on the information in the DeletionLockDocument.
Accepts: -
application/xml, application/json – DeletionLockDocument
Produces: -
application/xml, application/json – DeletionLockDocument
Role: _deletion_lock_write
-
Example
POST /deletion-lock
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DeletionLockDocument xmlns="http://xml.vidispine.com/schema/vidispine">
<expiryTime>2021-09-12T10:40:14.546+02:00</expiryTime>
<metadata>
<field>
<key>workflow</key>
<value>production</value>
</field>
</metadata>
</DeletionLockDocument>
Update a lock
-
PUT/deletion-lock/(lock-id) Updates a lock based on the information in the DeletionLockDocument.
Accepts: -
application/xml, application/json – DeletionLockDocument
Produces: -
application/xml, application/json – DeletionLockDocument
Role: _deletion_lock_write
-
Update a lock
-
PUT{lock-entity}/deletion-lock/(lock-id) Updates a lock based on the information in the DeletionLockDocument.
Accepts: -
application/xml, application/json – DeletionLockDocument
Produces: -
application/xml, application/json – DeletionLockDocument
Role: _deletion_lock_write
-
Delete a lock
-
DELETE/deletion-lock/(lock-id) -
DELETE{lock-entity}/deletion-lock/(lock-id) Delete a lock that was explicitly set on this entity.
Role: _deletion_lock_write