Test Case
Retrieve Test Cases
Get test cases for a prompt
GET
Retrieve test cases for a specific prompt. This endpoint returns test cases associated with the given prompt ID, with options to filter by prompt version and include generation data.
Retrieve Test Cases
Parameters
Name | Type | Required | Description |
---|---|---|---|
promptId | string | Yes | The UUID of the prompt to retrieve test cases for |
promptVersionIds | string[] | No | Optional array of prompt version UUIDs to filter test cases by specific versions |
includeGenerations | boolean | No | Whether to include generation data in the response |
Response
The response returns an array of test case objects with the following properties:
Field | Type | Description |
---|---|---|
id | string | Unique identifier for the test case (UUID) |
title | string | Title of the test case |
messages | array or null | Array of message objects with role and content |
variables | object or null | Key-value pairs of variables used in the test case |
variablesRichContent | object or null | Key-value pairs of rich content variables |
files | array or null | Array of file objects attached to the test case |
promptId | string | UUID of the prompt this test case belongs to |
expectedOutput | string or null | Expected output for evaluation purposes |
answers | object or null | Evaluation answers with good/bad results and evals |
promptApplicationId | string or null | UUID of the prompt application if applicable |
metadata | object or null | Metadata about the test case including source |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
deletedAt | string or null | Deletion timestamp if applicable |
generations | array | Array of generations (only included if includeGenerations=true) |
Example Response
Response
200 - application/json
List of test cases
The response is of type object[]
.