Describe the bytes of a file without downloading them
const url = 'https://work.optidata.cloud/api/drives/1/nodes/300754/content/meta';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Numeric id of the drive. Read it from GET /drives/config.json.
Numeric id of the node (file or folder).
Responses
Section titled “ Responses ”Content metadata.
Description of a file’s stored bytes — enough to decide whether a download is needed, and how to fetch it.
object
Opaque storage path of the content.
How many chunks the content is stored in, when chunked.
Whether the content is served base64 encoded.
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.
Authentication failures use an error key rather than message.
object
Examples
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}The caller lacks the permission level the operation requires.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "This action is unauthorized."}The resource does not exist, or does not belong to the given drive.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "No query results for model [App\\Models\\Node] 99999999"}Rate limit exceeded. Retry after the window resets.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "Too Many Attempts."}