---
title: "List the draft’s states, newest first"
method: GET
path: "/v1/templates/{slug}/draft/states"
tags: ["Template drafts"]
---

# List the draft’s states, newest first

`GET /v1/templates/{slug}/draft/states`

## Request

- Base URL: `https://api.shardflux.dev`
- URL: `https://api.shardflux.dev/v1/templates/{slug}/draft/states`
- Auth: HTTP bearer

## Path parameters

- `slug` string, required

## Query parameters

- `limit` integer
- `cursor` string

## Response `200`

Default Response

- object
  - `data` DraftState[], required
    - `checkpoint_id` string, uuid, required: UUIDv7, lowercase canonical form.
    - `label` string, nullable, required
    - `captured_at` string, date-time, required: RFC 3339 UTC timestamp with Z.
    - `captured_by` object, nullable, required
      - `type` 'user' | 'api_key' | 'system' | 'operator', required
      - `id` string, uuid, nullable, required: UUIDv7, lowercase canonical form.
    - `bytes` integer, nullable, required: Stored bytes of the captured workspace layer.
    - `test_instances` integer, required: Test instances opened from this state (live and ended).
  - `next_cursor` string, nullable, required

## Other responses

- `4XX`: Default Response
- `5XX`: Default Response

---

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