Deletion Locks¶
New in version 4.15.
In the following reference, {storage-resource}
is one of the following:
/storage/{storage-id}
/storage
In the following reference, {file-resource}
is one of the following:
{storage-resource}/file/{file-id}
{storage-resource}/file/path/{path}
{storage-resource}/file/uri/{uri}
In the following reference, {lock-entity}
is one of the following:
/collection
/collection/(collection-id)
/item
/item/(item-id)
{storage-resource}/file
{file-resource}
Get Deletion Locks¶
Retrieve a list of locks¶
-
GET
/deletion-lock
¶ Retrieves a list of deletion locks.
Query Parameters: - onlyEffective –
true
- Only return the effective lock of the entity.false
(default) - Return all deletion locks applied on the entity.
- metadata –
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
). - key
- username – Comma separated user names. Filter only locks created by the specified user(s).
- range – 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(*..*)
.d
is a date and time in the ISO 8601 format. - entityTypes –
Comma separated string to only return locks set explicitly on the specified entityType(s).
Default is
all
. Allowed values are:item
,collection
,file
.
Matrix Parameters: - first – Return locks starting from the specified offset. Default is
1
, the first lock. - number – Return at most the specified number of locks. Default is
100
.
Produces: - application/xml, application/json – DeletionLockListDocument
Role: _deletion_lock_read
- onlyEffective –
GET /deletion-lock?user=testuser
&metadata=workflow=production
&metadata=group=movie
&expiry=(*..2020-10-05T16:42:34.693%2B02:00]
Retrieve a specific lock¶
-
GET
/deletion-lock/
(lock-id)¶ Returns a specific lock.
Produces: - application/xml, application/json – XML/JSON, schema DeletionLockDocument
Role: _deletion_lock_read
Retrieve a list of locks of the entity¶
-
GET
{lock-entity}/deletion-lock
¶ Retrieves a list of deletion locks on the entity.
Query Parameters: - onlyEffective –
true
- Only return the effective lock of the entity.false
(default) - Return all deletion locks applied on the entity.
- metadata –
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
). - key
- username – Comma separated user names. Filter only locks created by the specified user(s).
- range – 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(*..*)
.d
is a date and time in the ISO 8601 format.
Matrix Parameters: - first – Return locks starting from the specified offset. Default is
1
, the first lock. - number – Return at most the specified number of locks. Default is
100
.
Produces: - application/xml, application/json – DeletionLockListDocument
Role: _deletion_lock_read
- onlyEffective –
Retrieve a specific lock of the 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