CumulusDocs
Open Studio
On this page

Get a trial transcript

Read one trial’s assertion trace and, while retained, the transcript used for its verdict.

Operation ID: test_runs.trial.

Request

GET /api/v1/test-runs/{test_run_id}/cases/{case_id}/trials/{trial}

  • TypeScript SDK: client.test_runs.trial (path arguments use path).
  • MCP tool: sdk_client_call with operationId: "test_runs.trial" (path arguments use input.path). Legacy alias: test_runs_trial. Connect to your authenticated /mcp endpoint with an API key for the same environment.
  • Minimum API key role: viewer.
  • Idempotency: No idempotency header required.

Read resource IDs from earlier responses and use a key for the same environment.

Request example

Set each path variable to an ID returned by an earlier API request.

Set CUMULUS_BASE_URL to your workspace API URL and CUMULUS_API_KEY to a key for that environment. Example values are synthetic.

cURL

curl
curl --fail-with-body -sS "${CUMULUS_BASE_URL%/}/api/v1/test-runs/${TEST_RUN_ID}/cases/${CASE_ID}/trials/${TRIAL}" \
  -H "Authorization: Bearer $CUMULUS_API_KEY"

TypeScript

typescript
import { Cumulus } from "@cumulus/sdk";

const baseUrl = process.env.CUMULUS_BASE_URL;
const apiKey = process.env.CUMULUS_API_KEY;
if (!baseUrl || !apiKey) throw new Error("Set CUMULUS_BASE_URL and CUMULUS_API_KEY");
const client = new Cumulus({ baseUrl, apiKey });

const response = await client.test_runs.trial({
  "path": {
    "test_run_id": "<test_run_id>",
    "case_id": "<case_id>",
    "trial": 1
  }
});

Input schema

Path, query and header parameters

test_run_id

path parameter · Required.

Type: string (uuid). pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.

case_id

path parameter · Required.

Type: string. minLength: 1. maxLength: 64. pattern: ^[a-z0-9][a-z0-9_-]*$.

trial

path parameter · Required.

Type: integer. At least 1. At most 30.

suite_id

query parameter · Optional.

Type: string (uuid). pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.

JSON request body

This operation has no JSON request body.

Complete OpenAPI schema
OpenAPI JSON
{
  "parameters": [
    {
      "name": "test_run_id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
      }
    },
    {
      "name": "case_id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "pattern": "^[a-z0-9][a-z0-9_-]*$"
      }
    },
    {
      "name": "trial",
      "in": "path",
      "required": true,
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 30
      }
    },
    {
      "name": "suite_id",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
      }
    }
  ],
  "requestBody": null
}

Responses

HTTP 200

Get one trial: its assertion trace and, while retained, the transcript it was judged on

application/json

FieldType or valuesRequiredDescription and limits
test_run_idstring (uuid)RequiredIdentifier of the test run whose progress or results you are reading. pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.
suite_idstring (uuid)RequiredIdentifier of the test suite. pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.
case_idstringRequiredminLength: 1. maxLength: 64. pattern: ^[a-z0-9][a-z0-9_-]*$.
namestringRequiredminLength: 1. maxLength: 200.
resultobjectRequired—
result.case_idstringRequiredminLength: 1. maxLength: 64. pattern: ^[a-z0-9][a-z0-9_-]*$.
result.trialintegerRequiredGreater than 0. At most 9007199254740991.
result.attemptintegerRequiredGreater than 0. At most 9007199254740991.
result.run_idstring (uuid) or nullRequiredRun identifier returned when the run was admitted. pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.
result.state"pending" · "running" · "evaluating" · "settled" · "cancelled"Required—
result.verdict"passed" · "failed" · "errored" or nullRequired—
result.reasonstring or nullRequiredpattern: ^[a-z][a-z0-9_.:-]{0,127}$.
result.assertionsarray of objectRequiredmaxItems: 25.
result.assertions[].assertion_idstringRequiredminLength: 1. maxLength: 64. pattern: ^[A-Za-z0-9][A-Za-z0-9_.-]*$.
result.assertions[].typestringRequiredminLength: 1. maxLength: 64.
result.assertions[].verdict"passed" · "failed" · "not_applicable" · "insufficient_data" · "errored"Required—
result.assertions[].measuredobjectRequired—
result.assertions[].measured.*string or number or boolean or nullOptionalAdditional keys are allowed.
result.assertions[].evidenceobjectRequired—
result.assertions[].evidence.turnsarray of integerRequiredmaxItems: 50.
result.assertions[].evidence.node_idsarray of stringRequiredmaxItems: 50.
result.assertions[].evidence.effect_idsarray of string (uuid)RequiredmaxItems: 20.
result.assertions[].judgeobject or nullRequired—
result.assertions[].judge.scorenumberRequired in a non-null parentAt least 0. At most 1.
result.assertions[].judge.rejudgedbooleanRequired in a non-null parent—
result.assertions[].judge.criteriaarray of objectRequired in a non-null parentmaxItems: 12.
result.assertions[].judge.criteria[].idstringRequired in a non-null parentminLength: 1. maxLength: 64.
result.assertions[].judge.criteria[].verdict"pass" · "fail" · "na"Required in a non-null parent—
result.assertions[].judge.criteria[].scoreinteger or nullRequired in a non-null parentAt least 1. At most 5.
result.assertions[].judge.criteria[].evidence_turnsarray of integerRequired in a non-null parentmaxItems: 20.
result.assertions[].judge.criteria[].rationalestring or nullRequired in a non-null parentmaxLength: 300.
result.assertions[].reasonstring or nullRequiredpattern: ^[a-z][a-z0-9_.:-]{0,127}$.
result.guardobjectRequired—
result.guard.compliance_blocksobjectRequired—
result.guard.compliance_blocks.*integerOptionalAdditional keys are allowed.
result.guard.rpc_unconfirmedintegerRequiredAt least 0. At most 9007199254740991.
result.guard.atomic_half_saidintegerRequiredAt least 0. At most 9007199254740991.
result.content_state"retained" · "expired"Required—
caseobject or nullRequired—
case.runobjectRequired in a non-null parent—
case.run.owner_idstringRequired in a non-null parentminLength: 1.
case.run.environmentstringRequired in a non-null parentminLength: 1.
case.run.tenant_idstring (uuid)Required in a non-null parentpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.
case.run.run_idstring (uuid)Required in a non-null parentRun identifier returned when the run was admitted. pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.
case.run.agent_idstringRequired in a non-null parentAgent identifier in the environment selected by your API key. minLength: 1. maxLength: 256. pattern: ^[A-Za-z0-9][A-Za-z0-9_.:-]*$.
case.run.publicationobjectRequired in a non-null parent—
case.run.publication.agent_idstringRequired in a non-null parentAgent identifier in the environment selected by your API key. minLength: 1. maxLength: 256. pattern: ^[A-Za-z0-9][A-Za-z0-9_.:-]*$.
case.run.publication.versionintegerRequired in a non-null parentAt least 0. At most 2147483647.
case.run.publication.digeststringRequired in a non-null parentpattern: ^sha256:[a-f0-9]{64}$.
case.run.plan_schema_versionintegerRequired in a non-null parentGreater than 0. At most 9007199254740991.
case.run.channel"cloud" · "phone" · "web"Required in a non-null parent—
case.run.mode"task" · "chat" · "background" · "outbound" · "inbound"Required in a non-null parent—
case.run.state"admitted" · "running" · "ending" · "completed" · "failed" · "cancelled" · "rejected" · "expired"Required in a non-null parent—
case.run.phone_state"admitted" · "preparing" · "awaiting_sip" · "dialing" · "ringing" · "active" · "terminating" · "ended" · "rejected" · "expired" · "setup_failed" or nullRequired in a non-null parent—
case.run.outcomeobject or nullRequired in a non-null parent—
case.run.outcome · combined section 1object—Fields for this schema branch.
case.run.outcome.transport"completed" · "busy" · "no_answer" · "rejected" · "cancelled" · "provider_failure" · "admission_expired" · "not_applicable"Required in a non-null parent—
case.run.outcome.execution"completed" · "failed" · "cancelled" · "not_started" · "unknown"Required in a non-null parent—
case.run.outcome.contact"human" · "voicemail" · "ivr" · "unknown" · "not_applicable"Required in a non-null parent—
case.run.outcome.businessobjectRequired in a non-null parent—
case.run.outcome.business · variant 1object—Fields for this schema branch.
case.run.outcome.business.status"known"Required in a non-null parent—
case.run.outcome.business.valuestringRequired in a non-null parentminLength: 1. maxLength: 256.
case.run.outcome.business · variant 2object—Fields for this schema branch.
case.run.outcome.business.status"unknown"Required in a non-null parent—
case.run.outcome.reasonstringRequired in a non-null parentminLength: 1. maxLength: 128.
case.run.outcome.resultobject or nullRequired in a non-null parent—
case.run.outcome.result · combined section 1object—Fields for this schema branch.
case.run.outcome.result.artifact_idstring (uuid)Required in a non-null parentpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.
case.run.outcome.result.sha256stringRequired in a non-null parentpattern: ^[a-f0-9]{64}$.
case.run.outcome.result.byte_sizeintegerRequired in a non-null parentAt least 0. At most 9007199254740991.
case.run.outcome.result.media_typestringRequired in a non-null parentminLength: 1. maxLength: 128.
case.run.outcome.result.expires_atstring (date-time) or nullRequired in a non-null parentpattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z))$.
case.run.dispositionstring or nullRequired in a non-null parent—
case.run.triggerobjectRequired in a non-null parent—
case.run.trigger · variant 1object—Fields for this schema branch.
case.run.trigger.kind"sip"Required in a non-null parent—
case.run.trigger.number_idstring (uuid)Required in a non-null parentpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.
case.run.trigger.call_id_sha256stringRequired in a non-null parentpattern: ^[a-f0-9]{64}$.
case.run.trigger · variant 2object—Fields for this schema branch.
case.run.trigger.kind"api"Required in a non-null parent—
case.run.trigger.idempotency_key_sha256stringRequired in a non-null parentpattern: ^[a-f0-9]{64}$.
case.run.trigger · variant 3object—Fields for this schema branch.
case.run.trigger.kind"schedule"Required in a non-null parent—
case.run.trigger.trigger_idstringRequired in a non-null parentminLength: 1. maxLength: 128.
case.run.trigger.scheduled_forstring (date-time)Required in a non-null parentpattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z))$.
case.run.trigger · variant 4object—Fields for this schema branch.
case.run.trigger.kind"event"Required in a non-null parent—
case.run.trigger.trigger_idstringRequired in a non-null parentminLength: 1. maxLength: 128.
case.run.trigger.source_event_idstring (uuid)Required in a non-null parentpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.
case.run.trigger · variant 5object—Fields for this schema branch.
case.run.trigger.kind"callback"Required in a non-null parent—
case.run.trigger.source_run_idstring (uuid)Required in a non-null parentpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.
case.run.trigger.effect_idstring (uuid)Required in a non-null parentpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.
case.run.trigger · variant 6object—Fields for this schema branch.
case.run.trigger.kind"evaluation"Required in a non-null parent—
case.run.trigger.comparison_idstring (uuid)Required in a non-null parentpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.
case.run.trigger · variant 7object—Fields for this schema branch.
case.run.trigger.kind"test"Required in a non-null parent—
case.run.trigger.test_run_idstring (uuid)Required in a non-null parentIdentifier of the test run whose progress or results you are reading. pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.
case.run.trigger.suite_idstring (uuid)Required in a non-null parentIdentifier of the test suite. pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.
case.run.trigger.case_idstringRequired in a non-null parentminLength: 1. maxLength: 64. pattern: ^[a-z0-9][a-z0-9_-]*$.
case.run.trigger.trialintegerRequired in a non-null parentGreater than 0. At most 9007199254740991.
case.run.principalobjectRequired in a non-null parent—
case.run.principal · variant 1object—Fields for this schema branch.
case.run.principal.owner_idstringRequired in a non-null parentminLength: 1.
case.run.principal.environmentstringRequired in a non-null parentminLength: 1.
case.run.principal.kind"user"Required in a non-null parent—
case.run.principal.idstring (uuid)Required in a non-null parentpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.
case.run.principal · variant 2object—Fields for this schema branch.
case.run.principal.owner_idstringRequired in a non-null parentminLength: 1.
case.run.principal.environmentstringRequired in a non-null parentminLength: 1.
case.run.principal.kind"api_key"Required in a non-null parent—
case.run.principal.idstring (uuid)Required in a non-null parentpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.
case.run.principal · variant 3object—Fields for this schema branch.
case.run.principal.owner_idstringRequired in a non-null parentminLength: 1.
case.run.principal.environmentstringRequired in a non-null parentminLength: 1.
case.run.principal.kind"system"Required in a non-null parent—
case.run.principal.idstringRequired in a non-null parentminLength: 1. maxLength: 256.
case.run.attempt_countintegerRequired in a non-null parentAt least 0. At most 9007199254740991.
case.run.created_atstring (date-time)Required in a non-null parentpattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z))$.
case.run.started_atstring (date-time) or nullRequired in a non-null parentpattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z))$.
case.run.ended_atstring (date-time) or nullRequired in a non-null parentpattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z))$.
case.run.versionintegerRequired in a non-null parentAt least 0. At most 2147483647.
case.run.tostring or nullRequired in a non-null parentminLength: 1. maxLength: 64.
case.run.fromstring or nullRequired in a non-null parentminLength: 1. maxLength: 64.
case.run.duration_msinteger or nullRequired in a non-null parentAt least 0. At most 9007199254740991.
case.run.metadataobjectRequired in a non-null parent—
case.run.metadata.*stringOptionalAdditional keys are allowed.
case.run.testbooleanRequired in a non-null parent—
case.run.provider_keysobjectOptional—
case.run.provider_keys.*objectOptionalAdditional keys are allowed.
case.language"en" · "es"Required in a non-null parent—
case.turnsarray of objectRequired in a non-null parentmaxItems: 2000.
case.turns[].indexintegerRequired in a non-null parentAt least 0. At most 9007199254740991.
case.turns[].role"user" · "agent"Required in a non-null parent—
case.turns[].textstringRequired in a non-null parentmaxLength: 32000.
case.turns[].node_idstring or nullRequired in a non-null parentminLength: 1. maxLength: 128.
case.turns[].at_msinteger or nullRequired in a non-null parentAt least 0. At most 9007199254740991.
case.patharray of objectRequired in a non-null parentmaxItems: 2000.
case.path[].node_idstringRequired in a non-null parentminLength: 1. maxLength: 128.
case.path[].turnintegerRequired in a non-null parentAt least 0. At most 9007199254740991.
case.path[].via"prompt_edge" · "automatic" · "action_result" · "start" · "global" · "flex_task"Required in a non-null parent—
case.tool_callsarray of objectRequired in a non-null parentmaxItems: 500.
case.tool_calls[].effect_idstring (uuid)Required in a non-null parentpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.
case.tool_calls[].action_idstringRequired in a non-null parentminLength: 1. maxLength: 128.
case.tool_calls[].node_idstring or nullRequired in a non-null parentminLength: 1. maxLength: 128.
case.tool_calls[].turnintegerRequired in a non-null parentAt least 0. At most 9007199254740991.
case.tool_calls[].argsany JSON valueOptional—
case.tool_calls[].answered_byobject or "source_receipt" or "unmocked" or "default"Required in a non-null parent—
case.tool_calls[].answered_by · variant 1object—Fields for this schema branch.
case.tool_calls[].answered_by.mockintegerRequired in a non-null parentAt least 0. At most 9007199254740991.
case.tool_calls[].answered_by · variant 2"source_receipt"—Fields for this schema branch.
case.tool_calls[].answered_by · variant 3"unmocked"—Fields for this schema branch.
case.tool_calls[].answered_by · variant 4"default"—Fields for this schema branch.
case.tool_calls[].state"succeeded" · "failed"Required in a non-null parent—
case.tool_calls[].error_codestring or nullRequired in a non-null parentmaxLength: 128.
case.transferobject or nullRequired in a non-null parent—
case.transfer.node_idstringRequired in a non-null parentminLength: 1. maxLength: 128.
case.transfer.turnintegerRequired in a non-null parentAt least 0. At most 9007199254740991.
case.endedobjectRequired in a non-null parent—
case.ended.reasonstringRequired in a non-null parentpattern: ^[a-z][a-z0-9_.:-]{0,127}$.
case.ended.class"completed" · "transferred" · "caller_hangup" · "max_turns" · "timeout" · "failed" · "cancelled" · "inactivity"Required in a non-null parent—
case.ended.dispositionstring or nullRequired in a non-null parentmaxLength: 128.
case.ended.infrastructurebooleanRequired in a non-null parent—
case.variablesobjectRequired in a non-null parent—
case.variables.*stringOptionalAdditional keys are allowed.
case.guard_eventsarray of objectRequired in a non-null parentmaxItems: 2000.
case.guard_events[] · variant 1object—Fields for this schema branch.
case.guard_events[].type"compliance_block"Required in a non-null parent—
case.guard_events[].turnintegerRequired in a non-null parentAt least 0. At most 9007199254740991.
case.guard_events[].rulestringRequired in a non-null parentpattern: ^[a-z][a-z0-9_.:-]{0,127}$.
case.guard_events[].clause_hashstringRequired in a non-null parentminLength: 1. maxLength: 256.
case.guard_events[] · variant 2object—Fields for this schema branch.
case.guard_events[].type"rpc_unconfirmed"Required in a non-null parent—
case.guard_events[].turnintegerRequired in a non-null parentAt least 0. At most 9007199254740991.
case.guard_events[] · variant 3object—Fields for this schema branch.
case.guard_events[].type"atomic_unit"Required in a non-null parent—
case.guard_events[].turnintegerRequired in a non-null parentAt least 0. At most 9007199254740991.
case.guard_events[].unit_idstringRequired in a non-null parentminLength: 1. maxLength: 256.
case.guard_events[].deliveredbooleanRequired in a non-null parent—
case.caller_traceobject or nullRequired in a non-null parent—
case.caller_trace.clock"participant"Required in a non-null parent—
case.caller_trace.outcome"completed" · "failed" · "timeout"Optional—
case.caller_trace.truncatedbooleanOptional—
case.caller_trace.linesarray of objectRequired in a non-null parentmaxItems: 200.
case.caller_trace.lines[].stepinteger or nullRequired in a non-null parentAt least -9007199254740991. At most 9007199254740991.
case.caller_trace.lines[].startnumberRequired in a non-null parent—
case.caller_trace.lines[].endnumberRequired in a non-null parent—
case.caller_trace.lines[].pausesarray of objectRequired in a non-null parentmaxItems: 10.
case.caller_trace.lines[].pauses[].startnumberRequired in a non-null parent—
case.caller_trace.lines[].pauses[].endnumberRequired in a non-null parent—
case.caller_trace.lines[].kind"line" · "interjection" · "backchannel" · "beep" · "keypad"Required in a non-null parent—
case.caller_trace.agent_audioarray of array of numberRequired in a non-null parentmaxItems: 2000.
case.caller_trace.joined_at_unix_msinteger or nullOptionalDefault: null. At least 0. At most 9007199254740991.
case.redactionobject or nullRequired in a non-null parent—
case.redaction.policy_versionstringRequired in a non-null parentminLength: 1.
case.cost_usdnumber or nullRequired in a non-null parentAt least 0.

Error responses

HTTPDescription
4XXTyped error (ApiError)
5XXTyped error (ApiError)

Errors use the shared error envelope. Inspect error.code, retryable, outcome and details before retrying.

Complete OpenAPI schema
OpenAPI JSON
{
  "200": {
    "description": "Get one trial: its assertion trace and, while retained, the transcript it was judged on",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/TestRunsTrialResponse200"
        }
      }
    }
  },
  "4XX": {
    "description": "Typed error (ApiError)",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  },
  "5XX": {
    "description": "Typed error (ApiError)",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  }
}

Referenced schemas

Expand the complete OpenAPI definitions for integrations that generate their own clients.

Complete OpenAPI schema
OpenAPI JSON
{
  "components": {
    "schemas": {
      "TestRunsTrialResponse200": {
        "type": "object",
        "properties": {
          "test_run_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
          },
          "suite_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
          },
          "case_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9][a-z0-9_-]*$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "result": {
            "$ref": "#/components/schemas/TrialResult"
          },
          "case": {
            "nullable": true,
            "type": "object",
            "properties": {
              "run": {
                "$ref": "#/components/schemas/Run"
              },
              "language": {
                "type": "string",
                "enum": [
                  "en",
                  "es"
                ]
              },
              "turns": {
                "maxItems": 2000,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "index": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "user",
                        "agent"
                      ]
                    },
                    "text": {
                      "type": "string",
                      "maxLength": 32000
                    },
                    "node_id": {
                      "nullable": true,
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "at_ms": {
                      "nullable": true,
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "index",
                    "role",
                    "text",
                    "node_id",
                    "at_ms"
                  ],
                  "additionalProperties": false
                }
              },
              "path": {
                "maxItems": 2000,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "node_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "turn": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "via": {
                      "type": "string",
                      "enum": [
                        "prompt_edge",
                        "automatic",
                        "action_result",
                        "start",
                        "global",
                        "flex_task"
                      ]
                    }
                  },
                  "required": [
                    "node_id",
                    "turn",
                    "via"
                  ],
                  "additionalProperties": false
                }
              },
              "tool_calls": {
                "maxItems": 500,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "effect_id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
                    },
                    "action_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "node_id": {
                      "nullable": true,
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "turn": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "args": {},
                    "answered_by": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "mock": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "mock"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "string",
                          "enum": [
                            "source_receipt"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "unmocked"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "default"
                          ]
                        }
                      ]
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "succeeded",
                        "failed"
                      ]
                    },
                    "error_code": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 128
                    }
                  },
                  "required": [
                    "effect_id",
                    "action_id",
                    "node_id",
                    "turn",
                    "answered_by",
                    "state",
                    "error_code"
                  ],
                  "additionalProperties": false
                }
              },
              "transfer": {
                "nullable": true,
                "type": "object",
                "properties": {
                  "node_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "turn": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "node_id",
                  "turn"
                ],
                "additionalProperties": false
              },
              "ended": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9_.:-]{0,127}$"
                  },
                  "class": {
                    "type": "string",
                    "enum": [
                      "completed",
                      "transferred",
                      "caller_hangup",
                      "max_turns",
                      "timeout",
                      "failed",
                      "cancelled",
                      "inactivity"
                    ]
                  },
                  "disposition": {
                    "nullable": true,
                    "type": "string",
                    "maxLength": 128
                  },
                  "infrastructure": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "reason",
                  "class",
                  "disposition",
                  "infrastructure"
                ],
                "additionalProperties": false
              },
              "variables": {
                "type": "object",
                "additionalProperties": {
                  "type": "string",
                  "maxLength": 4096
                }
              },
              "guard_events": {
                "maxItems": 2000,
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "compliance_block"
                          ]
                        },
                        "turn": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "rule": {
                          "type": "string",
                          "pattern": "^[a-z][a-z0-9_.:-]{0,127}$"
                        },
                        "clause_hash": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      },
                      "required": [
                        "type",
                        "turn",
                        "rule",
                        "clause_hash"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "rpc_unconfirmed"
                          ]
                        },
                        "turn": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "type",
                        "turn"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "atomic_unit"
                          ]
                        },
                        "turn": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "unit_id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "delivered": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "type",
                        "turn",
                        "unit_id",
                        "delivered"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              },
              "caller_trace": {
                "nullable": true,
                "type": "object",
                "properties": {
                  "clock": {
                    "type": "string",
                    "enum": [
                      "participant"
                    ]
                  },
                  "outcome": {
                    "type": "string",
                    "enum": [
                      "completed",
                      "failed",
                      "timeout"
                    ]
                  },
                  "truncated": {
                    "type": "boolean"
                  },
                  "lines": {
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "step": {
                          "nullable": true,
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "start": {
                          "type": "number"
                        },
                        "end": {
                          "type": "number"
                        },
                        "pauses": {
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "start": {
                                "type": "number"
                              },
                              "end": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "start",
                              "end"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "line",
                            "interjection",
                            "backchannel",
                            "beep",
                            "keypad"
                          ]
                        }
                      },
                      "required": [
                        "step",
                        "start",
                        "end",
                        "pauses",
                        "kind"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "agent_audio": {
                    "maxItems": 2000,
                    "type": "array",
                    "items": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "number"
                          }
                        ]
                      },
                      "minItems": 2,
                      "maxItems": 2
                    }
                  },
                  "joined_at_unix_ms": {
                    "default": null,
                    "nullable": true,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "clock",
                  "lines",
                  "agent_audio"
                ],
                "additionalProperties": false
              },
              "redaction": {
                "nullable": true,
                "type": "object",
                "properties": {
                  "policy_version": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "policy_version"
                ],
                "additionalProperties": false
              },
              "cost_usd": {
                "nullable": true,
                "type": "number",
                "minimum": 0
              }
            },
            "required": [
              "run",
              "language",
              "turns",
              "path",
              "tool_calls",
              "transfer",
              "ended",
              "variables",
              "guard_events",
              "caller_trace",
              "redaction",
              "cost_usd"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "test_run_id",
          "suite_id",
          "case_id",
          "name",
          "result",
          "case"
        ],
        "additionalProperties": false
      },
      "TrialResult": {
        "type": "object",
        "properties": {
          "case_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9][a-z0-9_-]*$"
          },
          "trial": {
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "attempt": {
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "run_id": {
            "nullable": true,
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "running",
              "evaluating",
              "settled",
              "cancelled"
            ]
          },
          "verdict": {
            "nullable": true,
            "type": "string",
            "enum": [
              "passed",
              "failed",
              "errored"
            ]
          },
          "reason": {
            "nullable": true,
            "type": "string",
            "pattern": "^[a-z][a-z0-9_.:-]{0,127}$"
          },
          "assertions": {
            "maxItems": 25,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "assertion_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]*$"
                },
                "type": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "verdict": {
                  "type": "string",
                  "enum": [
                    "passed",
                    "failed",
                    "not_applicable",
                    "insufficient_data",
                    "errored"
                  ]
                },
                "measured": {
                  "type": "object",
                  "additionalProperties": {
                    "nullable": true,
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 256
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      }
                    ]
                  }
                },
                "evidence": {
                  "type": "object",
                  "properties": {
                    "turns": {
                      "maxItems": 50,
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "node_ids": {
                      "maxItems": 50,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      }
                    },
                    "effect_ids": {
                      "maxItems": 20,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
                      }
                    }
                  },
                  "required": [
                    "turns",
                    "node_ids",
                    "effect_ids"
                  ],
                  "additionalProperties": false
                },
                "judge": {
                  "nullable": true,
                  "type": "object",
                  "properties": {
                    "score": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "rejudged": {
                      "type": "boolean"
                    },
                    "criteria": {
                      "maxItems": 12,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          "verdict": {
                            "type": "string",
                            "enum": [
                              "pass",
                              "fail",
                              "na"
                            ]
                          },
                          "score": {
                            "nullable": true,
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 5
                          },
                          "evidence_turns": {
                            "maxItems": 20,
                            "type": "array",
                            "items": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "rationale": {
                            "nullable": true,
                            "type": "string",
                            "maxLength": 300
                          }
                        },
                        "required": [
                          "id",
                          "verdict",
                          "score",
                          "evidence_turns",
                          "rationale"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "score",
                    "rejudged",
                    "criteria"
                  ],
                  "additionalProperties": false
                },
                "reason": {
                  "nullable": true,
                  "type": "string",
                  "pattern": "^[a-z][a-z0-9_.:-]{0,127}$"
                }
              },
              "required": [
                "assertion_id",
                "type",
                "verdict",
                "measured",
                "evidence",
                "judge",
                "reason"
              ],
              "additionalProperties": false
            }
          },
          "guard": {
            "type": "object",
            "properties": {
              "compliance_blocks": {
                "type": "object",
                "additionalProperties": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "rpc_unconfirmed": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "atomic_half_said": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "compliance_blocks",
              "rpc_unconfirmed",
              "atomic_half_said"
            ],
            "additionalProperties": false
          },
          "content_state": {
            "type": "string",
            "enum": [
              "retained",
              "expired"
            ]
          }
        },
        "required": [
          "case_id",
          "trial",
          "attempt",
          "run_id",
          "state",
          "verdict",
          "reason",
          "assertions",
          "guard",
          "content_state"
        ],
        "additionalProperties": false
      },
      "Run": {
        "type": "object",
        "properties": {
          "owner_id": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "minLength": 1
          },
          "tenant_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
          },
          "run_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
          },
          "agent_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
          },
          "publication": {
            "$ref": "#/components/schemas/PublicationRef"
          },
          "plan_schema_version": {
            "type": "integer",
            "minimum": 0,
            "exclusiveMinimum": true,
            "maximum": 9007199254740991
          },
          "channel": {
            "type": "string",
            "enum": [
              "cloud",
              "phone",
              "web"
            ]
          },
          "mode": {
            "type": "string",
            "enum": [
              "task",
              "chat",
              "background",
              "outbound",
              "inbound"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "admitted",
              "running",
              "ending",
              "completed",
              "failed",
              "cancelled",
              "rejected",
              "expired"
            ]
          },
          "phone_state": {
            "nullable": true,
            "type": "string",
            "enum": [
              "admitted",
              "preparing",
              "awaiting_sip",
              "dialing",
              "ringing",
              "active",
              "terminating",
              "ended",
              "rejected",
              "expired",
              "setup_failed"
            ]
          },
          "outcome": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/RunOutcome"
              }
            ]
          },
          "disposition": {
            "nullable": true,
            "type": "string"
          },
          "trigger": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "sip"
                    ]
                  },
                  "number_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
                  },
                  "call_id_sha256": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "kind",
                  "number_id",
                  "call_id_sha256"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "api"
                    ]
                  },
                  "idempotency_key_sha256": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "kind",
                  "idempotency_key_sha256"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "schedule"
                    ]
                  },
                  "trigger_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "scheduled_for": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  }
                },
                "required": [
                  "kind",
                  "trigger_id",
                  "scheduled_for"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "event"
                    ]
                  },
                  "trigger_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "source_event_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
                  }
                },
                "required": [
                  "kind",
                  "trigger_id",
                  "source_event_id"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "callback"
                    ]
                  },
                  "source_run_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
                  },
                  "effect_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
                  }
                },
                "required": [
                  "kind",
                  "source_run_id",
                  "effect_id"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "evaluation"
                    ]
                  },
                  "comparison_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
                  }
                },
                "required": [
                  "kind",
                  "comparison_id"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "test"
                    ]
                  },
                  "test_run_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
                  },
                  "suite_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
                  },
                  "case_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[a-z0-9][a-z0-9_-]*$"
                  },
                  "trial": {
                    "type": "integer",
                    "minimum": 0,
                    "exclusiveMinimum": true,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "kind",
                  "test_run_id",
                  "suite_id",
                  "case_id",
                  "trial"
                ],
                "additionalProperties": false
              }
            ]
          },
          "principal": {
            "$ref": "#/components/schemas/PrincipalRef"
          },
          "attempt_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "started_at": {
            "nullable": true,
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "ended_at": {
            "nullable": true,
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "version": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647
          },
          "to": {
            "nullable": true,
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "from": {
            "nullable": true,
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "duration_ms": {
            "nullable": true,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "test": {
            "type": "boolean"
          },
          "provider_keys": {
            "type": "object",
            "additionalProperties": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "enum": [
                        "platform"
                      ]
                    }
                  },
                  "required": [
                    "source"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "enum": [
                        "tenant"
                      ]
                    },
                    "last4": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 4
                    },
                    "fingerprint": {
                      "type": "string",
                      "pattern": "^sha256:[a-f0-9]{12}$"
                    }
                  },
                  "required": [
                    "source",
                    "last4",
                    "fingerprint"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          }
        },
        "required": [
          "owner_id",
          "environment",
          "tenant_id",
          "run_id",
          "agent_id",
          "publication",
          "plan_schema_version",
          "channel",
          "mode",
          "state",
          "phone_state",
          "outcome",
          "disposition",
          "trigger",
          "principal",
          "attempt_count",
          "created_at",
          "started_at",
          "ended_at",
          "version",
          "to",
          "from",
          "duration_ms",
          "metadata",
          "test"
        ],
        "additionalProperties": false
      },
      "PublicationRef": {
        "type": "object",
        "properties": {
          "agent_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
          },
          "version": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647
          },
          "digest": {
            "type": "string",
            "pattern": "^sha256:[a-f0-9]{64}$"
          }
        },
        "required": [
          "agent_id",
          "version",
          "digest"
        ],
        "additionalProperties": false
      },
      "RunOutcome": {
        "type": "object",
        "properties": {
          "transport": {
            "type": "string",
            "enum": [
              "completed",
              "busy",
              "no_answer",
              "rejected",
              "cancelled",
              "provider_failure",
              "admission_expired",
              "not_applicable"
            ]
          },
          "execution": {
            "type": "string",
            "enum": [
              "completed",
              "failed",
              "cancelled",
              "not_started",
              "unknown"
            ]
          },
          "contact": {
            "type": "string",
            "enum": [
              "human",
              "voicemail",
              "ivr",
              "unknown",
              "not_applicable"
            ]
          },
          "business": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "known"
                    ]
                  },
                  "value": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                },
                "required": [
                  "status",
                  "value"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "unknown"
                    ]
                  }
                },
                "required": [
                  "status"
                ],
                "additionalProperties": false
              }
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "result": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ContentRef"
              }
            ]
          }
        },
        "required": [
          "transport",
          "execution",
          "contact",
          "business",
          "reason",
          "result"
        ],
        "additionalProperties": false
      },
      "ContentRef": {
        "type": "object",
        "properties": {
          "artifact_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "byte_size": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "media_type": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "expires_at": {
            "nullable": true,
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "artifact_id",
          "sha256",
          "byte_size",
          "media_type",
          "expires_at"
        ],
        "additionalProperties": false
      },
      "PrincipalRef": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "owner_id": {
                "type": "string",
                "minLength": 1
              },
              "environment": {
                "type": "string",
                "minLength": 1
              },
              "kind": {
                "type": "string",
                "enum": [
                  "user"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
              }
            },
            "required": [
              "owner_id",
              "environment",
              "kind",
              "id"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "owner_id": {
                "type": "string",
                "minLength": 1
              },
              "environment": {
                "type": "string",
                "minLength": 1
              },
              "kind": {
                "type": "string",
                "enum": [
                  "api_key"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
              }
            },
            "required": [
              "owner_id",
              "environment",
              "kind",
              "id"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "owner_id": {
                "type": "string",
                "minLength": 1
              },
              "environment": {
                "type": "string",
                "minLength": 1
              },
              "kind": {
                "type": "string",
                "enum": [
                  "system"
                ]
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              }
            },
            "required": [
              "owner_id",
              "environment",
              "kind",
              "id"
            ],
            "additionalProperties": false
          }
        ]
      },
      "ApiError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "unauthenticated",
                  "forbidden",
                  "not_found",
                  "conflict",
                  "invalid_request",
                  "idempotency_conflict",
                  "policy_denied",
                  "capability_unavailable",
                  "provider_unavailable",
                  "knowledge_unavailable",
                  "publication_invalid",
                  "run_not_active",
                  "rate_limited",
                  "outcome_unknown",
                  "internal"
                ]
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "none",
                  "unknown"
                ]
              },
              "details": {
                "type": "object",
                "additionalProperties": {}
              }
            },
            "required": [
              "code",
              "message",
              "retryable",
              "outcome"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      }
    }
  }
}

Errors and recovery

See API error handling and Troubleshooting.

Content version 40c5495cCustomer SDKMarkdown source
Get a trial transcript · Cumulus developer docs