Skip to content

Describe the bytes of a file without downloading them

GET
/drives/{drive}/nodes/{node}/content/meta
curl --request GET \
--url https://work.optidata.cloud/api/drives/1/nodes/300754/content/meta \
--header 'Authorization: Bearer <token>'

Metadata about the current content — size, MIME type, storage path and chunk layout — without transferring the file. Call it to decide whether a download is needed at all. Requires view on the node.

drive
required
integer format: int64

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

node
required
integer format: int64

Numeric id of the node (file or folder).

Content metadata.

Media typeapplication/json

Description of a file’s stored bytes — enough to decide whether a download is needed, and how to fetch it.

object
node_content_id
integer | null format: int64
path

Opaque storage path of the content.

string | null
mime_type
string | null
size_bytes
integer | null format: int64
hash_sha256
string | null
chunk_count

How many chunks the content is stored in, when chunked.

integer | null
as_base64

Whether the content is served base64 encoded.

boolean | null
key
additional properties
any
Examplegenerated
{
"node_content_id": 1,
"path": "example",
"mime_type": "example",
"size_bytes": 1,
"hash_sha256": "example",
"chunk_count": 1,
"as_base64": true
}

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