Skip to main content
Files are the primary resource in a workspace. Uploading a file registers it in the ledger but does not make it searchable — ingestion does that. All write operations return a Job. All list routes use keyset cursor pagination (cursor / next_cursor).

Upload file

Register a file in the workspace. Two content paths are supported: Multipart upload (bytes):
The metadata form field must be a JSON-encoded UploadFileRequest. JSON upload (server-side URL fetch):
UploadFileRequest fields:
  • path (required) — Workspace-relative destination path. Must not start with /. No . or .. segments.
  • source (optional) — {"type": "url", "url": "...", "file_name": "..."} for server-side fetch. Omit for multipart.
  • labels (optional) — Key-value metadata stored verbatim.
  • graph_inclusion (optional, default "auto") — "auto", "include", or "exclude". Overrides the workspace KG exclusion rules for this file.
  • on_conflict (optional, default "reject") — "reject" raises path_conflict if a file already exists at this path. "new_version" creates a new version instead.
wait_seconds and Idempotency-Key are supported as query param and header respectively. Response (200 — job already succeeded):
Upload does not ingest. The file lands with ingestion_status: "discovered" and is not searchable until you call POST .../ingestions. Errors:
  • path_conflict (409) — File already exists at this path and on_conflict="reject".
  • file_too_large (413) — Upload exceeds the server maximum.

List files

Page through source files in the workspace. Query parameters:
  • cursor (optional) — Opaque cursor from next_cursor.
  • limit (optional, default 50, max 200)
Response:
total_count is exact after access filtering. coverage reports how many files were withheld by the access predicate and which labels would unlock them.

Get file

Retrieve file metadata plus short-lived presigned download and preview URLs. Response: A FileDetail — the File fields above plus:
  • download_url — Presigned GET URL that saves the file to disk.
  • preview_url — Presigned GET URL that browsers render inline.
  • download_url_expires_at — When both URLs expire.

Get file metadata

Detailed file information including ingestion-derived metadata and all live outputs. Response:

Get file output

Retrieve one derived output with a presigned download URL. Response: An ArtifactOutputDetail — the output fields above plus download_url, preview_url, download_url_expires_at.

Get artifact content by path

Stream the current bytes for a source file or derived output by its exact workspace-relative path. This authenticated route works across managed local and S3 storage and reapplies the file’s access-label rules on every request. Use your HTTP client’s query-parameter support so /, Unicode, spaces, and reserved characters in path are encoded correctly:
Query parameters:
  • path (required) — Exact workspace-relative path of a current source or derivative.
Headers:
  • Range (optional) — One byte range, such as bytes=0-1023. A satisfiable range returns 206 Partial Content.
The response streams the artifact with its detected media type, Content-Length, Accept-Ranges: bytes, and an inline Content-Disposition. Errors:
  • file_not_found (404) — No current visible artifact or stored bytes exist at the path.
  • range_not_satisfiable (416) — The Range header is malformed, contains multiple ranges, or selects bytes outside the artifact.

List output members

For outputs that are folders (e.g., extracted video frames), list member objects. Query parameters:
  • offset (optional, default 0) — Members to skip, for paging a large folder.
  • limit (optional, default 50, max 200)
Response:

Get file versions

View the version history of a file. Response:

Replace file

Replace a file’s bytes. Must use multipart/form-data: bytes in a file part and optional parameters as JSON-encoded metadata form field. There is no JSON-only path for labels-only updates — send the new bytes with updated metadata. Multipart:
ReplaceFileRequest fields (JSON-encoded in the metadata form field):
  • labels (optional) — New labels. Omit to leave existing labels unchanged. Pass {} to clear all.
  • graph_inclusion (optional) — Change this file’s KG inclusion. Omit to leave unchanged.
Response: A Job with kind: "file_replace".

Delete file

Delete a file and cascade all derived outputs asynchronously. Response (202 Accepted): A Job with kind: "file_delete".