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

# List a workspace file's versions

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

## Request

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

Newest first. Only the current version's bytes are kept. Free.

## Path parameters

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

## Query parameters

- `limit` integer
- `cursor` string

## Response `200`

One page of versions.

- WorkspaceFileVersionList
  - `items` WorkspaceFileVersion[], required
    - `version` integer
    - `size_bytes` integer
    - `observed_hash` string, nullable
    - `ingested_hash` string, nullable
    - `ingested_at` string, date-time, nullable
    - `created_at` string, date-time
    - `replaced_at` string, date-time, nullable
    - `is_current` boolean
  - `next_cursor` string, nullable, required

## 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)
