---
title: "List Testcases in Testset"
method: GET
path: "/testsets/{testsetId}/testcases"
---

# List Testcases in Testset

`GET /testsets/{testsetId}/testcases`

Retrieve a paginated list of Testcases belonging to a Testset.

## Path parameters

- `testsetId` string, required

## Query parameters

- `limit` integer
- `cursor` string

## Response `200`

Successfully retrieved list of Testcases.

- object
  - `data` Testcase[], required
    - `id` string, required — The ID of the Testcase.
    - `testsetId` string, required — The ID of the Testset this Testcase belongs to.
    - `jsonData` object, required — The JSON data of the Testcase, which is validated against the Testset's schema.
    - `inputs` object, required — Derived from data based on the Testset's fieldMapping. Contains all fields marked as inputs, including those with validation errors.
    - `expected` object, required — Derived from data based on the Testset's fieldMapping. Contains all fields marked as expected outputs, including those with validation errors.
    - `validationErrors` object[] — Validation errors found in the Testcase data. If present, the Testcase doesn't fully conform to its Testset's schema.
      - `path` string, required — JSON Pointer to the field with the validation error.
      - `message` string, required — Human-readable error description.
  - `nextCursor` string, nullable, required
  - `hasMore` boolean, required
  - `total` integer

## Other responses

- `401` — Error indicating that the request is not authenticated.
- `500` — An internal service error indicating an issue with the Scorecard service.

## Changes

- **2025-05-28** `97ddfea9a000` — 1 breaking, 1 info
  - removed the required property `data/items/labels` from the response with the `200` status
  - added the required property `data/items/expected` to the response with the `200` status

[Change history](https://skmtc.dev/scorecard-ai/apis/scorecard-api/changes/testsets/:testsetId/testcases/get.md)

---

[API](https://skmtc.dev/scorecard-ai/apis/scorecard-api.md) · [All operations](https://skmtc.dev/scorecard-ai/apis/scorecard-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/scorecard-ai/scorecard-api/revisions/121aaa257802/schema)
