Skip to content

Get one lock

GET
/drives/{drive}/nodes/locks/{nodeLock}
curl --request GET \
--url https://work.optidata.cloud/api/drives/1/nodes/locks/4471 \
--header 'Authorization: Bearer <token>'

A single lock with its holder and the node it protects. Requires permission to view the lock.

drive
required
integer format: int64

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

nodeLock
required
integer format: int64

Numeric id of the lock.

The lock.

Media typeapplication/json

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 resource does not exist, or does not belong to the given drive.

Media typeapplication/json

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

object
message
required

Human-readable description of the failure.

string
Examples
Examplemissing
{
"message": "No query results for model [App\\Models\\Node] 99999999"
}

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."
}