Skip to main content
POST
folder_metadata

Authorizations

X-API-Key
string
header
required

Headers

Idempotency-Key
string | null

Replaying a request with the same key returns the original job with 200, never a second job. The key is kept with the job for replay and never cleared, so it must not contain personal data.

Maximum string length: 200

Path Parameters

workspace_id
string<uuid>
required

Workspace identifier.

Body

application/json

Request body for folder-metadata: describe one folder of the workspace.

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

A narrow (category, ingestion_status, kind, name_contains) implies recursion unless recursive is sent explicitly: the counts those names come from cover subtrees, so the follow-up call must scope the same subtree. An explicit recursive=false alongside a narrow is honored.

category
string | null

Only files whose category exactly matches this name, as a previous response listed it.

directory
string
default:/

Folder to describe, relative to the workspace root: / (the default) is the root, evidence/2025 a folder under it. Never prefix it with the workspace id.

Maximum string length: 1024
ingestion_status
enum<string> | null

Only files in this ingestion status — e.g. failed to list what did not ingest.

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

Only files of this kind: document (paged or prose), table, or media.

Available options:
document,
table,
media,
json
name_contains
string | null

Only files whose path contains this text, case-insensitively — how to find a file you know by name. % and _ match literally.

Required string length: 1 - 256
page_size
integer
default:100

File entries per page. The counts always cover the whole scope.

Required range: 1 <= x <= 500
recursive
boolean
default:false

Describe the folder's whole subtree instead of its own files only. A narrow implies true unless sent.

start_after
string | null

Resume the file listing strictly after this path: the last file_entries path of the previous page.

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 is neither wider than the access gate nor wider than the 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. Source paths only, never ingestion derivatives.

categories
CategoryCount · object[]
required

File counts per category across the scope.

coverage
Coverage · object
required

What the access gate withheld from these counts, as counts and label names only.

directory
string
required

The folder described, relative to the workspace root (/ is the root).

file_entries
FolderFileEntry · object[]
required

Files in scope, sorted by path, one page at a time.

files_truncated
boolean
required

True when file_entries is one page of a longer listing; resume with start_after.

ingestion_summary
Ingestion Summary · object
required

File counts per ingestion status across the scope.

overall_files
integer
required

Files in scope that the caller can see: the folder, or its subtree when recursive.

subdirectories
SubdirectorySummary · object[]
required

The folder's immediate subfolders, each summarizing its subtree.

hint
string | null

Present only when an unfiltered call matched nothing: the nearest existing folder and what it holds.

job_id
string<uuid> | null

The external operation job; absent for commands inside a search job.