# List workspace test sets

GET

/v1/test-sets

```sh
curl --request GET \
  --url 'https://example.com/v1/test-sets?limit=25&kind=accuracy&scopeKind=tenant&inherit=true&includeRetired=false' \
  --header 'Authorization: Bearer <token>'
```

Cursor-paginated. Optional `?kind=` narrows to a single eval kind (exact match); optional `?name=` is a prefix match on `TestSet.id`. Sort order: test set id ascending. Latest version per id. A retired test set (every version unregistered) is listed only with `?includeRetired=true`, as its highest version with `unregisteredAt`, so it can be found and a version reinstated. A `corrections` test set (an agent’s frozen versions, and those built from corrections before) is listed only with `?kind=corrections`: an agent’s corrections are its test set (`/v1/agents/{agentId}/test-set`).

## Authorizations

- **[bearerAuth](https://docs.kindgi.com/v0.5.0/reference/api.md#bearerauth)**

## Parameters

### Query Parameters

**limit**

integer

default: 25 >= 1 <= 100

1..100. Default 25.

**cursor**

string

Where the previous page ended: its `nextCursor`, as it came. A runtime that seals cursors takes one only for the same list, filters and caller, within a day; otherwise `400 bad-input`, and the list starts again without it. Absent → first page.

**kind**

string

Allowed values: accuracy pairwise regression human-review benchmark custom corrections

Filter to test sets of a single kind. `corrections` is listed only when asked for here: an agent’s corrections are its test set (`/v1/agents/{agentId}/test-set`), and its frozen versions are `corrections` test sets.

**name**

string

Prefix match on `TestSet.id`. Dotted namespaces are the natural filter shape.

**scopeKind**

Discriminator for the ?scopeKind + ?scopeId + ?inherit triplet. Tenant carries no id (implicit from session); org/project require scopeId.

string

Allowed values: tenant org project

Optional scope discriminator. If absent, no scope filter is applied.

**scopeId**

string

\>= 1 characters

Required IF scopeKind is `org` or `project`. MUST be absent if scopeKind=`tenant` (the workspace is implicit from the session). Malformed combinations return 400 scope-invalid.

**inherit**

boolean

default: true

Default `true`. `false` = literal-at-this-scope only (admin/audit view). Load-bearing for policy/config-scoped resources (mcp-endpoints); documented no-op for content-scoped resources (agents/flows/tools/…).

**includeRetired**

boolean

When `true`, retired items (every version unregistered) are listed too, each as its highest version with that version’s `unregisteredAt`. Default: `false` (items with an active version only).

## Responses

### 200

Page of test sets.

application/json

object

**data**

required

Array\<object>

object

**id**

required

string

\>= 1 characters

**tenantId**

required

string format: uuid

**projectId**

The test set’s project: every version of a test set is in the one project. Absent when the runtime doesn’t record it: a pack `kindgi dev` serves from disk, or a runtime before Kindgi 0.1.6.

string format: uuid

**version**

required

Semver — publishing a modified test set produces a new version.

string

/^\d+\\.\d+\\.\d+$/

**kind**

required

string

Allowed values: accuracy pairwise regression human-review benchmark custom corrections

**description**

string

**spec**

required

Kind-specific test set body. For `accuracy`, typically `{ cases: [{ input, expectedOutput }], grader?: { adapterId, config? } }`. For `pairwise`, typically `{ prompts, variantA, variantB }`. For `regression`, typically `{ baseline, cases }`. For `human-review`, typically `{ rubric, reviewerRole }`. For `benchmark`, typically `{ benchmark: { name, version } }`. For `custom`, typically `{ handler: { modulePath, entrypointPath }, cases }`.

object

**_key_**

additional properties

any

**unregisteredAt**

Present only on an unregistered version: one `GET …/versions?includeTombstoned=true` lists, or a retired test set (every version unregistered) as `GET /v1/test-sets?includeRetired=true` lists it.

string format: date-time

**nextCursor**

string

**hasMore**

required

boolean

##### Example

```json
{
  "data": [
    {
      "kind": "accuracy"
    }
  ]
}
```

### 400

Malformed query parameter (unknown `kind`, or `corrections`).

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 401

Missing / malformed / expired / revoked bearer token.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 503

The database was too busy to answer in time (`database-busy`); `Retry-After` (whole seconds) says when to try again.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

## See also

- [`POST /v1/test-sets`: Publish a test set](https://docs.kindgi.com/v0.5.0/reference/api/operations/testsetspublish.md)
- [Kindgi 0.4.0](https://docs.kindgi.com/v0.5.0/releases/0.4.0.md)
- [Error code `database-busy`](https://docs.kindgi.com/v0.5.0/reference/errors.md#database-busy)
- [Every error code](https://docs.kindgi.com/v0.5.0/reference/errors.md)
