Skip to main content
POST
folder_metadata

Authorizations

X-API-Key
string
header
required

Path Parameters

workspace_id
string<uuid>
required

Workspace identifier.

Body

application/json

Request body for folder-metadata.

Non-recursive by default: the first call on a directory orients (its own files plus per-subdirectory summaries), and the caller descends or narrows from there instead of receiving the whole subtree at once.

A category or ingestion_status narrow implies recursion unless recursive is sent explicitly: the censuses those names come from (root categories, subdirectory top_categories / failed_files, ingestion_summary) count subtrees, so the natural follow-up call must scope the same subtree — otherwise narrowing by a subtree fact from the non-recursive root would answer an inexplicable zero. An explicit recursive=false alongside a narrow is honored as sent.

category
string | null
directory
string
default:/
Maximum string length: 1024
include_tables
boolean
default:false
ingestion_status
enum<string> | null

The only thing that says whether a file is searchable.

expired cannot be derived from the hash pair: retention clears ingested_hash, so an aged-out file and a never-ingested file look identical. They call for different customer actions, so the status carries the distinction the hashes cannot.

Available options:
discovered,
queued,
ingesting,
ingested,
stale,
expired,
failed,
not_required
kind
enum<string> | null

The processing lane a file routes through — exactly one per file.

DOCUMENT covers everything the categorize pipeline can split into logical documents (PDF, Office, images, text, markdown, HTML, email); TABLE covers spreadsheets and CSV; MEDIA covers audio and video, which become one speaker-attributed timeline plus sampled frames; JSON preserves arbitrary nested structure and may add a table projection for a top-level record array. The diagram lane remains an explicit non-goal: its extensions map to no lane, which surfaces as a typed per-file unsupported_file_type outcome.

Available options:
document,
table,
media,
json
name_contains
string | null
Required string length: 1 - 256
page_size
integer
default:100
Required range: 1 <= x <= 500
recursive
boolean
default:false
start_after
string | null
Maximum string length: 1024

Response

Successful Response

Response body for folder-metadata.

Counts are filtered by both the caller's access predicate and the requested directory — the two compose as an intersection so the view an agent sees is neither wider than its access gate nor wider than its declared scope.

file_entries lists the visible source files the counts cover (same scope and recursion as the counts), path-sorted, one page at a time (page_size); files_truncated reports a cut page — resume with start_after=<last path>, or narrow with category= / a subdirectory. Source paths, never ingestion derivatives: derivative paths are reported by GET /v1/workspaces/{workspace_id}/files/{file_id}/metadata.

categories
CategoryCount · object[]
required
coverage
Coverage · object
required

What the access gate withheld, in counts and label names only.

Never a name, path, or fragment of withheld content. Naming the labels leaks nothing the caller cannot already read from the workspace config, and it turns "some results were withheld" into an actionable request.

directory
string
required
file_entries
FolderFileEntry · object[]
required
files_truncated
boolean
required
ingestion_summary
Ingestion Summary · object
required
overall_files
integer
required
subdirectories
SubdirectorySummary · object[]
required
hint
string | null
shared_columns
SharedColumn · object[] | null
Maximum array length: 40
shared_columns_truncated
boolean | null
tables
TableCensusEntry · object[] | null
Maximum array length: 500
tables_truncated
boolean | null