v2

latestOpenAPI 3.1.02026-08-06276982.8 KB
files

Read file

Read contents from a file.

<Info>This acts on files 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>

get/v2/files/{path}

Path parameters

pathstring required

Full path to the file.

Query parameters

expect-node-type'file' | 'folder' required

Type of node at the target path.

Headers

Authorizationstring required

Bearer HTTP authentication.

IB-Contextstring

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

Rangestring

The portion of the file to read. A single HTTP byte range, with inclusive bounds and a non-negative start value. If not provided, return the entire file. Example: bytes=0-4

IB-Retry-Configstring

Configures retry logic if no file 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

Indicates that the response contains the entire file contents.