Skip to main content
GET
/
ai
/
assistants
/
tests
/
{test_id}
/
runs
/
{run_id}
JavaScript
import Telnyx from 'telnyx';

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

const testRunResponse = await client.ai.assistants.tests.runs.retrieve('run_id', {
  test_id: 'test_id',
});

console.log(testRunResponse.run_id);
{
  "run_id": "987fcdeb-51a2-43d1-b456-426614174000",
  "test_id": "123e4567-e89b-12d3-a456-426614174000",
  "triggered_by": "cron",
  "created_at": "2024-01-24T10:30:00Z",
  "completed_at": "2023-11-07T05:31:56Z",
  "logs": "<string>",
  "conversation_id": "<string>",
  "conversation_insights_id": "<string>",
  "test_suite_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "updated_at": "2023-11-07T05:31:56Z",
  "detail_status": [
    {
      "name": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

test_id
string
required

Unique identifier of the test.

run_id
string
required

Unique identifier of the run.

Response

Returns complete test run details including results, logs, and performance metrics

Response model containing test run execution details and results.

Provides comprehensive information about a test execution including status, timing, logs, and detailed evaluation results.

run_id
string<uuid>
required

Unique identifier for this specific test run execution.

Example:

"987fcdeb-51a2-43d1-b456-426614174000"

test_id
string<uuid>
required

Identifier of the assistant test that was executed.

Example:

"123e4567-e89b-12d3-a456-426614174000"

status
enum<string>
required

Represents the lifecycle of a test:

  • 'pending': Test is waiting to be executed.
  • 'starting': Test execution is initializing.
  • 'running': Test is currently executing.
  • 'passed': Test completed successfully.
  • 'failed': Test executed but did not pass.
  • 'error': An error occurred during test execution.
Available options:
pending,
starting,
running,
passed,
failed,
error
triggered_by
string
required

How this test run was initiated (manual, scheduled, or API).

Example:

"cron"

created_at
string<date-time>
required

Timestamp when the test run was created and queued.

Example:

"2024-01-24T10:30:00Z"

completed_at
string<date-time>

Timestamp when the test run finished execution.

logs
string

Detailed execution logs and debug information.

conversation_id
string

Identifier of the conversation created during test execution.

conversation_insights_id
string

Identifier for conversation analysis and insights data.

test_suite_run_id
string<uuid>

Identifier linking this run to a test suite execution batch.

updated_at
string<date-time>

Timestamp of the last update to this test run.

detail_status
TestRunDetailResult · object[]

Detailed evaluation results for each rubric criteria. Name is name of the criteria from the rubric and status is the result of the evaluation. This list will have a result for every criteria in the rubric section.