---
title: "Get workspace stats"
method: GET
path: "/v1/workspaces/{id}/stats"
tags: ["Workspaces"]
---

# Get workspace stats

`GET /v1/workspaces/{id}/stats`

## Request

- Base URL: `https://console.nace.ai`
- URL: `https://console.nace.ai/v1/workspaces/{id}/stats`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/nace/apis/drex-api/docs/v1/workspaces/:id/stats/get.ts> (a function with typed inputs; its response is checked against the schema)

What the workspace holds: files by ingestion status, bytes, pages, index entries and graph size. Free.

## Path parameters

- `id` string, required

## Response `200`

The stats.

- WorkspaceStats
  - `files_total` integer
  - `files_by_ingestion_status` object: Files per `ingestion_status`.
  - `bytes_total` integer
  - `pages_ingested` integer
  - `index_documents` integer
  - `kg_nodes` integer
  - `kg_edges` integer
  - `last_ingestion_at` string, date-time, nullable
  - `last_reconciliation_at` string, date-time, nullable
  - `next_expiry_at` string, date-time, nullable
  - `files_expiring_within_7d` integer

## Other responses

- `401`: Missing or invalid API key (`authentication_error`, code `invalid_api_key`).
- `404`: No workspace with this id that the key may use (`not_found_error`, code `workspace_not_found`), or Workspaces are off on this deployment (`not_found`).
- `429`: Over the account's requests per minute for document routes, or the document service is throttling this account (`rate_limit_error`).
- `500`: Something failed on Drex's side (`internal_error`).
- `502`: The document service refused Drex's own request (`upstream_error`, code `ndi_refused_drex`). Retry later.
- `503`: The document service is unavailable (`service_unavailable`).

---

[API](https://skmtc.dev/nace/apis/drex-api.md) - [All operations](https://skmtc.dev/nace/apis/drex-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nace/apis/drex-api/revisions/a0e62d925a61?raw)
