Skip to main content
GET
/
v2
/
list-test-runs
/
{test_case_batch_job_id}
JavaScript
import Retell from 'retell-sdk';

const client = new Retell({
  apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
});

const response = await client.tests.listTestRuns('test_case_batch_job_id');

console.log(response.has_more);
{
  "pagination_key": "<string>",
  "has_more": true,
  "items": [
    {
      "test_case_job_id": "<string>",
      "test_case_definition_id": "<string>",
      "test_case_definition_snapshot": {
        "name": "<string>",
        "response_engine": {
          "llm_id": "<string>",
          "version": 0
        },
        "user_prompt": "<string>",
        "metrics": [
          "<string>"
        ],
        "dynamic_variables": {},
        "tool_mocks": [
          {
            "tool_name": "<string>",
            "input_match_rule": {},
            "output": "<string>",
            "result": true
          }
        ],
        "test_case_definition_id": "<string>",
        "creation_timestamp": 123,
        "user_modified_timestamp": 123
      },
      "creation_timestamp": 123,
      "user_modified_timestamp": 123,
      "transcript_snapshot": {},
      "result_explanation": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Authentication header containing API key (find it in dashboard). The format is "Bearer YOUR_API_KEY"

Path Parameters

test_case_batch_job_id
string
required

ID of the batch test job

Query Parameters

limit
integer
default:50

Maximum number of items to return.

Required range: x <= 1000
pagination_key
string

Pagination key for fetching the next page.

Response

Test case jobs retrieved successfully

pagination_key
string

Pagination key for the next page.

has_more
boolean

Whether more results are available.

items
object[]