---
title: "Get a workspace file's metadata"
method: GET
path: "/v1/workspaces/{id}/files/{file_id}/metadata"
tags: ["Workspaces"]
---

# Get a workspace file's metadata

`GET /v1/workspaces/{id}/files/{file_id}/metadata`

## Request

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

What ingestion learned about the file. Free.

## Path parameters

- `id` string, required
- `file_id` string, required

## Response `200`

The metadata.

- WorkspaceFileMetadata
  - `file` WorkspaceFile
    - `file_id` string, required
    - `workspace_id` string, required
    - `path` string, required
    - `file_name` string
    - `file_type` string
    - `size_bytes` integer
    - `version` integer
    - `observed_hash` string, nullable
    - `ingested_hash` string, nullable
    - `ingestion_status` 'discovered' | 'queued' | 'ingesting' | 'ingested' | 'stale' | 'expired' | 'failed' | 'not_required'
    - `ingested_at` string, date-time, nullable
    - `category` string, nullable
    - `access_label` string, nullable
    - `access_label_source` string, nullable
    - `graph_inclusion` 'auto' | 'include' | 'exclude'
    - `expires_at` string, date-time, nullable
    - `labels` object
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `lane` string: `document`, `table`, `media` or `json`.
  - `page_count` integer, nullable
  - `sheet_names` string[], nullable
  - `duration_ms` integer, nullable
  - `summary` string, nullable
  - `keywords` string[], nullable
  - `documents` object[], nullable
  - `sheets` object[], nullable
  - `media` object, nullable
  - `outputs` object[]: Each with `output_id`, `kind`, `path`, `generation` and `created_at`.
  - `representations` object: Which of `search_index`, `organized_files` and `knowledge_graph` hold the file.
  - `last_error` object, nullable

## Other responses

- `401`: Missing or invalid API key (`authentication_error`, code `invalid_api_key`).
- `404`: No such workspace (`workspace_not_found`) or file (`file_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)
