workspaces

get_workspace_stats

Compute workspace content statistics. Cost class: fast.

Returns file counts, byte totals, ingestion timestamps, and expiry information — enough for a caller to determine whether the workspace needs ingestion or a re-ingest without paging through list_files.

kg_nodes / kg_edges describe the workspace's published knowledge graph, and are zero until a build has finished one. They come from the build's own record rather than the graph itself, so this stays a fast read; an unreachable graph store reports zero rather than failing the request.

Args: session: Database session. context: Resolved workspace plus caller access predicate.

Returns: The stats bag.

get/v1/workspaces/{workspace_id}/stats

Request

Path parameters

workspace_idstring uuid required

Workspace identifier.

Response

Successful Response

files_totalinteger required
files_by_ingestion_statusobject required
bytes_totalinteger required
pages_ingestedinteger required
index_documentsinteger required
kg_nodesinteger required

Nodes in the workspace's published knowledge graph; 0 when none is built.

kg_edgesinteger required

Edges in the workspace's published knowledge graph; 0 when none is built.

last_ingestion_atstring date-time nullable required
last_reconciliation_atstring date-time nullable required
next_expiry_atstring date-time nullable required

Earliest artifact expires_at; null when nothing expires.

files_expiring_within_7dinteger required

Changes

No recorded changes to this operation across all 1 revision of this API.