Skip to content

Check which of these nodes are shared with the caller

POST
/drives/{drive}/shared/withme/check
curl --request POST \
--url https://work.optidata.cloud/api/drives/1/shared/withme/check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "node_ids": [ 665198, 665199 ] }'

Given a list of node ids, returns the subset that is shared with the calling user, each reduced to id, parent_id and type. The ids that were checked are echoed back.

drive
required
integer format: int64

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

Media typeapplication/json

A list of node ids to operate on.

object
node_ids
required
Array<integer>
Examples
Examplecheck
{
"node_ids": [
665198,
665199
]
}

The subset shared with the caller.

Media typeapplication/json
object
node_ids
required

The ids that were checked.

Array<integer>
nodes
required
Array<object>
object
id
integer format: int64
parent_id
integer | null format: int64
type
integer
Allowed values: 1 2
Example
{
"nodes": [
{
"type": 1
}
]
}

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

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