Skip to content

Read the locks of several nodes

GET
/drives/{drive}/nodes/locks/batch
curl --request GET \
--url 'https://work.optidata.cloud/api/drives/1/nodes/locks/batch?node_ids%5B%5D=1' \
--header 'Authorization: Bearer <token>'

Locks held on many nodes in one round trip — call it before writing back a batch of files.

drive
required
integer format: int64

Numeric id of the drive. Read it from GET /drives/config.json.

node_ids[]
required
Array<integer>

Ids of the nodes to inspect.

The locks found.

Media typeapplication/json
Array<object>

An advisory lock held on a file while it is being edited. Take one before replacing the content of a file another user could be working on.

object
id
integer format: int64
node_id
integer format: int64
user_id
integer format: int64
note

Free-text reason shown to other users.

string | null
origin

Free-text label naming the client that took the lock.

string | null
user_hash

Opaque per-installation identifier of the lock holder.

string | null
expires_at
string | null format: date-time
created_at
string format: date-time
updated_at
string format: date-time
user
One of:

A user of the tenant.

object
id
integer format: int64
uuid
string format: uuid
cuid

Identifier of the company (tenant) the user belongs to.

string
username
string
email
string format: email
name
string
full_name
string
company_name
string
role

Role of the user inside the tenant.

string
status
string
Allowed values: active inactive blocked
avatar_url
string | null format: uri
created_at
string format: date-time
updated_at
string format: date-time
deleted_at
string | null format: date-time
profile

Profile extras (avatar, job title). Loaded only where noted.

object | null
groups

Groups the user belongs to. Loaded only where noted.

Array<object>

A group of users inside the tenant.

object
id
integer format: int64
guid

Tenant-wide identifier of the group; used in paths.

string format: uuid
name
string
description
string | null
email
string | null format: email
cuid
string
memberships

Members of the group, each with its embedded user.

Array<object>
object
key
additional properties
any
userStatus

Presence status of the user. Loaded only where noted.

object | null
status_details

Rendered presence details (type, icon, message). Present on dashboard listings.

object | null
Example
[
{
"user": {
"id": 15,
"uuid": "9c1f0e2a-4d31-4d8a-8c1a-1f0b6b1f9a10",
"cuid": "a1b2c3d4-2226-46c1-91b2-a9e9ba4c2d5b",
"username": "jane.doe@acme.example",
"email": "jane.doe@acme.example",
"name": "Jane Doe",
"full_name": "Jane Doe",
"company_name": "Acme",
"role": "super-admin",
"status": "active",
"groups": [
{
"id": 560,
"guid": "a19d5670-335d-4285-8ee4-fcb54cb70faf",
"name": "Finance"
}
]
}
}
]

Missing, malformed or expired authentication key.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Examplemissing

No bearer token sent

{
"error": "JWT passport exception: Missing bearer token in request"
}

The caller lacks the permission level the operation requires.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Exampledenied
{
"message": "This action is unauthorized."
}

The request body or query string failed validation.

Media typeapplication/json
object
message
required

The first validation message.

string
errors
required

Validation messages keyed by field name.

object
key
additional properties
Array<string>
Examples
Exampleinvalid
{
"message": "The name field is required.",
"errors": {
"name": [
"The name field is required."
]
}
}

Rate limit exceeded. Retry after the window resets.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Examplethrottled
{
"message": "Too Many Attempts."
}