Read file or folder metadata

Read metadata of a file or folder at the target path. This API operation reports whether the object at the target path is a file or folder. If a file, it also reports the file size and last modification time. <Info>This acts on files and folders in the AI Hub filesystem, not your local filesystem.</Info> <Note>Ensure the path is accessible within the context defined by the `IB-Context` header.</Note>

Authentication

AuthorizationBearer
Bearer HTTP authentication.

Path parameters

pathstringRequired
Full path to the file or folder.

Headers

IB-ContextstringOptional

Typically your organization ID. See Authorization and context identification for details.

IB-Retry-ConfigstringOptional

Configures retry logic if no file or folder is found at the target path. Uses a constant backoff algorithm. Don’t retry if this header isn’t provided. Example: {'retries': 3, 'backoff-seconds': 5}

Response headers

Content-Typestring

Returns application/json if it is a folder and application/octet-stream if it is a file.

Content-Lengthinteger
Optional. Only present if the target path is a file. The length of the file, in bytes.
last-modifiedstring
Optional. Only present if the target path is a file. The date and time the file was last modified.

Response

Successfully retrieved metadata.

Errors

404
Not Found Error