v1

latestOpenAPI 3.0.12026-07-226992320.0 KB
Test Runs

List Test Runs

Returns a paginated list of test run results for the specified batch, sorted by most recently created first. Use page and size to navigate through results.

get/v1/test-runs

Query parameters

batchIdstring required

Unique identifier of the batch run whose test runs are to be listed.

agentIdstring required

Unique identifier of the agent to which the batch run belongs.

pageinteger

Zero-based page number to retrieve. Use 0 for the first page. Must be 0 or greater.

sizeinteger

Number of test runs to return per page. Must be 1 or greater. Defaults to 10.

Response

OK

pageinteger

Current page number (0-based index). Indicates which page of results is being returned.

sizeinteger

Number of items requested per page. Determines the maximum size of the 'data' list.

totalCountinteger

Total number of records available across all pages. Useful for calculating pagination on the client side.

totalPagesinteger

Total number of pages available based on totalCounts and size. Helps clients understand how many pages exist in total.

hasNextboolean

Indicates whether there is a next page available after the current one. Useful for implementing 'Load More' or next navigation.

hasPreviousboolean

Indicates whether there is a previous page before the current one. Useful for enabling backward navigation.

Example response

{
  "data": [
    {
      "batchId": "batch_s0OJu2JWR8R45Fai",
      "workspaceId": "org_V6eZ2zg8ziDx5pft",
      "agent": {
        "name": "New AI Agent",
        "agentId": "agent_D5D0p7TUs66TTAEAx",
        "status": "Live"
      },
      "testCase": {
        "testCaseId": "tc_d17T6uReChpyfFeP",
        "label": "Angry Customer - Cancellation Flow",
        "agent": {
          "name": "New AI Agent",
          "agentId": "agent_D5D0p7TUs66TTAEAx",
          "status": "Live"
        },
        "workspaceId": "org_V6eZ2zg8ziDx5pft",
        "llmModel": "gpt-4o-mini",
        "mockData": [
          {
            "variableName": "customer_name",
            "value": "John Doe"
          },
          {
            "variableName": "account_status",
            "value": "active"
          }
        ],
        "userPrompt": "You are an angry customer who wants to cancel your subscription.",
        "attempt": 5,
        "successCriteria": "The agent should acknowledge the cancellation request, present retention alternatives, and confirm the cancellation if the customer insists."
      },
      "jobId": "job_ksUu5yRHGTLLrLeM",
      "chatId": "chat_IpELinkFvINQ1212",
      "createdDate": "2026-03-26T10:52:45.565Z",
      "completedDate": "2026-03-26T10:54:45.565Z",
      "isSuccessful": true,
      "remarks": "The Agent successfully maintained focus on the primary task of addressing the customer's order enquiry.",
      "conversation": [
        {
          "role": "user",
          "content": "I want to cancel my subscription immediately."
        }
      ]
    }
  ],
  "size": 20,
  "totalCount": 125,
  "totalPages": 7,
  "hasNext": true
}