---
title: "Get Testcase"
method: GET
path: "/testcases/{testcaseId}"
---

# Get Testcase

`GET /testcases/{testcaseId}`

Retrieve a specific Testcase by ID.

## Path parameters

- `testcaseId` string, required

## Response `200`

Successfully retrieved Testcase.

- Testcase — A test case in the Scorecard system. Contains JSON data that is validated against the schema defined by its Testset. The `inputs` and `expected` fields are derived from the `data` field based on the Testset's `fieldMapping`, and include all mapped fields, including those with validation errors. Testcases are stored regardless of validation results, with any validation errors included in the `validationErrors` field.
  - `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.

## Other responses

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

## Changes

> 37 revisions in range; 1 could not be searched.

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

[Change history](https://skmtc.dev/scorecard-ai/apis/scorecard-api/changes/testcases/:testcaseId/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)
