ApiArena

Save test case

POST
/arena/suites/{suite_id}/cases

Saving with an existing key creates a new version; a version used in a run never changes. Every tool of the assistant needs a choice in tool_mode: live, mock or fault. There is no default. facts, each tool response and each criterion are at most 8 KB as JSON, the whole case at most 64 KB. source_call_ids must be calls of your organization.

Authorization

BearerAuth
AuthorizationBearer <token>

API key authentication. Get your key from the dashboard.

In: header

Path Parameters

suite_id*string

Test suite ID

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/arena/suites/497f6eca-6276-4993-bfeb-53cbbbba6f08/cases" \  -H "Content-Type: application/json" \  -d '{    "key": "string",    "goal": "string",    "criteria": [      {        "id": "string",        "kind": "must"      }    ]  }'
{
  "arena_case": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "suite_id": "3e9c08eb-436b-4d4b-9cfe-ca21d8bdb99b",
    "key": "string",
    "version": 0,
    "status": "proposed",
    "goal": "string",
    "tester_kind": "speech_to_speech",
    "tester_model": "primary",
    "persona_id": "string",
    "language_plan": {
      "language": "nl"
    },
    "audio_profile_id": "string",
    "channel": "clean",
    "channel_params": {},
    "timeline": [
      {
        "type": "noise",
        "at_s": 0,
        "at_turn": 1
      }
    ],
    "facts": {},
    "entities": [
      {
        "key": "string",
        "label": "string",
        "value": "7411 AB",
        "spoken": "string"
      }
    ],
    "tool_mode": {
      "property1": {
        "mode": "live",
        "response": null,
        "fault": "error",
        "message": "string",
        "delay_ms": 0,
        "then": "live"
      },
      "property2": {
        "mode": "live",
        "response": null,
        "fault": "error",
        "message": "string",
        "delay_ms": 0,
        "then": "live"
      }
    },
    "max_duration_s": 0,
    "criteria": [
      {
        "id": "string",
        "kind": "must",
        "severity": "normal",
        "text": "string",
        "tool": "string",
        "arguments": {},
        "destination": "string",
        "by": "assistant",
        "entity": "string",
        "stages": [
          "understood"
        ],
        "metric": "string",
        "max_ms": 0
      }
    ],
    "source_call_ids": [
      "65de6817-20ce-4664-a1cf-f5e36479682d"
    ],
    "created_by": "ai",
    "created_at": "2019-08-24T14:15:22Z"
  }
}
{
  "error": "Invalid API key",
  "message": "string"
}
{
  "error": "Invalid API key",
  "message": "string"
}
{
  "error": "Invalid API key",
  "message": "string"
}
{
  "error": "Invalid API key",
  "message": "string"
}