{"openapi":"3.1.0","info":{"title":"Voicebot Tester Service for ThinkOwl","description":"<CENTER><img src=\"/static/voicebot-tester.png\"></CENTER><BR>OpenAPI-first contract for voicebot test execution, diagnostics, and artifacts.","contact":{"url":"http://www.thinkowl.com/"},"license":{"name":"ThinkOwl Usage License","url":"http://www.thinkowl.com/"},"version":"v1"},"paths":{"/metrics":{"get":{"summary":"Combined Metrics","description":"Expose combined metrics from the local instrumentator and the external server.","operationId":"combined_metrics_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/test/":{"post":{"summary":" Classify Text","description":"Template smoke endpoint for quick connectivity checks.\n\nBig picture:\nThis endpoint is intentionally simple and does not call ThinkOwl services. It is useful for probes that only need to\nverify that routing, request parsing, and serialization are alive.\n\nExample:\n```bash\ncurl -X POST \"http://localhost:8080/v1/test/\"       -H \"Content-Type: text/plain\"       --data \"ping\"\n```","operationId":"_classify_text_v1_test__post","requestBody":{"content":{"text/plain":{"schema":{"type":"string","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_TestResponse"}}}},"404":{"description":"Not Found","detail":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/valid":{"get":{"summary":" Is Valid","description":"Validate bearer token and return claims.\n\nBig picture:\nThis is the authorization guardrail endpoint for environments that need to validate IAM integration before allowing\nrun operations.","operationId":"_is_valid_v1_valid_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedMessage"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/runs":{"post":{"summary":" Start Run","description":"Create a new asynchronous run from selected testcase files or test scenarios.\n\nBig picture:\nThis is the execution entrypoint of the service. It snapshots credentials + execution config + selected files or\nscenario IDs and schedules background processing. The caller receives a `run_id` for later status/report calls.\nExactly one input kind is accepted: testcase file selections or scenario selection\n(`scenario_id` for one scenario, `scenario_ids` for several scenarios executed in one run).\nScenario runs are mutually exclusive with file selections; an explicitly empty `scenario_ids`\nlist and duplicate IDs are rejected; all referenced scenarios and their entities must exist for the desk\nbefore the run is scheduled.\n\nExample:\n```bash\ncurl -X POST \"http://localhost:8080/v1/runs\"       -H \"Content-Type: application/json\"       -d '{\n    \"credentials\": {\n      \"username\": \"user@example.org\",\n      \"password\": \"secret\",\n      \"client_id\": \"frontend\",\n      \"auth_url\": \"https://tenant.example.org/oauth/token\",\n      \"api_url\": \"https://tenant.example.org\"\n    },\n    \"desk_id\": \"desk-123\",\n    \"execution\": {\n      \"test_mode\": \"json_static\",\n      \"execution_mode\": \"sequential\",\n      \"repeat_count\": 1,\n      \"max_calls_per_minute\": 300,\n      \"eval_openai_enabled\": true\n    },\n    \"input\": {\n      \"selected_files\": [\"checkout.json\"],\n      \"selected_dynamic_case_ids\": []\n    }\n  }'\n```\n\nExample (multiple scenarios in one run):\n```bash\ncurl -X POST \"http://localhost:8080/v1/runs\"       -H \"Content-Type: application/json\"       -d '{\n    \"credentials\": {\n      \"username\": \"user@example.org\",\n      \"password\": \"secret\",\n      \"client_id\": \"frontend\",\n      \"auth_url\": \"https://tenant.example.org/oauth/token\",\n      \"api_url\": \"https://tenant.example.org\"\n    },\n    \"desk_id\": \"desk-123\",\n    \"execution\": {\n      \"test_mode\": \"json_static\",\n      \"execution_mode\": \"sequential\"\n    },\n    \"input\": {\n      \"scenario_ids\": [\"3f2c1a6e-1111-2222-3333-444455556666\", \"9b8a7c6d-1111-4222-8333-944455556666\"]\n    }\n  }'\n```\n\nWith `execution_mode: parallel` the scenarios run concurrently, in `sequential` mode\n(the default) they run one after another in the given order. The final report\n(`GET /v1/runs/{run_id}/report`) contains one entry per executed scenario; if some\nscenarios fail while others succeed, the run finishes in state `completed_with_errors`.","operationId":"_start_run_v1_runs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_StartRunRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_StartRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/runs:scheduled":{"get":{"summary":" List Scheduled Runs","description":"List scheduled runs, optionally filtered by desk_id.","operationId":"_list_scheduled_runs_v1_runs_scheduled_get","parameters":[{"name":"desk_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by desk identifier.","title":"Desk Id"},"description":"Filter by desk identifier."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_ListScheduledRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/runs:scheduled/{run_id}":{"delete":{"summary":" Cancel Scheduled Run","description":"Cancel a scheduled run before its scheduled time. If desk_id is provided, the in-memory record must match.","operationId":"_cancel_scheduled_run_v1_runs_scheduled__run_id__delete","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","description":"Scheduled run identifier.","title":"Run Id"},"description":"Scheduled run identifier."},{"name":"desk_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Desk identifier for access control.","title":"Desk Id"},"description":"Desk identifier for access control."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_AbortRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/runs/{run_id}":{"get":{"summary":" Get Run Status","description":"Get current status, progress counters, and partial summary for one run.\n\nBig picture:\nUse this endpoint as the primary polling API after `POST /v1/runs`.\nFrontends usually poll every few seconds until `progress.state` is `success`, `error`, or `aborted`.\n\nExample:\n```bash\ncurl \"http://localhost:8080/v1/runs/run_1716201000000?desk_id=desk-123\"\n```","operationId":"_get_run_status_v1_runs__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","description":"Run identifier.","title":"Run Id"},"description":"Run identifier."},{"name":"desk_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Desk ID for access control.","title":"Desk Id"},"description":"Desk ID for access control."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_RunStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/runs/{run_id}/abort":{"post":{"summary":" Abort Run","description":"Request graceful abort for one run. Requires matching desk_id if the run was created with one.","operationId":"_abort_run_v1_runs__run_id__abort_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","description":"Run identifier.","title":"Run Id"},"description":"Run identifier."},{"name":"desk_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Desk identifier for access control.","title":"Desk Id"},"description":"Desk identifier for access control."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_AbortRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/runs/{run_id}/report":{"get":{"summary":" Get Run Report","description":"Return final aggregated report for a completed run. Requires matching desk_id if the run was created with one.","operationId":"_get_run_report_v1_runs__run_id__report_get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","description":"Run identifier.","title":"Run Id"},"description":"Run identifier."},{"name":"desk_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Desk identifier for access control.","title":"Desk Id"},"description":"Desk identifier for access control."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_RunReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/testcases":{"get":{"summary":" List Testcases","description":"List all uploaded testcase files currently available for run selection.\n\nBig picture:\nThis endpoint provides the inventory for UI file pickers before `POST /v1/runs`.","operationId":"_list_testcases_v1_testcases_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_ListTestcasesResponse"}}}}}}},"/v1/testcases:upload":{"post":{"summary":" Upload Testcases","description":"Upload one or more testcase files (`.json` or `.csv`) via multipart form-data.\n\nBig picture:\nThis endpoint is the first step in the execution pipeline. Uploaded files are persisted in the service upload\ndirectory and can then be previewed and selected for runs.\n\nExample:\n```bash\ncurl -X POST \"http://localhost:8080/v1/testcases:upload\"       -F \"files=@./examples/checkout.json\"       -F \"files=@./examples/dynamic_cases.csv\"\n```","operationId":"_upload_testcases_v1_testcases_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body__upload_testcases_v1_testcases_upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_UploadTestcasesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/testcases/{filename}/preview":{"get":{"summary":" Get Testcase Preview","description":"Parse and preview one uploaded testcase file.\n\nBig picture:\nCall this between upload and run start to verify parseability and inspect dynamic row extraction for CSV files.","operationId":"_get_testcase_preview_v1_testcases__filename__preview_get","parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","description":"Uploaded testcase filename.","title":"Filename"},"description":"Uploaded testcase filename."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_TestcasePreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/testcases/{filename}":{"delete":{"summary":" Delete Testcase","description":"Delete one uploaded testcase file.\n\nBig picture:\nThis housekeeping endpoint keeps the testcase repository clean between iterations and CI runs.","operationId":"_delete_testcase_v1_testcases__filename__delete","parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","description":"Uploaded testcase filename.","title":"Filename"},"description":"Uploaded testcase filename."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_DeleteTestcaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/test":{"post":{"summary":" Test Auth","description":"Validate ThinkOwl credentials by requesting an auth token.\n\nBig picture:\nUse this as a preflight check before long runs so users get immediate feedback on credentials/tenant configuration.\n\nExample:\n```bash\ncurl -X POST \"http://localhost:8080/v1/auth/test\"       -H \"Content-Type: application/json\"       -d '{\n    \"credentials\": {\n      \"username\": \"user@example.org\",\n      \"password\": \"secret\",\n      \"client_id\": \"frontend\",\n      \"auth_url\": \"https://tenant.example.org/oauth/token\",\n      \"api_url\": \"https://tenant.example.org\"\n    },\n    \"desk_id\": \"desk-123\"\n  }'\n```","operationId":"_test_auth_v1_auth_test_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_AuthTestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_AuthTestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sip/test-connection":{"post":{"summary":" Test Sip Connection","description":"Run SIP diagnostic probe.\n\nBig picture:\nPlaceholder endpoint for SIP diagnostics in the service roadmap. It currently returns a normalized\n`NOT_IMPLEMENTED` response.","operationId":"_test_sip_connection_v1_sip_test_connection_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_SipTestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_SipTestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/progress":{"get":{"summary":" Get Progress","description":"Get progress snapshot of the latest run, optionally filtered by desk_id.","operationId":"_get_progress_v1_progress_get","parameters":[{"name":"desk_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Desk identifier for filtering.","title":"Desk Id"},"description":"Desk identifier for filtering."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_ProgressResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bot-config/intents":{"post":{"summary":" Inspect Bot Intents","description":"Fetch and normalize ThinkOwl intents for configuration inspection.\n\nBig picture:\nThis endpoint supports diagnostics and builder UX by exposing simplified intent metadata retrieved from bot-service.","operationId":"_inspect_bot_intents_v1_bot_config_intents_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_BotConfigRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bot-config/entities":{"post":{"summary":" Inspect Bot Entities","description":"Fetch and normalize ThinkOwl entities for configuration inspection.\n\nBig picture:\nUseful for validating whether entity setup in tenant configuration matches testcase expectations.","operationId":"_inspect_bot_entities_v1_bot_config_entities_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_BotConfigRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bot-config/triggers":{"post":{"summary":" Inspect Bot Triggers","description":"Fetch and flatten trigger definitions across intents.\n\nBig picture:\nHelps explain routing behavior of the bot by making trigger rules auditable in one response payload.","operationId":"_inspect_bot_triggers_v1_bot_config_triggers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_BotConfigRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bot-config/settings":{"post":{"summary":" Inspect Bot Settings","description":"Fetch current bot settings for the target desk.\n\nBig picture:\nThis endpoint complements intents/entities/triggers to build a complete configuration snapshot used in debugging.","operationId":"_inspect_bot_settings_v1_bot_config_settings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_BotConfigRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bot-config/intents/{intent_id}":{"post":{"summary":" Inspect Intent Details Post","description":"Inspect one specific intent including associated entities (Swagger-friendly POST variant).","operationId":"_inspect_intent_details_post_v1_bot_config_intents__intent_id__post","parameters":[{"name":"intent_id","in":"path","required":true,"schema":{"type":"string","description":"Intent identifier.","title":"Intent Id"},"description":"Intent identifier."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_IntentDetailsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":" Inspect Intent Details","description":"Inspect one specific intent including associated entities.\n\nBig picture:\nDrill-down endpoint used when list-level inspections indicate a problematic intent and deeper context is required.","operationId":"_inspect_intent_details_v1_bot_config_intents__intent_id__get","parameters":[{"name":"intent_id","in":"path","required":true,"schema":{"type":"string","description":"Intent identifier.","title":"Intent Id"},"description":"Intent identifier."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_IntentDetailsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/builder/session":{"post":{"summary":" Builder New Session","description":"Create a new builder chat session.\n\nBig picture:\nBuilder endpoints provide an authoring flow for testcase creation. A new `case_id` starts a conversation context\nwhich can then be used with `/v1/builder/chat`.","operationId":"_builder_new_session_v1_builder_session_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_BuilderNewSessionResponse"}}}}}}},"/v1/builder/chat":{"post":{"summary":" Builder Chat","description":"Send one message to the builder chatbot and return extracted intent/entity hints.\n\nBig picture:\nThis endpoint powers interactive testcase authoring. Users iterate in chat, then validate/save JSON drafts via the\nsubsequent builder endpoints.","operationId":"_builder_chat_v1_builder_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_BuilderChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_BuilderChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/builder/validate":{"post":{"summary":" Builder Validate","description":"Validate a draft without persisting it.\n\nDeprecated:\nUse POST /v1/builder/save?dry_run=true instead. This endpoint is kept for backwards compatibility.","operationId":"_builder_validate_v1_builder_validate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body__builder_validate_v1_builder_validate_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_BuilderValidateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/builder/save":{"post":{"summary":" Builder Save","description":"Validate a testcase draft; optionally persist it into upload storage.\n\nBig picture:\nWhen dry_run is set, the endpoint validates the draft without saving — useful for\npre-save quality checks. Without dry_run, the validated file is written to disk and\nimmediately available via /v1/testcases and /v1/runs.\n\nExample:\n```bash\ncurl -X POST \"http://localhost:8080/v1/builder/save?dry_run=true\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"testcase_name\": \"checkout_from_builder\",\n    \"raw_json\": \"{\"dialog\":[{\"user_input\":\"Hallo\",\"expected_response\":\"\"}]}\"\n  }'\n```","operationId":"_builder_save_v1_builder_save_post","parameters":[{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Dry Run"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_BuilderSaveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/artifacts/{relative_path}":{"get":{"summary":" Download Artifact","description":"Download one generated artifact file by relative path.\n\nBig picture:\nReport responses include artifact references with relative paths. This endpoint is the final retrieval step for\ndashboards, exports, and post-run audits.\n\nExample:\n```bash\ncurl -L \"http://localhost:8080/v1/artifacts/runs/run_1716201000000/report.json\" -o report.json\n```","operationId":"_download_artifact_v1_artifacts__relative_path__get","parameters":[{"name":"relative_path","in":"path","required":true,"schema":{"type":"string","description":"Artifact path relative to service artifact root.","title":"Relative Path"},"description":"Artifact path relative to service artifact root."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/builder/entities":{"post":{"summary":" Create Entity","description":"Create a new Test Entity.","operationId":"_create_entity_v1_builder_entities_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_CreateEntityRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_EntityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":" List Entities","description":"List stored Test Entities for a desk with pagination and optional name filter.","operationId":"_list_entities_v1_builder_entities_get","parameters":[{"name":"desk_id","in":"query","required":true,"schema":{"type":"string","title":"Desk Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_PaginatedEntitiesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/builder/entities/{entity_id}":{"get":{"summary":" Get Entity","description":"Get a single Test Entity by UUID.","operationId":"_get_entity_v1_builder_entities__entity_id__get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"desk_id","in":"query","required":true,"schema":{"type":"string","title":"Desk Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_EntityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":" Update Entity","description":"Replace a Test Entity (full PUT — all fields required).","operationId":"_update_entity_v1_builder_entities__entity_id__put","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_UpdateEntityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_EntityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":" Delete Entity","description":"Delete a Test Entity by UUID.","operationId":"_delete_entity_v1_builder_entities__entity_id__delete","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"desk_id","in":"query","required":true,"schema":{"type":"string","title":"Desk Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_DeleteEntityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/builder/scenarios":{"post":{"summary":" Create Scenario","description":"Create a new Test Scenario.","operationId":"_create_scenario_v1_builder_scenarios_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_CreateScenarioRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_ScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":" List Scenarios","description":"List stored Test Scenarios for a desk with pagination and optional name/channel filters.","operationId":"_list_scenarios_v1_builder_scenarios_get","parameters":[{"name":"desk_id","in":"query","required":true,"schema":{"type":"string","description":"Desk ID to scope the scenario list.","title":"Desk Id"},"description":"Desk ID to scope the scenario list."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case-insensitive substring filter on scenario name.","title":"Name"},"description":"Case-insensitive substring filter on scenario name."},{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"enum":["CHAT","PHONE","EMAIL"],"type":"string"},{"type":"null"}],"description":"Optional exact filter on scenario channel (CHAT, PHONE, EMAIL); matching is case-insensitive.","title":"Channel"},"description":"Optional exact filter on scenario channel (CHAT, PHONE, EMAIL); matching is case-insensitive."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_PaginatedScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/builder/scenarios/{scenario_id}":{"get":{"summary":" Get Scenario","description":"Get a single Test Scenario by UUID within the given desk.","operationId":"_get_scenario_v1_builder_scenarios__scenario_id__get","parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","title":"Scenario Id"}},{"name":"desk_id","in":"query","required":true,"schema":{"type":"string","description":"Desk ID to scope the scenario lookup.","title":"Desk Id"},"description":"Desk ID to scope the scenario lookup."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_ScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":" Update Scenario","description":"Replace a Test Scenario (full PUT — all fields required).","operationId":"_update_scenario_v1_builder_scenarios__scenario_id__put","parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","title":"Scenario Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_UpdateScenarioRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_ScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":" Delete Scenario","description":"Delete a Test Scenario by UUID within the given desk.","operationId":"_delete_scenario_v1_builder_scenarios__scenario_id__delete","parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","title":"Scenario Id"}},{"name":"desk_id","in":"query","required":true,"schema":{"type":"string","description":"Desk ID to scope the deletion.","title":"Desk Id"},"description":"Desk ID to scope the deletion."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_DeleteScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body__builder_validate_v1_builder_validate_post":{"properties":{"raw_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Json"},"raw_csv":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Csv"},"draft_format":{"type":"string","enum":["json","csv_dynamic"],"title":"Draft Format","default":"json"}},"type":"object","title":"Body__builder_validate_v1_builder_validate_post"},"Body__upload_testcases_v1_testcases_upload_post":{"properties":{"files":{"anyOf":[{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array"},{"type":"null"}],"title":"Files"}},"type":"object","title":"Body__upload_testcases_v1_testcases_upload_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"UnauthorizedMessage":{"properties":{"detail":{"type":"string","title":"Detail","default":"Bearer token missing or unknown"}},"type":"object","title":"UnauthorizedMessage","description":"A message to be returned when the user is unauthorized."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"_AbortRunResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"run_id":{"type":"string","title":"Run Id"},"state":{"type":"string","enum":["queued","running","success","error","aborted","scheduled","cancelled","completed_with_errors"],"title":"State"},"message":{"type":"string","title":"Message"}},"additionalProperties":false,"type":"object","required":["run_id","state","message"],"title":"_AbortRunResponse","description":"Response after aborting or requesting abort."},"_ApiUsage":{"properties":{"thinkowl_calls":{"type":"integer","title":"Thinkowl Calls","default":0},"openai_calls":{"type":"integer","title":"Openai Calls","default":0},"openai_prompt_tokens":{"type":"integer","title":"Openai Prompt Tokens","default":0},"openai_response_tokens":{"type":"integer","title":"Openai Response Tokens","default":0},"openai_total_tokens":{"type":"integer","title":"Openai Total Tokens","default":0}},"additionalProperties":false,"type":"object","title":"_ApiUsage","description":"Aggregated API usage counters."},"_ArtifactRef":{"properties":{"id":{"type":"string","title":"Id"},"path":{"type":"string","title":"Path"},"url":{"type":"string","title":"Url"},"label":{"type":"string","title":"Label"},"role":{"type":"string","title":"Role"},"format":{"type":"string","title":"Format"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"additionalProperties":false,"type":"object","required":["id","path","url","label","role","format"],"title":"_ArtifactRef","description":"Reference to generated artifacts."},"_AuthTestRequest":{"properties":{"credentials":{"$ref":"#/components/schemas/_ThinkOwlCredentials"},"desk_id":{"type":"string","title":"Desk Id"}},"additionalProperties":false,"type":"object","required":["credentials","desk_id"],"title":"_AuthTestRequest","description":"Auth diagnostic request."},"_AuthTestResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"token_type":{"type":"string","title":"Token Type"},"expires_in":{"type":"integer","title":"Expires In"},"message":{"type":"string","title":"Message"}},"additionalProperties":false,"type":"object","required":["token_type","expires_in","message"],"title":"_AuthTestResponse","description":"Auth diagnostic response."},"_BotConfigRequest":{"properties":{"credentials":{"$ref":"#/components/schemas/_ThinkOwlCredentials"},"desk_id":{"type":"string","title":"Desk Id"}},"additionalProperties":false,"type":"object","required":["credentials","desk_id"],"title":"_BotConfigRequest","description":"Request schema for bot config inspector endpoints."},"_BuilderChatRequest":{"properties":{"case_id":{"type":"string","title":"Case Id"},"channel":{"type":"string","title":"Channel","default":"CHAT"},"is_first_message":{"type":"boolean","title":"Is First Message","default":false},"message":{"type":"string","title":"Message"},"credentials":{"$ref":"#/components/schemas/_ThinkOwlCredentials"},"desk_id":{"type":"string","title":"Desk Id"}},"additionalProperties":false,"type":"object","required":["case_id","message","credentials","desk_id"],"title":"_BuilderChatRequest","description":"Builder chat request."},"_BuilderChatResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"response_text":{"type":"string","title":"Response Text"},"detected_intent":{"type":"string","title":"Detected Intent"},"detected_entities":{"items":{"type":"string"},"type":"array","title":"Detected Entities"}},"additionalProperties":false,"type":"object","required":["response_text","detected_intent"],"title":"_BuilderChatResponse","description":"Builder chat response."},"_BuilderNewSessionResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"case_id":{"type":"string","title":"Case Id"}},"additionalProperties":false,"type":"object","required":["case_id"],"title":"_BuilderNewSessionResponse","description":"Builder session response."},"_BuilderSaveRequest":{"properties":{"testcase_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testcase Name"},"raw_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Json"},"raw_csv":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Csv"},"draft_format":{"type":"string","enum":["json","csv_dynamic"],"title":"Draft Format","default":"json"}},"additionalProperties":false,"type":"object","title":"_BuilderSaveRequest","description":"Builder save request."},"_BuilderValidateResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"step_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step Count"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"}},"additionalProperties":false,"type":"object","required":["ok"],"title":"_BuilderValidateResponse","description":"Builder validate response."},"_CreateEntityRequest":{"properties":{"name":{"type":"string","title":"Name"},"desk_id":{"type":"string","title":"Desk Id"},"persona":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona"},"values":{"additionalProperties":{"anyOf":[{"type":"string"},{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"}]},"type":"object","title":"Values"}},"additionalProperties":false,"type":"object","required":["name","desk_id","values"],"title":"_CreateEntityRequest","description":"Request body for creating a Test Entity."},"_CreateScenarioRequest":{"properties":{"name":{"type":"string","title":"Name"},"desk_id":{"type":"string","title":"Desk Id"},"description":{"type":"string","title":"Description","default":""},"channel":{"type":"string","enum":["CHAT","PHONE","EMAIL"],"title":"Channel","default":"CHAT"},"language":{"type":"string","title":"Language","default":"de"},"entity_id":{"type":"string","title":"Entity Id"},"steps":{"items":{"$ref":"#/components/schemas/_TestStep"},"type":"array","minItems":1,"title":"Steps"}},"additionalProperties":false,"type":"object","required":["name","desk_id","entity_id","steps"],"title":"_CreateScenarioRequest","description":"Request body for creating a Test Scenario."},"_DeleteEntityResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"id":{"type":"string","title":"Id"},"deleted":{"type":"boolean","title":"Deleted"}},"additionalProperties":false,"type":"object","required":["id","deleted"],"title":"_DeleteEntityResponse","description":"Response envelope for entity deletion."},"_DeleteScenarioResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"id":{"type":"string","title":"Id"},"deleted":{"type":"boolean","title":"Deleted"}},"additionalProperties":false,"type":"object","required":["id","deleted"],"title":"_DeleteScenarioResponse","description":"Response envelope for scenario deletion."},"_DeleteTestcaseResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"filename":{"type":"string","title":"Filename"},"deleted":{"type":"boolean","title":"Deleted"}},"additionalProperties":false,"type":"object","required":["filename","deleted"],"title":"_DeleteTestcaseResponse","description":"Delete endpoint result."},"_EntityResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"entity":{"$ref":"#/components/schemas/_TestEntity"}},"additionalProperties":false,"type":"object","required":["entity"],"title":"_EntityResponse","description":"Response envelope for a single Test Entity."},"_ExecutionConfig":{"properties":{"test_mode":{"type":"string","enum":["json_static","csv_dynamic","sip_dynamic"],"title":"Test Mode","default":"json_static"},"execution_mode":{"type":"string","enum":["sequential","parallel"],"title":"Execution Mode","default":"sequential"},"max_calls_per_minute":{"type":"integer","title":"Max Calls Per Minute","default":600},"repeat_count":{"type":"integer","title":"Repeat Count","default":1},"eval_openai_enabled":{"type":"boolean","title":"Eval Openai Enabled","default":true},"eval_openai_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eval Openai Key"},"eval_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eval Prompt"},"scenario_turn_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Scenario Turn Limit"},"intent_suggestions_enabled":{"type":"boolean","title":"Intent Suggestions Enabled","default":false}},"additionalProperties":false,"type":"object","title":"_ExecutionConfig","description":"Execution behavior for test runs."},"_IntentDetailsRequest":{"properties":{"credentials":{"$ref":"#/components/schemas/_ThinkOwlCredentials"},"desk_id":{"type":"string","title":"Desk Id"}},"additionalProperties":false,"type":"object","required":["credentials","desk_id"],"title":"_IntentDetailsRequest","description":"Request schema for one intent details lookup."},"_ListScheduledRunsResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"scheduled_runs":{"items":{"$ref":"#/components/schemas/_ScheduledRunEntry"},"type":"array","title":"Scheduled Runs"}},"additionalProperties":false,"type":"object","title":"_ListScheduledRunsResponse","description":"Response for listing all scheduled runs."},"_ListTestcasesResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"files":{"items":{"type":"string"},"type":"array","title":"Files"}},"additionalProperties":false,"type":"object","title":"_ListTestcasesResponse","description":"List of uploaded testcase files."},"_PaginatedEntitiesResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"entities":{"items":{"$ref":"#/components/schemas/_TestEntity"},"type":"array","title":"Entities"},"total":{"type":"integer","title":"Total","default":0},"page":{"type":"integer","title":"Page","default":1},"page_size":{"type":"integer","title":"Page Size","default":20}},"additionalProperties":false,"type":"object","title":"_PaginatedEntitiesResponse","description":"Paginated response envelope for Test Entities."},"_PaginatedScenariosResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"scenarios":{"items":{"$ref":"#/components/schemas/_TestScenario"},"type":"array","title":"Scenarios"},"total":{"type":"integer","title":"Total","default":0},"page":{"type":"integer","title":"Page","default":1},"page_size":{"type":"integer","title":"Page Size","default":20}},"additionalProperties":false,"type":"object","title":"_PaginatedScenariosResponse","description":"Paginated response envelope for Test Scenarios."},"_ProgressResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"progress":{"$ref":"#/components/schemas/_ProgressSnapshot"}},"additionalProperties":false,"type":"object","required":["progress"],"title":"_ProgressResponse","description":"Compatibility progress response for migration phase."},"_ProgressSnapshot":{"properties":{"run_id":{"type":"string","title":"Run Id"},"state":{"type":"string","enum":["queued","running","success","error","aborted","scheduled","cancelled","completed_with_errors"],"title":"State"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finished At"},"scheduled_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheduled At"},"total_files":{"type":"integer","title":"Total Files","default":0},"completed_files":{"type":"integer","title":"Completed Files","default":0},"total_steps":{"type":"integer","title":"Total Steps","default":0},"completed_steps":{"type":"integer","title":"Completed Steps","default":0},"current_file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current File"},"current_file_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current File Index"},"current_file_steps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current File Steps"},"thinkowl_calls":{"type":"integer","title":"Thinkowl Calls","default":0},"openai_calls":{"type":"integer","title":"Openai Calls","default":0},"openai_prompt_tokens":{"type":"integer","title":"Openai Prompt Tokens","default":0},"openai_response_tokens":{"type":"integer","title":"Openai Response Tokens","default":0},"openai_total_tokens":{"type":"integer","title":"Openai Total Tokens","default":0},"sip_live_monitoring_enabled":{"type":"boolean","title":"Sip Live Monitoring Enabled","default":true},"sip_monitor_artifact":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sip Monitor Artifact"},"sip_visualization":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sip Visualization"},"run_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Name"}},"additionalProperties":false,"type":"object","required":["run_id","state"],"title":"_ProgressSnapshot","description":"Run progress and usage counters."},"_RunInputSelection":{"properties":{"selected_files":{"items":{"type":"string"},"type":"array","title":"Selected Files"},"selected_dynamic_case_ids":{"items":{"type":"string"},"type":"array","title":"Selected Dynamic Case Ids"},"scenario_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scenario Id","description":"ID of a single test scenario to run. Mutually exclusive with 'scenario_ids', 'selected_files' and 'selected_dynamic_case_ids'."},"scenario_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scenario Ids","description":"IDs of several test scenarios to run in one run (request order is preserved). Mutually exclusive with 'scenario_id', 'selected_files' and 'selected_dynamic_case_ids'. An explicitly empty list is rejected; omit the field to run testcase files instead."}},"additionalProperties":false,"type":"object","title":"_RunInputSelection","description":"Input file and case selections for starting runs.\n\nExactly one input kind is accepted per run: uploaded testcase files\n(``selected_files`` / ``selected_dynamic_case_ids``) or scenarios\n(``scenario_id`` for a single scenario, ``scenario_ids`` for several\nscenarios that run in one run). Scenario selection is mutually exclusive\nwith both other scenario selection and with file selections. An explicitly\nempty ``scenario_ids`` list is rejected — omit the field instead."},"_RunReportFiles":{"properties":{"json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Json"},"pdf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdf"}},"additionalProperties":false,"type":"object","title":"_RunReportFiles","description":"Report file references."},"_RunReportResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"run_id":{"type":"string","title":"Run Id"},"status":{"type":"string","enum":["queued","running","success","error","aborted","scheduled","cancelled","completed_with_errors"],"title":"Status"},"timestamp":{"type":"string","title":"Timestamp"},"run_count":{"type":"integer","title":"Run Count"},"total_steps":{"type":"integer","title":"Total Steps"},"aggregate_report":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Aggregate Report"},"evaluation_runs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Evaluation Runs"},"api_usage":{"$ref":"#/components/schemas/_ApiUsage"},"report_files":{"$ref":"#/components/schemas/_RunReportFiles"},"artifacts":{"items":{"$ref":"#/components/schemas/_ArtifactRef"},"type":"array","title":"Artifacts"},"run_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Name"}},"additionalProperties":false,"type":"object","required":["run_id","status","timestamp","run_count","total_steps","api_usage","report_files"],"title":"_RunReportResponse","description":"Final report payload for one run."},"_RunStatusResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"run_id":{"type":"string","title":"Run Id"},"progress":{"$ref":"#/components/schemas/_ProgressSnapshot"},"result_summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result Summary"}},"additionalProperties":false,"type":"object","required":["run_id","progress"],"title":"_RunStatusResponse","description":"Detailed status response for a run."},"_ScenarioResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"scenario":{"$ref":"#/components/schemas/_TestScenario"}},"additionalProperties":false,"type":"object","required":["scenario"],"title":"_ScenarioResponse","description":"Response envelope for a single Test Scenario."},"_ScheduledRunEntry":{"properties":{"run_id":{"type":"string","title":"Run Id"},"state":{"type":"string","enum":["queued","running","success","error","aborted","scheduled","cancelled","completed_with_errors"],"title":"State"},"scheduled_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheduled At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"selected_files":{"items":{"type":"string"},"type":"array","title":"Selected Files"},"test_mode":{"type":"string","enum":["json_static","csv_dynamic","sip_dynamic"],"title":"Test Mode","default":"json_static"},"run_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Name"}},"additionalProperties":false,"type":"object","required":["run_id","state"],"title":"_ScheduledRunEntry","description":"Single scheduled run entry for list responses."},"_SipConfig":{"properties":{"sip_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Domain"},"sip_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Username"},"sip_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Password"},"sip_auth_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Auth Username"},"sip_auth_realm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Auth Realm","default":"*"},"sip_auth_scheme":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Auth Scheme","default":"digest"},"sip_id_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Id Uri"},"sip_registrar_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Registrar Uri"},"sip_proxy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Proxy"},"sip_stun_server":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Stun Server"},"sip_local_port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sip Local Port","default":5068},"sip_target_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Target Number"},"sip_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Display Name"},"sip_transport":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Transport","default":"udp"},"sip_audio_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Audio Format","default":"wav"},"sip_tts_voice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Tts Voice","default":"alloy"},"sip_stt_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sip Stt Language","default":"de"},"sip_live_monitoring_enabled":{"type":"boolean","title":"Sip Live Monitoring Enabled","default":true},"sip_silence_duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sip Silence Duration Ms","default":1200},"sip_silence_threshold_db":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sip Silence Threshold Db","default":-38},"sip_max_turn_recording_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sip Max Turn Recording Seconds","default":30}},"additionalProperties":false,"type":"object","title":"_SipConfig","description":"SIP runtime settings."},"_SipTestRequest":{"properties":{"credentials":{"$ref":"#/components/schemas/_ThinkOwlCredentials"},"desk_id":{"type":"string","title":"Desk Id"},"sip":{"$ref":"#/components/schemas/_SipConfig"}},"additionalProperties":false,"type":"object","required":["credentials","desk_id","sip"],"title":"_SipTestRequest","description":"SIP diagnostic request."},"_SipTestResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"message":{"type":"string","title":"Message"},"details":{"additionalProperties":true,"type":"object","title":"Details"},"artifacts":{"items":{"$ref":"#/components/schemas/_ArtifactRef"},"type":"array","title":"Artifacts"}},"additionalProperties":false,"type":"object","required":["message"],"title":"_SipTestResponse","description":"SIP diagnostic response."},"_StartRunRequest":{"properties":{"credentials":{"$ref":"#/components/schemas/_ThinkOwlCredentials"},"desk_id":{"type":"string","title":"Desk Id"},"execution":{"$ref":"#/components/schemas/_ExecutionConfig"},"sip":{"anyOf":[{"$ref":"#/components/schemas/_SipConfig"},{"type":"null"}]},"input":{"$ref":"#/components/schemas/_RunInputSelection"},"scheduled_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheduled At"},"run_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Name"}},"additionalProperties":false,"type":"object","required":["credentials","desk_id","execution","input"],"title":"_StartRunRequest","description":"Request payload for creating a run."},"_StartRunResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"run_id":{"type":"string","title":"Run Id"},"state":{"type":"string","enum":["queued","running","success","error","aborted","scheduled","cancelled","completed_with_errors"],"title":"State"},"scheduled_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheduled At"},"run_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Name"}},"additionalProperties":false,"type":"object","required":["run_id","state"],"title":"_StartRunResponse","description":"Accepted response for a newly created run."},"_TestEntity":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"desk_id":{"type":"string","title":"Desk Id"},"persona":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona"},"values":{"additionalProperties":{"anyOf":[{"type":"string"},{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"}]},"type":"object","title":"Values"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"additionalProperties":false,"type":"object","required":["id","name","desk_id","values","created_at","updated_at"],"title":"_TestEntity","description":"A named profile of key/value customer data."},"_TestResponse":{"properties":{"value":{"type":"string","title":"Value"}},"additionalProperties":false,"type":"object","required":["value"],"title":"_TestResponse","description":"Basic smoke response model."},"_TestScenario":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"desk_id":{"type":"string","title":"Desk Id"},"description":{"type":"string","title":"Description","default":""},"channel":{"type":"string","enum":["CHAT","PHONE","EMAIL"],"title":"Channel","default":"CHAT"},"language":{"type":"string","title":"Language","default":"de"},"entity_id":{"type":"string","title":"Entity Id"},"steps":{"items":{"$ref":"#/components/schemas/_TestStep"},"type":"array","minItems":1,"title":"Steps"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"additionalProperties":false,"type":"object","required":["id","name","desk_id","entity_id","steps","created_at","updated_at"],"title":"_TestScenario","description":"A named, channel-specific dialog script."},"_TestStep":{"properties":{"prompt":{"type":"string","title":"Prompt"},"expected_response":{"type":"string","title":"Expected Response","default":""},"expected_intent":{"type":"string","title":"Expected Intent","default":""},"expected_intents":{"items":{"type":"string"},"type":"array","title":"Expected Intents"},"expected_entities":{"items":{"type":"string"},"type":"array","title":"Expected Entities"},"must_mention":{"items":{"type":"string"},"type":"array","title":"Must Mention"},"must_avoid":{"items":{"type":"string"},"type":"array","title":"Must Avoid"},"assessment_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment Prompt"},"dynamic_turn_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dynamic Turn Limit"}},"additionalProperties":false,"type":"object","required":["prompt"],"title":"_TestStep","description":"One dialog turn in a Test Scenario."},"_TestcasePreviewResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"filename":{"type":"string","title":"Filename"},"file_type":{"type":"string","enum":["json","csv"],"title":"File Type"},"preview":{"type":"string","title":"Preview"},"dynamic_case_preview_rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Dynamic Case Preview Rows"},"dynamic_case_preview_count":{"type":"integer","title":"Dynamic Case Preview Count","default":0}},"additionalProperties":false,"type":"object","required":["filename","file_type","preview"],"title":"_TestcasePreviewResponse","description":"Preview endpoint result."},"_ThinkOwlCredentials":{"properties":{"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"client_id":{"type":"string","title":"Client Id","default":"frontend"},"auth_url":{"type":"string","title":"Auth Url"},"api_url":{"type":"string","title":"Api Url"}},"additionalProperties":false,"type":"object","required":["username","password","auth_url","api_url"],"title":"_ThinkOwlCredentials","description":"ThinkOwl credentials required for auth and API calls."},"_UpdateEntityRequest":{"properties":{"name":{"type":"string","title":"Name"},"desk_id":{"type":"string","title":"Desk Id"},"persona":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona"},"values":{"additionalProperties":{"anyOf":[{"type":"string"},{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"}]},"type":"object","title":"Values"}},"additionalProperties":false,"type":"object","required":["name","desk_id","values"],"title":"_UpdateEntityRequest","description":"Request body for replacing a Test Entity (full PUT replacement)."},"_UpdateScenarioRequest":{"properties":{"name":{"type":"string","title":"Name"},"desk_id":{"type":"string","title":"Desk Id"},"description":{"type":"string","title":"Description","default":""},"channel":{"type":"string","enum":["CHAT","PHONE","EMAIL"],"title":"Channel","default":"CHAT"},"language":{"type":"string","title":"Language","default":"de"},"entity_id":{"type":"string","title":"Entity Id"},"steps":{"items":{"$ref":"#/components/schemas/_TestStep"},"type":"array","minItems":1,"title":"Steps"}},"additionalProperties":false,"type":"object","required":["name","desk_id","entity_id","steps"],"title":"_UpdateScenarioRequest","description":"Request body for replacing a Test Scenario (full PUT replacement)."},"_UploadTestcasesResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"saved":{"items":{"$ref":"#/components/schemas/_UploadedFileInfo"},"type":"array","title":"Saved"}},"additionalProperties":false,"type":"object","title":"_UploadTestcasesResponse","description":"Upload endpoint result."},"_UploadedFileInfo":{"properties":{"filename":{"type":"string","title":"Filename"},"file_type":{"type":"string","enum":["json","csv"],"title":"File Type"},"preview":{"type":"string","title":"Preview"},"dynamic_case_preview_rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Dynamic Case Preview Rows"}},"additionalProperties":false,"type":"object","required":["filename","file_type","preview"],"title":"_UploadedFileInfo","description":"Upload result for one file."}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}