Runs

Get File locks

Returns a list of locks from Lock server. On request, Lock server iterates over locked files and builds a cache (snapshot) that provides all the details about locked files for API requests. Building the cache is the most resource-intensive operation and may take a significant amount of time. There is a single cache per Agent, shared across all jobs and users. Requests for locks from different Job Runs using the same Lock server can lead to performance degradation, as the cache is refreshed with each request. All parameters in the request body are optional. An error is returned if an expired continuation_token is provided.

post/runs/{id}/file_locks

Request

  • Base URL
    https://localhost:8446/api/v2
  • Auth
    API key in header Authorization

Path parameters

idnumber required

Job run id

Request body

continuation_tokenstring

Continuation token. Use this param to continue iteration over locks with initially specified start_from, max_entries, cache_ttl, filter and sort. If token is provided, those fields will be ignored. Token can be used only once. New one is provided in response. When cache is reset, all tokens become invalid. If token is invalid, request will return error.

no_tokenboolean

No token. If true, token will not be returned.

start_fromnumber

Start from. Skip locks from locks list. Ignored if continuation_token is provided.

max_entriesnumber

Max entries. Max amount of locks in response. Ignored if continuation_token is provided.

cache_ttlnumber

Cache time to live. Max acceptable lifetime of cache. Checking whether the cache needs to be reset is performed only during handling request. Cache is refreshed only if cache_ttl is exceeded or if request is made for another Job run. If provided cache_ttl is 0, cache is refreshed. Ignored if continuation_token is provided.

filterobject

Filter. Filter locks. Specify at least one criterion. Ignored if continuation_token is provided.

filter.searchstring

Search. Matches by substring for process name, path and file name, user name.

filter.durationnumber

Duration. Minimum duration in seconds.

filter.lock_ownerstring

Lock owner. Allowed lock owner(s) (deviceid of Agent).

filter.exclusive_ownerstring

Exclusive owner. Allowed exclusive owner(s) (deviceid of Agent). Set to empty string to include locks without exclusive owner.

filter.accessstring

Access. Allowed access value(s). Possible values: R - Read only W - Write only D - Delete only RW - Read & Write RD - Read & Delete WD - Write & Delete RWD - Full access No access - No access

filter.shared_accessstring

Shared access. Allowed shared access value(s). Possible values are the same as for filter.access.

sortobject

Sort. Locks sort. Ignored if continuation_token is provided.

sort.fieldstring

Field. Field to order by. Possible values: any field in file lock object (see locks below).

sort.orderstring

Order. Sort Order. Possible values: asc - Ascending sort desc - Descending sort

Response

Successful response

cache_agenumber required

Cache age. Cache age in seconds.

continuation_tokenstring

Continuation token. Not returned if end of list was reached or no_token is true.

current_timenumber required

Current time. Lock server's UTC timestamp in seconds.

total_locksnumber required

Total locks. Total amount of locks.

locksobject required

Locks on files. Array of locked files.

locks.accessstring required

Access. Possible values: R - Read only W - Write only D - Delete only RW - Read & Write RD - Read & Delete WD - Write & Delete RWD - Full access No access - No access

locks.shared_accessstring required

Shared access. Possible values are the same as for locks.access.

locks.durationnumber required

Duration. Duration of a lock in seconds.

locks.lock_acquire_timenumber required

Lock acquire time. UTC timestamp of file lock acquisition.

locks.lock_ownerstring required

Lock owner. deviceid of Agent that has lock.

locks.lock_owner_namestring required

Lock owner name. Name of Agent that has lock.

locks.exclusive_ownerstring required

Exclusive owner. deviceid of Agent that is exclusive owner.

locks.exclusive_owner_namestring required

Exclusive owner name. Name of Agent that is exclusive owner.

locks.file_namestring required

File name.

locks.pathstring required

Path.

locks.process_namestring required

Process name. Name of the process that locked the file.

locks.user_namestring required

User name. Name of the user that locked the file.

Changes

No recorded changes to this operation across all 1 revision of this API.