{"openapi":"3.1.0","info":{"title":"connic API","description":"Public API for connic. Authenticate using an API key in the `Authorization: Bearer <key>` header. You can create and manage API keys in your [Project Settings](https://connic.co/projects?to=settings/cli).\n\n## Rate Limits\n\nAPI requests are rate-limited to **120/minute** per project. All API keys belonging to the same project share a single rate limit bucket. When the limit is exceeded, the API responds with `429 Too Many Requests` and a `Retry-After` header indicating when you can retry.","version":"1.0.0"},"paths":{"/v1/projects/{project_id}/environments":{"get":{"tags":["environments"],"summary":"List environments","description":"List the project's environments, default first, then by name. API keys limited to specific environments only see those.\n\nRequired permission: `environments.view`.","operationId":"list_environments","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicEnvironmentResponse"},"title":"Response 200 List Environments V1 Projects  Project Id  Environments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"environments","x-connic-permission-action":"read","x-connic-project-permission":"environments.view"},"post":{"tags":["environments"],"summary":"Create environment","description":"Create an environment. The project's first environment becomes the default.\n\nReturns 403 when the plan's environment limit is reached. With `copy_from_environment_id`,\nthat environment's variables are copied into the new one.\n\nRequired permission: `environments.create`. Passing `copy_from_environment_id` also requires `variables.view`. Passing `copy_from_environment_id` also requires `variables.create`.","operationId":"create_environment","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"environments","x-connic-permission-action":"write","x-connic-project-permission":"environments.create"}},"/v1/projects/{project_id}/environments/{environment_id}":{"get":{"tags":["environments"],"summary":"Get environment","description":"Get one environment with its settings and what the caller can do in it.\n\nRequired permission: `environments.view`.","operationId":"get_environment","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"environments","x-connic-permission-action":"read","x-connic-project-permission":"environments.view"},"patch":{"tags":["environments"],"summary":"Update environment","description":"Partially update an environment; omitted fields stay unchanged.\n\nRenaming also changes the slug and returns 400 if another environment already uses it.\n\nRequired permission: `environments.update`.","operationId":"update_environment","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"environments","x-connic-permission-action":"write","x-connic-project-permission":"environments.update"},"delete":{"tags":["environments"],"summary":"Delete environment","description":"Delete an environment.\n\nIts deployments are deactivated, its connectors disabled and its OAuth apps removed, and its\nscheduled, queued, running and approval-waiting runs are cancelled. The default environment and the\nlast standard environment cannot be deleted (400); a test environment with an active test session returns 409.\n\nRequired permission: `environments.delete`.","operationId":"delete_environment","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicOkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"environments","x-connic-permission-action":"write","x-connic-project-permission":"environments.delete"}},"/v1/projects/{project_id}/environments/{environment_id}/set-default":{"post":{"tags":["environments"],"summary":"Set default environment","description":"Make this environment the project's default; the previous default is unset.\n\nRequired permission: `environments.update`.","operationId":"set_default_environment","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicOkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"environments","x-connic-permission-action":"write","x-connic-project-permission":"environments.update"}},"/v1/projects/{project_id}/agents":{"get":{"tags":["agents"],"summary":"List agents","description":"Agents come from deployments and names that have historical runs in this environment. Each item includes deployment status, run and queue counts, last activity, configuration hints (type, source path), and whether an inbound or sync connector is attached to the known agent.\n\nRequired permission: `agents.view`.","operationId":"list_project_agents","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Target environment UUID","title":"Environment Id"},"description":"Target environment UUID"},{"name":"include_variants","in":"query","required":false,"schema":{"type":"boolean","description":"Include A/B variant agents as separate items","default":false,"title":"Include Variants"},"description":"Include A/B variant agents as separate items"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicAgentListItemResponse"},"title":"Response 200 List Project Agents V1 Projects  Project Id  Agents Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"agents","x-connic-permission-action":"read","x-connic-project-permission":"agents.view"}},"/v1/projects/{project_id}/agents/{agent_name}":{"get":{"tags":["agents"],"summary":"Get agent","description":"Returns the agent's configuration from the active deployment (null when the active deployment does not contain it), run statistics, token usage and cost, linked connectors, and average scores of its judges in the given environment. Statistics and judge averages cover runs queued in the selected window (the last 30 days by default), narrowed by the run filters.\n\nRequired permission: `agents.view`.","operationId":"get_agent_details","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"agent_name","in":"path","required":true,"schema":{"type":"string","title":"Agent Name"},"description":"Agent name as defined in the agent's YAML file."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Target environment UUID","title":"Environment Id"},"description":"Target environment UUID"},{"name":"time_range","in":"query","required":false,"schema":{"anyOf":[{"enum":["24h","7d","30d","90d","today","this_month","last_month","this_year","all"],"type":"string"},{"type":"null"}],"description":"Preset statistics window ending now, a calendar period in UTC, or `all` for no time limit. Ignored when `start_date` is set.","default":"30d","title":"Time Range"},"description":"Preset statistics window ending now, a calendar period in UTC, or `all` for no time limit. Ignored when `start_date` is set."},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Custom statistics window start; overrides `time_range`.","title":"Start Date"},"description":"Custom statistics window start; overrides `time_range`."},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Custom statistics window end; used only with `start_date`, which is open-ended without it.","title":"End Date"},"description":"Custom statistics window end; used only with `start_date`, which is open-ended without it."},{"name":"deployment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only include runs executed by this deployment.","title":"Deployment Id"},"description":"Only include runs executed by this deployment."},{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/RunStatus"}},{"type":"null"}],"description":"Restrict stats to statuses","title":"Status Filter"},"description":"Restrict stats to statuses"},{"name":"guardrail_outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["warned","blocked","redacted"],"type":"string"}},{"type":"null"}],"description":"Restrict stats to guardrail outcomes","title":"Guardrail Outcome"},"description":"Restrict stats to guardrail outcomes"},{"name":"test_name","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"A/B test variant names; use __base__ for runs without a variant","title":"Test Name"},"description":"A/B test variant names; use __base__ for runs without a variant"},{"name":"exclude_test_runs","in":"query","required":false,"schema":{"type":"boolean","description":"Exclude runs with a test name","default":false,"title":"Exclude Test Runs"},"description":"Exclude runs with a test name"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Run search text or filter expression, as in `GET /runs`.","title":"Search"},"description":"Run search text or filter expression, as in `GET /runs`."},{"name":"convert_costs_to","in":"query","required":false,"schema":{"anyOf":[{"enum":["EUR","USD"],"type":"string"},{"type":"null"}],"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call","title":"Convert Costs To"},"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAgentDetailsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"agents","x-connic-permission-action":"read","x-connic-project-permission":"agents.view"}},"/v1/projects/{project_id}/deployments":{"get":{"tags":["deployments"],"summary":"List deployments","description":"Returns all deployments in the environment, newest first, each with its number of failed test cases.\n\nRequired permission: `deployments.view`.","operationId":"list_deployments","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment to list deployments for.","title":"Environment Id"},"description":"Environment to list deployments for."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentListItemResponse"},"title":"Response List Deployments V1 Projects  Project Id  Deployments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"deployments","x-connic-permission-action":"read","x-connic-project-permission":"deployments.view"},"post":{"tags":["deployments"],"summary":"Create deployment","description":"Creates a deployment from the project's connected git repository.\n\nBuilds the latest commit on the environment's `git_branch`, or on the repository's default branch\nwhen the environment has none.\nOnly works for projects with a git provider connected; other projects return 400.\nFor projects without git, deploy with `connic deploy` from the CLI.\nOlder pending or building deployments in the same environment are cancelled.\n\nRequired permission: `deployments.create`.","operationId":"create_deployment","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment to deploy to","title":"Environment Id"},"description":"Environment to deploy to"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeploymentCreate"},{"type":"null"}],"title":"Deployment Create"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"deployments","x-connic-permission-action":"write","x-connic-project-permission":"deployments.create"}},"/v1/projects/{project_id}/deployments/{deployment_id}":{"get":{"tags":["deployments"],"summary":"Get deployment","description":"Returns one deployment with its status, source, build logs, test and connector results, and the agents it contains.\n\nRequired permission: `deployments.view`.","operationId":"get_deployment","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"},"description":"Deployment ID from `GET /deployments`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"deployments","x-connic-permission-action":"read","x-connic-project-permission":"deployments.view"}},"/v1/projects/{project_id}/deployments/{deployment_id}/test-runs":{"get":{"tags":["deployments"],"summary":"List deployment test results","description":"Results of each test case from this deployment's test phase, ordered by agent and test name.\n\nRequired permission: `deployments.test`.","operationId":"list_deployment_test_runs","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"},"description":"Deployment ID from `GET /deployments`."},{"name":"convert_costs_to","in":"query","required":false,"schema":{"anyOf":[{"enum":["EUR","USD"],"type":"string"},{"type":"null"}],"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call","title":"Convert Costs To"},"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentTestRunWithCost"},"title":"Response List Deployment Test Runs V1 Projects  Project Id  Deployments  Deployment Id  Test Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"deployments","x-connic-permission-action":"read","x-connic-project-permission":"deployments.test"}},"/v1/projects/{project_id}/deployments/{deployment_id}/cancel":{"post":{"tags":["deployments"],"summary":"Cancel deployment","description":"Requests cancellation of a deployment that is currently building.\n\nFor a deployment that is not building, nothing changes and the response has `ok: false`.\n\nRequired permission: `deployments.cancel`.","operationId":"cancel_deployment","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"},"description":"Deployment ID from `GET /deployments`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDeploymentCancelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"deployments","x-connic-permission-action":"write","x-connic-project-permission":"deployments.cancel"}},"/v1/projects/{project_id}/deployments/{deployment_id}/activate":{"post":{"tags":["deployments"],"summary":"Activate deployment","description":"Makes a deployment with status `deployed` the live version for its environment.\n\nConnectors declared in code are restored to the deployment's connector files. If a connector change\nfails, returns 409 and nothing is activated unless `force` is set.\n\nRequired permission: `deployments.activate`.","operationId":"activate_deployment","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"},"description":"Deployment ID from `GET /deployments`."},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","description":"Activate even if some connector changes from connectors/*.yaml fail; failing connectors keep their current state","default":false,"title":"Force"},"description":"Activate even if some connector changes from connectors/*.yaml fail; failing connectors keep their current state"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicOkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"deployments","x-connic-permission-action":"write","x-connic-project-permission":"deployments.activate"}},"/v1/projects/{project_id}/deployments/{deployment_id}/redeploy":{"post":{"tags":["deployments"],"summary":"Redeploy deployment","description":"Creates a new deployment using the same source and environment as an existing one.\n\nRequired permission: `deployments.redeploy`.","operationId":"redeploy_deployment","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"},"description":"Deployment ID from `GET /deployments`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"deployments","x-connic-permission-action":"write","x-connic-project-permission":"deployments.redeploy"}},"/v1/projects/{project_id}/deployments/{deployment_id}/deploy-anyway":{"post":{"tags":["deployments"],"summary":"Deploy anyway","description":"Creates a new deployment from the same source as one whose tests or connector changes failed.\n\nIf its tests failed, the new deployment skips the test phase; if connector changes failed,\nconnectors that fail to apply are skipped. Other deployments return 400.\n\nRequired permission: `deployments.override`.","operationId":"deploy_anyway","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"},"description":"Deployment ID from `GET /deployments`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"deployments","x-connic-permission-action":"write","x-connic-project-permission":"deployments.override"}},"/v1/projects/{project_id}/connectors":{"post":{"tags":["connectors"],"summary":"Create connector","description":"Creates a connector in an environment.\n\nThe configuration is validated for the connector type, and credential\nfields are stored encrypted. Names used by connectors defined in code\nreturn 409.\n\nRequired permission: `connectors.create`. Passing `agent_name` also requires `connectors.link`.","operationId":"create_connector","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment to create the connector in.","title":"Environment Id"},"description":"Environment to create the connector in."},{"name":"agent_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent to link to the new connector in the same request.","title":"Agent Name"},"description":"Agent to link to the new connector in the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"connectors","x-connic-permission-action":"write","x-connic-project-permission":"connectors.create"},"get":{"tags":["connectors"],"summary":"List connectors","description":"Returns all connectors in the project environment.\n\nStored credential fields such as passwords and provider keys are masked.\nSystem-generated connector secrets are returned so clients can configure\nand operate the connector.\n\nRequired permission: `connectors.view`.","operationId":"list_connectors","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment to list connectors from.","title":"Environment Id"},"description":"Environment to list connectors from."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConnectorResponse"},"title":"Response List Connectors V1 Projects  Project Id  Connectors Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"connectors","x-connic-permission-action":"read","x-connic-project-permission":"connectors.view"}},"/v1/projects/{project_id}/connectors/{connector_id}":{"patch":{"tags":["connectors"],"summary":"Update connector","description":"Updates a connector.\n\nFields left out of the body keep their values. Send the complete `config`\nfor the connector type; credential fields sent as `********` or left empty\nkeep their stored values. Connectors defined in code only accept `enabled`,\nand retired connectors can't be resumed.\n\nRequired permission: `connectors.update`.","operationId":"update_connector","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connector Id"},"description":"Connector ID from `GET /connectors`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"connectors","x-connic-permission-action":"write","x-connic-project-permission":"connectors.update"},"delete":{"tags":["connectors"],"summary":"Delete connector","description":"Permanently deletes a connector and its agent links.\n\nConnectors defined in `connectors/*.yaml` return 409 until they are\nremoved from code and retired by a deployment.\n\nRequired permission: `connectors.delete`.","operationId":"delete_connector","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connector Id"},"description":"Connector ID from `GET /connectors`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicOkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"connectors","x-connic-permission-action":"write","x-connic-project-permission":"connectors.delete"},"get":{"tags":["connectors"],"summary":"Get connector","description":"Returns a single connector's details.\n\nStored credential fields such as passwords and provider keys are masked.\nSystem-generated connector secrets are returned so clients can configure\nand operate the connector.\n\nRequired permission: `connectors.view`.","operationId":"get_connector","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connector Id"},"description":"Connector ID from `GET /connectors`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"connectors","x-connic-permission-action":"read","x-connic-project-permission":"connectors.view"}},"/v1/projects/{project_id}/connectors/{connector_id}/links":{"post":{"tags":["connectors"],"summary":"Link agent to connector","description":"Links an agent to a connector.\n\nInbound and sync connectors start the agent from their events; outbound\nconnectors send the agent's results. Connectors defined in code return 409.\n\nRequired permission: `connectors.link`.","operationId":"link_connector","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connector Id"},"description":"Connector ID from `GET /connectors`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentConnectorLinkCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentConnectorLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"connectors","x-connic-permission-action":"write","x-connic-project-permission":"connectors.link"},"get":{"tags":["connectors"],"summary":"List connector links","description":"Returns all agent links for a connector.\n\nRequired permission: `connectors.view`.","operationId":"list_connector_links","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connector Id"},"description":"Connector ID from `GET /connectors`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentConnectorLinkResponse"},"title":"Response List Connector Links V1 Projects  Project Id  Connectors  Connector Id  Links Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"connectors","x-connic-permission-action":"read","x-connic-project-permission":"connectors.view"}},"/v1/projects/{project_id}/connectors/{connector_id}/links/{link_id}":{"patch":{"tags":["connectors"],"summary":"Update connector link","description":"Replaces the settings of an agent link, such as the outbound policy of an outbound connector.\n\nConnectors defined in code return 409.\n\nRequired permission: `connectors.link`.","operationId":"update_connector_link","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connector Id"},"description":"Connector ID from `GET /connectors`."},{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"},"description":"Link ID from `GET /connectors/{connector_id}/links`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentConnectorLinkUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentConnectorLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"connectors","x-connic-permission-action":"write","x-connic-project-permission":"connectors.link"},"delete":{"tags":["connectors"],"summary":"Delete connector link","description":"Removes a link between an agent and a connector. Connectors defined in code return 409.\n\nRequired permission: `connectors.link`.","operationId":"delete_connector_link","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connector Id"},"description":"Connector ID from `GET /connectors`."},{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"},"description":"Link ID from `GET /connectors/{connector_id}/links`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicOkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"connectors","x-connic-permission-action":"write","x-connic-project-permission":"connectors.link"}},"/v1/projects/{project_id}/connectors/{connector_id}/runs":{"get":{"tags":["connectors"],"summary":"List connector runs","description":"Returns a connector's runs, newest first.\n\nA connector run records one event the connector received or one delivery\nit made, and how many agent runs it started.\n\nRequired permission: `connectors.view`.","operationId":"list_connector_runs","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connector Id"},"description":"Connector ID from `GET /connectors`."},{"name":"time_range","in":"query","required":false,"schema":{"enum":["1h","6h","24h","7d","30d"],"type":"string","description":"Only runs started within this window before now.","default":"7d","title":"Time Range"},"description":"Only runs started within this window before now."},{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ConnectorRunStatus"},{"type":"null"}],"description":"Only runs with this status.","title":"Status Filter"},"description":"Only runs with this status."},{"name":"trigger_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only runs with this trigger type, such as `webhook`, `cron` or `outbound`.","title":"Trigger Type"},"description":"Only runs with this trigger type, such as `webhook`, `cron` or `outbound`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of runs to return.","default":25,"title":"Limit"},"description":"Maximum number of runs to return."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of runs to skip.","default":0,"title":"Offset"},"description":"Number of runs to skip."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorRunListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"connectors","x-connic-permission-action":"read","x-connic-project-permission":"connectors.view"}},"/v1/projects/{project_id}/connectors/{connector_id}/runs/{run_id}":{"get":{"tags":["connectors"],"summary":"Get connector run","description":"Returns full details of a single connector run, including its status, timing, and output.\n\nRequired permission: `connectors.view`.","operationId":"get_connector_run","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connector Id"},"description":"Connector ID from `GET /connectors`."},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"},"description":"Connector run ID from `GET /connectors/{connector_id}/runs`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"connectors","x-connic-permission-action":"read","x-connic-project-permission":"connectors.view"}},"/v1/projects/{project_id}/connectors/{connector_id}/stats":{"get":{"tags":["connectors"],"summary":"Get connector stats","description":"Returns run statistics for a connector.\n\nIncludes total, completed, and failed run counts within the time range,\naverage duration, and the last run's status.\n\nRequired permission: `connectors.view`.","operationId":"get_connector_stats","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connector Id"},"description":"Connector ID from `GET /connectors`."},{"name":"time_range","in":"query","required":false,"schema":{"enum":["1h","6h","24h","7d","30d"],"type":"string","description":"Window before now to aggregate runs over.","default":"7d","title":"Time Range"},"description":"Window before now to aggregate runs over."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicConnectorStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"connectors","x-connic-permission-action":"read","x-connic-project-permission":"connectors.view"}},"/v1/projects/{project_id}/connectors/{connector_id}/logs":{"get":{"tags":["connectors"],"summary":"List connector logs","description":"Returns logs for a connector in reverse chronological order.\n\nFilter by log level (debug, info, warning, error) or search text, and limit the number of entries.\n\nRequired permission: `connectors.view`.","operationId":"get_connector_logs","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connector Id"},"description":"Connector ID from `GET /connectors`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum number of log entries to return.","default":100,"title":"Limit"},"description":"Maximum number of log entries to return."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of logs to skip","default":0,"title":"Offset"},"description":"Number of logs to skip"},{"name":"level","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["debug","info","warning","error"],"type":"string"}},{"type":"null"}],"description":"Only entries at these levels. Repeat the parameter to pass several.","title":"Level"},"description":"Only entries at these levels. Repeat the parameter to pass several."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case-insensitive text to find in the log message or details.","title":"Search"},"description":"Case-insensitive text to find in the log message or details."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicConnectorLogResponse"},"title":"Response 200 Get Connector Logs V1 Projects  Project Id  Connectors  Connector Id  Logs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"connectors","x-connic-permission-action":"read","x-connic-project-permission":"connectors.view"}},"/v1/projects/{project_id}/stats/aggregate":{"get":{"tags":["stats"],"summary":"Get aggregate stats","description":"Returns run totals for the environment.\n\nIncludes total runs, completed, failed and cancelled counts, and the number of tool calls\nfor runs queued in the date range. Defaults to the last 30 days.\n\nRequired permission: `stats.view`.","operationId":"get_aggregate_stats","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment to count runs in.","title":"Environment Id"},"description":"Environment to count runs in."},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only runs queued at or after this time. Defaults to 30 days ago; no offset means UTC.","title":"Start Date"},"description":"Only runs queued at or after this time. Defaults to 30 days ago; no offset means UTC."},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only runs queued at or before this time. Defaults to now; no offset means UTC.","title":"End Date"},"description":"Only runs queued at or before this time. Defaults to now; no offset means UTC."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAggregateStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"stats","x-connic-permission-action":"read","x-connic-project-permission":"stats.view"}},"/v1/projects/{project_id}/stats/runs-history":{"get":{"tags":["stats"],"summary":"Get run history","description":"Returns daily run counts by current status, grouped by the UTC date each run started.\n\nEach day counts runs that are now `started`, `completed`, `failed` or `cancelled`.\nDays without started runs are omitted. Defaults to the last 30 days.\n\nRequired permission: `stats.view`.","operationId":"get_runs_history","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment to count runs in.","title":"Environment Id"},"description":"Environment to count runs in."},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only runs started at or after this time. Defaults to 30 days ago; no offset means UTC.","title":"Start Date"},"description":"Only runs started at or after this time. Defaults to 30 days ago; no offset means UTC."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicRunHistoryItemResponse"},"title":"Response 200 Get Runs History V1 Projects  Project Id  Stats Runs History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"stats","x-connic-permission-action":"read","x-connic-project-permission":"stats.view"}},"/v1/projects/{project_id}/runs":{"get":{"tags":["stats"],"summary":"List runs","description":"Paginated run list for one environment. Narrow results with `status_filter`, `agent_name`, `trigger_source`, `deployment_id`, a preset `time_range`, or custom `start_date` and `end_date`; time filters apply to when runs were queued. Pass `session_id`, `session_app_name`, and `session_user_id` together to match one exact persistent session. `search` matches run ID, agent name, input, output and error text; it also accepts filter expressions like `context.customer == 'acme'`. Ordered by `sort_by` (`queued`, `duration`, `tokens`) in `sort_dir` direction; defaults to queue time, newest first. `projection=summary` leaves out `connector_id`, `ab_test_ids`, `input`, `output`, `error` and `triggered_by`; callers without the `runs.view` permission always get the summary projection. `include_total=false` skips counting and returns `total: null`.\n\nRequired permission: `stats.view`.","operationId":"get_project_runs","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment to list runs from","title":"Environment Id"},"description":"Environment to list runs from"},{"name":"deployment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only runs executed by this deployment.","title":"Deployment Id"},"description":"Only runs executed by this deployment."},{"name":"time_range","in":"query","required":false,"schema":{"anyOf":[{"enum":["1h","6h","24h","7d","30d","today","this_month","last_month","this_year"],"type":"string"},{"type":"null"}],"description":"Preset window ending now, or a calendar period in UTC. Ignored when both `start_date` and `end_date` are set.","title":"Time Range"},"description":"Preset window ending now, or a calendar period in UTC. Ignored when both `start_date` and `end_date` are set."},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Custom window start; applies only together with `end_date` and overrides `time_range`.","title":"Start Date"},"description":"Custom window start; applies only together with `end_date` and overrides `time_range`."},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Custom window end; applies only together with `start_date`.","title":"End Date"},"description":"Custom window end; applies only together with `start_date`."},{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/RunStatus"}},{"type":"null"}],"description":"Only runs in these statuses.","title":"Status Filter"},"description":"Only runs in these statuses."},{"name":"guardrail_outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["warned","blocked","redacted"],"type":"string"}},{"type":"null"}],"description":"Only runs with at least one guardrail intervention of these outcomes.","title":"Guardrail Outcome"},"description":"Only runs with at least one guardrail intervention of these outcomes."},{"name":"agent_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only runs of this agent.","title":"Agent Name"},"description":"Only runs of this agent."},{"name":"trigger_source","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/TriggerSource"},{"type":"null"}],"description":"How the run was triggered","title":"Trigger Source"},"description":"How the run was triggered"},{"name":"test_name","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by A/B test variant names; use __base__ for runs without a variant","title":"Test Name"},"description":"Filter by A/B test variant names; use __base__ for runs without a variant"},{"name":"exclude_test_runs","in":"query","required":false,"schema":{"type":"boolean","description":"Exclude runs with a test name","default":false,"title":"Exclude Test Runs"},"description":"Exclude runs with a test name"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Text matched against run ID, agent name, input, output and error, or a filter expression.","title":"Search"},"description":"Text matched against run ID, agent name, input, output and error, or a filter expression."},{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}],"description":"Persistent session ID; requires `session_app_name` and `session_user_id`.","title":"Session Id"},"description":"Persistent session ID; requires `session_app_name` and `session_user_id`."},{"name":"session_app_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}],"description":"Agent application name of the session; requires `session_id`.","title":"Session App Name"},"description":"Agent application name of the session; requires `session_id`."},{"name":"session_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}],"description":"Agent user identity of the session; requires `session_id`.","title":"Session User Id"},"description":"Agent user identity of the session; requires `session_id`."},{"name":"sort_by","in":"query","required":false,"schema":{"enum":["queued","duration","tokens"],"type":"string","description":"Column to sort by","default":"queued","title":"Sort By"},"description":"Column to sort by"},{"name":"sort_dir","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","description":"Sort direction","default":"desc","title":"Sort Dir"},"description":"Sort direction"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":250,"minimum":1,"description":"Page size, 1 to 250.","default":25,"title":"Limit"},"description":"Page size, 1 to 250."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of runs to skip.","default":0,"title":"Offset"},"description":"Number of runs to skip."},{"name":"projection","in":"query","required":false,"schema":{"enum":["full","summary"],"type":"string","description":"`full` returns every run field; `summary` leaves out the content fields.","default":"full","title":"Projection"},"description":"`full` returns every run field; `summary` leaves out the content fields."},{"name":"include_total","in":"query","required":false,"schema":{"type":"boolean","description":"Include the filtered total count","default":true,"title":"Include Total"},"description":"Include the filtered total count"},{"name":"convert_costs_to","in":"query","required":false,"schema":{"anyOf":[{"enum":["EUR","USD"],"type":"string"},{"type":"null"}],"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call","title":"Convert Costs To"},"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRunListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"runs","x-connic-permission-action":"read","x-connic-project-permission":"stats.view"}},"/v1/projects/{project_id}/logs":{"get":{"tags":["stats"],"summary":"List agent logs","description":"Cursor-paginated feed of the log lines agents wrote during runs in one environment (trace entries of type `log`). Pass `next_cursor` back as `cursor` to load the next page in the same `direction`. To fetch logs written after the first page, pass its `first_cursor` with `direction=newer`. Time filters apply to the log timestamp and take the same values as `GET /runs`.\n\nRequired permission: `logs.view`.","operationId":"get_project_logs","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment to list logs from","title":"Environment Id"},"description":"Environment to list logs from"},{"name":"time_range","in":"query","required":false,"schema":{"anyOf":[{"enum":["1h","6h","24h","7d","30d","today","this_month","last_month","this_year"],"type":"string"},{"type":"null"}],"description":"Preset window ending now, or a calendar period in UTC. Ignored when both `start_date` and `end_date` are set.","title":"Time Range"},"description":"Preset window ending now, or a calendar period in UTC. Ignored when both `start_date` and `end_date` are set."},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Custom window start; applies only together with `end_date` and overrides `time_range`.","title":"Start Date"},"description":"Custom window start; applies only together with `end_date` and overrides `time_range`."},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Custom window end; applies only together with `start_date`.","title":"End Date"},"description":"Custom window end; applies only together with `start_date`."},{"name":"deployment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by deployment","title":"Deployment Id"},"description":"Filter by deployment"},{"name":"exclude_test_runs","in":"query","required":false,"schema":{"type":"boolean","description":"Exclude logs from runs with a test name","default":false,"title":"Exclude Test Runs"},"description":"Exclude logs from runs with a test name"},{"name":"agent_name","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by one or more agent names","title":"Agent Name"},"description":"Filter by one or more agent names"},{"name":"level","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["debug","info","warning","error"],"type":"string"}},{"type":"null"}],"description":"Filter by one or more log levels","title":"Level"},"description":"Filter by one or more log levels"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["system","middleware","tool","hook","guardrail"],"type":"string"}},{"type":"null"}],"description":"Filter by one or more log sources","title":"Source"},"description":"Filter by one or more log sources"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Match log message, source, or agent name","title":"Search"},"description":"Match log message, source, or agent name"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor returned by the previous logs response","title":"Cursor"},"description":"Opaque cursor returned by the previous logs response"},{"name":"direction","in":"query","required":false,"schema":{"enum":["older","newer"],"type":"string","description":"`older` returns logs before `cursor`, newest first; `newer` returns logs after `cursor`, oldest first.","default":"older","title":"Direction"},"description":"`older` returns logs before `cursor`, newest first; `newer` returns logs after `cursor`, oldest first."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":250,"minimum":1,"description":"Page size, 1 to 250.","default":100,"title":"Limit"},"description":"Page size, 1 to 250."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProjectLogsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"logs","x-connic-permission-action":"read","x-connic-project-permission":"logs.view"}},"/v1/projects/{project_id}/runs/{run_id}":{"get":{"tags":["runs"],"summary":"Get run","description":"Returns one run with its input, output, error, execution trace, token usage and cost, connector, trigger details and run context. Token usage and cost cover the agent's own model calls; judge evaluations of the run are listed by `GET /runs/{run_id}/judge-runs`.\n\nRequired permission: `runs.view`.","operationId":"get_run","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"},"description":"Run ID from `GET /runs`."},{"name":"convert_costs_to","in":"query","required":false,"schema":{"anyOf":[{"enum":["EUR","USD"],"type":"string"},{"type":"null"}],"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call","title":"Convert Costs To"},"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRunWithTraces"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"runs","x-connic-permission-action":"read","x-connic-project-permission":"runs.view"},"delete":{"tags":["runs"],"summary":"Delete run","description":"Deletes the run's input, output, error, run context and execution trace, and the reasoning of judge evaluations of it. Status, timing, token usage, cost and judge scores remain, and `data_deleted_at` is set. Returns 409 until the run and its background processing have finished; an already-deleted run returns `deleted_count: 0`. This cannot be undone.\n\nRequired permission: `runs.delete`.","operationId":"delete_recorded_run_data","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"},"description":"Run ID from `GET /runs`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRunDataDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"runs","x-connic-permission-action":"write","x-connic-project-permission":"runs.delete"}},"/v1/projects/{project_id}/runs/{run_id}/rerun":{"post":{"tags":["runs"],"summary":"Rerun agent run","description":"Creates a new run of the same agent with the original payload and returns its `run_id`. The new run uses the original run's environment unless `environment_id` is given. Deleted runs cannot be rerun (409).\n\nRequired permission: `runs.rerun`.","operationId":"rerun_agent","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"},"description":"Run ID from `GET /runs`."},{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Environment to run in. Defaults to the original run's environment; required when that cannot be determined.","title":"Environment Id"},"description":"Environment to run in. Defaults to the original run's environment; required when that cannot be determined."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRerunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"runs","x-connic-permission-action":"write","x-connic-project-permission":"runs.rerun"}},"/v1/projects/{project_id}/runs/bulk-delete":{"post":{"tags":["runs"],"summary":"Delete selected runs","description":"Deletes the content of the selected runs in one environment, as `DELETE /runs/{run_id}` does. Already-deleted runs are skipped. Every selected run must belong to this environment (404 otherwise); if any selected run or its background processing is unfinished, returns 409 without deleting any runs. This cannot be undone.\n\nRequired permission: `runs.delete`.","operationId":"bulk_delete_run_data","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment the selected runs belong to.","title":"Environment Id"},"description":"Environment the selected runs belong to."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRunDataBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRunDataDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"runs","x-connic-permission-action":"write","x-connic-project-permission":"runs.delete"}},"/v1/projects/{project_id}/runs/bulk-rerun":{"post":{"tags":["runs"],"summary":"Rerun runs in bulk","description":"Reruns up to 100 runs in one environment, each as a new run of the same agent with its original payload.\n\nSupports two modes:\n- **By IDs**: provide `run_ids` in the request body to rerun specific runs. Query filters are ignored.\n- **By filter**: omit `run_ids` and use the query parameters to match runs.\n\nDeleted runs are skipped. A selection of more than 100 runs returns 422.\n\nRequired permission: `runs.rerun`.","operationId":"bulk_rerun","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment to rerun runs in; only its runs are selected.","title":"Environment Id"},"description":"Environment to rerun runs in; only its runs are selected."},{"name":"deployment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only runs executed by this deployment.","title":"Deployment Id"},"description":"Only runs executed by this deployment."},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only runs queued at or after this time; applies only together with `end_date`.","title":"Start Date"},"description":"Only runs queued at or after this time; applies only together with `end_date`."},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only runs queued at or before this time; applies only together with `start_date`.","title":"End Date"},"description":"Only runs queued at or before this time; applies only together with `start_date`."},{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/RunStatus"}},{"type":"null"}],"description":"Only runs in these statuses.","title":"Status Filter"},"description":"Only runs in these statuses."},{"name":"guardrail_outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["warned","blocked","redacted"],"type":"string"}},{"type":"null"}],"description":"Only runs with at least one guardrail intervention of these outcomes.","title":"Guardrail Outcome"},"description":"Only runs with at least one guardrail intervention of these outcomes."},{"name":"agent_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only runs of this agent.","title":"Agent Name"},"description":"Only runs of this agent."},{"name":"test_name","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by A/B test variant names; use __base__ for runs without a variant","title":"Test Name"},"description":"Filter by A/B test variant names; use __base__ for runs without a variant"},{"name":"exclude_test_runs","in":"query","required":false,"schema":{"type":"boolean","description":"Exclude runs with a test name","default":false,"title":"Exclude Test Runs"},"description":"Exclude runs with a test name"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Run search text or filter expression, as in `GET /runs`.","title":"Search"},"description":"Run search text or filter expression, as in `GET /runs`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkRerunBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicBulkRerunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"runs","x-connic-permission-action":"write","x-connic-project-permission":"runs.rerun"}},"/v1/projects/{project_id}/runs/bulk-cancel":{"post":{"tags":["runs"],"summary":"Cancel runs in bulk","description":"Cancels up to 100 runs in one environment.\n\nSupports two modes:\n- **By IDs**: provide `run_ids` in the request body to cancel specific runs. Query filters are ignored.\n- **By filter**: omit `run_ids` and use the query parameters to match runs.\n\nOnly runs with status `scheduled`, `queued` or `started` are cancelled; other selected runs are skipped.\nA selection of more than 100 cancellable runs returns 422.\n\nRequired permission: `runs.cancel`.","operationId":"bulk_cancel","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment to cancel runs in; only its runs are selected.","title":"Environment Id"},"description":"Environment to cancel runs in; only its runs are selected."},{"name":"deployment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only runs executed by this deployment.","title":"Deployment Id"},"description":"Only runs executed by this deployment."},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only runs queued at or after this time; applies only together with `end_date`.","title":"Start Date"},"description":"Only runs queued at or after this time; applies only together with `end_date`."},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only runs queued at or before this time; applies only together with `start_date`.","title":"End Date"},"description":"Only runs queued at or before this time; applies only together with `start_date`."},{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/RunStatus"}},{"type":"null"}],"description":"Only runs in these statuses. Only `scheduled`, `queued` and `started` runs can be cancelled, so other values match no runs.","title":"Status Filter"},"description":"Only runs in these statuses. Only `scheduled`, `queued` and `started` runs can be cancelled, so other values match no runs."},{"name":"guardrail_outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["warned","blocked","redacted"],"type":"string"}},{"type":"null"}],"description":"Only runs with at least one guardrail intervention of these outcomes.","title":"Guardrail Outcome"},"description":"Only runs with at least one guardrail intervention of these outcomes."},{"name":"agent_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only runs of this agent.","title":"Agent Name"},"description":"Only runs of this agent."},{"name":"test_name","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by A/B test variant names; use __base__ for runs without a variant","title":"Test Name"},"description":"Filter by A/B test variant names; use __base__ for runs without a variant"},{"name":"exclude_test_runs","in":"query","required":false,"schema":{"type":"boolean","description":"Exclude runs with a test name","default":false,"title":"Exclude Test Runs"},"description":"Exclude runs with a test name"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Run search text or filter expression, as in `GET /runs`.","title":"Search"},"description":"Run search text or filter expression, as in `GET /runs`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCancelBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicBulkCancelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"runs","x-connic-permission-action":"write","x-connic-project-permission":"runs.cancel"}},"/v1/projects/{project_id}/deployments/{deployment_id}/runs":{"get":{"tags":["runs"],"summary":"List runs for deployment","description":"Paginated runs created by this deployment, newest first. Items have the same shape as `GET /runs`.\n\nRequired permission: `runs.view`.","operationId":"list_deployment_runs","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"},"description":"Deployment ID from `GET /deployments`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":250,"minimum":1,"description":"Page size, 1 to 250.","default":25,"title":"Limit"},"description":"Page size, 1 to 250."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of runs to skip.","default":0,"title":"Offset"},"description":"Number of runs to skip."},{"name":"convert_costs_to","in":"query","required":false,"schema":{"anyOf":[{"enum":["EUR","USD"],"type":"string"},{"type":"null"}],"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call","title":"Convert Costs To"},"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRunListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"deployments","x-connic-permission-action":"read","x-connic-project-permission":"runs.view"}},"/v1/projects/{project_id}/runs/{run_id}/cancel":{"post":{"tags":["runs"],"summary":"Cancel run","description":"Cancels a run that is scheduled, queued or running.\n\nOnly runs with status `scheduled`, `queued` or `started` can be cancelled; other statuses return 400.\nA running run is marked `cancelled` immediately and its agent stops shortly after.\n\nRequired permission: `runs.cancel`.","operationId":"cancel_run","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"},"description":"Run ID from `GET /runs`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRunCancelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"runs","x-connic-permission-action":"write","x-connic-project-permission":"runs.cancel"}},"/v1/projects/{project_id}/environments/{environment_id}/queued-count":{"get":{"tags":["runs"],"summary":"Get queued run count","description":"Returns how many runs in the environment are currently waiting in `queued` status, optionally for one agent.\n\nRequired permission: `runs.view`.","operationId":"get_queued_count","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."},{"name":"agent_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only count runs of this agent.","title":"Agent Name"},"description":"Only count runs of this agent."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedCountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"environments","x-connic-permission-action":"read","x-connic-project-permission":"runs.view"}},"/v1/projects/{project_id}/environments/{environment_id}/purge-queue":{"post":{"tags":["runs"],"summary":"Purge queued runs","description":"Cancels every run in the environment that is in `queued` status, or only those of `agent_name`.\n\nPurged runs get the error `Purged from queue by user`. Scheduled and running runs are not affected.\n\nRequired permission: `runs.queue.manage`.","operationId":"purge_queue","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurgeQueueRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPurgeQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"environments","x-connic-permission-action":"write","x-connic-project-permission":"runs.queue.manage"}},"/v1/projects/{project_id}/audit-logs":{"get":{"tags":["audit-logs"],"summary":"List audit log","description":"Immutable activity feed for the project, newest first: who did what, on which resource, with before/after snapshots where captured. Default window is seven days; override with `time_range` or explicit `start_date` and `end_date`. Combine `action_filter`, `user_filter`, `resource_type`, and `search` to narrow results. Pagination uses `limit` and `offset`.\n\nRequired permission: `audit.view`.","operationId":"list_audit_logs","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"time_range","in":"query","required":false,"schema":{"enum":["1h","6h","24h","7d","30d","90d"],"type":"string","description":"Preset window ending now. Ignored when both `start_date` and `end_date` are set.","default":"7d","title":"Time Range"},"description":"Preset window ending now. Ignored when both `start_date` and `end_date` are set."},{"name":"action_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Action key prefix, e.g. deployment or member","title":"Action Filter"},"description":"Action key prefix, e.g. deployment or member"},{"name":"user_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Actor user id","title":"User Filter"},"description":"Actor user id"},{"name":"resource_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource type slug","title":"Resource Type"},"description":"Resource type slug"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case-insensitive match on action, resource type, or resource id","title":"Search"},"description":"Case-insensitive match on action, resource type, or resource id"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Custom range start (ISO 8601); applies only together with `end_date`","title":"Start Date"},"description":"Custom range start (ISO 8601); applies only together with `end_date`"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Custom range end (ISO 8601); applies only together with `start_date`","title":"End Date"},"description":"Custom range end (ISO 8601); applies only together with `start_date`"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Page size, 1 to 200","default":50,"title":"Limit"},"description":"Page size, 1 to 200"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of events to skip","default":0,"title":"Offset"},"description":"Number of events to skip"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAuditLogsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"audit-logs","x-connic-permission-action":"read","x-connic-project-permission":"audit.view"}},"/v1/projects/{project_id}/audit-logs/actions":{"get":{"tags":["audit-logs"],"summary":"List audit actions","description":"Distinct `action` strings ever recorded for this project, sorted alphabetically. Use a value, or a prefix of one, as `action_filter` when listing the audit log.\n\nRequired permission: `audit.view`.","operationId":"list_audit_actions","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAuditActionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"audit-logs","x-connic-permission-action":"read","x-connic-project-permission":"audit.view"}},"/v1/projects/{project_id}/audit-logs/users":{"get":{"tags":["audit-logs"],"summary":"List audit actors","description":"Users who appear as actors in this project's audit log, with id, email, and avatar. Use an id as `user_filter` when listing the audit log.\n\nRequired permission: `audit.view`.","operationId":"list_audit_users","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAuditUsersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"audit-logs","x-connic-permission-action":"read","x-connic-project-permission":"audit.view"}},"/v1/projects/{project_id}/audit-logs/retention":{"get":{"tags":["audit-logs"],"summary":"Get audit retention","description":"How long audit events are kept for this project, derived from the active billing tier and any custom plan rules.\n\nRequired permission: `audit.view`.","operationId":"get_retention_policy","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAuditRetentionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"audit-logs","x-connic-permission-action":"read","x-connic-project-permission":"audit.view"}},"/v1/projects/{project_id}/approvals":{"get":{"tags":["approvals"],"summary":"List approvals","description":"List tool-call approval requests in an environment, pending requests first, then newest first.\n\nPending requests whose run has already ended are left out.\n\nRequired permission: `approvals.view`.","operationId":"list_approvals","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment to list approval requests from.","title":"Environment Id"},"description":"Environment to list approval requests from."},{"name":"run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only requests from this agent run.","title":"Run Id"},"description":"Only requests from this agent run."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["pending","approved","rejected","timeout"],"type":"string"},{"type":"null"}],"description":"Only requests with this status. `timeout` covers requests that expired or whose run ended first.","title":"Status"},"description":"Only requests with this status. `timeout` covers requests that expired or whose run ended first."},{"name":"agent_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only requests from this agent.","title":"Agent Name"},"description":"Only requests from this agent."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Maximum number of requests to return.","default":50,"title":"Limit"},"description":"Maximum number of requests to return."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of requests to skip.","default":0,"title":"Offset"},"description":"Number of requests to skip."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApprovalListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"approvals","x-connic-permission-action":"read","x-connic-project-permission":"approvals.view"}},"/v1/projects/{project_id}/approvals/{approval_id}":{"get":{"tags":["approvals"],"summary":"Get approval","description":"Get one tool-call approval request.\n\nRequired permission: `approvals.view`.","operationId":"get_approval","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"approval_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Approval Id"},"description":"Approval ID from `GET /approvals`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"approvals","x-connic-permission-action":"read","x-connic-project-permission":"approvals.view"}},"/v1/projects/{project_id}/approvals/{approval_id}/decide":{"post":{"tags":["approvals"],"summary":"Decide approval","description":"Approve or reject a pending approval request.\n\nApproving resumes the run. Rejecting fails the run, or resumes it with the\nrejection when the request's `on_rejection` is `continue`. Returns 409 when\nthe request is no longer pending or its run has ended.\n\nRequired permission: `approvals.decide`.","operationId":"decide_approval","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"approval_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Approval Id"},"description":"Approval ID from `GET /approvals`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalDecision"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"approvals","x-connic-permission-action":"write","x-connic-project-permission":"approvals.decide"}},"/v1/projects/{project_id}/approvals/config":{"get":{"tags":["approvals"],"summary":"Get approval notification settings","description":"Get the per-agent member notification settings for approval requests in an environment.\n\nRequired permission: `approvals.configure`.","operationId":"get_approval_config","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment whose settings to return.","title":"Environment Id"},"description":"Environment whose settings to return."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalNotificationConfigResponse"},"title":"Response 200 Get Approval Config V1 Projects  Project Id  Approvals Config Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"approvals","x-connic-permission-action":"read","x-connic-project-permission":"approvals.configure"},"put":{"tags":["approvals"],"summary":"Replace approval notification settings","description":"Replace the per-agent member notification settings for approval requests in an environment.\n\nRequired permission: `approvals.configure`.","operationId":"update_approval_config","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment whose settings to replace.","title":"Environment Id"},"description":"Environment whose settings to replace."}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalNotificationConfigUpdate"},"description":"Settings that replace the environment's current ones. An empty list removes all.","default":[],"title":"Configs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalNotificationConfigResponse"},"title":"Response 200 Update Approval Config V1 Projects  Project Id  Approvals Config Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"approvals","x-connic-permission-action":"write","x-connic-project-permission":"approvals.configure"}},"/v1/projects/{project_id}/approvals/routing-config":{"put":{"tags":["approvals"],"summary":"Replace approval routing","description":"Replace an environment's member notification settings and approval channel routes in one change.\n\nOmit `channel_routes` or send null to keep the current channel routes.\nSending `channel_routes` requires an Enterprise plan.\n\nRequired permission: `approvals.configure`. Passing `channel_routes` also requires `channels.manage`.","operationId":"update_approval_routing_config","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment whose approval routing to replace.","title":"Environment Id"},"description":"Environment whose approval routing to replace."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRoutingConfigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApprovalRoutingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"approvals","x-connic-permission-action":"write","x-connic-project-permission":"approvals.configure"}},"/v1/projects/{project_id}/channels/types":{"get":{"tags":["channels"],"summary":"List channel types","description":"List the channel types with their configuration fields, and whether the project's plan includes channels.\n\nRequired permission: `channels.manage`.","operationId":"get_channel_types","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicChannelTypesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"channels","x-connic-permission-action":"read","x-connic-project-permission":"channels.manage"}},"/v1/projects/{project_id}/channels":{"get":{"tags":["channels"],"summary":"List channels","description":"List the notification channels configured for a project.\n\nRequired permission: `channels.manage`.","operationId":"list_channels","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChannelResponse"},"title":"Response 200 List Channels V1 Projects  Project Id  Channels Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"channels","x-connic-permission-action":"read","x-connic-project-permission":"channels.manage"},"post":{"tags":["channels"],"summary":"Create channel","description":"Create a notification channel and validate its provider configuration.\n\nRequired permission: `channels.manage`.","operationId":"create_channel","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"channels","x-connic-permission-action":"write","x-connic-project-permission":"channels.manage"}},"/v1/projects/{project_id}/channels/{channel_id}":{"get":{"tags":["channels"],"summary":"Get channel","description":"Get one notification channel. Secret configuration values are masked.\n\nRequired permission: `channels.manage`.","operationId":"get_channel","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Channel Id"},"description":"Channel ID from `GET /channels`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"channels","x-connic-permission-action":"read","x-connic-project-permission":"channels.manage"},"put":{"tags":["channels"],"summary":"Update channel","description":"Update a notification channel's settings and event subscriptions.\n\nRequired permission: `channels.manage`.","operationId":"update_channel","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Channel Id"},"description":"Channel ID from `GET /channels`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"channels","x-connic-permission-action":"write","x-connic-project-permission":"channels.manage"},"delete":{"tags":["channels"],"summary":"Delete channel","description":"Delete a notification channel and its dependent approval routes.\n\nRequired permission: `channels.manage`.","operationId":"delete_channel","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Channel Id"},"description":"Channel ID from `GET /channels`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicOkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"channels","x-connic-permission-action":"write","x-connic-project-permission":"channels.manage"}},"/v1/projects/{project_id}/channels/{channel_id}/test":{"post":{"tags":["channels"],"summary":"Test channel","description":"Send a test message through a configured notification channel. Returns 502 when delivery fails.\n\nRequired permission: `channels.manage`.","operationId":"test_channel","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Channel Id"},"description":"Channel ID from `GET /channels`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicChannelTestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"channels","x-connic-permission-action":"write","x-connic-project-permission":"channels.manage"}},"/v1/projects/{project_id}/approvals/channel-routes":{"get":{"tags":["channels"],"summary":"List approval channel routes","description":"List the routes that deliver an environment's approval requests to channels.\n\nRequired permission: `channels.manage`.","operationId":"list_approval_routes","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment whose routes to list.","title":"Environment Id"},"description":"Environment whose routes to list."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalChannelRouteResponse"},"title":"Response 200 List Approval Routes V1 Projects  Project Id  Approvals Channel Routes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"approvals","x-connic-permission-action":"read","x-connic-project-permission":"channels.manage"},"put":{"tags":["channels"],"summary":"Replace approval channel routes","description":"Replace the routes that deliver an environment's approval requests to channels.\n\nRequired permission: `channels.manage`.","operationId":"update_approval_routes","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment whose routes to replace.","title":"Environment Id"},"description":"Environment whose routes to replace."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalChannelRouteUpdate"},"description":"Routes that replace the environment's current routes. An empty list removes all routes.","title":"Routes"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalChannelRouteResponse"},"title":"Response 200 Update Approval Routes V1 Projects  Project Id  Approvals Channel Routes Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"approvals","x-connic-permission-action":"write","x-connic-project-permission":"channels.manage"}},"/v1/projects/{project_id}/compliance/overview":{"get":{"tags":["compliance"],"summary":"Get compliance overview","description":"Return a project-wide summary of AI governance and compliance state.\n\nRequired permission: `compliance.view`.","operationId":"get_overview","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceOverviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"read","x-connic-project-permission":"compliance.view"}},"/v1/projects/{project_id}/compliance/systems":{"get":{"tags":["compliance"],"summary":"List AI systems","description":"List the AI systems registered for compliance management, sorted by name.\n\nRequired permission: `compliance.view`.","operationId":"list_systems","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ComplianceAISystemResponse"},"title":"Response List Systems V1 Projects  Project Id  Compliance Systems Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"read","x-connic-project-permission":"compliance.view"},"post":{"tags":["compliance"],"summary":"Create AI system","description":"Register an AI system and link its governed environments and deployments.\n\nRequired permission: `compliance.manage`.","operationId":"create_system","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceAISystemCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceAISystemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"write","x-connic-project-permission":"compliance.manage"}},"/v1/projects/{project_id}/compliance/systems/{system_id}":{"get":{"tags":["compliance"],"summary":"Get AI system","description":"Return an AI system with its latest compliance assessment.\n\nRequired permission: `compliance.view`.","operationId":"get_system","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"system_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"System Id"},"description":"AI system ID from `GET /compliance/systems`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceAISystemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"read","x-connic-project-permission":"compliance.view"},"patch":{"tags":["compliance"],"summary":"Update AI system","description":"Update an AI system's governance metadata and deployment links.\n\nRequired permission: `compliance.manage`.","operationId":"update_system","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"system_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"System Id"},"description":"AI system ID from `GET /compliance/systems`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceAISystemUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceAISystemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"write","x-connic-project-permission":"compliance.manage"},"delete":{"tags":["compliance"],"summary":"Delete AI system","description":"Delete a draft AI system that has no assessments, controls, or other governance records.\n\nOther systems return 409; set their `status` to `retired` instead.\n\nRequired permission: `compliance.manage`.","operationId":"delete_system","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"system_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"System Id"},"description":"AI system ID from `GET /compliance/systems`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicOkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"write","x-connic-project-permission":"compliance.manage"}},"/v1/projects/{project_id}/compliance/systems/{system_id}/assessments":{"get":{"tags":["compliance"],"summary":"List assessments","description":"List compliance assessments for an AI system, newest first.\n\nRequired permission: `compliance.view`.","operationId":"list_assessments","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"system_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"System Id"},"description":"AI system ID from `GET /compliance/systems`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ComplianceAssessmentResponse"},"title":"Response List Assessments V1 Projects  Project Id  Compliance Systems  System Id  Assessments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"read","x-connic-project-permission":"compliance.view"},"post":{"tags":["compliance"],"summary":"Create assessment","description":"Create a draft compliance assessment as the AI system's next version.\n\nThe result is derived from the submitted dimensions.\n\nRequired permission: `compliance.manage`.","operationId":"create_assessment","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"system_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"System Id"},"description":"AI system ID from `GET /compliance/systems`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceAssessmentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceAssessmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"write","x-connic-project-permission":"compliance.manage"}},"/v1/projects/{project_id}/compliance/systems/{system_id}/assessments/{assessment_id}/review":{"post":{"tags":["compliance"],"summary":"Review assessment","description":"Approve a draft compliance assessment or request changes.\n\nOnly the latest version can be approved. Approval needs a nonblank\nrationale, and `acknowledge_uncertainty` when any answer is uncertain.\n\nRequired permission: `compliance.manage`.","operationId":"review_assessment","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"system_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"System Id"},"description":"AI system ID from `GET /compliance/systems`."},{"name":"assessment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Assessment Id"},"description":"Assessment ID from `GET /compliance/systems/{system_id}/assessments`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceAssessmentReview"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceAssessmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"write","x-connic-project-permission":"compliance.manage"}},"/v1/projects/{project_id}/compliance/controls":{"get":{"tags":["compliance"],"summary":"List controls","description":"List compliance controls for the project or one AI system.\n\nRequired permission: `compliance.view`.","operationId":"list_controls","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"system_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only controls for this AI system.","title":"System Id"},"description":"Only controls for this AI system."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ComplianceControlResponse"},"title":"Response List Controls V1 Projects  Project Id  Compliance Controls Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"read","x-connic-project-permission":"compliance.view"}},"/v1/projects/{project_id}/compliance/systems/{system_id}/controls/generate":{"post":{"tags":["compliance"],"summary":"Generate controls","description":"Generate live controls from an AI system's latest approved assessment.\n\nControls that no longer apply are kept and marked `not_applicable`.\n\nRequired permission: `compliance.manage`.","operationId":"generate_controls","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"system_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"System Id"},"description":"AI system ID from `GET /compliance/systems`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceControlGenerate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ComplianceControlResponse"},"title":"Response Generate Controls V1 Projects  Project Id  Compliance Systems  System Id  Controls Generate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"write","x-connic-project-permission":"compliance.manage"}},"/v1/projects/{project_id}/compliance/controls/{control_id}":{"patch":{"tags":["compliance"],"summary":"Update control","description":"Update a compliance control's status, evidence, and review details.\n\nA `not_applicable` status requires an `exception_rationale`.\n\nRequired permission: `compliance.manage`.","operationId":"update_control","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"control_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Control Id"},"description":"Control ID from `GET /compliance/controls`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceControlUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceControlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"write","x-connic-project-permission":"compliance.manage"}},"/v1/projects/{project_id}/compliance/systems/{system_id}/controls/refresh":{"post":{"tags":["compliance"],"summary":"Refresh controls","description":"Refresh live controls from the latest approved assessment.\n\nRequired permission: `compliance.manage`.","operationId":"refresh_controls","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"system_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"System Id"},"description":"AI system ID from `GET /compliance/systems`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ComplianceControlResponse"},"title":"Response Refresh Controls V1 Projects  Project Id  Compliance Systems  System Id  Controls Refresh Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"write","x-connic-project-permission":"compliance.manage"}},"/v1/projects/{project_id}/compliance/systems/{system_id}/transparency-policy":{"get":{"tags":["compliance"],"summary":"Get transparency policy","description":"Return the configured transparency policy for an AI system, or null if none is configured.\n\nRequired permission: `compliance.view`.","operationId":"get_transparency_policy","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"system_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"System Id"},"description":"AI system ID from `GET /compliance/systems`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ComplianceTransparencyPolicyResponse"},{"type":"null"}],"title":"Response Get Transparency Policy V1 Projects  Project Id  Compliance Systems  System Id  Transparency Policy Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"read","x-connic-project-permission":"compliance.view"},"put":{"tags":["compliance"],"summary":"Replace transparency policy","description":"Create or replace the transparency policy for an AI system. Each replacement increments `version`.\n\nRequired permission: `compliance.manage`.","operationId":"upsert_transparency_policy","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"system_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"System Id"},"description":"AI system ID from `GET /compliance/systems`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceTransparencyPolicyUpsert"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceTransparencyPolicyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"write","x-connic-project-permission":"compliance.manage"}},"/v1/projects/{project_id}/compliance/systems/{system_id}/transparency-applications":{"get":{"tags":["compliance"],"summary":"List transparency applications","description":"List recorded transparency-policy applications for an AI system, newest first.\n\nRequired permission: `compliance.view`.","operationId":"list_transparency_applications","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"system_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"System Id"},"description":"AI system ID from `GET /compliance/systems`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum number of applications to return.","default":100,"title":"Limit"},"description":"Maximum number of applications to return."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ComplianceTransparencyApplicationResponse"},"title":"Response List Transparency Applications V1 Projects  Project Id  Compliance Systems  System Id  Transparency Applications Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"read","x-connic-project-permission":"compliance.view"},"post":{"tags":["compliance"],"summary":"Record transparency application","description":"Record evidence that an AI system's transparency policy was applied.\n\nRequires a transparency policy. Repeating a request with the same\n`idempotency_key` from the same caller returns the original record;\ndifferent content with the same key returns 409.\n\nRequired permission: `compliance.manage`.","operationId":"create_transparency_application","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"system_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"System Id"},"description":"AI system ID from `GET /compliance/systems`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceTransparencyApplicationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceTransparencyApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"write","x-connic-project-permission":"compliance.manage"}},"/v1/projects/{project_id}/compliance/systems/{system_id}/monitoring-plan":{"get":{"tags":["compliance"],"summary":"Get monitoring plan","description":"Return the post-market monitoring plan for an AI system, or null if none exists.\n\nRequired permission: `compliance.view`.","operationId":"get_monitoring_plan","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"system_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"System Id"},"description":"AI system ID from `GET /compliance/systems`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ComplianceMonitoringPlanResponse"},{"type":"null"}],"title":"Response Get Monitoring Plan V1 Projects  Project Id  Compliance Systems  System Id  Monitoring Plan Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"read","x-connic-project-permission":"compliance.view"},"put":{"tags":["compliance"],"summary":"Replace monitoring plan","description":"Create or replace an AI system's post-market monitoring plan.\n\nWhen `next_review_at` is omitted and `last_reviewed_at` is set, it is\n`last_reviewed_at` plus `review_cadence_days`. An `active` plan needs an\nowner, signals or a monitoring procedure, and a next review date.\n\nRequired permission: `compliance.manage`.","operationId":"upsert_monitoring_plan","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"system_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"System Id"},"description":"AI system ID from `GET /compliance/systems`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceMonitoringPlanUpsert"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceMonitoringPlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"write","x-connic-project-permission":"compliance.manage"}},"/v1/projects/{project_id}/compliance/incidents":{"get":{"tags":["compliance"],"summary":"List incidents","description":"List compliance incidents, most recent awareness date first.\n\nRequired permission: `compliance.view`.","operationId":"list_incidents","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"system_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only incidents for this AI system.","title":"System Id"},"description":"Only incidents for this AI system."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["open","investigating","contained","resolved","closed"],"type":"string"},{"type":"null"}],"description":"Only incidents with this status.","title":"Status"},"description":"Only incidents with this status."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ComplianceIncidentResponse"},"title":"Response List Incidents V1 Projects  Project Id  Compliance Incidents Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"read","x-connic-project-permission":"compliance.view"},"post":{"tags":["compliance"],"summary":"Create incident","description":"Record a compliance incident for an AI system.\n\nRequired permission: `compliance.incidents.manage`.","operationId":"create_incident","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceIncidentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceIncidentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"write","x-connic-project-permission":"compliance.incidents.manage"}},"/v1/projects/{project_id}/compliance/incidents/{incident_id}":{"patch":{"tags":["compliance"],"summary":"Update incident","description":"Update a compliance incident's status, impact, and corrective actions.\n\nRequired permission: `compliance.incidents.manage`.","operationId":"update_incident","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"incident_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Incident Id"},"description":"Incident ID from `GET /compliance/incidents`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceIncidentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceIncidentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"write","x-connic-project-permission":"compliance.incidents.manage"}},"/v1/projects/{project_id}/compliance/evidence-snapshots":{"get":{"tags":["compliance"],"summary":"List evidence snapshots","description":"List immutable compliance evidence snapshots for a project or system, newest first.\n\nRequired permission: `compliance.view`.","operationId":"list_evidence_snapshots","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"system_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only snapshots scoped to this AI system.","title":"System Id"},"description":"Only snapshots scoped to this AI system."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of snapshots to return.","default":50,"title":"Limit"},"description":"Maximum number of snapshots to return."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of snapshots to skip.","default":0,"title":"Offset"},"description":"Number of snapshots to skip."},{"name":"before_created_at","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Cursor: `created_at` of the last snapshot on the previous page. Send together with `before_id`.","title":"Before Created At"},"description":"Cursor: `created_at` of the last snapshot on the previous page. Send together with `before_id`."},{"name":"before_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Cursor: ID of the last snapshot on the previous page. Send together with `before_created_at`.","title":"Before Id"},"description":"Cursor: ID of the last snapshot on the previous page. Send together with `before_created_at`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ComplianceEvidenceSnapshotResponse"},"title":"Response List Evidence Snapshots V1 Projects  Project Id  Compliance Evidence Snapshots Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"read","x-connic-project-permission":"compliance.view"},"post":{"tags":["compliance"],"summary":"Create evidence snapshot","description":"Create an immutable export snapshot of selected compliance evidence.\n\nIf a snapshot with the same scope and content already exists, that snapshot is returned.\n\nRequired permission: `compliance.export`.","operationId":"create_evidence_snapshot","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceEvidenceSnapshotCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceEvidenceSnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"write","x-connic-project-permission":"compliance.export"}},"/v1/projects/{project_id}/compliance/evidence-snapshots/{snapshot_id}/download":{"get":{"tags":["compliance"],"summary":"Download evidence snapshot","description":"Download a completed compliance evidence snapshot as a ZIP archive.\n\nThe `X-Content-SHA256` header carries the snapshot's `content_hash` and\n`X-Archive-SHA256` the hash of the archive.\n\nRequired permission: `compliance.export`.","operationId":"download_evidence_snapshot","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Snapshot Id"},"description":"Evidence snapshot ID from `GET /compliance/evidence-snapshots`."}],"responses":{"200":{"description":"Successful Response","content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"compliance","x-connic-permission-action":"read","x-connic-project-permission":"compliance.export"}},"/v1/projects/{project_id}/bridges":{"get":{"tags":["bridges"],"summary":"List bridges","description":"List all bridges for the project.\n\nRequired permission: `bridges.view`.","operationId":"list_bridges","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgeListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"bridges","x-connic-permission-action":"read","x-connic-project-permission":"bridges.view"}},"/v1/projects/{project_id}/bridges/{bridge_id}/routes":{"get":{"tags":["bridges"],"summary":"Get bridge routes","description":"Get a bridge's automatic TCP routes.\n\nConnections to a matching host and port go through the bridge without the\n`.cnc-bridge-<bridge_id>` hostname suffix.\n\nRequired permission: `bridges.update`.","operationId":"get_bridge_routes","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"bridge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bridge Id"},"description":"Bridge ID from `GET /bridges`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgeRoutesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"bridges","x-connic-permission-action":"read","x-connic-project-permission":"bridges.update"},"put":{"tags":["bridges"],"summary":"Replace bridge routes","description":"Replace a bridge's automatic TCP routes.\n\nExplicit `.cnc-bridge-<bridge_id>` hostnames take priority, then exact\nroutes, then regex routes.\n\nRequired permission: `bridges.update`.","operationId":"update_bridge_routes","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"bridge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bridge Id"},"description":"Bridge ID from `GET /bridges`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgeRoutesUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgeRoutesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"bridges","x-connic-permission-action":"write","x-connic-project-permission":"bridges.update"}},"/v1/projects/{project_id}/connections":{"get":{"tags":["connections"],"summary":"List connections","description":"List connections for the project, optionally filtered by connector type.\n\nRequired permission: `connections.view`.","operationId":"list_connections","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only connections usable by this connector type, such as `kafka`.","title":"Type"},"description":"Only connections usable by this connector type, such as `kafka`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"connections","x-connic-permission-action":"read","x-connic-project-permission":"connections.view"},"post":{"tags":["connections"],"summary":"Create connection","description":"Create a reusable set of credentials for the project.\n\nConnector types that need an app setup flow return 400 and must be connected in the dashboard.\n\nRequired permission: `connections.create`.","operationId":"create_connection","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"connections","x-connic-permission-action":"write","x-connic-project-permission":"connections.create"}},"/v1/projects/{project_id}/connections/{connection_id}":{"get":{"tags":["connections"],"summary":"Get connection","description":"Get one connection with its secret fields masked.\n\nRequired permission: `connections.view`.","operationId":"get_connection","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"},"description":"Connection ID from `GET /connections`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"connections","x-connic-permission-action":"read","x-connic-project-permission":"connections.view"},"patch":{"tags":["connections"],"summary":"Update connection","description":"Rename a connection or update its credentials. Connectors that use it pick up new credentials.\n\nRequired permission: `connections.update`.","operationId":"update_connection","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"},"description":"Connection ID from `GET /connections`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"connections","x-connic-permission-action":"write","x-connic-project-permission":"connections.update"},"delete":{"tags":["connections"],"summary":"Delete connection","description":"Delete a connection. Returns 409 with the `connector_ids` that still use it.\n\nRequired permission: `connections.delete`.","operationId":"delete_connection","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"},"description":"Connection ID from `GET /connections`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicOkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"connections","x-connic-permission-action":"write","x-connic-project-permission":"connections.delete"}},"/v1/projects/{project_id}/connections/-/schema/{connector_type}":{"get":{"tags":["connections"],"summary":"Get connection schema","description":"Return the credential fields a connection for this connector type stores.\n\nTypes that don't support connections return 400.\n\nRequired permission: `connections.view`.","operationId":"get_connection_schema_for_type","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"connector_type","in":"path","required":true,"schema":{"type":"string","title":"Connector Type"},"description":"Connector type that supports connections, such as `kafka` or `postgres`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionSchemaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"connections","x-connic-permission-action":"read","x-connic-project-permission":"connections.view"}},"/v1/projects/{project_id}/oauth-apps":{"get":{"tags":["oauth-apps"],"summary":"List OAuth apps","description":"Lists an environment's OAuth apps and the redirect URL to register with providers.\n\nClient secrets are never returned.\n\nRequired permission: `oauth_apps.view`.","operationId":"list_oauth_apps","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment to list OAuth apps from.","title":"Environment Id"},"description":"Environment to list OAuth apps from."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAppListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"oauth-apps","x-connic-permission-action":"read","x-connic-project-permission":"oauth_apps.view"}},"/v1/projects/{project_id}/oauth-apps/{app_id}/users":{"get":{"tags":["oauth-apps"],"summary":"List OAuth app users","description":"Lists end users who connected through an OAuth app, most recently connected first.\n\nPass `user_id` to check one end user's connection. Token values are never returned.\n\nRequired permission: `oauth_apps.view`.","operationId":"list_oauth_app_users","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"},"description":"OAuth app ID from `GET /oauth-apps`."},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}],"description":"Only this end user's connection.","title":"User Id"},"description":"Only this end user's connection."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Maximum number of end users to return.","default":50,"title":"Limit"},"description":"Maximum number of end users to return."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of end users to skip.","default":0,"title":"Offset"},"description":"Number of end users to skip."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthUserListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"oauth-apps","x-connic-permission-action":"read","x-connic-project-permission":"oauth_apps.view"},"delete":{"tags":["oauth-apps"],"summary":"Revoke OAuth app user","description":"Disconnects an end user from an OAuth app and deletes their stored tokens.\n\nMCP servers that use the app skip this user until they sign in again.\n\nRequired permission: `oauth_apps.manage`.","operationId":"revoke_oauth_app_user","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"},"description":"OAuth app ID from `GET /oauth-apps`."},{"name":"user_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"description":"End-user ID to disconnect.","title":"User Id"},"description":"End-user ID to disconnect."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthUserRevokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"oauth-apps","x-connic-permission-action":"write","x-connic-project-permission":"oauth_apps.manage"}},"/v1/projects/{project_id}/oauth-apps/{app_id}/connect-links":{"post":{"tags":["oauth-apps"],"summary":"Create OAuth connect link","description":"Creates a single-use sign-in link for an end user, valid for 10 minutes.\n\nSend the user to `url`. After they sign in with the provider, their token is stored\nunder `user_id`. Use the same ID that your middleware sets in the context path named\nby the MCP server's `oauth.user`. The browser then returns to `return_url` with\n`connic_oauth=connected`, `denied`, or `failed` added to the query. `return_url`\nmust match one of the app's return URLs; without it, connic shows a confirmation page.\n\nRequired permission: `oauth_apps.connect`.","operationId":"create_oauth_connect_link","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"},"description":"OAuth app ID from `GET /oauth-apps`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthConnectLinkCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthConnectLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"oauth-apps","x-connic-permission-action":"write","x-connic-project-permission":"oauth_apps.connect"}},"/v1/projects/{project_id}/judges":{"post":{"tags":["judges"],"summary":"Create judge","description":"Creates a judge that scores runs of one agent in the given environment against a rubric, using an LLM. With `trigger_mode=automatic`, it evaluates completed runs that match `filter_expression`, sampled at `sample_rate`; with `manual`, evaluations start only through the trigger endpoints. The judge only evaluates runs of the `agent_name` in the body.\n\nRequired permission: `judges.create`.","operationId":"create_judge","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment the judge belongs to","title":"Environment Id"},"description":"Environment the judge belongs to"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JudgeCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JudgeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"judges","x-connic-permission-action":"write","x-connic-project-permission":"judges.create"},"get":{"tags":["judges"],"summary":"List judges","description":"Every judge in the environment, newest first. Each item bundles configuration, trigger rules, and rollups such as average score and total evaluations completed.\n\nRequired permission: `judges.view`.","operationId":"list_judges","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment to list judges for","title":"Environment Id"},"description":"Environment to list judges for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JudgeResponse"},"title":"Response List Judges V1 Projects  Project Id  Judges Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"judges","x-connic-permission-action":"read","x-connic-project-permission":"judges.view"}},"/v1/projects/{project_id}/judges/{judge_id}":{"get":{"tags":["judges"],"summary":"Get judge","description":"Returns one judge with its rubric, model, trigger settings and notification threshold, plus its average score and number of completed evaluations.\n\nRequired permission: `judges.view`.","operationId":"get_judge","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"judge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Judge Id"},"description":"Judge ID from `GET /judges`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JudgeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"judges","x-connic-permission-action":"read","x-connic-project-permission":"judges.view"},"patch":{"tags":["judges"],"summary":"Update judge","description":"Partially updates a judge; omitted fields stay unchanged. Returns 409 while a running or paused A/B test uses the judge.\n\nRequired permission: `judges.update`.","operationId":"update_judge","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"judge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Judge Id"},"description":"Judge ID from `GET /judges`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JudgeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JudgeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"judges","x-connic-permission-action":"write","x-connic-project-permission":"judges.update"},"delete":{"tags":["judges"],"summary":"Delete judge","description":"Deletes the judge and all of its evaluations. Returns 409 while any started A/B test that used the judge keeps its results. This cannot be undone.\n\nRequired permission: `judges.delete`.","operationId":"delete_judge","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"judge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Judge Id"},"description":"Judge ID from `GET /judges`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicOkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"judges","x-connic-permission-action":"write","x-connic-project-permission":"judges.delete"}},"/v1/projects/{project_id}/judges/{judge_id}/runs":{"get":{"tags":["judges"],"summary":"List judge evaluation runs","description":"Paginated history of this judge's evaluations, newest first. Optional `status_filter` narrows to queued, running, completed, or failed states. `low_score_only` keeps rows whose score is below `low_score_threshold_pct` of the rubric maximum. Each row links back to the evaluated agent run and includes reasoning text, token usage, and judge token cost.\n\nRequired permission: `judges.view`.","operationId":"list_judge_runs","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"judge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Judge Id"},"description":"Judge ID from `GET /judges`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size, 1 to 100.","default":25,"title":"Limit"},"description":"Page size, 1 to 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of evaluations to skip.","default":0,"title":"Offset"},"description":"Number of evaluations to skip."},{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/JudgeRunStatus"}},{"type":"null"}],"description":"Only evaluations in these statuses.","title":"Status Filter"},"description":"Only evaluations in these statuses."},{"name":"low_score_only","in":"query","required":false,"schema":{"type":"boolean","description":"Only scored evaluations whose overall score is below `low_score_threshold_pct` percent of the maximum.","default":false,"title":"Low Score Only"},"description":"Only scored evaluations whose overall score is below `low_score_threshold_pct` percent of the maximum."},{"name":"low_score_threshold_pct","in":"query","required":false,"schema":{"type":"number","maximum":100,"minimum":0,"description":"Percentage of the maximum score used by `low_score_only`, 0 to 100.","default":50,"title":"Low Score Threshold Pct"},"description":"Percentage of the maximum score used by `low_score_only`, 0 to 100."},{"name":"convert_costs_to","in":"query","required":false,"schema":{"anyOf":[{"enum":["EUR","USD"],"type":"string"},{"type":"null"}],"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call","title":"Convert Costs To"},"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JudgeRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"judges","x-connic-permission-action":"read","x-connic-project-permission":"judges.view"}},"/v1/projects/{project_id}/runs/{run_id}/judge-runs":{"get":{"tags":["judges"],"summary":"List judge evaluations for a run","description":"Every judge evaluation of this agent run, newest first, with scores, reasoning, status, token usage and cost.\n\nRequired permission: `judges.view`.","operationId":"get_judge_runs_for_agent_run","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"},"description":"Run ID from `GET /runs`."},{"name":"convert_costs_to","in":"query","required":false,"schema":{"anyOf":[{"enum":["EUR","USD"],"type":"string"},{"type":"null"}],"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call","title":"Convert Costs To"},"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JudgeRunResponse"},"title":"Response Get Judge Runs For Agent Run V1 Projects  Project Id  Runs  Run Id  Judge Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"runs","x-connic-permission-action":"read","x-connic-project-permission":"judges.view"}},"/v1/projects/{project_id}/judges/{judge_id}/trigger":{"post":{"tags":["judges"],"summary":"Trigger judge evaluation","description":"Starts a new evaluation for `agent_run_id`. The run must belong to the judge's environment and its agent name must match the judge's configured agent. Returns `judge_run_id`. Responds with `409 Conflict` while another evaluation for this judge and run is queued or running, or when the run has been deleted.\n\nRequired permission: `judges.trigger`.","operationId":"trigger_judge","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"judge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Judge Id"},"description":"Judge ID from `GET /judges`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualTriggerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicJudgeTriggerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"judges","x-connic-permission-action":"write","x-connic-project-permission":"judges.trigger"}},"/v1/projects/{project_id}/judges/{judge_id}/trigger-bulk":{"post":{"tags":["judges"],"summary":"Trigger judge evaluations in bulk","description":"Queues an evaluation for every completed run of the judge's agent queued between `start_date` and `end_date`. Deleted runs and runs that already have a queued or running evaluation for this judge are skipped. With `dry_run`, nothing is queued and only the matching run `count` is returned. Rejects timeframes matching more than 1000 runs.\n\nRequired permission: `judges.trigger`.","operationId":"trigger_judge_bulk","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"judge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Judge Id"},"description":"Judge ID from `GET /judges`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTriggerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicJudgeBulkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"judges","x-connic-permission-action":"write","x-connic-project-permission":"judges.trigger"}},"/v1/projects/{project_id}/judges/{judge_id}/stats":{"get":{"tags":["judges"],"summary":"Get judge stats","description":"Average scores over completed evaluations, per-criterion averages over the 100 most recent ones, the failure count, and token usage and cost across all of the judge's evaluations.\n\nRequired permission: `judges.view`.","operationId":"get_judge_stats","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"judge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Judge Id"},"description":"Judge ID from `GET /judges`."},{"name":"convert_costs_to","in":"query","required":false,"schema":{"anyOf":[{"enum":["EUR","USD"],"type":"string"},{"type":"null"}],"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call","title":"Convert Costs To"},"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JudgeStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"judges","x-connic-permission-action":"read","x-connic-project-permission":"judges.view"}},"/v1/projects/{project_id}/ab-tests":{"get":{"tags":["ab-tests"],"summary":"List A/B tests","description":"List an agent's A/B tests in an environment, newest first.\n\nRequired permission: `ab_tests.view`. With `judges.view`, the response also includes judge names.","operationId":"list_ab_tests","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment to list tests from.","title":"Environment Id"},"description":"Environment to list tests from."},{"name":"agent_name","in":"query","required":true,"schema":{"type":"string","description":"Base agent whose tests to list.","title":"Agent Name"},"description":"Base agent whose tests to list."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ABTestListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"ab-tests","x-connic-permission-action":"read","x-connic-project-permission":"ab_tests.view"},"post":{"tags":["ab-tests"],"summary":"Create A/B test","description":"Create an A/B test as a draft for a deployed agent variant.\n\n`test_name` must be a variant from `GET /ab-tests/variants`. Returns 409\nwhen the agent already has a draft, running or paused test for that variant.\n\nRequired permission: `ab_tests.create`. With `judges.view`, the response also includes judge names.","operationId":"create_ab_test","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment to run the test in.","title":"Environment Id"},"description":"Environment to run the test in."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ABTestCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ABTestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"ab-tests","x-connic-permission-action":"write","x-connic-project-permission":"ab_tests.create"}},"/v1/projects/{project_id}/ab-tests/{test_id}":{"get":{"tags":["ab-tests"],"summary":"Get A/B test","description":"Get one A/B test with its configuration, status, and run counts.\n\nRequired permission: `ab_tests.view`. With `judges.view`, the response also includes judge names.","operationId":"get_ab_test","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"test_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Test Id"},"description":"A/B test ID from `GET /ab-tests`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ABTestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"ab-tests","x-connic-permission-action":"read","x-connic-project-permission":"ab_tests.view"},"patch":{"tags":["ab-tests"],"summary":"Update A/B test","description":"Update an A/B test's configuration, lifecycle state, or outcome.\n\nSet `status` to `running` to start or resume, `paused` to pause, or\n`concluded` to end the test. Analysis mode and plan can only change while\nthe test is a draft, and a confidence test's configuration is fixed once it starts.\n\nRequired permission: `ab_tests.update`. With `judges.view`, the response also includes judge names.","operationId":"update_ab_test","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"test_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Test Id"},"description":"A/B test ID from `GET /ab-tests`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ABTestUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ABTestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"ab-tests","x-connic-permission-action":"write","x-connic-project-permission":"ab_tests.update"},"delete":{"tags":["ab-tests"],"summary":"Delete A/B test","description":"Delete an A/B test. Running tests and confidence tests that have started can't be deleted.\n\nRequired permission: `ab_tests.delete`.","operationId":"delete_ab_test","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"test_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Test Id"},"description":"A/B test ID from `GET /ab-tests`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicOkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"ab-tests","x-connic-permission-action":"write","x-connic-project-permission":"ab_tests.delete"}},"/v1/projects/{project_id}/ab-tests/variants":{"get":{"tags":["ab-tests"],"summary":"List A/B test variants","description":"List the test variants of an agent in the environment's active deployment.\n\nA variant is an agent named `<agent_name>-test-<variant>`. Pass the variant\nname as `test_name` when creating a test.\n\nRequired permission: `ab_tests.view`.","operationId":"list_available_variants","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment whose active deployment to read.","title":"Environment Id"},"description":"Environment whose active deployment to read."},{"name":"agent_name","in":"query","required":true,"schema":{"type":"string","description":"Base agent to list variants for.","title":"Agent Name"},"description":"Base agent to list variants for."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicABTestVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"ab-tests","x-connic-permission-action":"read","x-connic-project-permission":"ab_tests.view"}},"/v1/projects/{project_id}/ab-tests/plan-preview":{"post":{"tags":["ab-tests"],"summary":"Preview A/B test plan","description":"Calculate the sample targets and analysis boundaries for a confidence-mode test without creating it.\n\nRequired permission: `ab_tests.create`.","operationId":"preview_ab_test_plan","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment the test would run in.","title":"Environment Id"},"description":"Environment the test would run in."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ABTestPlanPreviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ABTestPlanPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"ab-tests","x-connic-permission-action":"read","x-connic-project-permission":"ab_tests.create"}},"/v1/projects/{project_id}/ab-tests/{test_id}/comparison":{"get":{"tags":["ab-tests"],"summary":"Get A/B test comparison","description":"Compare control and variant performance for an A/B test.\n\nRequired permission: `ab_tests.view`. With `judges.view`, the response also includes judge names.","operationId":"get_ab_test_comparison","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"test_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Test Id"},"description":"A/B test ID from `GET /ab-tests`."},{"name":"convert_costs_to","in":"query","required":false,"schema":{"anyOf":[{"enum":["EUR","USD"],"type":"string"},{"type":"null"}],"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call","title":"Convert Costs To"},"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicABTestComparisonResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"ab-tests","x-connic-permission-action":"read","x-connic-project-permission":"ab_tests.view"}},"/v1/projects/{project_id}/budgets/daily-cost":{"get":{"tags":["budgets"],"summary":"Get daily spend","description":"Per-day token usage and cost, split by agent, for one calendar month, including judge evaluations. Costs are in each model's pricing currency unless `convert_costs_to` is set. Defaults to the current month; pass `month=YYYY-MM` to query history. Covers every environment the caller can access; `environment_id` limits it to one. `group_by=model` splits by model; `group_by=context.<key>` splits by a run context value such as `context.customer_id`, with `context_value: null` for runs that do not set it. Response includes running month total, projected end-of-month estimate when the month is in progress, and month-over-month trend versus the prior calendar month.\n\nRequired permission: `budgets.view`.","operationId":"get_daily_cost","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Month in YYYY-MM format","title":"Month"},"description":"Month in YYYY-MM format"},{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Restrict to one environment UUID","title":"Environment Id"},"description":"Restrict to one environment UUID"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Exact range start; applies only together with `end_date` and narrows the data within `month`","title":"Start Date"},"description":"Exact range start; applies only together with `end_date` and narrows the data within `month`"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Exact range end (exclusive); applies only together with `start_date`","title":"End Date"},"description":"Exact range end (exclusive); applies only together with `start_date`"},{"name":"tz_offset","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"UTC offset in minutes, with the sign inverted (-120 for UTC+2, 300 for UTC-5). Days are grouped in this timezone; defaults to UTC.","title":"Tz Offset"},"description":"UTC offset in minutes, with the sign inverted (-120 for UTC+2, 300 for UTC-5). Days are grouped in this timezone; defaults to UTC."},{"name":"group_by","in":"query","required":false,"schema":{"type":"string","description":"Group spend by 'agent', 'model', or a run context path such as 'context.customer_id'","default":"agent","title":"Group By"},"description":"Group spend by 'agent', 'model', or a run context path such as 'context.customer_id'"},{"name":"convert_costs_to","in":"query","required":false,"schema":{"anyOf":[{"enum":["EUR","USD"],"type":"string"},{"type":"null"}],"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call","title":"Convert Costs To"},"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDailyCostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"budgets","x-connic-permission-action":"read","x-connic-project-permission":"budgets.view"}},"/v1/projects/{project_id}/budgets/agent-ranking":{"get":{"tags":["budgets"],"summary":"Get spend per agent","description":"Token usage and native-currency cost by agent for the chosen month (default: current), sorted by name. Each row includes an exact per-currency cost breakdown, agent and judge token usage, and run count. Covers every environment the caller can access; pass `environment_id` to limit to one. `group_by=model` ranks models; `group_by=context.<key>` ranks run context values such as `context.customer_id`, with `context_value: null` for runs that do not set it.\n\nRequired permission: `budgets.view`.","operationId":"get_agent_ranking","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Month in YYYY-MM format","title":"Month"},"description":"Month in YYYY-MM format"},{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Restrict to one environment UUID","title":"Environment Id"},"description":"Restrict to one environment UUID"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Exact range start; applies only together with `end_date` and replaces the month bounds","title":"Start Date"},"description":"Exact range start; applies only together with `end_date` and replaces the month bounds"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Exact range end (exclusive); applies only together with `start_date`","title":"End Date"},"description":"Exact range end (exclusive); applies only together with `start_date`"},{"name":"tz_offset","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"UTC offset in minutes, with the sign inverted (-120 for UTC+2, 300 for UTC-5). Days are grouped in this timezone; defaults to UTC.","title":"Tz Offset"},"description":"UTC offset in minutes, with the sign inverted (-120 for UTC+2, 300 for UTC-5). Days are grouped in this timezone; defaults to UTC."},{"name":"group_by","in":"query","required":false,"schema":{"type":"string","description":"Group spend by 'agent', 'model', or a run context path such as 'context.customer_id'","default":"agent","title":"Group By"},"description":"Group spend by 'agent', 'model', or a run context path such as 'context.customer_id'"},{"name":"convert_costs_to","in":"query","required":false,"schema":{"anyOf":[{"enum":["EUR","USD"],"type":"string"},{"type":"null"}],"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call","title":"Convert Costs To"},"description":"Convert token costs to EUR or USD at the daily ECB reference rate of each model call"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAgentRankingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"budgets","x-connic-permission-action":"read","x-connic-project-permission":"budgets.view"}},"/v1/projects/{project_id}/budgets/alerts":{"get":{"tags":["budgets"],"summary":"List spend alerts and limits","description":"All configured spend notifications and hard caps, newest first. Each item shows threshold, period (monthly or daily), scope (project-wide, specific environments, or agents), whether it is active, and computed spend so far in the current period.\n\nRequired permission: `budgets.view`.","operationId":"list_spend_alerts","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SpendAlertResponse"},"title":"Response List Spend Alerts V1 Projects  Project Id  Budgets Alerts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"budgets","x-connic-permission-action":"read","x-connic-project-permission":"budgets.view"},"post":{"tags":["budgets"],"summary":"Create spend alert or limit","description":"`type=alert` sends a notification once per period when token cost reaches `threshold_amount` in the selected currency. `type=limit` holds new runs in the queue once spend reaches the threshold, until the next period or until the limit is raised, disabled or removed. `scope` is `global` (whole project), `environment` (environment IDs in `scope_ids`) or `agent` (agent names in `scope_ids`). `period` is `monthly` or `daily`.\n\nRequired permission: `budgets.manage`.","operationId":"create_spend_alert","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendAlertCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendAlertResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"budgets","x-connic-permission-action":"write","x-connic-project-permission":"budgets.manage"}},"/v1/projects/{project_id}/budgets/alerts/{alert_id}":{"get":{"tags":["budgets"],"summary":"Get spend alert or limit","description":"One spend notification or hard cap, with computed spend so far in the current period.\n\nRequired permission: `budgets.view`.","operationId":"get_spend_alert","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Id"},"description":"Spend alert ID from `GET /budgets/alerts`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendAlertResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"budgets","x-connic-permission-action":"read","x-connic-project-permission":"budgets.view"},"put":{"tags":["budgets"],"summary":"Update spend alert or limit","description":"Partial update: only supplied fields change. Changing `threshold_amount` or `currency` clears `last_triggered_at` so the alert can fire again in the current period. Raising a limit above current spend, or disabling it, releases runs it was holding in the queue.\n\nRequired permission: `budgets.manage`.","operationId":"update_spend_alert","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Id"},"description":"Spend alert ID from `GET /budgets/alerts`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendAlertUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendAlertResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"budgets","x-connic-permission-action":"write","x-connic-project-permission":"budgets.manage"},"delete":{"tags":["budgets"],"summary":"Delete spend alert or limit","description":"Removes the rule entirely. If it was a limit, runs it was holding in the queue are released.\n\nRequired permission: `budgets.manage`.","operationId":"delete_spend_alert","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"alert_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Alert Id"},"description":"Spend alert ID from `GET /budgets/alerts`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicOkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"budgets","x-connic-permission-action":"write","x-connic-project-permission":"budgets.manage"}},"/v1/projects/{project_id}/retrieval/namespaces":{"get":{"tags":["retrieval"],"summary":"List retrieval namespaces","description":"Returns the namespace hierarchy for managed retrieval. Namespaces use dot-separated paths (e.g. `docs.api`, `docs.guides`). Use `parent` to list children of a specific namespace and `depth` to control nesting. Without `parent`, the response's `parent` is null and `namespaces` holds the top-level namespaces.\n\nRequired permission: `retrieval.manage`.","operationId":"list_namespaces","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment ID from `GET /environments`.","title":"Environment Id"},"description":"Environment ID from `GET /environments`."},{"name":"parent","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"List the namespaces below this one, such as `docs`. The response's `parent` then describes it.","title":"Parent"},"description":"List the namespaces below this one, such as `docs`. The response's `parent` then describes it."},{"name":"depth","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":0,"description":"Levels to return: 1 returns only the direct children of `parent` (or the top level), 0 returns all levels.","default":1,"title":"Depth"},"description":"Levels to return: 1 returns only the direct children of `parent` (or the top level), 0 returns all levels."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicNamespacesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"retrieval","x-connic-permission-action":"read","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/retrieval/entries":{"get":{"tags":["retrieval"],"summary":"List retrieval entries","description":"Returns paginated retrieval entries. Each entry represents an ingested document or text. Filter by `namespace`, `content_type`, or free-text `search` on the entry ID.\n\nRequired permission: `retrieval.manage`.","operationId":"list_entries","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment ID from `GET /environments`.","title":"Environment Id"},"description":"Environment ID from `GET /environments`."},{"name":"namespace","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only entries in this namespace or its child namespaces.","title":"Namespace"},"description":"Only entries in this namespace or its child namespaces."},{"name":"content_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only entries of this type: `text` (text uploads and plain-text files), `pdf`, or `image`.","title":"Content Type"},"description":"Only entries of this type: `text` (text uploads and plain-text files), `pdf`, or `image`."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case-insensitive match anywhere in the entry ID. `%` and `_` act as wildcards.","title":"Search"},"description":"Case-insensitive match anywhere in the entry ID. `%` and `_` act as wildcards."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Maximum number of entries to return.","default":50,"title":"Limit"},"description":"Maximum number of entries to return."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of entries to skip.","default":0,"title":"Offset"},"description":"Number of entries to skip."},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"enum":["entry","chunks","namespace","created"],"type":"string"},{"type":"null"}],"description":"Sort key: `entry` (entry ID), `chunks` (chunk count), `namespace`, or `created` (first ingestion time). Defaults to `created`.","title":"Sort By"},"description":"Sort key: `entry` (entry ID), `chunks` (chunk count), `namespace`, or `created` (first ingestion time). Defaults to `created`."},{"name":"sort_dir","in":"query","required":false,"schema":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"description":"Sort direction. Defaults to `desc`.","title":"Sort Dir"},"description":"Sort direction. Defaults to `desc`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRetrievalEntriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"retrieval","x-connic-permission-action":"read","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/retrieval/entries/{entry_id}":{"get":{"tags":["retrieval"],"summary":"Get retrieval entry details","description":"Returns all chunks of one retrieval entry, ordered by chunk index. Entry IDs are unique per namespace, so pass `namespace` for an entry stored in one. An unknown entry returns an empty `chunks` list.\n\nRequired permission: `retrieval.manage`.","operationId":"get_entry","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"},"description":"Retrieval entry ID."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment ID from `GET /environments`.","title":"Environment Id"},"description":"Environment ID from `GET /environments`."},{"name":"namespace","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Namespace the entry is stored in. Omit for an entry in the default namespace.","title":"Namespace"},"description":"Namespace the entry is stored in. Omit for an entry in the default namespace."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRetrievalEntryDetailsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"retrieval","x-connic-permission-action":"read","x-connic-project-permission":"retrieval.manage"},"delete":{"tags":["retrieval"],"summary":"Delete retrieval entry","description":"Deletes a retrieval entry and all its chunks. Entry IDs are unique per namespace, so pass `namespace` for an entry stored in one.\n\nRequired permission: `retrieval.manage`.","operationId":"delete_entry","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"},"description":"Retrieval entry ID."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment ID from `GET /environments`.","title":"Environment Id"},"description":"Environment ID from `GET /environments`."},{"name":"namespace","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Namespace the entry is stored in. Omit for an entry in the default namespace.","title":"Namespace"},"description":"Namespace the entry is stored in. Omit for an entry in the default namespace."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRetrievalDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"retrieval","x-connic-permission-action":"write","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/retrieval/stats":{"get":{"tags":["retrieval"],"summary":"Get retrieval stats","description":"Return entry and chunk totals for an environment, with chunk counts per namespace and entry counts per content type.\n\nRequired permission: `retrieval.manage`.","operationId":"get_stats","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment ID from `GET /environments`.","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRetrievalStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"retrieval","x-connic-permission-action":"read","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/retrieval/text":{"post":{"tags":["retrieval"],"summary":"Upload text for retrieval","description":"Ingests plain text for managed semantic retrieval. The text is chunked, embedded, and indexed asynchronously; the entry appears in `GET /retrieval/entries` once indexing finishes.\n\nRequired permission: `retrieval.manage`.","operationId":"upload_text","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment ID from `GET /environments`.","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrievalTextUploadRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRetrievalIngestionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"retrieval","x-connic-permission-action":"write","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/retrieval/file":{"post":{"tags":["retrieval"],"summary":"Upload file for retrieval","description":"Uploads a file of up to 25 MB as multipart form data for managed semantic retrieval. Supported formats are PDF, PNG, JPG/JPEG, GIF, WebP, TXT, Markdown, CSV, JSON, JSONL, YAML, and LOG. The file is processed, chunked, and embedded asynchronously; the entry appears in `GET /retrieval/entries` once indexing finishes.\n\nRequired permission: `retrieval.manage`.","operationId":"upload_file","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment ID from `GET /environments`.","title":"Environment Id"},"description":"Environment ID from `GET /environments`."},{"name":"namespace","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Dot-separated namespace such as `docs.api`, up to 10 levels. Omit for the default namespace.","title":"Namespace"},"description":"Dot-separated namespace such as `docs.api`, up to 10 levels. Omit for the default namespace."},{"name":"entry_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Entry identifier. Uploading again with the same ID and namespace replaces the entry. Defaults to the file name.","title":"Entry Id"},"description":"Entry identifier. Uploading again with the same ID and namespace replaces the entry. Defaults to the file name."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/RetrievalFileUploadRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRetrievalIngestionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"retrieval","x-connic-permission-action":"write","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/retrieval/namespaces/{namespace}":{"delete":{"tags":["retrieval"],"summary":"Delete retrieval namespace","description":"Deletes all entries within a namespace, including entries in child namespaces.\n\nRequired permission: `retrieval.manage`.","operationId":"delete_namespace","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"namespace","in":"path","required":true,"schema":{"type":"string","title":"Namespace"},"description":"Dot-separated namespace, such as `docs.api`."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment ID from `GET /environments`.","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRetrievalDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"retrieval","x-connic-permission-action":"write","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/retrieval/sources":{"get":{"tags":["retrieval"],"summary":"List retrieval sources","description":"List the external retrieval sources connected to an environment, oldest first. Credentials are not returned.\n\nRequired permission: `retrieval.view`.","operationId":"list_retrieval_sources","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment ID from `GET /environments`.","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RetrievalSourceResponse"},"title":"Response List Retrieval Sources V1 Projects  Project Id  Retrieval Sources Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"retrieval","x-connic-permission-action":"read","x-connic-project-permission":"retrieval.view"},"post":{"tags":["retrieval"],"summary":"Connect retrieval source","description":"Connect an external retrieval source to an environment and queue its first sync.\n\nRequired permission: `retrieval.manage`.","operationId":"create_retrieval_source","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment ID from `GET /environments`.","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRetrievalSourceRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrievalSourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"x-connic-permission-section":"retrieval","x-connic-permission-action":"write","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/retrieval/sources/{source_id}":{"get":{"tags":["retrieval"],"summary":"Get retrieval source","description":"Get one external retrieval source with its sync status. Credentials are not returned.\n\nRequired permission: `retrieval.view`.","operationId":"get_retrieval_source","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"},"description":"Retrieval source ID from `GET /retrieval/sources`."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment ID from `GET /environments`.","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrievalSourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"retrieval","x-connic-permission-action":"read","x-connic-project-permission":"retrieval.view"},"patch":{"tags":["retrieval"],"summary":"Update retrieval source","description":"Update a retrieval source's name or provider configuration.\n\nRequired permission: `retrieval.manage`.","operationId":"update_retrieval_source","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"},"description":"Retrieval source ID from `GET /retrieval/sources`."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment ID from `GET /environments`.","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRetrievalSourceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrievalSourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"retrieval","x-connic-permission-action":"write","x-connic-project-permission":"retrieval.manage"},"delete":{"tags":["retrieval"],"summary":"Delete retrieval source","description":"Disconnect a retrieval source and delete the retrieval entries it synced.\n\nRequired permission: `retrieval.manage`.","operationId":"delete_retrieval_source","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"},"description":"Retrieval source ID from `GET /retrieval/sources`."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment ID from `GET /environments`.","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicOkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"retrieval","x-connic-permission-action":"write","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/retrieval/sources/{source_id}/runs":{"get":{"tags":["retrieval"],"summary":"List retrieval source runs","description":"List the most recent sync runs for a retrieval source, newest first.\n\nRequired permission: `retrieval.view`.","operationId":"list_retrieval_source_runs","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"},"description":"Retrieval source ID from `GET /retrieval/sources`."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment ID from `GET /environments`.","title":"Environment Id"},"description":"Environment ID from `GET /environments`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of runs to return.","default":20,"title":"Limit"},"description":"Maximum number of runs to return."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RetrievalSourceRunResponse"},"title":"Response List Retrieval Source Runs V1 Projects  Project Id  Retrieval Sources  Source Id  Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"retrieval","x-connic-permission-action":"read","x-connic-project-permission":"retrieval.view"}},"/v1/projects/{project_id}/retrieval/sources/{source_id}/sync":{"post":{"tags":["retrieval"],"summary":"Sync retrieval source","description":"Queue a manual sync for a retrieval source, regardless of its sync interval.\n\nThe sync is recorded as a run with trigger `manual`. If a sync of this source is already running, no extra run starts.\n\nRequired permission: `retrieval.manage`.","operationId":"sync_retrieval_source","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"},"description":"Retrieval source ID from `GET /retrieval/sources`."},{"name":"environment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Environment ID from `GET /environments`.","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRetrievalSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"retrieval","x-connic-permission-action":"write","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/database/{environment_id}/stats":{"get":{"tags":["database"],"summary":"Get database statistics","description":"Return collection, document, and storage-byte totals for one environment database.\n\nRequired permission: `retrieval.manage`.","operationId":"get_database_stats","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"database","x-connic-permission-action":"read","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/database/{environment_id}/collections":{"get":{"tags":["database"],"summary":"List database collections","description":"List every collection with its document count and storage size.\n\nRequired permission: `retrieval.manage`.","operationId":"list_database_collections","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseCollectionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"database","x-connic-permission-action":"read","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/database/{environment_id}/collections/{name}":{"delete":{"tags":["database"],"summary":"Delete database collection","description":"Permanently delete an existing collection and all documents in it.\n\nRequired permission: `retrieval.manage`.","operationId":"delete_database_collection","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"},"description":"Collection name."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseDeleteCollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"database","x-connic-permission-action":"write","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/database/{environment_id}/collections/{name}/schema":{"get":{"tags":["database"],"summary":"Get database collection schema","description":"Infer field types, fill rates, nullability, and examples from up to 200 documents.\n\nRequired permission: `retrieval.manage`.","operationId":"get_database_collection_schema","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"},"description":"Collection name."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseCollectionSchemaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"database","x-connic-permission-action":"read","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/database/{environment_id}/collections/{name}/find":{"post":{"tags":["database"],"summary":"Find database documents","description":"Query documents with the full filter, ordered sort, pagination, and field-projection controls. When distinct is set, sort, pagination, and projection are ignored and the response contains values and count.\n\nRequired permission: `retrieval.manage`.","operationId":"find_database_documents","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"},"description":"Collection name."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseFindRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DatabaseFindDocumentsResponse"},{"$ref":"#/components/schemas/DatabaseFindDistinctResponse"}],"title":"Response Find Database Documents V1 Projects  Project Id  Database  Environment Id  Collections  Name  Find Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"database","x-connic-permission-action":"read","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/database/{environment_id}/collections/{name}/update":{"post":{"tags":["database"],"summary":"Update database documents","description":"Merge fields into existing matching documents. A missing, null, or empty filter updates every document; null update values remove top-level fields.\n\nRequired permission: `retrieval.manage`.","operationId":"update_database_documents","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"},"description":"Collection name."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"database","x-connic-permission-action":"write","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/database/{environment_id}/collections/{name}/delete":{"post":{"tags":["database"],"summary":"Delete database documents","description":"Permanently delete documents matching a required non-empty filter.\n\nRequired permission: `retrieval.manage`.","operationId":"delete_database_documents","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"},"description":"Collection name."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseDeleteDocumentsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseDeleteDocumentsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"database","x-connic-permission-action":"write","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/database/{environment_id}/collections/{name}/count":{"post":{"tags":["database"],"summary":"Count database documents","description":"Count documents matching an optional filter without returning the documents.\n\nRequired permission: `retrieval.manage`.","operationId":"count_database_documents","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"},"description":"Collection name."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseCountRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseCountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"database","x-connic-permission-action":"read","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/database/{environment_id}/collections/{name}/import":{"post":{"tags":["database"],"summary":"Import database documents","description":"Seed a new or empty collection once from a multipart file upload. A missing collection is created. Every document is written in one transaction, so an invalid document fails the whole import and writes nothing. Returns 409 if the collection already has documents; to replace them, delete the collection and import again. Each environment allows 50 import requests per rolling 24 hours, counting failed ones; beyond that the response is 429 with a `Retry-After` header in seconds.\n\nRequired permission: `retrieval.manage`.","operationId":"import_database_documents","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"},"description":"Collection name."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DatabaseImportRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"database","x-connic-permission-action":"write","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/sessions/{environment_id}":{"get":{"tags":["sessions"],"summary":"List persistent sessions","description":"List active persistent agent sessions for one environment, most recently updated first. Expired and internal sessions are excluded from `sessions`, `total`, and `app_names`. Session state omits keys in the reserved `connic:` namespace.\n\nRequired permission: `retrieval.manage`.","operationId":"list_sessions","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case-insensitive session ID pattern. Text is matched anywhere; an unescaped percent (%) matches any sequence and an unescaped underscore (_) matches one character. An empty value applies no search filter.","title":"Search"},"description":"Case-insensitive session ID pattern. Text is matched anywhere; an unescaped percent (%) matches any sequence and an unescaped underscore (_) matches one character. An empty value applies no search filter."},{"name":"app_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only sessions with this exact `app_name`, as listed in `app_names`. An empty value applies no filter.","title":"App Name"},"description":"Only sessions with this exact `app_name`, as listed in `app_names`. An empty value applies no filter."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Maximum number of sessions to return.","default":50,"title":"Limit"},"description":"Maximum number of sessions to return."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of sessions to skip.","default":0,"title":"Offset"},"description":"Number of sessions to skip."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"sessions","x-connic-permission-action":"read","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/sessions/{environment_id}/{session_id}":{"get":{"tags":["sessions"],"summary":"Get persistent session","description":"Get one active persistent session by its exact `app_name`, `user_id`, and session ID, with its most recent events. Session state omits keys in the reserved `connic:` namespace. Expired and internal sessions return 404.\n\nRequired permission: `retrieval.manage`.","operationId":"get_persistent_session","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"},"description":"Session ID from `GET /sessions/{environment_id}`."},{"name":"app_name","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"description":"The session's `app_name` from `GET /sessions/{environment_id}`.","title":"App Name"},"description":"The session's `app_name` from `GET /sessions/{environment_id}`."},{"name":"user_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"description":"The session's `user_id` from `GET /sessions/{environment_id}`.","title":"User Id"},"description":"The session's `user_id` from `GET /sessions/{environment_id}`."},{"name":"event_limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum number of most recent events to return.","default":200,"title":"Event Limit"},"description":"Maximum number of most recent events to return."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersistentSessionDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"sessions","x-connic-permission-action":"read","x-connic-project-permission":"retrieval.manage"},"delete":{"tags":["sessions"],"summary":"Delete persistent session","description":"Permanently delete a persistent agent session and its event history. When both `app_name` and `user_id` are non-empty, only that exact session is deleted. Otherwise, every non-internal session with this session ID in the environment is deleted.\n\nRequired permission: `retrieval.manage`.","operationId":"delete_session","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."},{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"},"description":"Session ID from `GET /sessions/{environment_id}`."},{"name":"app_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent application name. Used for exact targeting only when it and user_id are both non-empty.","title":"App Name"},"description":"Agent application name. Used for exact targeting only when it and user_id are both non-empty."},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent user identity. Used for exact targeting only when it and app_name are both non-empty.","title":"User Id"},"description":"Agent user identity. Used for exact targeting only when it and app_name are both non-empty."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicOkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"sessions","x-connic-permission-action":"write","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/sessions/{environment_id}/bulk-delete":{"post":{"tags":["sessions"],"summary":"Bulk delete persistent sessions","description":"Permanently delete every non-internal persistent agent session, with its event history, that matches the optional `app_name` and `search` filters. Missing, null, or empty filters delete every non-internal session in the environment.\n\nRequired permission: `retrieval.manage`.","operationId":"bulk_delete_sessions","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteSessionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteSessionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"sessions","x-connic-permission-action":"write","x-connic-project-permission":"retrieval.manage"}},"/v1/projects/{project_id}/files/{environment_id}/stats":{"get":{"tags":["files"],"summary":"Get file statistics","description":"Return the number of files and stored bytes in one environment.\n\nRequired permission: `files.view`.","operationId":"get_file_stats","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"files","x-connic-permission-action":"read","x-connic-project-permission":"files.view"}},"/v1/projects/{project_id}/files/{environment_id}/list":{"post":{"tags":["files"],"summary":"List files","description":"List files and subfolders in a folder, or all files below it, with metadata filters.\n\nRequired permission: `files.view`.","operationId":"list_files","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesListRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"files","x-connic-permission-action":"read","x-connic-project-permission":"files.view"}},"/v1/projects/{project_id}/files/{environment_id}/get":{"post":{"tags":["files"],"summary":"Get file metadata","description":"Return a file's system fields and custom metadata.\n\nRequired permission: `files.view`.","operationId":"get_file","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilePathRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get File V1 Projects  Project Id  Files  Environment Id  Get Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"files","x-connic-permission-action":"read","x-connic-project-permission":"files.view"}},"/v1/projects/{project_id}/files/{environment_id}/download-link":{"post":{"tags":["files"],"summary":"Create a file download link","description":"Return a short-lived link that downloads the file. The link supports range requests.\n\nRequired permission: `files.view`.","operationId":"create_file_download_link","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilePathRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDownloadLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"files","x-connic-permission-action":"read","x-connic-project-permission":"files.view"}},"/v1/projects/{project_id}/files/{environment_id}/uploads":{"post":{"tags":["files"],"summary":"Start a file upload","description":"Start an upload of up to 1 GiB. Send the file in parts with PUT {upload_url}/parts/{n}?token=..., then finish with POST {upload_url}/complete?token=.... An existing path gets a numbered name unless overwrite is true.\n\nRequired permission: `files.manage`.","operationId":"create_file_upload","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"files","x-connic-permission-action":"write","x-connic-project-permission":"files.manage"}},"/v1/projects/{project_id}/files/{environment_id}/write":{"post":{"tags":["files"],"summary":"Write a small file","description":"Store a small file in one request. Use an upload for large files.\n\nRequired permission: `files.manage`.","operationId":"write_file","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileWriteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Write File V1 Projects  Project Id  Files  Environment Id  Write Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"files","x-connic-permission-action":"write","x-connic-project-permission":"files.manage"}},"/v1/projects/{project_id}/files/{environment_id}/update":{"post":{"tags":["files"],"summary":"Move a file or update its metadata","description":"Move or rename a file or folder, or merge metadata into a file.\n\nRequired permission: `files.manage`.","operationId":"update_file","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"files","x-connic-permission-action":"write","x-connic-project-permission":"files.manage"}},"/v1/projects/{project_id}/files/{environment_id}/delete":{"post":{"tags":["files"],"summary":"Delete a file or folder","description":"Delete a file, or a folder and everything in it when recursive is true.\n\nRequired permission: `files.manage`.","operationId":"delete_file","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"},"description":"ID of the project the API key belongs to."},{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"},"description":"Environment ID from `GET /environments`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDeleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required permission or access to the environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"404":{"description":"The resource does not exist in this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-connic-permission-section":"files","x-connic-permission-action":"write","x-connic-project-permission":"files.manage"}}},"components":{"schemas":{"ABTestAnalysisMode":{"type":"string","enum":["exploratory","confidence"],"title":"ABTestAnalysisMode","description":"`exploratory` compares descriptive metrics; `confidence` follows a locked statistical plan with planned decision looks."},"ABTestAnalysisPlanInput":{"properties":{"primary_metric":{"type":"string","enum":["success_rate","judge_score"],"title":"Primary Metric","description":"`success_rate` compares the share of completed runs; `judge_score` compares the normalized score from `judge_id`."},"objective":{"$ref":"#/components/schemas/ABTestObjective","description":"Hypothesis to test. `noninferiority` requires `noninferiority_margin`.","default":"superiority"},"direction":{"$ref":"#/components/schemas/ABTestMetricDirection","description":"Whether a higher or lower metric value is better.","default":"increase"},"baseline_value":{"type":"number","title":"Baseline Value","description":"Expected control value: a success rate between 0 and 1 (exclusive), or a judge score from 0 to 1."},"baseline_stddev":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Baseline Stddev","description":"Expected standard deviation of the normalized judge score. Required and positive for `judge_score`."},"minimum_detectable_effect":{"type":"number","exclusiveMinimum":0.0,"title":"Minimum Detectable Effect","description":"Smallest absolute difference worth detecting, for example 0.05 for 5 percentage points."},"noninferiority_margin":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Noninferiority Margin","description":"Largest acceptable absolute shortfall versus control. Required for `noninferiority`."},"alpha":{"type":"number","exclusiveMaximum":0.5,"exclusiveMinimum":0.0,"title":"Alpha","description":"Two-sided significance level.","default":0.05},"power":{"type":"number","exclusiveMaximum":1.0,"exclusiveMinimum":0.5,"title":"Power","description":"Probability of detecting the planned effect.","default":0.8},"randomization_unit":{"$ref":"#/components/schemas/ABTestRandomizationUnit","description":"Whether each run or each session is assigned to an arm.","default":"run"},"judge_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Judge Id","description":"Judge that scores runs for `judge_score`. It must belong to the same agent and environment, be enabled and automatic, evaluate every run and have no filter. Must be null for `success_rate`."},"futility_threshold":{"type":"number","exclusiveMaximum":1.0,"exclusiveMinimum":0.0,"title":"Futility Threshold","description":"Conditional power below which a look is flagged as unlikely to succeed. Advisory only; it does not stop the test.","default":0.2}},"type":"object","required":["primary_metric","baseline_value","minimum_detectable_effect"],"title":"ABTestAnalysisPlanInput","description":"Assumptions for a confidence-mode A/B test plan. Metric values use a 0 to 1 scale."},"ABTestAnalysisPlanResponse":{"properties":{"primary_metric":{"type":"string","enum":["success_rate","judge_score"],"title":"Primary Metric","description":"`success_rate` compares the share of completed runs; `judge_score` compares the normalized score from `judge_id`."},"objective":{"$ref":"#/components/schemas/ABTestObjective","description":"Hypothesis to test. `noninferiority` requires `noninferiority_margin`.","default":"superiority"},"direction":{"$ref":"#/components/schemas/ABTestMetricDirection","description":"Whether a higher or lower metric value is better.","default":"increase"},"baseline_value":{"type":"number","title":"Baseline Value","description":"Expected control value: a success rate between 0 and 1 (exclusive), or a judge score from 0 to 1."},"baseline_stddev":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Baseline Stddev","description":"Expected standard deviation of the normalized judge score. Required and positive for `judge_score`."},"minimum_detectable_effect":{"type":"number","exclusiveMinimum":0.0,"title":"Minimum Detectable Effect","description":"Smallest absolute difference worth detecting, for example 0.05 for 5 percentage points."},"noninferiority_margin":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Noninferiority Margin","description":"Largest acceptable absolute shortfall versus control. Required for `noninferiority`."},"alpha":{"type":"number","exclusiveMaximum":0.5,"exclusiveMinimum":0.0,"title":"Alpha","description":"Two-sided significance level.","default":0.05},"power":{"type":"number","exclusiveMaximum":1.0,"exclusiveMinimum":0.5,"title":"Power","description":"Probability of detecting the planned effect.","default":0.8},"randomization_unit":{"$ref":"#/components/schemas/ABTestRandomizationUnit","description":"Whether each run or each session is assigned to an arm.","default":"run"},"judge_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Judge Id","description":"Judge that scores runs for `judge_score`. It must belong to the same agent and environment, be enabled and automatic, evaluate every run and have no filter. Must be null for `success_rate`."},"futility_threshold":{"type":"number","exclusiveMaximum":1.0,"exclusiveMinimum":0.0,"title":"Futility Threshold","description":"Conditional power below which a look is flagged as unlikely to succeed. Advisory only; it does not stop the test.","default":0.2},"id":{"type":"string","format":"uuid","title":"Id"},"ab_test_id":{"type":"string","format":"uuid","title":"Ab Test Id","description":"A/B test the plan belongs to."},"control_allocation":{"type":"number","title":"Control Allocation","description":"Share of assigned traffic that goes to control."},"variant_allocation":{"type":"number","title":"Variant Allocation","description":"Share of assigned traffic that goes to the variant."},"judge_snapshot":{"additionalProperties":true,"type":"object","title":"Judge Snapshot","description":"Metric judge configuration captured at the first start. Empty for `success_rate` plans or before the start; only `redacted: true` without `judges.view`."},"quality_judge_snapshot":{"additionalProperties":true,"type":"object","title":"Quality Judge Snapshot","description":"Quality guardrail judge configuration captured at the first start. Empty when the guardrail is off; only `redacted: true` without `judges.view`."},"planned_control_samples":{"type":"integer","title":"Planned Control Samples","description":"Maximum number of control units the plan collects."},"planned_variant_samples":{"type":"integer","title":"Planned Variant Samples","description":"Maximum number of variant units the plan collects."},"look_fractions":{"items":{"type":"number"},"type":"array","title":"Look Fractions","description":"Shares of the planned sample at which analysis looks happen."},"boundaries":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Boundaries","description":"Decision boundary for each planned look, in the same shape as the plan preview `boundaries`."},"design_version":{"type":"string","title":"Design Version","description":"Identifier of the sequential design, such as `two-sided-obf-v1`."},"srm_threshold":{"type":"number","title":"Srm Threshold","description":"p-value below which a sample-ratio mismatch between the planned and observed split stops the test."},"outcome_policy":{"type":"string","title":"Outcome Policy","description":"Identifier of the rule that turns each assigned unit into an outcome."},"locked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Locked At","description":"When the plan was locked by the test's first start. null while the test is a draft."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["primary_metric","baseline_value","minimum_detectable_effect","id","ab_test_id","control_allocation","variant_allocation","planned_control_samples","planned_variant_samples","look_fractions","boundaries","design_version","srm_threshold","outcome_policy","created_at","updated_at"],"title":"ABTestAnalysisPlanResponse","description":"Statistical plan of a confidence-mode A/B test, locked when the test first starts."},"ABTestCreate":{"properties":{"agent_name":{"type":"string","title":"Agent Name","description":"Base (control) agent."},"test_name":{"type":"string","title":"Test Name","description":"Variant suffix. The active deployment must contain an agent named `{agent_name}-test-{test_name}`."},"traffic_percentage":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Traffic Percentage","description":"Percentage of the agent's traffic routed to the variant. Confidence mode requires 1 to 99.","default":0},"analysis_mode":{"$ref":"#/components/schemas/ABTestAnalysisMode","description":"How results are analyzed. `confidence` requires `analysis_plan`.","default":"exploratory"},"analysis_plan":{"anyOf":[{"$ref":"#/components/schemas/ABTestAnalysisPlanInput"},{"type":"null"}],"description":"Planning assumptions for confidence mode. Ignored in exploratory mode."},"min_sample_size":{"type":"integer","minimum":1.0,"title":"Min Sample Size","description":"Completed runs needed in each group before the comparison reports enough data.","default":100},"auto_rollback_enabled":{"type":"boolean","title":"Auto Rollback Enabled","description":"Pause the test automatically when the variant's failure rate exceeds `rollback_threshold`.","default":false},"rollback_threshold":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Rollback Threshold","description":"Variant failure rate (0 to 1) above which the failure guardrail pauses the test.","default":0.8},"rollback_window":{"type":"integer","minimum":10.0,"title":"Rollback Window","description":"Number of most recent finished variant runs the failure guardrail evaluates.","default":50},"quality_guardrail_enabled":{"type":"boolean","title":"Quality Guardrail Enabled","description":"Pause the test when the variant's average judge score falls below `quality_threshold`. Requires `quality_judge_id`.","default":false},"quality_judge_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Quality Judge Id","description":"Judge for the quality guardrail. It must belong to the same agent and environment, be enabled and automatic, evaluate every run and have no filter."},"quality_threshold":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Quality Threshold","description":"Lowest acceptable average normalized score (0 to 1) for the variant.","default":0.0},"quality_window":{"type":"integer","minimum":1.0,"title":"Quality Window","description":"Number of most recent evaluated variant runs the quality guardrail averages.","default":20},"quality_min_evaluations":{"type":"integer","minimum":1.0,"title":"Quality Min Evaluations","description":"Evaluations needed before the quality guardrail can act. Cannot exceed `quality_window`.","default":10}},"type":"object","required":["agent_name","test_name"],"title":"ABTestCreate","description":"Creates a draft A/B test for a variant in the environment's active deployment."},"ABTestListResponse":{"properties":{"tests":{"items":{"$ref":"#/components/schemas/ABTestResponse"},"type":"array","title":"Tests","description":"A/B tests for the agent, newest first."},"total":{"type":"integer","title":"Total","description":"Number of tests returned."}},"type":"object","required":["tests","total"],"title":"ABTestListResponse"},"ABTestMetricDirection":{"type":"string","enum":["increase","decrease"],"title":"ABTestMetricDirection","description":"Which change in the primary metric counts as better: `increase` or `decrease`."},"ABTestObjective":{"type":"string","enum":["superiority","noninferiority"],"title":"ABTestObjective","description":"`superiority` tests whether the variant beats control; `noninferiority` tests that it is not worse by more than a margin."},"ABTestPlanPreviewRequest":{"properties":{"traffic_percentage":{"type":"integer","exclusiveMaximum":100.0,"exclusiveMinimum":0.0,"title":"Traffic Percentage","description":"Percentage of traffic routed to the variant, 1 to 99."},"analysis_plan":{"$ref":"#/components/schemas/ABTestAnalysisPlanInput","description":"Planning assumptions."}},"type":"object","required":["traffic_percentage","analysis_plan"],"title":"ABTestPlanPreviewRequest","description":"Inputs for previewing a confidence-mode plan."},"ABTestPlanPreviewResponse":{"properties":{"planned_control_samples":{"type":"integer","title":"Planned Control Samples","description":"Maximum control sample, including the sequential design's inflation and a minimum of 80 per arm."},"planned_variant_samples":{"type":"integer","title":"Planned Variant Samples","description":"Maximum variant sample, including the sequential design's inflation and a minimum of 80 per arm."},"total_samples":{"type":"integer","title":"Total Samples","description":"Sum of the planned control and variant samples."},"fixed_horizon_control_samples":{"type":"integer","title":"Fixed Horizon Control Samples","description":"Control sample a single analysis at the end would need."},"fixed_horizon_variant_samples":{"type":"integer","title":"Fixed Horizon Variant Samples","description":"Variant sample a single analysis at the end would need."},"max_information_inflation":{"type":"number","title":"Max Information Inflation","description":"Factor by which the sequential design increases the fixed-horizon sample."},"look_fractions":{"items":{"type":"number"},"type":"array","title":"Look Fractions","description":"Shares of the planned sample at which analysis looks happen."},"boundaries":{"items":{"$ref":"#/components/schemas/ABTestSequentialBoundaryResponse"},"type":"array","title":"Boundaries","description":"Decision boundary for each planned look."}},"type":"object","required":["planned_control_samples","planned_variant_samples","total_samples","fixed_horizon_control_samples","fixed_horizon_variant_samples","max_information_inflation","look_fractions","boundaries"],"title":"ABTestPlanPreviewResponse","description":"Sample sizes and decision boundaries calculated for a confidence-mode plan."},"ABTestRandomizationUnit":{"type":"string","enum":["run","session"],"title":"ABTestRandomizationUnit","description":"`run` assigns each run independently; `session` keeps all runs of one session in the same arm."},"ABTestRecommendation":{"type":"string","enum":["collecting","continue","variant_recommended","control_recommended","inconclusive","invalid_srm","safety_stopped"],"title":"ABTestRecommendation","description":"Test verdict: `collecting` before the first planned look, `continue` after a look without a decision, `variant_recommended` or `control_recommended` when a boundary was crossed, `inconclusive`, `invalid_srm` after a sample-ratio mismatch, or `safety_stopped` when the test was stopped automatically."},"ABTestResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project the test belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Environment the test runs in."},"agent_name":{"type":"string","title":"Agent Name","description":"Base (control) agent."},"test_name":{"type":"string","title":"Test Name","description":"Variant suffix."},"variant_agent_name":{"type":"string","title":"Variant Agent Name","description":"Variant agent name, `{agent_name}-test-{test_name}`."},"traffic_percentage":{"type":"integer","title":"Traffic Percentage","description":"Percentage of the agent's traffic routed to the variant."},"status":{"$ref":"#/components/schemas/ABTestStatus","description":"Lifecycle state. Unless the test is running, all traffic goes to the base agent."},"analysis_mode":{"$ref":"#/components/schemas/ABTestAnalysisMode","description":"How results are analyzed. Fixed once the test leaves draft.","default":"exploratory"},"analysis_plan":{"anyOf":[{"$ref":"#/components/schemas/ABTestAnalysisPlanResponse"},{"type":"null"}],"description":"Statistical plan of a confidence test. null for exploratory tests."},"min_sample_size":{"type":"integer","title":"Min Sample Size","description":"Completed runs needed in each group before the comparison reports enough data."},"auto_rollback_enabled":{"type":"boolean","title":"Auto Rollback Enabled","description":"Whether the failure guardrail is on."},"rollback_threshold":{"type":"number","title":"Rollback Threshold","description":"Variant failure rate (0 to 1) above which the failure guardrail pauses the test."},"rollback_window":{"type":"integer","title":"Rollback Window","description":"Number of most recent finished variant runs the failure guardrail evaluates."},"quality_guardrail_enabled":{"type":"boolean","title":"Quality Guardrail Enabled","description":"Whether the quality guardrail is on.","default":false},"quality_judge_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Quality Judge Id","description":"Judge for the quality guardrail. null when unset or without `judges.view`."},"quality_threshold":{"type":"number","title":"Quality Threshold","description":"Lowest acceptable average normalized score (0 to 1) for the variant.","default":0.0},"quality_window":{"type":"integer","title":"Quality Window","description":"Number of most recent evaluated variant runs the quality guardrail averages.","default":20},"quality_min_evaluations":{"type":"integer","title":"Quality Min Evaluations","description":"Evaluations needed before the quality guardrail can act.","default":10},"winner":{"anyOf":[{"type":"string","enum":["control","variant"]},{"type":"null"}],"title":"Winner","description":"Manually chosen winner of an exploratory test. null when none."},"recommendation":{"anyOf":[{"$ref":"#/components/schemas/ABTestRecommendation"},{"type":"null"}],"description":"Verdict of a confidence test, or `safety_stopped` for any test stopped automatically."},"recommendation_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommendation Reason","description":"Explanation of `recommendation`."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Why the test was stopped automatically. Cleared when the test resumes."},"stop_reason":{"anyOf":[{"$ref":"#/components/schemas/ABTestStopReason"},{"type":"null"}],"description":"Why the test last stopped. null while running or before the first stop."},"stop_details":{"additionalProperties":true,"type":"object","title":"Stop Details","description":"Details for `stop_reason`, such as the observed failure rate and window for `failure_guardrail`."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When the test first started. null for drafts."},"stopped_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Stopped At","description":"When the test was last paused or stopped. Cleared when it resumes."},"concluded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Concluded At","description":"When the test was concluded."},"control_runs":{"type":"integer","title":"Control Runs","description":"Completed control runs. Confidence tests exclude forced runs.","default":0},"variant_runs":{"type":"integer","title":"Variant Runs","description":"Completed variant runs. Confidence tests exclude forced runs.","default":0},"control_avg_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Control Avg Cost","description":"Always null. Cost statistics are returned by the comparison endpoint."},"variant_avg_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Variant Avg Cost","description":"Always null. Cost statistics are returned by the comparison endpoint."},"control_avg_duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Control Avg Duration","description":"Average duration of completed control runs, in milliseconds."},"variant_avg_duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Variant Avg Duration","description":"Average duration of completed variant runs, in milliseconds."},"control_avg_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Control Avg Score","description":"Average normalized judge score (0 to 1) of control runs, from the metric or quality judge when set. null without evaluations."},"variant_avg_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Variant Avg Score","description":"Average normalized judge score (0 to 1) of variant runs, from the metric or quality judge when set. null without evaluations."}},"type":"object","required":["id","project_id","environment_id","agent_name","test_name","variant_agent_name","traffic_percentage","status","min_sample_size","auto_rollback_enabled","rollback_threshold","rollback_window","created_at","updated_at"],"title":"ABTestResponse","description":"An A/B test that routes part of an agent's traffic to a variant, with run totals per arm."},"ABTestSequentialBoundaryResponse":{"properties":{"look_number":{"type":"integer","title":"Look Number","description":"1-based position of the look."},"information_fraction":{"type":"number","title":"Information Fraction","description":"Share of the planned sample reached at this look."},"critical_z":{"type":"number","title":"Critical Z","description":"Absolute z-score the effect must exceed to stop at this look."},"nominal_two_sided_alpha":{"type":"number","title":"Nominal Two Sided Alpha","description":"Two-sided significance level that corresponds to `critical_z`."},"cumulative_alpha_spent":{"type":"number","title":"Cumulative Alpha Spent","description":"Type I error spent through this look."},"final_critical_z":{"type":"number","title":"Final Critical Z","description":"Critical z-score at the final look."},"total_looks":{"type":"integer","title":"Total Looks","description":"Number of planned looks."}},"type":"object","required":["look_number","information_fraction","critical_z","nominal_two_sided_alpha","cumulative_alpha_spent","final_critical_z","total_looks"],"title":"ABTestSequentialBoundaryResponse","description":"O'Brien-Fleming decision boundary at one planned analysis look."},"ABTestStatus":{"type":"string","enum":["draft","running","paused","concluded","rolled_back","failed"],"title":"ABTestStatus","description":"A/B test state: `draft` until started, `running` while routing traffic, `paused`, `concluded`, or `failed` when the variant is missing from the active deployment. `rolled_back` is no longer set."},"ABTestStopReason":{"type":"string","enum":["manual","failure_guardrail","quality_guardrail","efficacy","futility","srm","analysis_error","variant_unavailable"],"title":"ABTestStopReason","description":"Why a test stopped: `manual`, a guardrail (`failure_guardrail`, `quality_guardrail`), a planned look (`efficacy` when a boundary was crossed, `futility` when the final look was inconclusive), `srm` (sample-ratio mismatch), `analysis_error` (metric judge evaluations failed), or `variant_unavailable`."},"ABTestUpdate":{"properties":{"traffic_percentage":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Traffic Percentage","description":"Percentage of the agent's traffic routed to the variant. Running tests for the same agent cannot exceed 100 in total."},"analysis_mode":{"anyOf":[{"$ref":"#/components/schemas/ABTestAnalysisMode"},{"type":"null"}],"description":"How results are analyzed. Switching to `exploratory` removes the plan."},"analysis_plan":{"anyOf":[{"$ref":"#/components/schemas/ABTestAnalysisPlanInput"},{"type":"null"}],"description":"Planning assumptions for confidence mode."},"min_sample_size":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Min Sample Size","description":"Completed runs needed in each group before the comparison reports enough data."},"auto_rollback_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Rollback Enabled","description":"Pause the test automatically when the variant's failure rate exceeds `rollback_threshold`."},"rollback_threshold":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Rollback Threshold","description":"Variant failure rate (0 to 1) above which the failure guardrail pauses the test."},"rollback_window":{"anyOf":[{"type":"integer","minimum":10.0},{"type":"null"}],"title":"Rollback Window","description":"Number of most recent finished variant runs the failure guardrail evaluates."},"quality_guardrail_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Quality Guardrail Enabled","description":"Pause the test when the variant's average judge score falls below `quality_threshold`."},"quality_judge_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Quality Judge Id","description":"Judge for the quality guardrail. It must belong to the same agent and environment, be enabled and automatic, evaluate every run and have no filter."},"quality_threshold":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Quality Threshold","description":"Lowest acceptable average normalized score (0 to 1) for the variant."},"quality_window":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Quality Window","description":"Number of most recent evaluated variant runs the quality guardrail averages."},"quality_min_evaluations":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Quality Min Evaluations","description":"Evaluations needed before the quality guardrail can act. Cannot exceed `quality_window`."},"status":{"anyOf":[{"type":"string","enum":["running","paused","concluded"]},{"type":"null"}],"title":"Status","description":"`running` starts a draft or resumes a paused test, `paused` pauses a running test, and `concluded` ends a running or paused test."},"winner":{"anyOf":[{"type":"string","enum":["control","variant"]},{"type":"null"}],"title":"Winner","description":"Manually chosen winner. Not accepted for confidence tests."}},"type":"object","title":"ABTestUpdate","description":"Partial update of an A/B test. Mode and plan change only in draft; confidence settings lock at the first start."},"AgentConnectorLinkCreate":{"properties":{"agent_name":{"type":"string","title":"Agent Name","description":"Agent name as defined in the agent's YAML file."},"config":{"additionalProperties":true,"type":"object","title":"Config","description":"Per-link settings. `files_required: true` fails runs before they start when an expected file is missing. On outbound connectors, `outbound` sets `version: 1` and `usage`: `automatic` sends after each completed run (limit it with `source: {\"mode\": \"connectors\", \"connector_ids\": [...]}`), while `agent_tool` and `middleware` let the model or your middleware call the connector by `action_name`."}},"type":"object","required":["agent_name"],"title":"AgentConnectorLinkCreate","description":"Agent to link to a connector."},"AgentConnectorLinkResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"connector_id":{"type":"string","format":"uuid","title":"Connector Id","description":"Connector the agent is linked to."},"agent_name":{"type":"string","title":"Agent Name","description":"Agent that the connector starts or sends results for."},"config":{"additionalProperties":true,"type":"object","title":"Config","description":"Settings for this link, such as `files_required` and, for outbound connectors, the `outbound` object."},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","connector_id","agent_name","config","created_at"],"title":"AgentConnectorLinkResponse","description":"Link between an agent and a connector."},"AgentConnectorLinkUpdate":{"properties":{"config":{"additionalProperties":true,"type":"object","title":"Config","description":"Settings that replace the link's current settings, in the same shape as when creating the link."}},"type":"object","required":["config"],"title":"AgentConnectorLinkUpdate","description":"New settings for an agent link."},"AgentRunWithTraces":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_name":{"type":"string","title":"Agent Name","description":"Base agent name; runs handled by an A/B variant are stored under the base name."},"test_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Name","description":"A/B test variant that handled the run, or the test case name for `deploy_gate` runs; null for runs of the base agent."},"ab_test_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Ab Test Ids","description":"IDs of the A/B tests this run was counted in."},"status":{"$ref":"#/components/schemas/RunStatus","description":"`scheduled` and `queued` runs have not started, `started` runs are executing, `awaiting_approval` runs wait for a tool approval, and `completed`, `failed` and `cancelled` are final."},"input":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input","description":"Run input as text, with the environment's redacted keys masked; null after the run is deleted."},"output":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output","description":"Final agent output, with the environment's redacted keys masked; null until the run finishes and after it is deleted."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Failure or cancellation message, if any; null after the run is deleted."},"queued_at":{"type":"string","format":"date-time","title":"Queued At","description":"When the run was created."},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When execution began; null until the run starts."},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the run reached a final status; null while it is active."},"duration_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Ms","description":"Execution time in milliseconds, excluding time spent waiting for approvals or child runs; null until the run ends."},"data_deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Data Deleted At","description":"When the run's content and trace were deleted; null if they were not. Status, usage and cost remain."},"can_delete_data":{"type":"boolean","title":"Can Delete Data","description":"True when the run and its background processing (usage accounting, judge evaluations, outbound deliveries) have finished, so it can be deleted.","default":false},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At","description":"When a scheduled run is due to start; null for runs queued immediately."},"queued_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Queued Reason","description":"Why a queued run has not started yet, for example `concurrency_wait`, `credit_exhausted` or `budget_limit_exceeded:<spend alert ID>`. Null once the run starts."},"token_usage":{"$ref":"#/components/schemas/PublicRunTokenUsageResponse","description":"Token counts for the agent's own model calls, excluding judge evaluations, with one `model_usages` entry per call."},"traces":{"items":{"$ref":"#/components/schemas/AgentTraceResponse"},"type":"array","title":"Traces","description":"Execution trace: spans and log entries ordered by `start_time`, then `span_order`. Empty after the run is deleted.","default":[]},"connector":{"anyOf":[{"$ref":"#/components/schemas/ConnectorInfo"},{"type":"null"}],"description":"Connector whose event started the run; null for runs not started by a connector."},"triggered_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triggered By","description":"ID of the run whose agent started this run; older runs may hold a free-text value instead."},"triggered_by_run":{"anyOf":[{"$ref":"#/components/schemas/TriggeredByRunInfo"},{"type":"null"}],"description":"Parent run details when another agent in the same deployment started this run; null otherwise."},"trigger_source":{"$ref":"#/components/schemas/TriggerSource","description":"What started the run: a user or API call, a connector event, another agent, or a deployment test.","default":"manual"},"deployment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deployment Id","description":"ID of the deployment that ran this run; null until the run is picked up."},"token_cost":{"anyOf":[{"$ref":"#/components/schemas/PublicTokenCostResponse"},{"type":"null"}],"description":"Cost of the agent's own model calls, excluding judge evaluations; null when no model calls were recorded."},"run_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Run Context","description":"Context values stored by the run's middleware and tools, with the environment's redacted keys masked; null after the run is deleted."},"session":{"anyOf":[{"$ref":"#/components/schemas/RunSessionInfo"},{"type":"null"}],"description":"Persistent session the run belongs to; null for runs without one."},"guardrail_interventions":{"items":{"$ref":"#/components/schemas/PublicGuardrailInterventionResponse"},"type":"array","title":"Guardrail Interventions","description":"Guardrail checks that warned about, blocked or redacted content during the run."}},"type":"object","required":["id","agent_name","status","queued_at","token_usage"],"title":"AgentRunWithTraces","description":"One run with its content, execution trace, token usage and cost."},"AgentTraceResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id","description":"ID of the run this entry belongs to."},"name":{"type":"string","title":"Name","description":"Span name, or the log source for `log` entries, such as `log:system` or `log:tool:<tool name>`."},"type":{"type":"string","enum":["span","log"],"title":"Type","description":"`span` for a timed step such as a model or tool call; `log` for a log line written during the run."},"status":{"type":"string","title":"Status","description":"Span outcome; a value containing `ERROR` (any case) marks a failed span. For `log` entries, the log level: `debug`, `info`, `warning` or `error`."},"inputs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inputs","description":"Step input as text, with the environment's redacted keys masked."},"outputs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outputs","description":"Step output as text, with the environment's redacted keys masked. For `log` entries, the log message."},"thoughts":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thoughts","description":"Model reasoning text for the step, when the model returns it."},"start_time":{"type":"string","format":"date-time","title":"Start Time","description":"When the step started or the log line was written."},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Time","description":"When the span ended; null for `log` entries and unfinished spans."},"duration_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Ms","description":"Span duration in milliseconds; null for `log` entries."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Additional span attributes as key-value pairs; empty for `log` entries."},"span_order":{"type":"integer","title":"Span Order","description":"Recording order within the run; breaks ties between equal `start_time` values."},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id","description":"Span identifier, unique within the run."},"parent_span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Span Id","description":"`span_id` of the enclosing span; null for top-level spans and `log` entries."}},"type":"object","required":["id","run_id","name","type","status","inputs","outputs","thoughts","start_time","end_time","duration_ms","metadata","span_order","span_id","parent_span_id"],"title":"AgentTraceResponse","description":"One span or log entry from a run's execution trace."},"ApprovalChannelRouteResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Environment whose approval requests are routed."},"channel_id":{"type":"string","format":"uuid","title":"Channel Id","description":"Channel that receives the approval requests."},"agent_name":{"type":"string","title":"Agent Name","description":"Agent whose approval requests are routed; `*` for all agents."},"enabled":{"type":"boolean","title":"Enabled","description":"Whether requests are delivered through this route."}},"type":"object","required":["id","environment_id","channel_id","agent_name","enabled"],"title":"ApprovalChannelRouteResponse","description":"Sends an environment's approval requests to a channel."},"ApprovalChannelRouteUpdate":{"properties":{"channel_id":{"type":"string","format":"uuid","title":"Channel Id","description":"Channel in the project that receives the approval requests."},"agent_name":{"type":"string","title":"Agent Name","description":"Agent whose approval requests are routed; `*` for all agents.","default":"*"},"enabled":{"type":"boolean","title":"Enabled","description":"Whether requests are delivered through this route.","default":true}},"type":"object","required":["channel_id"],"title":"ApprovalChannelRouteUpdate","description":"Sends an environment's approval requests to a channel."},"ApprovalDecision":{"properties":{"status":{"type":"string","enum":["approved","rejected"],"title":"Status","description":"`approved` resumes the run. `rejected` fails the run, or resumes it when the agent's `on_rejection` is `continue`."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Optional note. On rejection it is added to the run error or passed to the agent."},"response":{"anyOf":[{"type":"string","maxLength":16384},{"type":"null"}],"title":"Response","description":"Text returned to the agent as the tool result. Required when approving a request with a `response_label`; not accepted otherwise."}},"type":"object","required":["status"],"title":"ApprovalDecision","description":"Decision on a pending approval request."},"ApprovalNotificationConfigResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Environment the setting applies to."},"agent_name":{"type":"string","title":"Agent Name","description":"Agent whose approval requests trigger the notification; `*` for all agents."},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Project member to notify. null applies to all members."},"enabled":{"type":"boolean","title":"Enabled","description":"Whether the member receives these notifications."}},"type":"object","required":["id","environment_id","agent_name","enabled"],"title":"ApprovalNotificationConfigResponse","description":"Which agent's approval requests a project member is notified about."},"ApprovalNotificationConfigUpdate":{"properties":{"agent_name":{"type":"string","title":"Agent Name","description":"Agent whose approval requests trigger the notification; `*` for all agents."},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Project member to notify. null applies to all members."},"enabled":{"type":"boolean","title":"Enabled","description":"Whether the member receives these notifications.","default":true}},"type":"object","required":["agent_name"],"title":"ApprovalNotificationConfigUpdate","description":"Which agent's approval requests a project member is notified about."},"ApprovalResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id","description":"Run that is paused until the request is decided."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Environment of the run."},"agent_name":{"type":"string","title":"Agent Name","description":"Agent that made the tool call."},"tool_name":{"type":"string","title":"Tool Name","description":"Tool the agent wants to call."},"tool_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Params","description":"Arguments of the pending tool call."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Message for reviewers from the agent's approval settings."},"response_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Label","description":"Label of the text a reviewer must provide when approving. Set for human input requests; null for plain approvals."},"response_sensitive":{"type":"boolean","title":"Response Sensitive","description":"Whether the reviewer's response is redacted from recorded run data.","default":false},"timeout":{"type":"integer","title":"Timeout","description":"Seconds the request waits for a decision before it times out (30 to 604800)."},"on_rejection":{"type":"string","title":"On Rejection","description":"What happens on rejection or timeout: `fail` ends the run, `continue` resumes it and tells the agent the call was not approved.","default":"fail"},"status":{"type":"string","enum":["pending","approved","rejected","timeout"],"title":"Status","description":"`pending` until decided. `timeout` when no decision arrived in time or the run ended first."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At","description":"When the request was resolved. null while pending."},"resolved_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved By Id","description":"ID of the user who decided, or a system value such as `system` for automatic resolutions. null while pending."},"resolved_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved By","description":"Email of the user who decided, or a system value for automatic resolutions. null while pending."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Note given with the decision, or why the request was closed automatically. null when none."}},"type":"object","required":["id","run_id","environment_id","agent_name","tool_name","timeout","status","created_at"],"title":"ApprovalResponse","description":"A paused tool call that waits for a human to approve it or provide input."},"ApprovalRoutingConfigUpdate":{"properties":{"configs":{"items":{"$ref":"#/components/schemas/ApprovalNotificationConfigUpdate"},"type":"array","title":"Configs","description":"Member notification settings. Replaces all existing settings for the environment."},"channel_routes":{"anyOf":[{"items":{"$ref":"#/components/schemas/ApprovalChannelRouteUpdate"},"type":"array"},{"type":"null"}],"title":"Channel Routes","description":"Channel routes. Replaces all existing routes for the environment; null keeps them."}},"type":"object","title":"ApprovalRoutingConfigUpdate","description":"Replaces member approval notifications and, optionally, channel routes for an environment in one request."},"BridgeListResponse":{"properties":{"bridges":{"items":{"$ref":"#/components/schemas/BridgeResponse"},"type":"array","title":"Bridges","description":"Bridges in the project, oldest first."}},"type":"object","required":["bridges"],"title":"BridgeListResponse"},"BridgeResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","enum":["connected","disconnected"],"title":"Status","description":"`connected` while the bridge agent is connected to connic, otherwise `disconnected`."},"route_count":{"type":"integer","title":"Route Count","description":"Number of automatic routes. Read them with `GET /bridges/{bridge_id}/routes`."},"last_connected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Connected At","description":"When the bridge agent last connected, or null if it never has."},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","name","status","route_count","last_connected_at","created_at","updated_at"],"title":"BridgeResponse","description":"Bridge that gives connic access to services in a private network."},"BridgeRoute":{"properties":{"match_type":{"type":"string","enum":["exact","regex"],"title":"Match Type","description":"`exact` matches one hostname or IP; `regex` matches against an anchored `^...$` pattern from a restricted subset."},"target":{"type":"string","title":"Target","description":"Hostname or IP for `exact`, or the pattern for `regex` (up to 200 characters). connic and local hosts can't be routed."},"port":{"type":"integer","maximum":65535.0,"minimum":1.0,"title":"Port","description":"TCP port the route applies to."}},"additionalProperties":false,"type":"object","required":["match_type","target","port"],"title":"BridgeRoute","description":"Automatic route that sends matching TCP connections through the bridge."},"BridgeRoutesResponse":{"properties":{"bridge_id":{"type":"string","format":"uuid","title":"Bridge Id","description":"Bridge the routes belong to."},"routes":{"items":{"$ref":"#/components/schemas/BridgeRoute"},"type":"array","title":"Routes","description":"Automatic routes of the bridge."}},"type":"object","required":["bridge_id","routes"],"title":"BridgeRoutesResponse"},"BridgeRoutesUpdateRequest":{"properties":{"routes":{"items":{"$ref":"#/components/schemas/BridgeRoute"},"type":"array","maxItems":32,"title":"Routes","description":"Routes that replace the bridge's current routes. Up to 32 per bridge and 256 across the project."}},"additionalProperties":false,"type":"object","required":["routes"],"title":"BridgeRoutesUpdateRequest","description":"Complete set of automatic routes for a bridge."},"BulkCancelBody":{"properties":{"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100},{"type":"null"}],"title":"Run Ids","description":"IDs of the runs to cancel, at most 100. Omit or send null to select runs with the query filters instead; an empty list is rejected."}},"type":"object","title":"BulkCancelBody","description":"Runs to cancel."},"BulkDeleteRunDataBody":{"properties":{"run_ids":{"items":{"type":"string","format":"uuid"},"type":"array","minItems":1,"title":"Run Ids","description":"IDs of the runs to delete; all must belong to `environment_id`."}},"type":"object","required":["run_ids"],"title":"BulkDeleteRunDataBody","description":"Runs to delete."},"BulkDeleteSessionsRequest":{"properties":{"app_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Name","description":"Non-empty agent application name to match exactly. An empty or null value applies no filter."},"search":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search","description":"Case-insensitive session ID pattern. Text is matched anywhere; an unescaped percent (%) matches any sequence and an unescaped underscore (_) matches one character. An empty value applies no search filter."}},"additionalProperties":true,"type":"object","title":"BulkDeleteSessionsRequest"},"BulkDeleteSessionsResponse":{"properties":{"deleted_count":{"type":"integer","minimum":0.0,"title":"Deleted Count","description":"Number of sessions deleted."}},"type":"object","required":["deleted_count"],"title":"BulkDeleteSessionsResponse"},"BulkRerunBody":{"properties":{"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100},{"type":"null"}],"title":"Run Ids","description":"IDs of the runs to rerun, at most 100. Omit or send null to select runs with the query filters instead; an empty list is rejected."}},"type":"object","title":"BulkRerunBody","description":"Runs to rerun."},"BulkTriggerRequest":{"properties":{"start_date":{"type":"string","format":"date-time","title":"Start Date","description":"Start of the window, matched against when runs were queued; no offset means UTC."},"end_date":{"type":"string","format":"date-time","title":"End Date","description":"End of the window, inclusive; must be after `start_date`."},"dry_run":{"type":"boolean","title":"Dry Run","description":"Only count the matching runs; nothing is queued.","default":false}},"type":"object","required":["start_date","end_date"],"title":"BulkTriggerRequest","description":"Time window of runs to evaluate."},"ChannelCreate":{"properties":{"type":{"type":"string","title":"Type","description":"Channel type, such as `webhook`. The channel types endpoint lists the available types."},"name":{"type":"string","title":"Name"},"config":{"additionalProperties":true,"type":"object","title":"Config","description":"Type-specific settings, using the configuration fields the channel types endpoint lists for the type."},"subscribed_events":{"items":{"type":"string"},"type":"array","title":"Subscribed Events","description":"Notification event types to send to this channel, such as `build_failed` or `judge_score_low`.","default":[]},"enabled":{"type":"boolean","title":"Enabled","description":"Whether the channel receives deliveries.","default":true}},"type":"object","required":["type","name","config"],"title":"ChannelCreate"},"ChannelResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project the channel belongs to."},"type":{"type":"string","title":"Type","description":"Channel type, such as `webhook`, `datadog` or `otlp`."},"name":{"type":"string","title":"Name"},"config":{"additionalProperties":true,"type":"object","title":"Config","description":"Type-specific settings. Secret values are masked as `****` followed by their last four characters."},"subscribed_events":{"items":{"type":"string"},"type":"array","title":"Subscribed Events","description":"Notification event types sent to this channel.","default":[]},"enabled":{"type":"boolean","title":"Enabled","description":"Whether the channel receives deliveries."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","project_id","type","name","config","enabled","created_at","updated_at"],"title":"ChannelResponse","description":"An external destination for project notifications and approval requests."},"ChannelUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config","description":"Settings merged into the stored configuration. Secret fields that are omitted, empty or still masked keep their stored values."},"subscribed_events":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Subscribed Events","description":"Notification event types to send to this channel. Replaces the current list."},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled","description":"Whether the channel receives deliveries."}},"type":"object","title":"ChannelUpdate","description":"Partial update of a channel. Omitted fields are unchanged."},"ComplianceAISystemCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"Name, unique in the project (case-insensitive)."},"description":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Description","description":"Internal context. It does not change the intended-purpose assessment."},"intended_purpose":{"type":"string","maxLength":4000,"minLength":1,"title":"Intended Purpose","description":"What the system is designed to do, for whom, and in which operational context."},"owner":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Owner","description":"Accountable person or team."},"status":{"type":"string","enum":["draft","active","retired"],"title":"Status","description":"Lifecycle status. Only a draft system without governance records can be deleted.","default":"draft"},"geographies":{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array","maxItems":50,"title":"Geographies","description":"Countries or regions where the system is used."},"affected_persons":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Affected Persons","description":"Groups whose rights, opportunities or access may be affected."},"sector":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Sector","description":"Industry sector."},"linked_agent_names":{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array","maxItems":100,"title":"Linked Agent Names","description":"Agents that implement the system. Run, approval and judge evidence is collected for these agents."},"environment_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"title":"Environment Ids","description":"Environments the system runs in. Evidence and monitoring are scoped to them."},"deployment_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"title":"Deployment Ids","description":"Deployments covered by the system."},"first_use_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Use At","description":"When the system first handled a live use case."}},"type":"object","required":["name","intended_purpose"],"title":"ComplianceAISystemCreate","description":"Registers an AI system or use case for EU AI Act governance."},"ComplianceAISystemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project the system belongs to."},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Internal context."},"intended_purpose":{"type":"string","title":"Intended Purpose","description":"What the system is designed to do, for whom, and in which operational context."},"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner","description":"Accountable person or team."},"status":{"type":"string","enum":["draft","active","retired"],"title":"Status","description":"Lifecycle status."},"geographies":{"items":{"type":"string"},"type":"array","title":"Geographies","description":"Countries or regions where the system is used."},"affected_persons":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affected Persons","description":"Groups whose rights, opportunities or access may be affected."},"sector":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sector","description":"Industry sector."},"linked_agent_names":{"items":{"type":"string"},"type":"array","title":"Linked Agent Names","description":"Agents that implement the system."},"environment_ids":{"items":{"type":"string"},"type":"array","title":"Environment Ids","description":"IDs of the environments the system runs in."},"deployment_ids":{"items":{"type":"string"},"type":"array","title":"Deployment Ids","description":"IDs of the deployments covered by the system."},"first_use_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Use At","description":"When the system first handled a live use case."},"created_by":{"type":"string","title":"Created By","description":"ID of the user who registered the system."},"updated_by":{"type":"string","title":"Updated By","description":"ID of the user who last changed the system."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"latest_assessment":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Latest Assessment","description":"Latest assessment version in any status, with the same fields as an assessment. null when none exists."}},"type":"object","required":["id","project_id","name","description","intended_purpose","owner","status","geographies","affected_persons","sector","linked_agent_names","environment_ids","deployment_ids","first_use_at","created_by","updated_by","created_at","updated_at"],"title":"ComplianceAISystemResponse","description":"An AI system or use case registered for EU AI Act governance."},"ComplianceAISystemUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name","description":"Name, unique in the project (case-insensitive)."},"description":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Description","description":"Internal context. It does not change the intended-purpose assessment."},"intended_purpose":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Intended Purpose","description":"What the system is designed to do, for whom, and in which operational context."},"owner":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Owner","description":"Accountable person or team."},"status":{"anyOf":[{"type":"string","enum":["draft","active","retired"]},{"type":"null"}],"title":"Status","description":"Lifecycle status. Only a draft system without governance records can be deleted."},"geographies":{"anyOf":[{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array","maxItems":50},{"type":"null"}],"title":"Geographies","description":"Countries or regions where the system is used."},"affected_persons":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Affected Persons","description":"Groups whose rights, opportunities or access may be affected."},"sector":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Sector","description":"Industry sector."},"linked_agent_names":{"anyOf":[{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array","maxItems":100},{"type":"null"}],"title":"Linked Agent Names","description":"Agents that implement the system. Run, approval and judge evidence is collected for these agents."},"environment_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100},{"type":"null"}],"title":"Environment Ids","description":"Environments the system runs in. Evidence and monitoring are scoped to them."},"deployment_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100},{"type":"null"}],"title":"Deployment Ids","description":"Deployments covered by the system."},"first_use_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Use At","description":"When the system first handled a live use case."}},"type":"object","title":"ComplianceAISystemUpdate","description":"Partial update of an AI system. Omitted fields are unchanged; required fields cannot be set to null."},"ComplianceAssessmentCreate":{"properties":{"dimensions":{"$ref":"#/components/schemas/ComplianceAssessmentDimensions","description":"Assessment answers."},"rationale":{"type":"string","maxLength":8000,"minLength":1,"title":"Rationale","description":"Why these answers were recorded."},"regulatory_source_version":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Regulatory Source Version","description":"Legal source or internal policy version used. Defaults to the source reviewed for the current catalog."}},"type":"object","required":["dimensions","rationale"],"title":"ComplianceAssessmentCreate","description":"Records a new assessment version. The result is derived from the answers and is preliminary, not a legal determination."},"ComplianceAssessmentDimensions":{"properties":{"eu_scope":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Eu Scope","description":"Whether the system is placed on the EU market, put into service in the EU, or used where its output affects people in the EU."},"roles":{"items":{"type":"string","enum":["provider","deployer","importer","distributor","authorised_representative","product_manufacturer"]},"type":"array","maxItems":6,"minItems":1,"title":"Roles","description":"Your organization's operator roles. Controls are generated for `provider` and `deployer` only."},"prohibited_practice":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Prohibited Practice","description":"Whether the system may involve a prohibited AI practice under Article 5."},"annex_i_product":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Annex I Product","description":"Whether the system is a safety component of, or itself, a product covered by Annex I legislation."},"annex_iii_use_case":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Annex Iii Use Case","description":"Whether the intended use falls within an Annex III high-risk use case."},"annex_iii_profiling":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Annex Iii Profiling","description":"Whether the system profiles natural persons in an Annex III use case."},"article_6_3_exemption":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Article 6 3 Exemption","description":"Whether an Article 6(3) exemption is relied on for an Annex III use case."},"fria_applicable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Fria Applicable","description":"Whether a fundamental rights impact assessment (Article 27) is expected for this deployment."},"direct_interaction":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Direct Interaction","description":"Whether the system interacts directly with natural persons."},"synthetic_content":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Synthetic Content","description":"Whether the system generates or manipulates synthetic text, image, audio or video content."},"emotion_recognition":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Emotion Recognition","description":"Whether the system performs emotion recognition."},"biometric_categorisation":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Biometric Categorisation","description":"Whether the system performs biometric categorisation."},"deepfake":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deepfake","description":"Whether the system generates or manipulates content that may constitute a deepfake."},"public_interest_text":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Public Interest Text","description":"Whether the system generates or manipulates text published to inform the public on matters of public interest."},"human_editorial_review":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Human Editorial Review","description":"Whether public-interest text undergoes human editorial review with an identified responsible person or entity."},"gpai_provider":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Gpai Provider","description":"Whether your organization places a general-purpose AI model on the market as its provider."}},"type":"object","required":["roles"],"title":"ComplianceAssessmentDimensions","description":"Assessment answers. Each yes/no question takes true, false, or null when the answer is uncertain."},"ComplianceAssessmentResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project the assessment belongs to."},"system_id":{"type":"string","format":"uuid","title":"System Id","description":"AI system that was assessed."},"version":{"type":"integer","title":"Version","description":"Version number for the system, starting at 1."},"status":{"type":"string","enum":["draft","approved","changes_requested"],"title":"Status","description":"`draft` until reviewed, then `approved` or `changes_requested`."},"dimensions":{"additionalProperties":true,"type":"object","title":"Dimensions","description":"Assessment answers, in the shape of the create request's `dimensions`."},"result":{"additionalProperties":true,"type":"object","title":"Result","description":"Preliminary classification derived from `dimensions`, including `scope_status`, `high_risk_status`, `article_50_applicable_triggers`, `uncertain_dimensions` and `needs_review`."},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale","description":"Why the answers were recorded."},"catalog_version":{"type":"string","title":"Catalog Version","description":"Version of the obligation catalog used to derive the result."},"regulatory_source_version":{"type":"string","title":"Regulatory Source Version","description":"Legal source or internal policy version the assessment used."},"created_by":{"type":"string","title":"Created By","description":"ID of the user who recorded the assessment."},"reviewed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewed By","description":"ID of the reviewer. null until reviewed."},"review_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Notes","description":"Reviewer notes."},"uncertainty_acknowledged":{"type":"boolean","title":"Uncertainty Acknowledged","description":"Whether the reviewer approved despite uncertain (null) answers."},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At","description":"When the assessment was reviewed. null until reviewed."},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","project_id","system_id","version","status","dimensions","result","rationale","catalog_version","regulatory_source_version","created_by","reviewed_by","review_notes","uncertainty_acknowledged","reviewed_at","created_at"],"title":"ComplianceAssessmentResponse","description":"An immutable, versioned role and risk assessment of an AI system. Its result is preliminary, not a legal determination."},"ComplianceAssessmentReview":{"properties":{"decision":{"type":"string","enum":["approved","changes_requested"],"title":"Decision","description":"`approved` accepts the assessment (latest version only); `changes_requested` marks it as needing a new version."},"review_notes":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Review Notes","description":"Reviewer notes."},"acknowledge_uncertainty":{"type":"boolean","title":"Acknowledge Uncertainty","description":"Must be true to approve an assessment with uncertain (null) answers.","default":false}},"type":"object","required":["decision"],"title":"ComplianceAssessmentReview","description":"Review decision on a draft assessment."},"ComplianceAttestationProvenance":{"properties":{"source":{"type":"string","enum":["customer_attestation","upstream_attestation"],"title":"Source","description":"`customer_attestation` for a disclosure your application rendered or verified, `upstream_attestation` for evidence from an upstream provider."},"attested_by":{"type":"string","maxLength":200,"minLength":1,"title":"Attested By","description":"Person or team responsible for the attestation."},"attested_at":{"type":"string","format":"date-time","title":"Attested At","description":"When the attestation was made."},"evidence_reference":{"type":"string","maxLength":500,"minLength":1,"title":"Evidence Reference","description":"Reference to the supporting record, such as a ticket, document or provider attestation ID."},"basis":{"type":"string","maxLength":4000,"minLength":1,"title":"Basis","description":"Facts that support the attestation."}},"additionalProperties":false,"type":"object","required":["source","attested_by","attested_at","evidence_reference","basis"],"title":"ComplianceAttestationProvenance","description":"Who attests to a transparency record and on what basis."},"ComplianceControlGenerate":{"properties":{"assessment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assessment Id","description":"Expected assessment. The request fails unless it is the system's latest approved assessment."}},"type":"object","title":"ComplianceControlGenerate","description":"Generates controls from the system's latest approved assessment."},"ComplianceControlResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project the control belongs to."},"system_id":{"type":"string","format":"uuid","title":"System Id","description":"AI system the control belongs to."},"assessment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assessment Id","description":"Approved assessment that last generated or refreshed the control."},"obligation_key":{"type":"string","title":"Obligation Key","description":"Stable key of the obligation, such as `provider-logging`."},"catalog_version":{"type":"string","title":"Catalog Version","description":"Version of the obligation catalog the control was generated from."},"article":{"type":"string","title":"Article","description":"Article reference, such as `Article 12`."},"title":{"type":"string","title":"Title","description":"Short statement of the obligation."},"family":{"type":"string","title":"Family","description":"Obligation group, such as `classification`, `transparency` or `high-risk provider`."},"applicability_rationale":{"type":"string","title":"Applicability Rationale","description":"Why the obligation applies, based on the assessment answers."},"implementation_type":{"type":"string","enum":["connic","customer","external","shared"],"title":"Implementation Type","description":"Who is accountable: `connic` when the platform provides the mechanism, `customer` for your organization, `shared` when platform features support an obligation you own, `external` when handled outside the platform."},"status":{"type":"string","enum":["gap","configured","needs_evidence","not_applicable"],"title":"Status","description":"Implementation status."},"evidence_status":{"type":"string","enum":["missing","partial","verified","not_required"],"title":"Evidence Status","description":"State of the supporting evidence."},"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner","description":"Person or team responsible for the control."},"evidence_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence Notes","description":"Notes on the supporting evidence."},"exception_rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exception Rationale","description":"Why the control does not apply."},"residual_risk":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Residual Risk","description":"Risk that remains with the control in place."},"next_review_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Review At","description":"When the control is next due for review."},"connic_links":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Connic Links","description":"connic features that support the control, each with `feature`, `href`, `status` (`configured` or `available`) and `evidence_count`."},"last_refreshed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Refreshed At","description":"When the control was last generated or refreshed."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","project_id","system_id","assessment_id","obligation_key","catalog_version","article","title","family","applicability_rationale","implementation_type","status","evidence_status","owner","evidence_notes","exception_rationale","residual_risk","next_review_at","connic_links","last_refreshed_at","created_at","updated_at"],"title":"ComplianceControlResponse","description":"An applicable EU AI Act obligation mapped to an operational control."},"ComplianceControlUpdate":{"properties":{"status":{"anyOf":[{"type":"string","enum":["gap","configured","needs_evidence","not_applicable"]},{"type":"null"}],"title":"Status","description":"Implementation status. `not_applicable` requires `exception_rationale`. Cannot be null."},"evidence_status":{"anyOf":[{"type":"string","enum":["missing","partial","verified","not_required"]},{"type":"null"}],"title":"Evidence Status","description":"State of the supporting evidence. Cannot be null."},"owner":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Owner","description":"Person or team responsible for the control."},"evidence_notes":{"anyOf":[{"type":"string","maxLength":8000,"minLength":1},{"type":"null"}],"title":"Evidence Notes","description":"Notes on the supporting evidence."},"exception_rationale":{"anyOf":[{"type":"string","maxLength":8000,"minLength":1},{"type":"null"}],"title":"Exception Rationale","description":"Why the control does not apply. Required when `status` is `not_applicable`."},"residual_risk":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Residual Risk","description":"Risk that remains with the control in place."},"next_review_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Review At","description":"When the control is next due for review."}},"type":"object","title":"ComplianceControlUpdate","description":"Partial update of a control. Omitted fields are unchanged."},"ComplianceCorrectiveAction":{"properties":{"action":{"type":"string","maxLength":2000,"minLength":1,"title":"Action","description":"What will be done."},"owner":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Owner","description":"Person or team responsible."},"status":{"type":"string","maxLength":200,"minLength":1,"title":"Status","description":"Free-text status, such as `open` or `done`.","default":"open"},"due_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due At","description":"When the action is due."}},"additionalProperties":false,"type":"object","required":["action"],"title":"ComplianceCorrectiveAction","description":"A corrective action tracked on an incident."},"ComplianceEvidenceSnapshotCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"Label for the snapshot."},"system_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"System Id","description":"AI system to capture. null captures every system, or those linked to `environment_ids`."},"environment_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"title":"Environment Ids","description":"Limit telemetry to these environments. Each must be linked to a captured system."},"time_from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time From","description":"Start of the window for time-bound evidence such as incidents, transparency records and run telemetry."},"time_to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Time To","description":"End of the window for time-bound evidence. Must not precede `time_from`."}},"type":"object","required":["name"],"title":"ComplianceEvidenceSnapshotCreate","description":"Captures an immutable, metadata-only snapshot of governance records and telemetry. Raw prompts and outputs are never included."},"ComplianceEvidenceSnapshotResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project the snapshot belongs to."},"system_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"System Id","description":"AI system the snapshot was limited to. null when it covers several systems."},"name":{"type":"string","title":"Name"},"scope":{"additionalProperties":true,"type":"object","title":"Scope","description":"What was captured: `system_ids`, `environment_ids`, `system_agent_environment_pairs`, `telemetry_scope`, `time_from` and `time_to`."},"content_hash":{"type":"string","title":"Content Hash","description":"SHA-256 hash of the canonical snapshot content, also sent as `X-Content-SHA256` on download."},"catalog_version":{"type":"string","title":"Catalog Version","description":"Version of the obligation catalog when the snapshot was taken."},"created_by":{"type":"string","title":"Created By","description":"ID of the user who captured the snapshot."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"coverage":{"additionalProperties":true,"type":"object","title":"Coverage","description":"Coverage summary: control counts by status, transparency record counts, `missing_items` and `missing_evidence`, the time and environment scope, and the plan's data retention in days."}},"type":"object","required":["id","project_id","system_id","name","scope","content_hash","catalog_version","created_by","created_at","coverage"],"title":"ComplianceEvidenceSnapshotResponse","description":"Immutable, metadata-only capture of governance records and telemetry. Download it as a ZIP archive."},"ComplianceIncidentCreate":{"properties":{"system_id":{"type":"string","format":"uuid","title":"System Id","description":"AI system the incident concerns."},"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id","description":"Environment involved. Must be linked to the system if the system lists environments."},"deployment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deployment Id","description":"Deployment involved. Must be linked to the system if the system lists deployments."},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id","description":"Run involved. Its environment and deployment fill in omitted references and must match given ones."},"title":{"type":"string","maxLength":300,"minLength":1,"title":"Title","description":"Short summary of the incident."},"description":{"anyOf":[{"type":"string","maxLength":8000,"minLength":1},{"type":"null"}],"title":"Description","description":"What happened."},"severity":{"type":"string","enum":["low","medium","high","critical"],"title":"Severity","description":"Internal severity rating.","default":"medium"},"awareness_at":{"type":"string","format":"date-time","title":"Awareness At","description":"When your organization first became aware of the incident."},"causal_link_status":{"type":"string","enum":["unknown","suspected","confirmed","ruled_out"],"title":"Causal Link Status","description":"Whether the AI system is linked to the cause of the incident.","default":"unknown"},"affected_rights":{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array","maxItems":50,"title":"Affected Rights","description":"Rights or interests affected."},"member_states":{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array","maxItems":50,"title":"Member States","description":"EU Member States affected."},"reportability_status":{"type":"string","enum":["not_assessed","not_reportable","reportable","reported"],"title":"Reportability Status","description":"Whether the incident must be reported to an authority. `reported` requires an authority notification in `notification_history`.","default":"not_assessed"},"reporting_deadline":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reporting Deadline","description":"Reporting deadline your organization determined. Cannot precede `awareness_at`."},"deadline_basis":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Deadline Basis","description":"Rule, decision or counsel instruction behind `reporting_deadline`."},"confirm_reporting_deadline":{"type":"boolean","title":"Confirm Reporting Deadline","description":"Records that you confirmed `reporting_deadline`. Requires the deadline and `deadline_basis`.","default":false},"containment":{"anyOf":[{"type":"string","maxLength":8000,"minLength":1},{"type":"null"}],"title":"Containment","description":"Containment measures taken."},"investigation":{"anyOf":[{"type":"string","maxLength":8000,"minLength":1},{"type":"null"}],"title":"Investigation","description":"Investigation findings."},"corrective_actions":{"items":{"$ref":"#/components/schemas/ComplianceCorrectiveAction"},"type":"array","maxItems":100,"title":"Corrective Actions","description":"Corrective actions to track."},"notification_history":{"items":{"$ref":"#/components/schemas/ComplianceIncidentNotification"},"type":"array","maxItems":100,"title":"Notification History","description":"Notifications sent about the incident, such as reports to authorities."}},"type":"object","required":["system_id","title","awareness_at"],"title":"ComplianceIncidentCreate","description":"Records an AI incident for an AI system. connic records deadlines and notifications but does not calculate deadlines or judge legal sufficiency."},"ComplianceIncidentNotification":{"properties":{"recipient":{"type":"string","maxLength":300,"minLength":1,"title":"Recipient","description":"Recipient or authority notified."},"channel":{"type":"string","maxLength":200,"minLength":1,"title":"Channel","description":"How the notification was sent, such as email or a portal."},"at":{"type":"string","format":"date-time","title":"At","description":"When the notification was sent."},"external_reference":{"type":"string","maxLength":500,"minLength":1,"title":"External Reference","description":"Case or submission ID from the recipient."},"note":{"anyOf":[{"type":"string","maxLength":2000,"minLength":1},{"type":"null"}],"title":"Note","description":"Additional context."}},"additionalProperties":false,"type":"object","required":["recipient","channel","at","external_reference"],"title":"ComplianceIncidentNotification","description":"A notification sent about an incident, such as a report to an authority."},"ComplianceIncidentResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project the incident belongs to."},"system_id":{"type":"string","format":"uuid","title":"System Id","description":"AI system the incident concerns."},"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id","description":"Environment involved."},"deployment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deployment Id","description":"Deployment involved."},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id","description":"Run involved."},"title":{"type":"string","title":"Title","description":"Short summary of the incident."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"What happened."},"severity":{"type":"string","enum":["low","medium","high","critical"],"title":"Severity","description":"Internal severity rating."},"status":{"type":"string","enum":["open","investigating","contained","resolved","closed"],"title":"Status","description":"Case status."},"awareness_at":{"type":"string","format":"date-time","title":"Awareness At","description":"When your organization first became aware of the incident."},"causal_link_status":{"type":"string","enum":["unknown","suspected","confirmed","ruled_out"],"title":"Causal Link Status","description":"Whether the AI system is linked to the cause of the incident."},"affected_rights":{"items":{"type":"string"},"type":"array","title":"Affected Rights","description":"Rights or interests affected."},"member_states":{"items":{"type":"string"},"type":"array","title":"Member States","description":"EU Member States affected."},"reportability_status":{"type":"string","enum":["not_assessed","not_reportable","reportable","reported"],"title":"Reportability Status","description":"Whether the incident must be reported to an authority."},"reporting_deadline":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reporting Deadline","description":"Reporting deadline your organization determined."},"deadline_basis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deadline Basis","description":"Rule, decision or counsel instruction behind `reporting_deadline`."},"deadline_confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deadline Confirmed At","description":"When `reporting_deadline` was confirmed. Cleared when the deadline, awareness time or basis changes."},"deadline_confirmed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deadline Confirmed By","description":"ID of the user who confirmed the deadline."},"containment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Containment","description":"Containment measures taken."},"investigation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Investigation","description":"Investigation findings."},"corrective_actions":{"items":{"$ref":"#/components/schemas/ComplianceCorrectiveAction"},"type":"array","title":"Corrective Actions","description":"Corrective actions being tracked."},"notification_history":{"items":{"$ref":"#/components/schemas/ComplianceIncidentNotification"},"type":"array","title":"Notification History","description":"Notifications sent about the incident, such as reports to authorities."},"created_by":{"type":"string","title":"Created By","description":"ID of the user who recorded the incident."},"updated_by":{"type":"string","title":"Updated By","description":"ID of the user who last changed the incident."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At","description":"When the incident was resolved or closed. null while open."}},"type":"object","required":["id","project_id","system_id","environment_id","deployment_id","run_id","title","description","severity","status","awareness_at","causal_link_status","affected_rights","member_states","reportability_status","reporting_deadline","deadline_basis","deadline_confirmed_at","deadline_confirmed_by","containment","investigation","corrective_actions","notification_history","created_by","updated_by","created_at","updated_at","closed_at"],"title":"ComplianceIncidentResponse","description":"An AI incident and its corrective-action and notification record."},"ComplianceIncidentUpdate":{"properties":{"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id","description":"Environment involved. Must be linked to the system if the system lists environments."},"deployment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deployment Id","description":"Deployment involved. Must be linked to the system if the system lists deployments."},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id","description":"Run involved. Its environment and deployment fill in omitted references and must match given ones."},"title":{"anyOf":[{"type":"string","maxLength":300,"minLength":1},{"type":"null"}],"title":"Title","description":"Short summary of the incident."},"description":{"anyOf":[{"type":"string","maxLength":8000,"minLength":1},{"type":"null"}],"title":"Description","description":"What happened."},"severity":{"anyOf":[{"type":"string","enum":["low","medium","high","critical"]},{"type":"null"}],"title":"Severity","description":"Internal severity rating."},"status":{"anyOf":[{"type":"string","enum":["open","investigating","contained","resolved","closed"]},{"type":"null"}],"title":"Status","description":"Case status. `resolved` and `closed` set `closed_at`; `closed` requires an authority notification in `notification_history`."},"awareness_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Awareness At","description":"When your organization first became aware of the incident. Changing it clears the deadline confirmation."},"causal_link_status":{"anyOf":[{"type":"string","enum":["unknown","suspected","confirmed","ruled_out"]},{"type":"null"}],"title":"Causal Link Status","description":"Whether the AI system is linked to the cause of the incident."},"affected_rights":{"anyOf":[{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array","maxItems":50},{"type":"null"}],"title":"Affected Rights","description":"Rights or interests affected."},"member_states":{"anyOf":[{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array","maxItems":50},{"type":"null"}],"title":"Member States","description":"EU Member States affected."},"reportability_status":{"anyOf":[{"type":"string","enum":["not_assessed","not_reportable","reportable","reported"]},{"type":"null"}],"title":"Reportability Status","description":"Whether the incident must be reported to an authority. `reported` requires an authority notification in `notification_history`."},"reporting_deadline":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reporting Deadline","description":"Reporting deadline your organization determined. Changing it clears the deadline confirmation."},"deadline_basis":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Deadline Basis","description":"Rule, decision or counsel instruction behind `reporting_deadline`. Changing it clears the deadline confirmation."},"confirm_reporting_deadline":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Confirm Reporting Deadline","description":"true confirms `reporting_deadline` (requires the deadline and `deadline_basis`); false clears the confirmation."},"containment":{"anyOf":[{"type":"string","maxLength":8000,"minLength":1},{"type":"null"}],"title":"Containment","description":"Containment measures taken."},"investigation":{"anyOf":[{"type":"string","maxLength":8000,"minLength":1},{"type":"null"}],"title":"Investigation","description":"Investigation findings."},"corrective_actions":{"anyOf":[{"items":{"$ref":"#/components/schemas/ComplianceCorrectiveAction"},"type":"array","maxItems":100},{"type":"null"}],"title":"Corrective Actions","description":"Corrective actions. Replaces the current list."},"notification_history":{"anyOf":[{"items":{"$ref":"#/components/schemas/ComplianceIncidentNotification"},"type":"array","maxItems":100},{"type":"null"}],"title":"Notification History","description":"Notifications sent about the incident. Replaces the list; once an authority notification is recorded, entries can only be appended."}},"type":"object","title":"ComplianceIncidentUpdate","description":"Partial update of an incident. Omitted fields are unchanged; required fields cannot be set to null."},"ComplianceMonitoringPlanResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project the plan belongs to."},"system_id":{"type":"string","format":"uuid","title":"System Id","description":"AI system the plan covers."},"status":{"type":"string","enum":["draft","active","paused","retired"],"title":"Status","description":"Plan status. Active plans count as due once `next_review_at` passes."},"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner","description":"Person or team responsible for monitoring."},"review_cadence_days":{"type":"integer","title":"Review Cadence Days","description":"Days between scheduled reviews."},"signals":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Signals","description":"Monitored signals as free-form objects."},"thresholds":{"additionalProperties":true,"type":"object","title":"Thresholds","description":"Threshold values keyed by metric."},"monitoring_procedure":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Monitoring Procedure","description":"How the system is monitored."},"escalation_procedure":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Escalation Procedure","description":"How findings are escalated."},"last_reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Reviewed At","description":"When the plan was last reviewed."},"next_review_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Review At","description":"When the next review is due."},"created_by":{"type":"string","title":"Created By","description":"ID of the user who created the plan."},"updated_by":{"type":"string","title":"Updated By","description":"ID of the user who last saved the plan."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","project_id","system_id","status","owner","review_cadence_days","signals","thresholds","monitoring_procedure","escalation_procedure","last_reviewed_at","next_review_at","created_by","updated_by","created_at","updated_at"],"title":"ComplianceMonitoringPlanResponse","description":"Post-market monitoring plan for an AI system."},"ComplianceMonitoringPlanUpsert":{"properties":{"status":{"type":"string","enum":["draft","active","paused","retired"],"title":"Status","description":"Plan status. `active` requires `owner`, `next_review_at`, and `signals` or `monitoring_procedure`.","default":"draft"},"owner":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Owner","description":"Person or team responsible for monitoring."},"review_cadence_days":{"type":"integer","maximum":3650.0,"minimum":1.0,"title":"Review Cadence Days","description":"Days between scheduled reviews.","default":90},"signals":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":100,"title":"Signals","description":"Monitored signals as free-form objects, for example with `name`, `source` and `threshold`. At most 64 KiB when serialized."},"thresholds":{"additionalProperties":true,"type":"object","maxProperties":100,"title":"Thresholds","description":"Threshold values keyed by metric, such as `error_rate`. At most 64 KiB when serialized."},"monitoring_procedure":{"anyOf":[{"type":"string","maxLength":8000,"minLength":1},{"type":"null"}],"title":"Monitoring Procedure","description":"How the system is monitored."},"escalation_procedure":{"anyOf":[{"type":"string","maxLength":8000,"minLength":1},{"type":"null"}],"title":"Escalation Procedure","description":"How findings are escalated."},"last_reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Reviewed At","description":"When the plan was last reviewed."},"next_review_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Review At","description":"When the next review is due. Defaults to `last_reviewed_at` plus `review_cadence_days` when omitted."}},"type":"object","title":"ComplianceMonitoringPlanUpsert","description":"Post-market monitoring plan for an AI system. Each save replaces the whole plan."},"ComplianceOverviewResponse":{"properties":{"systems":{"additionalProperties":{"type":"integer"},"type":"object","title":"Systems","description":"AI system counts: `total`, `draft`, `active`, `retired`, `unassessed`, `awaiting_review` and `reviewed`."},"controls":{"additionalProperties":{"type":"integer"},"type":"object","title":"Controls","description":"Control counts by status, plus `total`."},"transparency":{"additionalProperties":{"type":"integer"},"type":"object","title":"Transparency","description":"Systems by Article 50 state: `applicable`, `configured`, `needs_configuration` and `not_applicable`, plus the number of `enabled_policies`."},"incidents":{"additionalProperties":{"type":"integer"},"type":"object","title":"Incidents","description":"`open` incidents, and `overdue` open incidents past an unreported reporting deadline."},"monitoring":{"additionalProperties":{"type":"integer"},"type":"object","title":"Monitoring","description":"`due`: active monitoring plans whose next review date has passed."},"latest_snapshot":{"anyOf":[{"$ref":"#/components/schemas/ComplianceEvidenceSnapshotResponse"},{"type":"null"}],"description":"Most recent evidence snapshot. null when none exists."}},"type":"object","required":["systems","controls","transparency","incidents","monitoring"],"title":"ComplianceOverviewResponse","description":"Project-wide summary of AI governance state."},"ComplianceTransparencyApplicationCreate":{"properties":{"idempotency_key":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Idempotency Key","description":"Retry key, scoped to the caller and system. Repeating a request with the same key and content returns the existing record; reusing the key with different content fails."},"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id","description":"Environment the record documents. Must be linked to the system if the system lists environments."},"deployment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deployment Id","description":"Deployment the record documents. Must be linked to the system if the system lists deployments."},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id","description":"Run the record documents. Its agent, environment, deployment and connector fill in omitted references and must match given ones."},"connector_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connector Id","description":"Connector the record documents."},"agent_name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Agent Name","description":"Agent the record documents. Must be linked to the system if the system lists agents."},"surface":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Surface","description":"Where the disclosure was delivered, such as a web application or email."},"mode":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Mode","description":"Free-text label for how the disclosure was delivered."},"disclosure_type":{"type":"string","enum":["direct_interaction","synthetic_content","deepfake","public_interest_text","biometric_emotion"],"title":"Disclosure Type","description":"Disclosure or marking the record covers."},"status":{"type":"string","enum":["applied","failed","delivery_unknown"],"title":"Status","description":"`applied` when delivery was confirmed; `failed` and `delivery_unknown` require `failure_reason`."},"output_hash":{"anyOf":[{"type":"string","maxLength":64,"minLength":64},{"type":"null"}],"title":"Output Hash","description":"Hex SHA-256 digest of the delivered output. Stored in lowercase."},"failure_reason":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Failure Reason","description":"Why delivery failed or could not be confirmed. Must be omitted when `status` is `applied`."},"provenance":{"$ref":"#/components/schemas/ComplianceAttestationProvenance","description":"Who attests to the record and on what basis."},"application_metadata":{"additionalProperties":true,"type":"object","maxProperties":50,"title":"Application Metadata","description":"Free-form JSON with additional details. At most 64 KiB when serialized."},"applied_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Applied At","description":"When the disclosure was applied or the attempt ended. Defaults to the time of the request; cannot be in the future."}},"type":"object","required":["disclosure_type","status","provenance"],"title":"ComplianceTransparencyApplicationCreate","description":"Attested evidence that a disclosure or marking from the system's transparency policy was applied, failed, or could not be confirmed."},"ComplianceTransparencyApplicationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project the record belongs to."},"system_id":{"type":"string","format":"uuid","title":"System Id","description":"AI system the record belongs to."},"policy_id":{"type":"string","format":"uuid","title":"Policy Id","description":"Transparency policy in effect when the record was created."},"policy_version":{"type":"integer","title":"Policy Version","description":"Version of that policy."},"evidence_source":{"type":"string","enum":["customer_attestation","upstream_attestation"],"title":"Evidence Source","description":"Source of the attestation, from `provenance.source`."},"provenance":{"additionalProperties":true,"type":"object","title":"Provenance","description":"Who attested to the record and on what basis, as submitted."},"idempotency_key":{"type":"string","title":"Idempotency Key","description":"SHA-256 digest derived from the submitted idempotency key, or a random value when none was sent."},"request_digest":{"type":"string","title":"Request Digest","description":"SHA-256 digest of the submitted content, used to detect conflicting retries."},"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id","description":"Environment the record documents."},"deployment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deployment Id","description":"Deployment the record documents."},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id","description":"Run the record documents."},"connector_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connector Id","description":"Connector the record documents."},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name","description":"Agent the record documents."},"surface":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surface","description":"Where the disclosure was delivered."},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode","description":"Free-text label for how the disclosure was delivered."},"disclosure_type":{"type":"string","enum":["direct_interaction","synthetic_content","deepfake","public_interest_text","biometric_emotion"],"title":"Disclosure Type","description":"Disclosure or marking the record covers."},"status":{"type":"string","enum":["applied","failed","delivery_unknown"],"title":"Status","description":"`applied` when delivery was confirmed, otherwise `failed` or `delivery_unknown`."},"output_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Hash","description":"Lowercase hex SHA-256 digest of the delivered output."},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason","description":"Why delivery failed or could not be confirmed. null when applied."},"policy_snapshot":{"additionalProperties":true,"type":"object","title":"Policy Snapshot","description":"Copy of the transparency policy at the time of recording."},"policy_hash":{"type":"string","title":"Policy Hash","description":"SHA-256 hash of `policy_snapshot`."},"application_metadata":{"additionalProperties":true,"type":"object","title":"Application Metadata","description":"Additional details submitted with the record."},"applied_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Applied At","description":"When the disclosure was applied. null unless `status` is `applied`."},"finalized_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finalized At","description":"When the attempt ended."},"recorded_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recorded By","description":"ID of the user who recorded the evidence."},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","project_id","system_id","policy_id","policy_version","evidence_source","provenance","idempotency_key","request_digest","environment_id","deployment_id","run_id","connector_id","agent_name","surface","mode","disclosure_type","status","output_hash","failure_reason","policy_snapshot","policy_hash","application_metadata","applied_at","finalized_at","recorded_by","created_at"],"title":"ComplianceTransparencyApplicationResponse","description":"Immutable, attested evidence that a transparency disclosure was applied, failed, or could not be confirmed."},"ComplianceTransparencyPolicyResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project the policy belongs to."},"system_id":{"type":"string","format":"uuid","title":"System Id","description":"AI system the policy covers."},"version":{"type":"integer","title":"Version","description":"Policy version, starting at 1 and increased by every save."},"enabled":{"type":"boolean","title":"Enabled","description":"Whether this is the active Article 50 configuration for the system."},"direct_interaction_disclosure_enabled":{"type":"boolean","title":"Direct Interaction Disclosure Enabled","description":"Whether people are told they are interacting with an AI system."},"disclosure_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disclosure Text","description":"Default disclosure text."},"localized_disclosures":{"additionalProperties":true,"type":"object","title":"Localized Disclosures","description":"Disclosure text keyed by language tag."},"modalities":{"items":{"type":"string"},"type":"array","title":"Modalities","description":"Synthetic-content modalities in scope."},"marking_responsibility":{"type":"string","enum":["not_assessed","customer_application","not_applicable"],"title":"Marking Responsibility","description":"Who handles machine-readable marking of synthetic content."},"marking_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Marking Method","description":"Marking method or provider capability used."},"deepfake_disclosure_enabled":{"type":"boolean","title":"Deepfake Disclosure Enabled","description":"Whether deepfake content is disclosed."},"public_interest_text_disclosure_enabled":{"type":"boolean","title":"Public Interest Text Disclosure Enabled","description":"Whether AI-generated text on matters of public interest is disclosed."},"biometric_emotion_disclosure_enabled":{"type":"boolean","title":"Biometric Emotion Disclosure Enabled","description":"Whether people are informed about biometric categorisation or emotion recognition."},"display_mode":{"type":"string","enum":["prefix","banner","metadata"],"title":"Display Mode","description":"How the disclosure is shown: a text prefix, an application banner, or application metadata."},"placement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Placement","description":"Where the disclosure appears."},"frequency":{"type":"string","enum":["first_interaction","every_response"],"title":"Frequency","description":"Whether the disclosure is shown on the first interaction or with every response."},"default_language":{"type":"string","title":"Default Language","description":"Language tag of `disclosure_text`."},"accessibility_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accessibility Notes","description":"How the disclosure is made accessible."},"provider_attestation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Attestation","description":"Upstream provider statement about marking or disclosure support."},"exceptions_rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exceptions Rationale","description":"Why an obligation does not apply."},"verification":{"additionalProperties":true,"type":"object","title":"Verification","description":"Free-form JSON describing how the implementation was verified."},"created_by":{"type":"string","title":"Created By","description":"ID of the user who created the policy."},"updated_by":{"type":"string","title":"Updated By","description":"ID of the user who last saved the policy."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","project_id","system_id","version","enabled","direct_interaction_disclosure_enabled","disclosure_text","localized_disclosures","modalities","marking_responsibility","marking_method","deepfake_disclosure_enabled","public_interest_text_disclosure_enabled","biometric_emotion_disclosure_enabled","display_mode","placement","frequency","default_language","accessibility_notes","provider_attestation","exceptions_rationale","verification","created_by","updated_by","created_at","updated_at"],"title":"ComplianceTransparencyPolicyResponse","description":"Article 50 transparency measures your organization implements for an AI system, as recorded in connic."},"ComplianceTransparencyPolicyUpsert":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Makes this the active Article 50 configuration for the system.","default":false},"direct_interaction_disclosure_enabled":{"type":"boolean","title":"Direct Interaction Disclosure Enabled","description":"Whether people are told they are interacting with an AI system.","default":false},"disclosure_text":{"anyOf":[{"type":"string","maxLength":2000,"minLength":1},{"type":"null"}],"title":"Disclosure Text","description":"Default disclosure text."},"localized_disclosures":{"additionalProperties":{"type":"string","maxLength":2000,"minLength":1},"propertyNames":{"maxLength":35,"minLength":1},"type":"object","maxProperties":50,"title":"Localized Disclosures","description":"Disclosure text keyed by language tag, such as `de` or `fr-CA`."},"modalities":{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array","maxItems":20,"title":"Modalities","description":"Synthetic-content modalities in scope, such as `text`, `image`, `audio` or `video`."},"marking_responsibility":{"type":"string","enum":["not_assessed","customer_application","not_applicable"],"title":"Marking Responsibility","description":"Machine-readable marking of synthetic content: `customer_application` when your application marks it, `not_applicable` with a reason in `exceptions_rationale`, or `not_assessed`.","default":"not_assessed"},"marking_method":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Marking Method","description":"Marking method or provider capability actually used, such as C2PA metadata."},"deepfake_disclosure_enabled":{"type":"boolean","title":"Deepfake Disclosure Enabled","description":"Whether deepfake content is disclosed.","default":false},"public_interest_text_disclosure_enabled":{"type":"boolean","title":"Public Interest Text Disclosure Enabled","description":"Whether AI-generated text on matters of public interest is disclosed.","default":false},"biometric_emotion_disclosure_enabled":{"type":"boolean","title":"Biometric Emotion Disclosure Enabled","description":"Whether people are informed about biometric categorisation or emotion recognition.","default":false},"display_mode":{"type":"string","enum":["prefix","banner","metadata"],"title":"Display Mode","description":"How the disclosure is shown: a text prefix, an application banner, or application metadata.","default":"prefix"},"placement":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Placement","description":"Where the disclosure appears."},"frequency":{"type":"string","enum":["first_interaction","every_response"],"title":"Frequency","description":"Whether the disclosure is shown on the first interaction or with every response.","default":"first_interaction"},"default_language":{"type":"string","maxLength":35,"minLength":1,"title":"Default Language","description":"Language tag of `disclosure_text`.","default":"en"},"accessibility_notes":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Accessibility Notes","description":"How the disclosure is made accessible."},"provider_attestation":{"anyOf":[{"type":"string","maxLength":2000,"minLength":1},{"type":"null"}],"title":"Provider Attestation","description":"Upstream provider statement about marking or disclosure support."},"exceptions_rationale":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Exceptions Rationale","description":"Why an obligation does not apply, such as the editorial-review exception for public-interest text."},"verification":{"additionalProperties":true,"type":"object","maxProperties":50,"title":"Verification","description":"Free-form JSON describing how the implementation was verified. At most 64 KiB when serialized."}},"type":"object","title":"ComplianceTransparencyPolicyUpsert","description":"Article 50 transparency measures your organization implements for an AI system; connic records them but does not apply disclosures. Each save replaces the policy and increments `version`."},"ConnectionConnectorResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Environment the connector runs in."},"managed_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Managed Key","description":"Key of the `connectors/<key>.yaml` file that defines the connector in code, or null."}},"type":"object","required":["id","name","environment_id"],"title":"ConnectionConnectorResponse","description":"Connector that uses a connection."},"ConnectionCreateRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Unique per connection type in the project."},"type":{"$ref":"#/components/schemas/ConnectorType","description":"Connector type the credentials are for. Only types that support Connections are accepted."},"config":{"additionalProperties":true,"type":"object","title":"Config","description":"Credential fields from `GET /connections/-/schema/{connector_type}`. Other fields are dropped."}},"type":"object","required":["name","type","config"],"title":"ConnectionCreateRequest","description":"Reusable credentials to create."},"ConnectionListResponse":{"properties":{"connections":{"items":{"$ref":"#/components/schemas/ConnectionResponse"},"type":"array","title":"Connections","description":"Connections in the project, oldest first."}},"type":"object","required":["connections"],"title":"ConnectionListResponse"},"ConnectionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project the connection belongs to."},"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type","description":"Connection type. Related connector types that share credentials use the same type."},"config":{"additionalProperties":true,"type":"object","title":"Config","description":"Credential fields, with secret fields masked as `********`."},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"connector_ids":{"items":{"type":"string"},"type":"array","title":"Connector Ids","description":"IDs of the connectors that use this connection, in any environment.","default":[]},"connectors":{"items":{"$ref":"#/components/schemas/ConnectionConnectorResponse"},"type":"array","title":"Connectors","description":"Connectors that use this connection, in any environment. A connection in use can't be deleted.","default":[]}},"type":"object","required":["id","project_id","name","type","config","created_at","updated_at"],"title":"ConnectionResponse","description":"Reusable credentials shared by compatible connectors in the project."},"ConnectionSchemaResponse":{"properties":{"type":{"type":"string","title":"Type","description":"Connection type the fields belong to."},"name":{"type":"string","title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon","description":"Icon identifier for the type, or null."},"fields":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Fields","description":"Field definitions with `name`, `type`, `label`, `description` and `required`, plus optional keys such as `default`, `options`, `min`, `max`, `section` and `sensitive`. Fields of type `password` or with `sensitive` set are secrets and come back masked."},"sections":{"additionalProperties":true,"type":"object","title":"Sections","description":"Field groups keyed by the `section` value of fields, each with a `title` and `icon`."}},"type":"object","required":["type","name","fields","sections"],"title":"ConnectionSchemaResponse","description":"Credential fields a connection of this type stores."},"ConnectionUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name","description":"New name, unique per connection type in the project."},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config","description":"Complete set of credential fields. Secret fields sent as `********` or left empty keep their stored value unless a field they belong with, such as the host or username, changes."}},"type":"object","title":"ConnectionUpdateRequest","description":"Changes to a connection. Omitted fields keep their values."},"ConnectorCreate":{"properties":{"domain_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Domain Id","description":"Active custom domain of the project for the connector's URL. Not every connector type supports one."},"name":{"type":"string","title":"Name","description":"Must not match a connector defined in code in the same environment."},"type":{"$ref":"#/components/schemas/ConnectorType","description":"Connector type. Determines the fields `config` accepts."},"config":{"additionalProperties":true,"type":"object","title":"Config","description":"Configuration for the connector type, with the fields documented on that connector's docs page. For types that use Connections, `connection_id` reuses saved credentials, and credentials sent inline are stored in a matching or new Connection. Secrets such as webhook secrets are generated by connic."},"enabled":{"type":"boolean","title":"Enabled","description":"Set to false to create the connector paused. Some inbound stream connectors start paused unless this is sent, and any connector starts paused when the plan's active connector limit is reached.","default":true}},"type":"object","required":["name","type"],"title":"ConnectorCreate","description":"Connector to create in the environment given by `environment_id`."},"ConnectorInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type","description":"Connector type, such as `http` or `cron`."}},"type":"object","required":["id","name","type"],"title":"ConnectorInfo","description":"Connector whose event started a run."},"ConnectorResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project the connector belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Environment the connector runs in."},"domain_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Domain Id","description":"Custom domain the connector's URL uses, or null for the default connector host."},"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/ConnectorType","description":"Connector type. Determines the fields in `config`."},"config":{"additionalProperties":true,"type":"object","title":"Config","description":"Configuration for the connector type, with the fields documented on that connector's docs page. Credential fields are masked as `********`; secrets connic generates for the connector, such as webhook secrets, are returned in full."},"enabled":{"type":"boolean","title":"Enabled","description":"False while the connector is paused. A paused connector starts no new runs."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"managed_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Managed Key","description":"Key of the `connectors/<key>.yaml` file that defines this connector in code, or null. Change these connectors in your codebase; the API can only pause or resume them."},"retired_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Retired At","description":"When the active deployment stopped declaring this connector in code, or null. Retired connectors stay paused until a deployment declares them again, and can be deleted."}},"type":"object","required":["id","project_id","environment_id","name","type","config","enabled","created_at","updated_at"],"title":"ConnectorResponse","description":"Connector in an environment, with its configuration."},"ConnectorRunListResponse":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/ConnectorRunResponse"},"type":"array","title":"Runs","description":"Runs on this page."},"total":{"type":"integer","title":"Total","description":"Number of runs matching the filters."},"limit":{"type":"integer","title":"Limit","description":"Page size used for this response."},"offset":{"type":"integer","title":"Offset","description":"Number of matching runs skipped before this page."}},"type":"object","required":["runs","total","limit","offset"],"title":"ConnectorRunListResponse","description":"Page of connector runs, newest first."},"ConnectorRunResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"connector_id":{"type":"string","format":"uuid","title":"Connector Id","description":"Connector that recorded the run."},"source_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Run Id","description":"Agent run this connector run belongs to, such as the run an outbound connector delivered; null for most inbound events."},"trigger_type":{"type":"string","title":"Trigger Type","description":"What started the run, such as `webhook`, `cron`, or `outbound` for deliveries. Values depend on the connector type."},"status":{"$ref":"#/components/schemas/ConnectorRunStatus","description":"`started` while in progress, then `completed` or `failed`."},"input":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input","description":"Data the run received or sent, usually as a JSON string."},"output":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output","description":"Result of the run, such as the response returned to the caller, usually as a JSON string."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message when the run failed."},"http_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Http Status","description":"HTTP status code returned to the caller or received from the destination; null when no HTTP exchange applies."},"agents_triggered":{"type":"integer","title":"Agents Triggered","description":"Number of agent runs this connector run started."},"started_at":{"type":"string","format":"date-time","title":"Started At","description":"When the connector received the event or began the delivery."},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the run finished; null while it is `started`."},"duration_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Ms","description":"Duration in milliseconds."}},"type":"object","required":["id","connector_id","trigger_type","status","agents_triggered","started_at"],"title":"ConnectorRunResponse","description":"One event a connector received or one delivery it made."},"ConnectorRunStatus":{"type":"string","enum":["started","completed","failed"],"title":"ConnectorRunStatus","description":"State of one connector execution: `started`, then `completed` or `failed`."},"ConnectorType":{"type":"string","enum":["http","cron","kafka","sqs","postgres","websocket","mcp","email","s3","stripe","telegram","slack","twilio","twilio_messaging","telnyx","telnyx_messaging"],"title":"ConnectorType","description":"Connector type, which sets the event source or destination and the fields accepted in `config`."},"ConnectorUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"New display name. It cannot match a connector declared in code in the same environment."},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config","description":"Type-specific settings that replace the current configuration. Secret fields that are omitted, empty or still masked keep their stored values."},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled","description":"Enable or disable the connector. Enabling counts toward the plan's connector limit."},"domain_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Domain Id","description":"Active custom domain of the project that serves the connector's endpoints, or null for the default host. Not every connector type supports custom domains."}},"type":"object","title":"ConnectorUpdate","description":"Partial update of a connector. Connectors declared in code accept only `enabled`."},"CreateRetrievalSourceRequest":{"properties":{"type":{"type":"string","title":"Type","description":"Source type: `notion`, `confluence` (Confluence Cloud), `coda` (Superhuman Docs), `zendesk` (Zendesk Help Center), or `website`."},"name":{"type":"string","title":"Name"},"config":{"additionalProperties":true,"type":"object","title":"Config","description":"Provider settings. Required keys: `integration_token` for `notion`; `site_url`, `email`, and `api_token` for `confluence`; `api_token` for `coda`; `subdomain` and `locales` for `zendesk`; `start_url` and `crawl_permission: true` for `website`. Every type also accepts `namespace` (default `sources.<type>`), `sync_interval` (`15m`, `1h`, `6h`, `12h`, `24h`, or `7d`; default `24h`, at least `12h` for `website`), and `on_delete` (`remove` or `keep`; default `remove`)."}},"type":"object","required":["type","name","config"],"title":"CreateRetrievalSourceRequest"},"DatabaseCollection":{"properties":{"name":{"type":"string","title":"Name"},"document_count":{"type":"integer","minimum":0.0,"title":"Document Count","description":"Documents in the collection."},"size_bytes":{"type":"integer","minimum":0.0,"title":"Size Bytes","description":"Storage used by the collection, including indexes, in bytes."}},"type":"object","required":["name","document_count","size_bytes"],"title":"DatabaseCollection"},"DatabaseCollectionSchemaResponse":{"properties":{"collection":{"type":"string","title":"Collection"},"fields":{"items":{"$ref":"#/components/schemas/DatabaseSchemaField"},"type":"array","maxItems":100,"title":"Fields","description":"Inferred fields, highest `fill_rate` first, up to 100."},"sample_size":{"type":"integer","minimum":0.0,"title":"Sample Size","description":"Maximum number of documents sampled, currently 200. Smaller collections are sampled in full."}},"type":"object","required":["collection","fields","sample_size"],"title":"DatabaseCollectionSchemaResponse"},"DatabaseCollectionsResponse":{"properties":{"collections":{"items":{"$ref":"#/components/schemas/DatabaseCollection"},"type":"array","title":"Collections","description":"Collections sorted by name."},"total":{"type":"integer","minimum":0.0,"title":"Total","description":"Number of collections."}},"type":"object","required":["collections","total"],"title":"DatabaseCollectionsResponse"},"DatabaseCountRequest":{"properties":{"filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filter","description":"Filter object keyed by field path. Supports equality plus $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $and, $or, $not, $nor, $exists, $contains, $elemMatch, $regex, and $near (one top-level {\"lat\", \"lng\", \"maxDistance\"} condition; find returns nearest first with _distance in meters)."}},"additionalProperties":true,"type":"object","title":"DatabaseCountRequest"},"DatabaseCountResponse":{"properties":{"count":{"type":"integer","minimum":0.0,"title":"Count","description":"Documents matching the filter. 0 when the collection does not exist."}},"type":"object","required":["count"],"title":"DatabaseCountResponse"},"DatabaseDeleteCollectionResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","description":"Always `true`."},"name":{"type":"string","title":"Name","description":"Name of the deleted collection."}},"type":"object","required":["ok","name"],"title":"DatabaseDeleteCollectionResponse"},"DatabaseDeleteDocumentsRequest":{"properties":{"filter":{"additionalProperties":true,"type":"object","minProperties":1,"title":"Filter","description":"Required non-empty filter. Filter object keyed by field path. Supports equality plus $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $and, $or, $not, $nor, $exists, $contains, $elemMatch, $regex, and $near (one top-level {\"lat\", \"lng\", \"maxDistance\"} condition; find returns nearest first with _distance in meters)."}},"additionalProperties":true,"type":"object","required":["filter"],"title":"DatabaseDeleteDocumentsRequest"},"DatabaseDeleteDocumentsResponse":{"properties":{"deleted_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Deleted Ids","description":"`_id` values of the deleted documents."},"deleted_count":{"type":"integer","minimum":0.0,"title":"Deleted Count","description":"Number of documents deleted."}},"type":"object","required":["deleted_ids","deleted_count"],"title":"DatabaseDeleteDocumentsResponse"},"DatabaseDocument":{"properties":{"_id":{"type":"string","format":"uuid","title":"Id"},"_created_at":{"type":"string","format":"date-time","title":"Created At"},"_updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"additionalProperties":true,"type":"object","required":["_id","_created_at","_updated_at"],"title":"DatabaseDocument","description":"Stored document: your fields at the top level plus `_id`, `_created_at`, and `_updated_at`.\n\nResults of a find with a `$near` filter also include `_distance` in meters."},"DatabaseFindDistinctResponse":{"properties":{"values":{"items":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"array","maxItems":1000,"title":"Values","description":"Distinct values of the `distinct` field as strings, sorted, with null last. Up to 1000."},"count":{"type":"integer","maximum":1000.0,"minimum":0.0,"title":"Count","description":"Number of values returned."}},"type":"object","required":["values","count"],"title":"DatabaseFindDistinctResponse"},"DatabaseFindDocumentsResponse":{"properties":{"documents":{"items":{"$ref":"#/components/schemas/DatabaseDocument"},"type":"array","maxItems":1000,"title":"Documents","description":"Matching documents for this page."},"count":{"type":"integer","maximum":1000.0,"minimum":0.0,"title":"Count","description":"Number of documents in this response."},"total":{"type":"integer","minimum":0.0,"title":"Total","description":"Documents matching the filter, ignoring `limit` and `skip`."}},"type":"object","required":["documents","count","total"],"title":"DatabaseFindDocumentsResponse"},"DatabaseFindRequest":{"properties":{"filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filter","description":"Filter object keyed by field path. Supports equality plus $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $and, $or, $not, $nor, $exists, $contains, $elemMatch, $regex, and $near (one top-level {\"lat\", \"lng\", \"maxDistance\"} condition; find returns nearest first with _distance in meters)."},"sort":{"anyOf":[{"additionalProperties":{"type":"integer","enum":[1,-1]},"propertyNames":{"maxLength":256,"minLength":1},"type":"object","maxProperties":50},{"type":"null"}],"title":"Sort","description":"Ordered mapping of dot-separated field paths to 1 (ascending) or -1 (descending). Paths may contain up to 10 non-empty segments."},"limit":{"type":"integer","title":"Limit","description":"Maximum documents to return. Values are clamped to 1-1000; 0 uses the default of 100.","default":100},"skip":{"type":"integer","title":"Skip","description":"Number of matching documents to skip. Values are clamped to 0-1,000,000.","default":0},"fields":{"anyOf":[{"items":{"type":"string","maxLength":256,"minLength":1},"type":"array","maxItems":50},{"type":"null"}],"title":"Fields","description":"Dot-separated field paths to return instead of whole documents. System fields are always included."},"distinct":{"anyOf":[{"type":"string","maxLength":256,"minLength":1},{"type":"null"}],"title":"Distinct","description":"Dot-separated field path whose distinct values to return, as strings, instead of documents."}},"additionalProperties":true,"type":"object","title":"DatabaseFindRequest"},"DatabaseImportRequest":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"Up to 25 MB of documents as a JSON array of objects, or as JSONL with one object per line. Blank JSONL lines are ignored."}},"type":"object","required":["file"],"title":"DatabaseImportRequest"},"DatabaseImportResponse":{"properties":{"name":{"type":"string","title":"Name","description":"Name of the collection the documents were imported into."},"imported_count":{"type":"integer","minimum":1.0,"title":"Imported Count","description":"Number of documents imported."}},"type":"object","required":["name","imported_count"],"title":"DatabaseImportResponse"},"DatabaseSchemaField":{"properties":{"path":{"type":"string","title":"Path","description":"Dot-separated field path. Nested objects are expanded up to five levels deep; arrays are not expanded."},"types":{"items":{"type":"string","enum":["array","boolean","null","number","object","string"]},"type":"array","maxItems":6,"minItems":1,"title":"Types","description":"JSON types observed for this field across the sample."},"primary_type":{"type":"string","enum":["array","boolean","null","number","object","string"],"title":"Primary Type","description":"Most common observed JSON type."},"fill_rate":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Fill Rate","description":"Share of sampled documents that contain the field, including null values, from 0 to 1."},"example_values":{"items":{"type":"string"},"type":"array","maxItems":3,"title":"Example Values","description":"Up to 3 distinct non-null values, converted to strings. Objects and arrays are not included."},"nullable":{"type":"boolean","title":"Nullable","description":"Whether any sampled document has null for this field."}},"type":"object","required":["path","types","primary_type","fill_rate","example_values","nullable"],"title":"DatabaseSchemaField","description":"Field inferred from the sampled documents."},"DatabaseStatsResponse":{"properties":{"total_collections":{"type":"integer","minimum":0.0,"title":"Total Collections","description":"Number of collections in the environment."},"total_documents":{"type":"integer","minimum":0.0,"title":"Total Documents","description":"Documents across all collections."},"total_size_bytes":{"type":"integer","minimum":0.0,"title":"Total Size Bytes","description":"Storage used by all collections, including indexes, in bytes."}},"type":"object","required":["total_collections","total_documents","total_size_bytes"],"title":"DatabaseStatsResponse"},"DatabaseUpdateRequest":{"properties":{"filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filter","description":"Filter object keyed by field path. Supports equality plus $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $and, $or, $not, $nor, $exists, $contains, $elemMatch, $regex, and $near (one top-level {\"lat\", \"lng\", \"maxDistance\"} condition; find returns nearest first with _distance in meters). Missing, null, or empty matches every document."},"update":{"additionalProperties":true,"type":"object","minProperties":1,"title":"Update","description":"Top-level fields to merge. A null value removes that field."}},"additionalProperties":true,"type":"object","required":["update"],"title":"DatabaseUpdateRequest"},"DatabaseUpdateResponse":{"properties":{"updated_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Updated Ids","description":"`_id` values of the updated documents."},"updated_count":{"type":"integer","minimum":0.0,"title":"Updated Count","description":"Number of documents updated."}},"type":"object","required":["updated_ids","updated_count"],"title":"DatabaseUpdateResponse"},"DeploymentCreate":{"properties":{"skip_tests":{"type":"boolean","title":"Skip Tests","description":"Skip the deploy-gate test phase for this deployment.","default":false}},"additionalProperties":false,"type":"object","title":"DeploymentCreate"},"DeploymentListItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project the deployment belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Environment the deployment belongs to."},"commit_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Hash","description":"Git commit or ref that was built. null for CLI uploads."},"source_type":{"type":"string","enum":["git","cli_upload"],"title":"Source Type","description":"`git` for builds from the connected repository, `cli_upload` for code uploaded with the CLI."},"status":{"$ref":"#/components/schemas/DeploymentStatus","description":"Lifecycle state of the build. A `deployed` deployment serves traffic only while `is_active` is true."},"is_active":{"type":"boolean","title":"Is Active","description":"Whether this deployment currently serves the environment."},"agents_metadata":{"type":"string","title":"Agents Metadata","description":"JSON-encoded array with the configuration of each agent found in the code. `[]` until the build discovers agents."},"agents_count":{"type":"integer","title":"Agents Count","description":"Number of agents in the deployment."},"tools_count":{"type":"integer","title":"Tools Count","description":"Number of distinct tools referenced by the agents."},"middlewares_count":{"type":"integer","title":"Middlewares Count","description":"Number of middleware modules found."},"guardrails_count":{"type":"integer","title":"Guardrails Count","description":"Number of distinct guardrail types used by the agents."},"logs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logs","description":"Build and activation log output. null until the build writes output."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When the build started. null while pending."},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the deployment finished, failed or was cancelled."},"testing_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Testing Started At","description":"When the test phase started. null if it has not run."},"deploy_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deploy Started At","description":"When activation started. null if it has not started."},"tests_status":{"anyOf":[{"type":"string","enum":["running","passed","failed","skipped","cancelled"]},{"type":"null"}],"title":"Tests Status","description":"Result of the deploy-gate test phase. null when tests have not run or the code has no tests."},"skip_tests":{"type":"boolean","title":"Skip Tests","description":"Whether the deploy-gate test phase was skipped for this deployment."},"connic_triggered":{"type":"boolean","title":"Connic Triggered","description":"Whether connic started this deployment on the project's behalf."},"kind":{"type":"string","enum":["deploy","dev_session","test_run"],"title":"Kind","description":"`deploy` for a regular deployment, `dev_session` for code synced by `connic dev`, `test_run` for a build that only runs tests."},"current_phase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Phase","description":"Current phase: `building`, `testing`, `deploying`, `active` or `done`. null before the build starts."},"connectors_status":{"anyOf":[{"type":"string","enum":["applied","partial","failed"]},{"type":"null"}],"title":"Connectors Status","description":"Result of applying the connectors declared in code: `applied`, `partial` when some failed and kept their previous state, or `failed`. null until connectors are applied."},"skip_failed_connectors":{"type":"boolean","title":"Skip Failed Connectors","description":"Whether connectors declared in code that fail to apply keep their previous state instead of failing the deployment.","default":false},"tests_failed_count":{"type":"integer","title":"Tests Failed Count","description":"Number of test cases that failed in the deploy-gate test phase."}},"type":"object","required":["id","project_id","environment_id","commit_hash","source_type","status","is_active","agents_metadata","agents_count","tools_count","middlewares_count","guardrails_count","logs","created_at","started_at","ended_at","testing_started_at","deploy_started_at","tests_status","skip_tests","connic_triggered","kind","current_phase","tests_failed_count"],"title":"DeploymentListItemResponse","description":"A deployment with the number of test cases that failed in its deploy-gate test phase."},"DeploymentResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project the deployment belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Environment the deployment belongs to."},"commit_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Hash","description":"Git commit or ref that was built. null for CLI uploads."},"source_type":{"type":"string","enum":["git","cli_upload"],"title":"Source Type","description":"`git` for builds from the connected repository, `cli_upload` for code uploaded with the CLI."},"status":{"$ref":"#/components/schemas/DeploymentStatus","description":"Lifecycle state of the build. A `deployed` deployment serves traffic only while `is_active` is true."},"is_active":{"type":"boolean","title":"Is Active","description":"Whether this deployment currently serves the environment."},"agents_metadata":{"type":"string","title":"Agents Metadata","description":"JSON-encoded array with the configuration of each agent found in the code. `[]` until the build discovers agents."},"agents_count":{"type":"integer","title":"Agents Count","description":"Number of agents in the deployment."},"tools_count":{"type":"integer","title":"Tools Count","description":"Number of distinct tools referenced by the agents."},"middlewares_count":{"type":"integer","title":"Middlewares Count","description":"Number of middleware modules found."},"guardrails_count":{"type":"integer","title":"Guardrails Count","description":"Number of distinct guardrail types used by the agents."},"logs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logs","description":"Build and activation log output. null until the build writes output."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When the build started. null while pending."},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the deployment finished, failed or was cancelled."},"testing_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Testing Started At","description":"When the test phase started. null if it has not run."},"deploy_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deploy Started At","description":"When activation started. null if it has not started."},"tests_status":{"anyOf":[{"type":"string","enum":["running","passed","failed","skipped","cancelled"]},{"type":"null"}],"title":"Tests Status","description":"Result of the deploy-gate test phase. null when tests have not run or the code has no tests."},"skip_tests":{"type":"boolean","title":"Skip Tests","description":"Whether the deploy-gate test phase was skipped for this deployment."},"connic_triggered":{"type":"boolean","title":"Connic Triggered","description":"Whether connic started this deployment on the project's behalf."},"kind":{"type":"string","enum":["deploy","dev_session","test_run"],"title":"Kind","description":"`deploy` for a regular deployment, `dev_session` for code synced by `connic dev`, `test_run` for a build that only runs tests."},"current_phase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Phase","description":"Current phase: `building`, `testing`, `deploying`, `active` or `done`. null before the build starts."},"connectors_status":{"anyOf":[{"type":"string","enum":["applied","partial","failed"]},{"type":"null"}],"title":"Connectors Status","description":"Result of applying the connectors declared in code: `applied`, `partial` when some failed and kept their previous state, or `failed`. null until connectors are applied."},"skip_failed_connectors":{"type":"boolean","title":"Skip Failed Connectors","description":"Whether connectors declared in code that fail to apply keep their previous state instead of failing the deployment.","default":false}},"type":"object","required":["id","project_id","environment_id","commit_hash","source_type","status","is_active","agents_metadata","agents_count","tools_count","middlewares_count","guardrails_count","logs","created_at","started_at","ended_at","testing_started_at","deploy_started_at","tests_status","skip_tests","connic_triggered","kind","current_phase"],"title":"DeploymentResponse","description":"A build of the project's agents for one environment."},"DeploymentStatus":{"type":"string","enum":["pending","building","deployed","failed","blocked","cancelled"],"title":"DeploymentStatus","description":"Deployment state: `pending` until the build starts, `building` while it builds, tests and activates, then `deployed`, `failed` or `cancelled`."},"DeploymentTestRunWithCost":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"deployment_id":{"type":"string","format":"uuid","title":"Deployment Id","description":"ID of the deployment whose test phase ran this case."},"agent_name":{"type":"string","title":"Agent Name","description":"Agent under test."},"test_name":{"type":"string","title":"Test Name","description":"Test case name from the agent's tests in code."},"runs":{"type":"integer","title":"Runs","description":"Number of agent runs the case executes."},"successes":{"type":"integer","title":"Successes","description":"Number of agent runs that passed so far."},"success_threshold":{"type":"integer","title":"Success Threshold","description":"Percentage of runs that must pass for the case to pass."},"passed":{"type":"boolean","title":"Passed","description":"Whether the case passed; false until it finishes."},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason","description":"Short explanation when the case failed or was cancelled."},"agent_run_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Agent Run Ids","description":"IDs of the agent runs executed for this case, in order."},"agent_run_passed":{"items":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"type":"array","title":"Agent Run Passed","description":"Pass result for each entry in `agent_run_ids`; null while that run's result is pending."},"started_at":{"type":"string","format":"date-time","title":"Started At","description":"When the case was planned at the start of the test phase."},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the case finished; null while pending or running."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"`pending`, `running`, `passed`, `failed`, or `cancelled` when the deployment was cancelled first."},"token_usage":{"$ref":"#/components/schemas/TestRunTokenUsage","description":"Token counts summed over the case's agent runs, including judge evaluations of those runs.","default":{"input_tokens":0,"output_tokens":0,"cached_input_tokens":0,"thinking_tokens":0,"audio_input_tokens":0,"audio_output_tokens":0,"audio_cached_input_tokens":0,"audio_thinking_tokens":0,"audio_usage_missing":false,"total_tokens":0}},"token_cost":{"anyOf":[{"$ref":"#/components/schemas/PublicTokenCostResponse"},{"type":"null"}],"description":"Cost of the case's agent runs and their judge evaluations; null when no model calls were recorded."}},"type":"object","required":["id","deployment_id","agent_name","test_name","runs","successes","success_threshold","passed","agent_run_ids","agent_run_passed","started_at"],"title":"DeploymentTestRunWithCost","description":"Result of one test case from a deployment's test phase."},"EnvironmentCreate":{"properties":{"log_retention_seconds":{"anyOf":[{"type":"integer","minimum":3600.0},{"type":"null"}],"title":"Log Retention Seconds","description":"How long runs are kept before automatic deletion, in seconds. At most the plan's retention; null uses the plan's retention."},"redacted_keys":{"items":{"type":"string"},"type":"array","title":"Redacted Keys","description":"JSON field paths, such as `user.token` or `*.password`, whose values are replaced with `[REDACTED]` in newly recorded run data, logs and traces. Defaults to common secret field names."},"manual_deploy_group_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Manual Deploy Group Ids","description":"Permission group IDs whose members can start deployments manually in this environment. null allows all groups; an empty list allows only the project owner."},"copy_from_group_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Copy From Group Ids","description":"Permission group IDs whose members can copy data from this environment into another. null allows all groups; an empty list allows only the project owner."},"name":{"type":"string","title":"Name","description":"Display name. Its slug must be unique among the project's environments."},"git_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Git Branch","description":"Git branch whose pushes deploy to this environment. null for projects that deploy with the CLI."},"copy_from_environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Copy From Environment Id","description":"ID of an environment whose variables are copied into the new one. Copying also requires `variables.view` and `variables.create`."},"pr_testing_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pr Testing Enabled","description":"Run the test suite when a pull request targets `git_branch`. Pro and enterprise plans only. Defaults to true when `git_branch` is set, a git provider is connected and the plan allows it."},"deploy_gate_tests_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deploy Gate Tests Enabled","description":"Run the test suite before each deployment in this environment is activated. Defaults to true."}},"type":"object","required":["name"],"title":"EnvironmentCreate"},"EnvironmentUpdate":{"properties":{"log_retention_seconds":{"anyOf":[{"type":"integer","minimum":3600.0},{"type":"null"}],"title":"Log Retention Seconds","description":"How long runs are kept before automatic deletion, in seconds. At most the plan's retention; null uses the plan's retention."},"redacted_keys":{"items":{"type":"string"},"type":"array","title":"Redacted Keys","description":"JSON field paths, such as `user.token` or `*.password`, whose values are replaced with `[REDACTED]` in newly recorded run data, logs and traces. Case-sensitive; an empty list disables redaction."},"manual_deploy_group_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Manual Deploy Group Ids","description":"Permission group IDs whose members can start deployments manually in this environment. null allows all groups; an empty list allows only the project owner."},"copy_from_group_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Copy From Group Ids","description":"Permission group IDs whose members can copy data from this environment into another. null allows all groups; an empty list allows only the project owner."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Display name. Its slug must be unique among the project's environments."},"git_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Git Branch","description":"Git branch whose pushes deploy to this environment."},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"When false, pushes and pull requests on `git_branch` no longer trigger deployments or PR tests."},"test_environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Test Environment Id","description":"Another environment in the project whose variables, connectors and credentials the deploy gate tests use. null runs tests in this environment."},"pr_testing_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pr Testing Enabled","description":"Run the test suite when a pull request targets `git_branch`. Pro and enterprise plans only."},"deploy_gate_tests_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deploy Gate Tests Enabled","description":"Run the test suite before each deployment in this environment is activated."}},"type":"object","title":"EnvironmentUpdate","description":"Partial update of an environment. Omitted fields are unchanged."},"FileDeleteRequest":{"properties":{"path":{"type":"string","maxLength":1024,"minLength":1,"title":"Path","description":"File path such as invoices/2026/acme.pdf."},"recursive":{"type":"boolean","title":"Recursive","description":"Required to delete a folder and everything in it.","default":false}},"additionalProperties":false,"type":"object","required":["path"],"title":"FileDeleteRequest"},"FileDeleteResponse":{"properties":{"deleted":{"type":"integer","title":"Deleted"}},"type":"object","required":["deleted"],"title":"FileDeleteResponse"},"FileDownloadLinkResponse":{"properties":{"url":{"type":"string","title":"Url"},"expires_at":{"type":"string","title":"Expires At"},"file":{"additionalProperties":true,"type":"object","title":"File"}},"type":"object","required":["url","expires_at","file"],"title":"FileDownloadLinkResponse"},"FileListResponse":{"properties":{"folder":{"type":"string","title":"Folder"},"folders":{"items":{"type":"string"},"type":"array","title":"Folders","description":"Subfolders of the listed folder; empty for recursive listings."},"files":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Files"},"count":{"type":"integer","title":"Count"},"total":{"type":"integer","title":"Total","description":"Files matching the listing across all pages."}},"type":"object","required":["folder","folders","files","count","total"],"title":"FileListResponse"},"FilePathRequest":{"properties":{"path":{"type":"string","maxLength":1024,"minLength":1,"title":"Path","description":"File path such as invoices/2026/acme.pdf."}},"additionalProperties":false,"type":"object","required":["path"],"title":"FilePathRequest"},"FileStatsResponse":{"properties":{"total_files":{"type":"integer","minimum":0.0,"title":"Total Files"},"total_size_bytes":{"type":"integer","minimum":0.0,"title":"Total Size Bytes"}},"type":"object","required":["total_files","total_size_bytes"],"title":"FileStatsResponse"},"FileUpdateRequest":{"properties":{"path":{"type":"string","maxLength":1024,"minLength":1,"title":"Path","description":"File path such as invoices/2026/acme.pdf."},"new_path":{"anyOf":[{"type":"string","maxLength":1024,"minLength":1},{"type":"null"}],"title":"New Path","description":"Move or rename to this path."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Fields to merge. A null value removes a field."}},"additionalProperties":false,"type":"object","required":["path"],"title":"FileUpdateRequest"},"FileUpdateResponse":{"properties":{"moved":{"type":"integer","title":"Moved"},"file":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"File"},"folder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder"}},"type":"object","required":["moved"],"title":"FileUpdateResponse"},"FileUploadRequest":{"properties":{"path":{"type":"string","maxLength":1024,"minLength":1,"title":"Path","description":"File path such as invoices/2026/acme.pdf."},"size":{"type":"integer","minimum":0.0,"title":"Size","description":"File size in bytes."},"mime_type":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Mime Type"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"overwrite":{"type":"boolean","title":"Overwrite","description":"Replace an existing file at this path instead of renaming the new one.","default":false}},"additionalProperties":false,"type":"object","required":["path","size"],"title":"FileUploadRequest"},"FileUploadResponse":{"properties":{"upload_id":{"type":"string","title":"Upload Id"},"path":{"type":"string","title":"Path"},"size":{"type":"integer","title":"Size"},"part_bytes":{"type":"integer","title":"Part Bytes","description":"Every part except the last has exactly this many bytes."},"part_count":{"type":"integer","title":"Part Count"},"upload_url":{"type":"string","title":"Upload Url","description":"PUT {upload_url}/parts/{n}?token=..., then POST {upload_url}/complete?token=..."},"token":{"type":"string","title":"Token"},"expires_at":{"type":"string","title":"Expires At"}},"type":"object","required":["upload_id","path","size","part_bytes","part_count","upload_url","token","expires_at"],"title":"FileUploadResponse"},"FileWriteRequest":{"properties":{"path":{"type":"string","maxLength":1024,"minLength":1,"title":"Path","description":"File path such as invoices/2026/acme.pdf."},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content","description":"Text content."},"content_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Base64","description":"Binary content, base64-encoded."},"mime_type":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Mime Type"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"overwrite":{"type":"boolean","title":"Overwrite","default":false}},"additionalProperties":false,"type":"object","required":["path"],"title":"FileWriteRequest"},"FilesListRequest":{"properties":{"folder":{"type":"string","maxLength":1024,"title":"Folder","description":"Folder to list. Empty for the root.","default":""},"recursive":{"type":"boolean","title":"Recursive","description":"Include files in all subfolders instead of listing subfolders.","default":false},"filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filter","description":"Metadata filter with the database query operators. System fields start with an underscore."},"sort":{"anyOf":[{"additionalProperties":{"type":"integer","enum":[1,-1]},"type":"object"},{"type":"null"}],"title":"Sort","description":"Sort order. Defaults to {\"_name\": 1}."},"limit":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Limit","default":100},"skip":{"type":"integer","minimum":0.0,"title":"Skip","default":0}},"additionalProperties":false,"type":"object","title":"FilesListRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"JudgeCreate":{"properties":{"name":{"type":"string","title":"Name","description":"Display name, at most 200 characters."},"agent_name":{"type":"string","title":"Agent Name","description":"Agent whose runs the judge evaluates."},"model":{"type":"string","title":"Model","description":"Model that scores runs, for example a `connic/*` model. At most 512 characters."},"system_prompt":{"type":"string","title":"System Prompt","description":"Extra instructions for the scoring model. At most 8,000 characters.","default":""},"include_agent_system_prompt":{"type":"boolean","title":"Include Agent System Prompt","description":"Include the evaluated agent's system prompt in the scoring context.","default":false},"criteria":{"items":{"$ref":"#/components/schemas/JudgeCriterion"},"type":"array","title":"Criteria","description":"Scoring rubric with 1 to 20 criteria. The combined `max_score` is at most 10,000 and the combined name and description length at most 20,000 characters."},"filter_expression":{"type":"string","title":"Filter Expression","description":"Expression over the run's `input`, `output` and `context` that must be true for automatic evaluation. Empty matches every run.","default":""},"trigger_mode":{"type":"string","enum":["automatic","manual"],"title":"Trigger Mode","description":"`automatic` evaluates runs when they complete; `manual` evaluates only when triggered.","default":"automatic"},"sample_rate":{"type":"number","title":"Sample Rate","description":"Share of matching runs evaluated automatically, from 0 to 1.","default":1.0},"notification_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Notification Threshold","description":"Sends a `judge_score_low` notification when the average score, as a share of the maximum, drops below this value (0 to 1). null disables it."},"notification_window":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Notification Window","description":"Number of most recent evaluations averaged for `notification_threshold` (1 to 10,000). null averages all.","default":10},"enabled":{"type":"boolean","title":"Enabled","description":"When false, runs are not evaluated automatically; on-demand triggers still work.","default":true}},"type":"object","required":["name","agent_name","model","criteria"],"title":"JudgeCreate"},"JudgeCriterion":{"properties":{"name":{"type":"string","title":"Name","description":"Criterion name, unique within the judge (case-insensitive). At most 200 characters."},"description":{"type":"string","title":"Description","description":"What the scoring model evaluates for this criterion. At most 2,000 characters."},"max_score":{"type":"number","title":"Max Score","description":"Highest score for this criterion, greater than 0 and at most 1,000."}},"type":"object","required":["name","description","max_score"],"title":"JudgeCriterion","description":"One rubric criterion the judge scores."},"JudgeCriterionAverage":{"properties":{"name":{"type":"string","title":"Name"},"avg_score":{"type":"number","title":"Avg Score","description":"Average points for this criterion over the evaluations in `count`."},"max_score":{"type":"number","title":"Max Score","description":"Maximum points for this criterion, as recorded on the latest evaluation."},"count":{"type":"integer","title":"Count","description":"Number of evaluations included in the average."}},"type":"object","required":["name","avg_score","max_score","count"],"title":"JudgeCriterionAverage","description":"Average score for one rubric criterion."},"JudgeCriterionScore":{"properties":{"name":{"type":"string","title":"Name"},"score":{"type":"number","title":"Score","description":"Points awarded, from 0 to `max_score`."},"max_score":{"type":"number","title":"Max Score","description":"Maximum points for this criterion in the judge's rubric."},"reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning","description":"Judge's explanation for this score; null after the evaluated run is deleted."}},"type":"object","required":["name","score","max_score"],"title":"JudgeCriterionScore","description":"Score for one rubric criterion."},"JudgeResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project the judge belongs to."},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Environment whose runs the judge evaluates."},"name":{"type":"string","title":"Name"},"agent_name":{"type":"string","title":"Agent Name","description":"Agent whose runs the judge evaluates."},"model":{"type":"string","title":"Model","description":"Model that scores runs."},"system_prompt":{"type":"string","title":"System Prompt","description":"Extra instructions for the scoring model."},"include_agent_system_prompt":{"type":"boolean","title":"Include Agent System Prompt","description":"Whether the evaluated agent's system prompt is included in the scoring context."},"criteria":{"items":{"$ref":"#/components/schemas/JudgeCriterion"},"type":"array","title":"Criteria","description":"Scoring rubric."},"filter_expression":{"type":"string","title":"Filter Expression","description":"Expression a run must match to be evaluated automatically. Empty matches every run."},"trigger_mode":{"type":"string","title":"Trigger Mode","description":"`automatic` evaluates runs when they complete; `manual` evaluates only when triggered."},"sample_rate":{"type":"number","title":"Sample Rate","description":"Share of matching runs evaluated automatically, from 0 to 1."},"notification_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Notification Threshold","description":"Average score share (0 to 1) below which a `judge_score_low` notification is sent. null when disabled."},"notification_window":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Notification Window","description":"Number of most recent evaluations averaged for `notification_threshold`. null averages all.","default":10},"enabled":{"type":"boolean","title":"Enabled","description":"When false, runs are not evaluated automatically."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"avg_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Score","description":"Average overall score of completed evaluations. null before the first one."},"avg_max_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Max Score","description":"Average maximum possible score of completed evaluations. null before the first one."},"total_evaluated":{"type":"integer","title":"Total Evaluated","description":"Number of completed evaluations.","default":0}},"type":"object","required":["id","project_id","environment_id","name","agent_name","model","system_prompt","include_agent_system_prompt","criteria","filter_expression","trigger_mode","sample_rate","enabled","created_at","updated_at"],"title":"JudgeResponse","description":"An LLM judge that scores one agent's runs against a rubric, with evaluation totals."},"JudgeRunResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"judge_id":{"type":"string","format":"uuid","title":"Judge Id","description":"ID of the judge that ran this evaluation."},"agent_run_id":{"type":"string","format":"uuid","title":"Agent Run Id","description":"ID of the agent run this judge evaluated."},"judge_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Judge Name","description":"Current name of the judge."},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name","description":"Agent of the evaluated run."},"status":{"$ref":"#/components/schemas/JudgeRunStatus","description":"`queued` and `running` evaluations are in progress; `completed` ones have scores; `failed` ones have an `error`."},"scores":{"anyOf":[{"items":{"$ref":"#/components/schemas/JudgeCriterionScore"},"type":"array"},{"type":"null"}],"title":"Scores","description":"Per-criterion scores in rubric order; null until the evaluation completes."},"overall_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overall Score","description":"Sum of the criterion scores; null until the evaluation completes."},"overall_max_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overall Max Score","description":"Sum of the criteria's maximum points; null until the evaluation completes."},"reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning","description":"Judge's overall explanation; null until the evaluation completes and after the evaluated run is deleted."},"token_usage":{"$ref":"#/components/schemas/PublicRunTokenUsageResponse","description":"Tokens the judge's model calls used for this evaluation, with one `model_usages` entry per call."},"token_cost":{"anyOf":[{"$ref":"#/components/schemas/PublicTokenCostResponse"},{"type":"null"}],"description":"Cost of this evaluation's model calls; null when no model calls were recorded."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Failure message when `status` is `failed`."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At","description":"When the evaluation completed or failed; null while it is queued or running."}},"type":"object","required":["id","judge_id","agent_run_id","status","token_usage","created_at"],"title":"JudgeRunResponse","description":"One judge evaluation of an agent run."},"JudgeRunStatus":{"type":"string","enum":["queued","running","completed","failed"],"title":"JudgeRunStatus","description":"State of one judge evaluation: `queued`, `running`, then `completed` or `failed`."},"JudgeRunsResponse":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/JudgeRunResponse"},"type":"array","title":"Runs","description":"Evaluations on this page, newest first."},"total":{"type":"integer","title":"Total","description":"Number of evaluations matching the filters."},"limit":{"type":"integer","title":"Limit","description":"Page size used for this response."},"offset":{"type":"integer","title":"Offset","description":"Number of evaluations skipped."}},"type":"object","required":["runs","total","limit","offset"],"title":"JudgeRunsResponse","description":"Page of judge evaluations."},"JudgeStatsResponse":{"properties":{"avg_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Score","description":"Average overall score of completed evaluations; null when none have completed."},"avg_max_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Max Score","description":"Average overall maximum score of completed evaluations; null when none have completed."},"total_evaluated":{"type":"integer","title":"Total Evaluated","description":"Number of completed evaluations.","default":0},"total_failed":{"type":"integer","title":"Total Failed","description":"Number of failed evaluations.","default":0},"criteria_averages":{"items":{"$ref":"#/components/schemas/JudgeCriterionAverage"},"type":"array","title":"Criteria Averages","description":"Per-criterion averages over the 100 most recent completed evaluations, in rubric order.","default":[]},"total_tokens":{"type":"integer","title":"Total Tokens","description":"Input, output and thinking tokens across all of the judge's evaluations.","default":0},"total_input_tokens":{"type":"integer","title":"Total Input Tokens","description":"Input tokens across all evaluations, including cached ones.","default":0},"total_output_tokens":{"type":"integer","title":"Total Output Tokens","description":"Output tokens across all evaluations.","default":0},"total_thinking_tokens":{"type":"integer","title":"Total Thinking Tokens","description":"Reasoning tokens across all evaluations.","default":0},"total_cached_input_tokens":{"type":"integer","title":"Total Cached Input Tokens","description":"Input tokens served from the provider's cache; part of `total_input_tokens`.","default":0},"total_audio_input_tokens":{"type":"integer","title":"Total Audio Input Tokens","description":"Audio part of `total_input_tokens`.","default":0},"total_audio_output_tokens":{"type":"integer","title":"Total Audio Output Tokens","description":"Audio part of `total_output_tokens`.","default":0},"total_audio_cached_input_tokens":{"type":"integer","title":"Total Audio Cached Input Tokens","description":"Audio part of `total_cached_input_tokens`.","default":0},"total_audio_thinking_tokens":{"type":"integer","title":"Total Audio Thinking Tokens","description":"Audio part of `total_thinking_tokens`.","default":0},"total_audio_usage_missing":{"type":"boolean","title":"Total Audio Usage Missing","description":"True when at least one model call did not report its audio token split, so audio totals may be low.","default":false},"avg_tokens_per_eval":{"type":"number","title":"Avg Tokens Per Eval","description":"Average `total_tokens` per evaluation with recorded usage, rounded to one decimal; 0 when there is none.","default":0},"token_cost":{"anyOf":[{"$ref":"#/components/schemas/PublicTokenCostResponse"},{"type":"null"}],"description":"Cost of all of the judge's evaluations; null when no model calls were recorded."}},"type":"object","title":"JudgeStatsResponse","description":"Aggregate scores, token usage and cost for one judge."},"JudgeUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Display name, at most 200 characters."},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name","description":"Agent whose runs the judge evaluates."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Model that scores runs, for example a `connic/*` model. At most 512 characters."},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt","description":"Extra instructions for the scoring model. At most 8,000 characters."},"include_agent_system_prompt":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Agent System Prompt","description":"Include the evaluated agent's system prompt in the scoring context."},"criteria":{"anyOf":[{"items":{"$ref":"#/components/schemas/JudgeCriterion"},"type":"array"},{"type":"null"}],"title":"Criteria","description":"Scoring rubric with 1 to 20 criteria. The combined `max_score` is at most 10,000 and the combined name and description length at most 20,000 characters."},"filter_expression":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter Expression","description":"Expression over the run's `input`, `output` and `context` that must be true for automatic evaluation. Empty matches every run."},"trigger_mode":{"anyOf":[{"type":"string","enum":["automatic","manual"]},{"type":"null"}],"title":"Trigger Mode","description":"`automatic` evaluates runs when they complete; `manual` evaluates only when triggered."},"sample_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sample Rate","description":"Share of matching runs evaluated automatically, from 0 to 1."},"notification_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Notification Threshold","description":"Sends a `judge_score_low` notification when the average score, as a share of the maximum, drops below this value (0 to 1). null disables it."},"notification_window":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Notification Window","description":"Number of most recent evaluations averaged for `notification_threshold` (1 to 10,000). null averages all."},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled","description":"When false, runs are not evaluated automatically; on-demand triggers still work."}},"type":"object","title":"JudgeUpdate","description":"Partial update of a judge. Omitted fields are unchanged; a judge used by a running or paused A/B test cannot change."},"ManualTriggerRequest":{"properties":{"agent_run_id":{"type":"string","format":"uuid","title":"Agent Run Id","description":"ID of the agent run to evaluate; must be a run of the judge's agent in the judge's environment."}},"type":"object","required":["agent_run_id"],"title":"ManualTriggerRequest","description":"Agent run to evaluate."},"OAuthAppListResponse":{"properties":{"redirect_url":{"type":"string","title":"Redirect Url","description":"Callback URL to register as the redirect URI with the OAuth provider."},"apps":{"items":{"$ref":"#/components/schemas/OAuthAppResponse"},"type":"array","title":"Apps","description":"OAuth apps in the environment, sorted by name."}},"type":"object","required":["redirect_url","apps"],"title":"OAuthAppListResponse","description":"OAuth apps of an environment and the redirect URL to register with providers."},"OAuthAppResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"environment_id":{"type":"string","format":"uuid","title":"Environment Id","description":"Environment the app belongs to."},"name":{"type":"string","title":"Name","description":"Name agents reference in `mcp_servers[].oauth.app`. Unique per environment."},"authorization_url":{"type":"string","title":"Authorization Url","description":"Provider endpoint that end users are sent to for sign-in."},"token_url":{"type":"string","title":"Token Url","description":"Provider endpoint that exchanges authorization codes and refreshes tokens."},"client_id":{"type":"string","title":"Client Id","description":"OAuth client ID registered with the provider."},"has_client_secret":{"type":"boolean","title":"Has Client Secret","description":"Whether a client secret is stored. The secret is never returned."},"token_auth_method":{"type":"string","enum":["client_secret_post","client_secret_basic"],"title":"Token Auth Method","description":"How the client authenticates at the token endpoint: `client_secret_post` sends the credentials in the form body, `client_secret_basic` uses HTTP Basic auth."},"scopes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scopes","description":"Scope value sent with the authorization request, or null to send none."},"resource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource","description":"Resource indicator sent with authorization and token requests, or null."},"return_urls":{"items":{"type":"string"},"type":"array","title":"Return Urls","description":"URLs a connect link may return the browser to. A `return_url` matches an entry with the same scheme and host when its path is the entry's path or below it."},"bridge_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Bridge Id","description":"Bridge that token requests go through, or null for a public token endpoint."},"connected_users":{"type":"integer","title":"Connected Users","description":"Number of end users with stored tokens."},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","environment_id","name","authorization_url","token_url","client_id","has_client_secret","token_auth_method","scopes","resource","return_urls","bridge_id","connected_users","created_at","updated_at"],"title":"OAuthAppResponse","description":"OAuth client that lets end users sign in to an MCP server's provider."},"OAuthConnectLinkCreate":{"properties":{"user_id":{"type":"string","maxLength":255,"minLength":1,"title":"User Id","description":"Your ID for the end user, up to 255 characters. Use the value your middleware sets at the MCP server's `oauth.user` context path."},"return_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Url","description":"Where the browser returns after sign-in, with `connic_oauth` set to `connected`, `denied` or `failed`. Must match one of the app's `return_urls`; omit to show a connic confirmation page."}},"type":"object","required":["user_id"],"title":"OAuthConnectLinkCreate","description":"End user to create a sign-in link for."},"OAuthConnectLinkResponse":{"properties":{"url":{"type":"string","title":"Url","description":"Single-use sign-in URL to send the end user to."},"expires_at":{"type":"string","title":"Expires At","description":"When the link expires, 10 minutes after creation."}},"type":"object","required":["url","expires_at"],"title":"OAuthConnectLinkResponse","description":"Single-use sign-in link for an end user."},"OAuthUserListResponse":{"properties":{"users":{"items":{"$ref":"#/components/schemas/OAuthUserResponse"},"type":"array","title":"Users","description":"End users on this page, most recently connected first."},"total":{"type":"integer","title":"Total","description":"Number of end users matching the filter."}},"type":"object","required":["users","total"],"title":"OAuthUserListResponse"},"OAuthUserResponse":{"properties":{"user_id":{"type":"string","title":"User Id","description":"End-user ID your backend passed when creating the connect link."},"status":{"type":"string","enum":["connected","expired"],"title":"Status","description":"`expired` when the access token has expired and no refresh token is stored, otherwise `connected`."},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope","description":"Scope the provider granted, or null if it didn't report one."},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At","description":"When the stored access token expires, or null if the provider set no expiry."},"connected_at":{"type":"string","title":"Connected At","description":"When the end user last completed sign-in."},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At","description":"When an agent run last used the token, or null if never."}},"type":"object","required":["user_id","status","scope","expires_at","connected_at","last_used_at"],"title":"OAuthUserResponse","description":"End user's connection to an OAuth app."},"OAuthUserRevokeResponse":{"properties":{"user_id":{"type":"string","title":"User Id","description":"End-user ID from the request."},"disconnected":{"type":"boolean","title":"Disconnected","description":"True if stored tokens were deleted; false if the end user had none."}},"type":"object","required":["user_id","disconnected"],"title":"OAuthUserRevokeResponse","description":"Result of disconnecting an end user from an OAuth app."},"PersistentSession":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"session_id":{"type":"string","maxLength":512,"title":"Session Id","description":"`session-<agent name>-<key>`, where the key is the value resolved from the agent's `session.key`, or `default` when no key is set."},"app_name":{"type":"string","maxLength":255,"title":"App Name","description":"`runner-` followed by the agent name with hyphens replaced by underscores."},"user_id":{"type":"string","maxLength":255,"title":"User Id","description":"User identity of the session. Pass it with `app_name` to get or delete this exact session."},"state":{"additionalProperties":true,"type":"object","title":"State","description":"Session state saved by the agent's runs. Keys in the reserved `connic:` namespace are omitted."},"event_count":{"type":"integer","minimum":0.0,"title":"Event Count","description":"Total events recorded in the session."},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"Expiry time, extended each time a run uses the session; null when the agent sets no `session.ttl`."},"last_update_time":{"type":"string","format":"date-time","title":"Last Update Time","description":"Time a run last used or updated the session."},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","session_id","app_name","user_id","state","event_count","last_update_time","created_at"],"title":"PersistentSession","description":"Persistent agent session. Its events are returned by `GET /sessions/{environment_id}/{session_id}`."},"PersistentSessionDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"session_id":{"type":"string","maxLength":512,"title":"Session Id","description":"`session-<agent name>-<key>`, where the key is the value resolved from the agent's `session.key`, or `default` when no key is set."},"app_name":{"type":"string","maxLength":255,"title":"App Name","description":"`runner-` followed by the agent name with hyphens replaced by underscores."},"user_id":{"type":"string","maxLength":255,"title":"User Id","description":"User identity of the session. Pass it with `app_name` to get or delete this exact session."},"state":{"additionalProperties":true,"type":"object","title":"State","description":"Session state saved by the agent's runs. Keys in the reserved `connic:` namespace are omitted."},"event_count":{"type":"integer","minimum":0.0,"title":"Event Count","description":"Total events recorded in the session."},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"Expiry time, extended each time a run uses the session; null when the agent sets no `session.ttl`."},"last_update_time":{"type":"string","format":"date-time","title":"Last Update Time","description":"Time a run last used or updated the session."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"events":{"items":{"$ref":"#/components/schemas/PersistentSessionEvent"},"type":"array","maxItems":500,"title":"Events","description":"Most recent events in ascending `event_index` order, up to `event_limit`."}},"type":"object","required":["id","session_id","app_name","user_id","state","event_count","last_update_time","created_at","events"],"title":"PersistentSessionDetail"},"PersistentSessionEvent":{"properties":{"event_index":{"type":"integer","minimum":0.0,"title":"Event Index","description":"Position of the event in the session, starting at 0."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"event_data":{"additionalProperties":true,"type":"object","title":"Event Data","description":"Recorded run event, such as a message, model response, tool call, or tool result. Inline file data and provider-specific state are omitted."}},"type":"object","required":["event_index","created_at","event_data"],"title":"PersistentSessionEvent"},"PublicABTestAnalysisResponse":{"properties":{"recommendation":{"$ref":"#/components/schemas/ABTestRecommendation","description":"Current recommendation."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Explanation for the recommendation. Null when there is none."},"validity":{"$ref":"#/components/schemas/PublicABTestValidityResponse","description":"Check that runs were split between the arms as planned."},"primary_metric":{"$ref":"#/components/schemas/PublicABTestPrimaryMetricResponse","description":"Primary metric estimate for both arms."},"control_observed":{"type":"integer","title":"Control Observed","description":"Control assignments with a recorded outcome so far, up to `control_target`."},"variant_observed":{"type":"integer","title":"Variant Observed","description":"Variant assignments with a recorded outcome so far, up to `variant_target`."},"control_analyzed":{"type":"integer","title":"Control Analyzed","description":"Control outcomes used at the latest planned look. 0 before the first look."},"variant_analyzed":{"type":"integer","title":"Variant Analyzed","description":"Variant outcomes used at the latest planned look. 0 before the first look."},"control_target":{"type":"integer","title":"Control Target","description":"Planned number of control outcomes."},"variant_target":{"type":"integer","title":"Variant Target","description":"Planned number of variant outcomes."},"information_fraction":{"type":"number","title":"Information Fraction","description":"Share of the planned sample collected so far, from 0 to 1: the lower of the two arms' observed-to-target ratios."},"latest_look":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Look","description":"Number of the latest planned look that has run. Null before the first look."},"next_look_fraction":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Next Look Fraction","description":"Information fraction at which the next planned look runs. Null when all looks are done."},"missing_outcomes":{"type":"integer","title":"Missing Outcomes","description":"Assignments without a usable outcome yet, for example because the run is still active or has no judge score."},"judge_evaluation_errors":{"type":"integer","title":"Judge Evaluation Errors","description":"Assignments whose primary-metric judge evaluation failed. They are left out of the analysis."}},"type":"object","required":["recommendation","reason","validity","primary_metric","control_observed","variant_observed","control_analyzed","variant_analyzed","control_target","variant_target","information_fraction","latest_look","next_look_fraction","missing_outcomes","judge_evaluation_errors"],"title":"PublicABTestAnalysisResponse","description":"Sequential confidence analysis of the test's primary metric."},"PublicABTestArmStatsResponse":{"properties":{"count":{"type":"integer","title":"Count","description":"Completed runs in this arm."},"token_cost_statistics":{"additionalProperties":{"$ref":"#/components/schemas/PublicABTestCostStatisticsItemResponse"},"type":"object","title":"Token Cost Statistics","description":"Cost per run keyed by currency code, over finished runs whose calls could all be priced. Judge costs are excluded."},"token_cost_coverage":{"$ref":"#/components/schemas/PublicTokenCostCoverageResponse","description":"Whether every model call in this arm could be priced."},"avg_duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Duration","description":"Mean duration of completed runs in milliseconds. Null when there are none."},"avg_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Score","description":"Average judge score normalized to 0 to 1 (score divided by maximum score), using the latest evaluation per run and judge. Null when no completed run was scored."},"success_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Success Rate","description":"Percentage of finished runs that completed, from 0 to 100. Null when no run has finished."},"p50_duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P50 Duration","description":"Median duration of completed runs in milliseconds. Null when there are none."},"p95_duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P95 Duration","description":"95th percentile duration of completed runs in milliseconds. Null when there are none."},"judge_evaluated_count":{"type":"integer","title":"Judge Evaluated Count","description":"Completed runs with at least one judge score."},"judge_coverage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Judge Coverage","description":"Percentage of completed runs with a judge score, from 0 to 100. Null when there are no completed runs."}},"type":"object","required":["count","token_cost_statistics","token_cost_coverage","avg_duration","avg_score","success_rate","p50_duration","p95_duration","judge_evaluated_count","judge_coverage"],"title":"PublicABTestArmStatsResponse"},"PublicABTestComparisonResponse":{"properties":{"test":{"$ref":"#/components/schemas/ABTestResponse","description":"The A/B test."},"control":{"$ref":"#/components/schemas/PublicABTestArmStatsResponse","description":"Statistics for base agent runs assigned to the test."},"variant":{"$ref":"#/components/schemas/PublicABTestArmStatsResponse","description":"Statistics for variant runs assigned to the test."},"has_enough_data":{"type":"boolean","title":"Has Enough Data","description":"True when both arms have at least `min_sample_size` completed runs."},"min_sample_size":{"type":"integer","title":"Min Sample Size","description":"Minimum completed runs per arm set on the test."},"analysis":{"anyOf":[{"$ref":"#/components/schemas/PublicABTestAnalysisResponse"},{"type":"null"}],"description":"Confidence analysis. Null unless the test's analysis mode is `confidence`."},"cost_comparison":{"$ref":"#/components/schemas/PublicABTestCostComparisonResponse","description":"Average cost per run compared between the arms."},"selected_judge_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Selected Judge Id","description":"Judge whose scores fill `avg_score`: the primary-metric judge when the primary metric is `judge_score`, otherwise the quality judge. Present only when the caller can view judges."},"selected_judge_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selected Judge Name","description":"Name of the judge in `selected_judge_id`. Present only when the caller can view judges."},"quality_judge_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality Judge Name","description":"Name of the test's quality judge. Present only when the caller can view judges."}},"type":"object","required":["test","control","variant","has_enough_data","min_sample_size","analysis","cost_comparison"],"title":"PublicABTestComparisonResponse"},"PublicABTestCostComparisonItemResponse":{"properties":{"winner":{"type":"string","enum":["control","variant","tie"],"title":"Winner","description":"Arm with the lower average cost per run, or `tie`."},"control_average":{"type":"string","title":"Control Average","description":"Average cost per run in the control arm, as a decimal string."},"variant_average":{"type":"string","title":"Variant Average","description":"Average cost per run in the variant arm, as a decimal string."}},"type":"object","required":["winner","control_average","variant_average"],"title":"PublicABTestCostComparisonItemResponse"},"PublicABTestCostComparisonResponse":{"properties":{"by_currency":{"additionalProperties":{"$ref":"#/components/schemas/PublicABTestCostComparisonItemResponse"},"type":"object","title":"By Currency","description":"Comparison for each currency code present in both arms. Empty when either arm has model calls that could not be priced."},"overall_winner":{"anyOf":[{"type":"string","enum":["control","variant","tie"]},{"type":"null"}],"title":"Overall Winner","description":"Winner when both arms were priced in one and the same currency. Null otherwise."}},"type":"object","required":["by_currency","overall_winner"],"title":"PublicABTestCostComparisonResponse"},"PublicABTestCostStatisticsItemResponse":{"properties":{"average":{"type":"string","title":"Average","description":"Mean cost per run, as a decimal string."},"p50":{"type":"string","title":"P50","description":"Median cost per run, as a decimal string."},"p95":{"type":"string","title":"P95","description":"95th percentile cost per run, as a decimal string."},"run_count":{"type":"integer","title":"Run Count","description":"Runs included in the statistics."},"approximate":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Approximate","description":"True when some amounts were converted from another currency. Present only when `convert_costs_to` is set."}},"type":"object","required":["average","p50","p95","run_count"],"title":"PublicABTestCostStatisticsItemResponse"},"PublicABTestPrimaryMetricResponse":{"properties":{"metric":{"type":"string","enum":["success_rate","judge_score"],"title":"Metric","description":"`success_rate`: share of runs that completed. `judge_score`: judge score normalized to 0 to 1, with runs that did not complete scored 0."},"control_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Control Value","description":"Metric value for the control arm. Null until both arms have data."},"variant_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Variant Value","description":"Metric value for the variant arm. Null until both arms have data."},"effect_size":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Effect Size","description":"Absolute difference, variant minus control."},"relative_effect":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Relative Effect","description":"Difference relative to the control value, where 0.1 means 10% higher. Null when the control value is 0."},"ci_lower":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ci Lower","description":"Lower bound of the confidence interval for `effect_size`. Null until the first planned look."},"ci_upper":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ci Upper","description":"Upper bound of the confidence interval for `effect_size`. Null until the first planned look."},"confidence_level":{"type":"number","title":"Confidence Level","description":"Confidence level of the interval, 1 minus the test's alpha (for example 0.95)."},"interval_type":{"type":"string","enum":["descriptive","sequential_adjusted"],"title":"Interval Type","description":"`sequential_adjusted`: values come from the latest planned look, with the interval widened to stay valid across repeated looks. `descriptive`: point estimates from the data so far, without an interval."}},"type":"object","required":["metric","control_value","variant_value","effect_size","relative_effect","ci_lower","ci_upper","confidence_level","interval_type"],"title":"PublicABTestPrimaryMetricResponse","description":"Primary metric estimate for both arms and the difference between them."},"PublicABTestValidityResponse":{"properties":{"status":{"type":"string","enum":["invalid","valid","pending"],"title":"Status","description":"`valid` when the latest planned look passed the check, `invalid` when the split differs from the planned allocation more than chance allows and the comparison cannot be trusted, `pending` before the first look."},"srm_p_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Srm P Value","description":"P-value of a chi-square test comparing the observed split with `expected_variant_allocation` at the latest look. Values below `threshold` flag a mismatch; null before the first look."},"threshold":{"type":"number","title":"Threshold","description":"P-value below which a sample ratio mismatch is reported."},"control_assignments":{"type":"integer","title":"Control Assignments","description":"Control assignments counted in the check, or assigned so far before the first look."},"variant_assignments":{"type":"integer","title":"Variant Assignments","description":"Variant assignments counted in the check, or assigned so far before the first look."},"expected_variant_allocation":{"type":"number","title":"Expected Variant Allocation","description":"Planned share of assignments sent to the variant, from 0 to 1."}},"type":"object","required":["status","srm_p_value","threshold","control_assignments","variant_assignments","expected_variant_allocation"],"title":"PublicABTestValidityResponse","description":"Sample ratio mismatch check: whether runs were split between the arms as planned."},"PublicABTestVariantsResponse":{"properties":{"variants":{"items":{"type":"string"},"type":"array","title":"Variants","description":"Variants in the environment's active deployment, from agent names of the form `<agent>-test-<variant>`."}},"type":"object","required":["variants"],"title":"PublicABTestVariantsResponse"},"PublicAgentConfigResponse":{"properties":{"type":{"type":"string","title":"Type","description":"`llm`, `sequential` (runs other agents in order) or `tool` (runs one tool directly)."},"source_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Path","description":"Path of the agent's YAML file in your code."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description from the agent definition."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Model the agent uses. Null for sequential and tool agents."},"fallback_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fallback Model","description":"Model used after a failed request to the primary model. Null when not set."},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature","description":"Sampling temperature, from 0 to 2."},"max_concurrent_runs":{"type":"integer","title":"Max Concurrent Runs","description":"Maximum runs of this agent that execute at the same time. Defaults to 1."},"max_iterations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Iterations","description":"Maximum model calls per run."},"timeout":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Timeout","description":"Maximum run time in seconds, capped by the plan's limit. Null when not set."},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Effort","description":"Reasoning effort: `auto`, `off`, `minimal`, `low`, `medium`, `high` or `xhigh`. Null when not set."},"reasoning_budget":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reasoning Budget","description":"Deprecated reasoning token budget for legacy models. Null when not set."},"output_schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Schema","description":"Name of the JSON schema file in `schemas/` (without `.json`) that structures the agent's output. Null when the agent has none."},"agents":{"anyOf":[{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array"},{"type":"null"}],"title":"Agents","description":"Agents a sequential agent runs, in order. Empty for other types."},"tool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Name","description":"Tool a tool agent executes, as a module path under `tools/`. Null for other types."},"retry_options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Retry Options","description":"Retry settings passed through from the agent definition: `attempts`, `initial_delay`, `max_delay` and `rerun_middleware`."},"session":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session","description":"Persistent session settings passed through from the agent definition. Null when sessions are off."},"concurrency":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"integer"},{"type":"null"}],"title":"Concurrency","description":"Key-based concurrency settings (`key`, `on_conflict`) passed through from the agent definition. Null when not set."},"tools":{"anyOf":[{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array"},{"type":"null"}],"title":"Tools","description":"Tools the agent can call, as listed in the agent definition."},"discoverable_tools":{"anyOf":[{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array"},{"type":"null"}],"title":"Discoverable Tools","description":"Tools the agent finds on demand through tool search instead of loading them upfront."},"mcp_servers":{"anyOf":[{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array"},{"type":"null"}],"title":"Mcp Servers","description":"MCP servers the agent connects to, passed through from the agent definition (`name`, `url`, `discoverable`, `bridge`, `oauth_app`)."},"guardrails":{"anyOf":[{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Guardrails","description":"Input and output guardrail rules with their `type` and `mode`. Null when none are configured."},"database":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Database","description":"Database access settings (`collections`, `prevent_delete`, `prevent_write`). Null means unrestricted access."},"retrieval":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Retrieval","description":"Retrieval access settings (`namespaces`, `prevent_delete`, `prevent_write`). Null means unrestricted access."}},"type":"object","required":["type","source_path","description","model","fallback_model","temperature","max_concurrent_runs","max_iterations","timeout","reasoning_effort","reasoning_budget","output_schema","agents","tool_name","retry_options","session","concurrency","tools","discoverable_tools","mcp_servers","guardrails","database","retrieval"],"title":"PublicAgentConfigResponse","description":"Agent configuration from the active deployment. Fields mirror the agent's YAML definition."},"PublicAgentConnectorResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type","description":"Connector type, such as `http` or `cron`."},"mode":{"type":"string","title":"Mode","description":"`inbound`, `outbound` or `sync`."},"enabled":{"type":"boolean","title":"Enabled","description":"False when the connector is paused."},"link_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Link Id","description":"ID of the link between this agent and the connector."},"link_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Link Config","description":"Settings of that link, as returned by `GET /connectors/{connector_id}/links`."}},"type":"object","required":["id","name","type","mode","enabled"],"title":"PublicAgentConnectorResponse"},"PublicAgentDetailsResponse":{"properties":{"agent":{"$ref":"#/components/schemas/PublicAgentIdentityResponse","description":"Agent identity and deployed configuration."},"stats":{"$ref":"#/components/schemas/PublicAgentStatsResponse","description":"Run, duration, token and cost statistics for runs matching the filters."},"connectors":{"items":{"$ref":"#/components/schemas/PublicAgentConnectorResponse"},"type":"array","title":"Connectors","description":"Connectors linked to the agent in this environment."},"judges":{"items":{"$ref":"#/components/schemas/PublicAgentJudgeResponse"},"type":"array","title":"Judges","description":"Judges for the agent in this environment, with average scores over the matching runs."}},"type":"object","required":["agent","stats","connectors","judges"],"title":"PublicAgentDetailsResponse"},"PublicAgentIdentityResponse":{"properties":{"name":{"type":"string","title":"Name"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project the agent belongs to."},"is_active":{"type":"boolean","title":"Is Active","description":"Whether the agent is part of the environment's active deployment."},"config":{"anyOf":[{"$ref":"#/components/schemas/PublicAgentConfigResponse"},{"type":"null"}],"description":"Configuration from the active deployment. Null when the agent is not currently deployed."}},"type":"object","required":["name","project_id","is_active","config"],"title":"PublicAgentIdentityResponse"},"PublicAgentJudgeResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"enabled":{"type":"boolean","title":"Enabled","description":"False when the judge is paused."},"trigger_mode":{"type":"string","title":"Trigger Mode","description":"`automatic` evaluates runs as they complete; `manual` evaluates only when triggered."},"avg_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Score","description":"Average overall score of completed evaluations for the matching runs. Null when none."},"avg_max_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Max Score","description":"Average maximum possible score of those evaluations. Null when none."}},"type":"object","required":["id","name","enabled","trigger_mode","avg_score","avg_max_score"],"title":"PublicAgentJudgeResponse"},"PublicAgentListItemResponse":{"properties":{"name":{"type":"string","title":"Name"},"is_active":{"type":"boolean","title":"Is Active","description":"Whether the agent is part of the environment's active deployment."},"voice_enabled":{"type":"boolean","title":"Voice Enabled","description":"Whether the agent has a voice configuration."},"type":{"type":"string","title":"Type","description":"`llm`, `sequential` (runs other agents in order) or `tool` (runs one tool directly)."},"total_runs":{"type":"integer","title":"Total Runs","description":"All runs of the agent in this environment."},"active_runs":{"type":"integer","title":"Active Runs","description":"Runs currently executing."},"queued_runs":{"type":"integer","title":"Queued Runs","description":"Runs waiting in the queue."},"last_running":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Running","description":"Start time of the agent's most recent run. Null when no run has started."},"status":{"type":"string","enum":["running","idle"],"title":"Status","description":"`running` while at least one run is executing, otherwise `idle`."},"source_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Path","description":"Path of the agent's YAML file in your code. Null for agents only known from past runs."},"has_inbound_connector":{"type":"boolean","title":"Has Inbound Connector","description":"Whether an inbound or sync connector is linked to the agent, including paused connectors."},"test_variants":{"items":{"type":"string"},"type":"array","title":"Test Variants","description":"A/B test variants deployed for this agent, from agent names of the form `<agent>-test-<variant>`."}},"type":"object","required":["name","is_active","voice_enabled","type","total_runs","active_runs","queued_runs","last_running","status","source_path","has_inbound_connector","test_variants"],"title":"PublicAgentListItemResponse"},"PublicAgentRankingItemResponse":{"properties":{"token_cost":{"anyOf":[{"$ref":"#/components/schemas/PublicTokenCostResponse"},{"type":"null"}],"description":"Total cost, including judge evaluations. Null when there were no model calls."},"agent_token_cost":{"anyOf":[{"$ref":"#/components/schemas/PublicTokenCostResponse"},{"type":"null"}],"description":"Cost of the agent's own model calls, without judges. Null when there were none."},"run_count":{"type":"integer","title":"Run Count","description":"Runs started in the period for this group."},"agent_token_usage":{"$ref":"#/components/schemas/PublicTokenUsageResponse","description":"Tokens used by the agent's own model calls."},"judge_token_usage":{"$ref":"#/components/schemas/PublicTokenUsageResponse","description":"Tokens used by judge evaluations."},"total_token_usage":{"$ref":"#/components/schemas/PublicTokenUsageResponse","description":"Agent and judge tokens combined."},"agent_token_usage_by_currency":{"additionalProperties":{"$ref":"#/components/schemas/PublicTokenUsageResponse"},"type":"object","title":"Agent Token Usage By Currency","description":"Agent tokens from priced calls, keyed by the currency they were priced in."},"judge_token_usage_by_currency":{"additionalProperties":{"$ref":"#/components/schemas/PublicTokenUsageResponse"},"type":"object","title":"Judge Token Usage By Currency","description":"Judge tokens from priced calls, keyed by the currency they were priced in."},"total_token_usage_by_currency":{"additionalProperties":{"$ref":"#/components/schemas/PublicTokenUsageResponse"},"type":"object","title":"Total Token Usage By Currency","description":"Agent and judge tokens from priced calls, keyed by the currency they were priced in."},"agent_name":{"type":"string","title":"Agent Name","description":"Agent the row belongs to (`group_by=agent`)."}},"type":"object","required":["token_cost","agent_token_cost","run_count","agent_token_usage","judge_token_usage","total_token_usage","agent_token_usage_by_currency","judge_token_usage_by_currency","total_token_usage_by_currency","agent_name"],"title":"PublicAgentRankingItemResponse"},"PublicAgentRankingResponse":{"properties":{"month":{"type":"string","title":"Month","description":"Month in `YYYY-MM` format."},"currencies":{"items":{"type":"string"},"type":"array","title":"Currencies","description":"Currency codes with a nonzero cost in the results."},"agents":{"items":{"anyOf":[{"$ref":"#/components/schemas/PublicAgentRankingItemResponse"},{"$ref":"#/components/schemas/PublicModelRankingItemResponse"},{"$ref":"#/components/schemas/PublicContextRankingItemResponse"}]},"type":"array","title":"Agents","description":"One row per agent, model or context value, depending on `group_by`, sorted by name."}},"type":"object","required":["month","currencies","agents"],"title":"PublicAgentRankingResponse"},"PublicAgentStatsResponse":{"properties":{"total_runs":{"type":"integer","title":"Total Runs","description":"Runs matching the filters."},"active_runs":{"type":"integer","title":"Active Runs","description":"Matching runs currently executing."},"queued_runs":{"type":"integer","title":"Queued Runs","description":"Matching runs waiting in the queue."},"failed_runs":{"type":"integer","title":"Failed Runs","description":"Matching runs that failed."},"total_duration_sec":{"type":"number","title":"Total Duration Sec","description":"Sum of run durations in seconds, from start to end."},"avg_duration_sec":{"type":"number","title":"Avg Duration Sec","description":"Mean run duration in seconds. 0 when no run has finished."},"p50_duration_sec":{"type":"number","title":"P50 Duration Sec","description":"Median run duration in seconds. 0 when no run has finished."},"p95_duration_sec":{"type":"number","title":"P95 Duration Sec","description":"95th percentile run duration in seconds. 0 when no run has finished."},"token_usage":{"$ref":"#/components/schemas/PublicTokenUsageResponse","description":"Tokens used by the runs and their judge evaluations."},"agent_token_usage":{"$ref":"#/components/schemas/PublicTokenUsageResponse","description":"Tokens used by the agent's own model calls."},"judge_token_usage":{"$ref":"#/components/schemas/PublicTokenUsageResponse","description":"Tokens used by judge evaluations of the runs."},"runs_with_tokens":{"type":"integer","title":"Runs With Tokens","description":"Runs with at least one recorded model call."},"token_cost":{"anyOf":[{"$ref":"#/components/schemas/PublicTokenCostResponse"},{"type":"null"}],"description":"Cost of the runs and their judge evaluations. Null when there were no model calls."},"token_cost_statistics":{"additionalProperties":{"$ref":"#/components/schemas/PublicTokenCostStatisticsItemResponse"},"type":"object","title":"Token Cost Statistics","description":"Cost per run keyed by currency code, including judge costs, over runs whose calls could all be priced."},"avg_tokens_per_run":{"type":"number","title":"Avg Tokens Per Run","description":"Mean agent tokens per run, over runs with recorded model calls."},"p50_tokens_per_run":{"type":"number","title":"P50 Tokens Per Run","description":"Median agent tokens per run, over runs with recorded model calls."},"p95_tokens_per_run":{"type":"number","title":"P95 Tokens Per Run","description":"95th percentile agent tokens per run, over runs with recorded model calls."}},"type":"object","required":["total_runs","active_runs","queued_runs","failed_runs","total_duration_sec","avg_duration_sec","p50_duration_sec","p95_duration_sec","token_usage","agent_token_usage","judge_token_usage","runs_with_tokens","token_cost","token_cost_statistics","avg_tokens_per_run","p50_tokens_per_run","p95_tokens_per_run"],"title":"PublicAgentStatsResponse"},"PublicAggregateStatsResponse":{"properties":{"total_runs":{"type":"integer","title":"Total Runs","description":"Runs queued in the date range."},"total_success":{"type":"integer","title":"Total Success","description":"Runs that completed."},"total_failed":{"type":"integer","title":"Total Failed","description":"Runs that failed."},"total_cancelled":{"type":"integer","title":"Total Cancelled","description":"Runs that were cancelled."},"total_tool_calls":{"type":"integer","title":"Total Tool Calls","description":"Tool calls made by those runs."}},"type":"object","required":["total_runs","total_success","total_failed","total_cancelled","total_tool_calls"],"title":"PublicAggregateStatsResponse"},"PublicApprovalListResponse":{"properties":{"approvals":{"items":{"$ref":"#/components/schemas/ApprovalResponse"},"type":"array","title":"Approvals","description":"Approval requests on this page, pending ones first."},"total":{"type":"integer","title":"Total","description":"Approval requests matching the filters across all pages."}},"type":"object","required":["approvals","total"],"title":"PublicApprovalListResponse"},"PublicApprovalRoutingResponse":{"properties":{"configs":{"items":{"$ref":"#/components/schemas/ApprovalNotificationConfigResponse"},"type":"array","title":"Configs","description":"Member notification settings for approval requests in the environment."},"channel_routes":{"items":{"$ref":"#/components/schemas/ApprovalChannelRouteResponse"},"type":"array","title":"Channel Routes","description":"Channel routes that deliver approval requests in the environment."}},"type":"object","required":["configs","channel_routes"],"title":"PublicApprovalRoutingResponse"},"PublicAuditActionsResponse":{"properties":{"actions":{"items":{"type":"string"},"type":"array","title":"Actions","description":"Distinct action keys recorded for the project, sorted alphabetically."}},"type":"object","required":["actions"],"title":"PublicAuditActionsResponse"},"PublicAuditLogItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project the event belongs to."},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User who performed the action. Null for system events."},"user_email":{"type":"string","title":"User Email","description":"Email of the user, or `System` for system events."},"user_picture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Picture","description":"Avatar URL of the user. Null when unavailable."},"action":{"type":"string","title":"Action","description":"Action key, such as `deployment.create` or `run.cancel`."},"resource_type":{"type":"string","title":"Resource Type","description":"Type of the affected resource, such as `deployment` or `run`."},"resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Id","description":"ID of the affected resource. Null when the action has no single target."},"changes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changes","description":"JSON string with the captured `before` and `after` state, with sensitive values masked. Null when nothing was captured."},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address","description":"IP address the request came from. Null for system events."},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent","description":"User agent of the request. Null for system events."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","project_id","user_id","user_email","user_picture","action","resource_type","resource_id","changes","ip_address","user_agent","created_at"],"title":"PublicAuditLogItemResponse"},"PublicAuditLogsResponse":{"properties":{"logs":{"items":{"$ref":"#/components/schemas/PublicAuditLogItemResponse"},"type":"array","title":"Logs","description":"Audit events on this page, newest first."},"total":{"type":"integer","title":"Total","description":"Events matching the filters across all pages."},"limit":{"type":"integer","title":"Limit","description":"Page size used."},"offset":{"type":"integer","title":"Offset","description":"Number of events skipped."}},"type":"object","required":["logs","total","limit","offset"],"title":"PublicAuditLogsResponse"},"PublicAuditRetentionResponse":{"properties":{"retention_days":{"type":"integer","title":"Retention Days","description":"Days audit events are kept. -1 means they are kept indefinitely."},"billing_tier":{"type":"string","title":"Billing Tier","description":"Billing tier of the project, such as `free`, `developer`, `pro` or `enterprise`."}},"type":"object","required":["retention_days","billing_tier"],"title":"PublicAuditRetentionResponse"},"PublicAuditUserResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email","description":"Email address of the user."},"picture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Picture","description":"Avatar URL. Null when unavailable."}},"type":"object","required":["id","email","picture"],"title":"PublicAuditUserResponse"},"PublicAuditUsersResponse":{"properties":{"users":{"items":{"$ref":"#/components/schemas/PublicAuditUserResponse"},"type":"array","title":"Users","description":"Users who appear as actors in the project's audit log."}},"type":"object","required":["users"],"title":"PublicAuditUsersResponse"},"PublicBulkCancelResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"Whether the operation succeeded."},"cancelled_count":{"type":"integer","title":"Cancelled Count","description":"Number of runs cancelled."}},"type":"object","required":["ok","cancelled_count"],"title":"PublicBulkCancelResponse"},"PublicBulkRerunResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"Whether the operation succeeded."},"rerun_count":{"type":"integer","title":"Rerun Count","description":"Number of runs triggered again."},"new_run_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"New Run Ids","description":"IDs of the new runs."}},"type":"object","required":["ok","rerun_count","new_run_ids"],"title":"PublicBulkRerunResponse"},"PublicChannelConfigFieldResponse":{"properties":{"key":{"type":"string","title":"Key","description":"Key of this field in the channel's `config` object."},"label":{"type":"string","title":"Label","description":"Human-readable field name."},"type":{"type":"string","title":"Type","description":"Value kind: `text`, `url`, `password`, `select` or `bridge` (ID of a connic bridge)."},"required":{"type":"boolean","title":"Required","description":"Whether `config` must include this field."},"placeholder":{"type":"string","title":"Placeholder","description":"Example value."},"secret":{"type":"boolean","title":"Secret","description":"Whether the value is secret. Secret values are masked in responses."},"help":{"type":"string","title":"Help","description":"Guidance for the field."},"options":{"items":{"type":"string"},"type":"array","title":"Options","description":"Allowed values for `select` fields. Empty for other types."}},"type":"object","required":["key","label","type","required","placeholder","secret","help","options"],"title":"PublicChannelConfigFieldResponse"},"PublicChannelTestResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"Whether the operation succeeded."},"status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status","description":"HTTP status returned by the destination. Null when the channel type does not report one."}},"type":"object","required":["ok","status"],"title":"PublicChannelTestResponse"},"PublicChannelTypeResponse":{"properties":{"type":{"type":"string","title":"Type","description":"Type key to pass when creating a channel, such as `webhook`, `datadog` or `otlp`."},"label":{"type":"string","title":"Label","description":"Human-readable name of the channel type."},"description":{"type":"string","title":"Description","description":"What the channel type delivers to."},"available":{"type":"boolean","title":"Available","description":"Whether channels of this type can be created. Unavailable types are listed for reference."},"config_fields":{"items":{"$ref":"#/components/schemas/PublicChannelConfigFieldResponse"},"type":"array","title":"Config Fields","description":"Fields accepted in the channel's `config` object."}},"type":"object","required":["type","label","description","available","config_fields"],"title":"PublicChannelTypeResponse"},"PublicChannelTypesResponse":{"properties":{"types":{"items":{"$ref":"#/components/schemas/PublicChannelTypeResponse"},"type":"array","title":"Types","description":"Supported channel types."},"plan_enabled":{"type":"boolean","title":"Plan Enabled","description":"Whether the project's plan includes channels."}},"type":"object","required":["types","plan_enabled"],"title":"PublicChannelTypesResponse"},"PublicConnectorLogResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"level":{"type":"string","title":"Level","description":"`debug`, `info`, `warning` or `error`."},"message":{"type":"string","title":"Message","description":"Log text."},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"type":"array"},{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}],"title":"Details","description":"Structured details attached to the entry, as any JSON value. Null when there are none."},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","level","message","details","created_at"],"title":"PublicConnectorLogResponse"},"PublicConnectorStatsResponse":{"properties":{"total_runs":{"type":"integer","title":"Total Runs","description":"Connector runs started in the time range. A connector run is one received event or outbound delivery."},"completed_runs":{"type":"integer","title":"Completed Runs","description":"Connector runs that completed."},"failed_runs":{"type":"integer","title":"Failed Runs","description":"Connector runs that failed."},"total_agents_triggered":{"type":"integer","title":"Total Agents Triggered","description":"Agent runs started by these connector runs."},"avg_duration_ms":{"type":"number","title":"Avg Duration Ms","description":"Mean connector run duration in milliseconds. 0 when there were no runs."},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At","description":"Start time of the most recent connector run in the range. Null when there were none."},"last_run_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Run Status","description":"`started`, `completed` or `failed` for the most recent connector run. Null when there were none."}},"type":"object","required":["total_runs","completed_runs","failed_runs","total_agents_triggered","avg_duration_ms","last_run_at","last_run_status"],"title":"PublicConnectorStatsResponse"},"PublicContextRankingItemResponse":{"properties":{"token_cost":{"anyOf":[{"$ref":"#/components/schemas/PublicTokenCostResponse"},{"type":"null"}],"description":"Total cost, including judge evaluations. Null when there were no model calls."},"agent_token_cost":{"anyOf":[{"$ref":"#/components/schemas/PublicTokenCostResponse"},{"type":"null"}],"description":"Cost of the agent's own model calls, without judges. Null when there were none."},"run_count":{"type":"integer","title":"Run Count","description":"Runs started in the period for this group."},"agent_token_usage":{"$ref":"#/components/schemas/PublicTokenUsageResponse","description":"Tokens used by the agent's own model calls."},"judge_token_usage":{"$ref":"#/components/schemas/PublicTokenUsageResponse","description":"Tokens used by judge evaluations."},"total_token_usage":{"$ref":"#/components/schemas/PublicTokenUsageResponse","description":"Agent and judge tokens combined."},"agent_token_usage_by_currency":{"additionalProperties":{"$ref":"#/components/schemas/PublicTokenUsageResponse"},"type":"object","title":"Agent Token Usage By Currency","description":"Agent tokens from priced calls, keyed by the currency they were priced in."},"judge_token_usage_by_currency":{"additionalProperties":{"$ref":"#/components/schemas/PublicTokenUsageResponse"},"type":"object","title":"Judge Token Usage By Currency","description":"Judge tokens from priced calls, keyed by the currency they were priced in."},"total_token_usage_by_currency":{"additionalProperties":{"$ref":"#/components/schemas/PublicTokenUsageResponse"},"type":"object","title":"Total Token Usage By Currency","description":"Agent and judge tokens from priced calls, keyed by the currency they were priced in."},"context_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context Value","description":"Run context value at the `group_by` path. Null for runs that do not set it."}},"type":"object","required":["token_cost","agent_token_cost","run_count","agent_token_usage","judge_token_usage","total_token_usage","agent_token_usage_by_currency","judge_token_usage_by_currency","total_token_usage_by_currency","context_value"],"title":"PublicContextRankingItemResponse"},"PublicCostTrendResponse":{"properties":{"amount":{"type":"string","title":"Amount","description":"Change versus the previous calendar month, as a decimal string. Negative when spend fell."},"percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Percent","description":"Change in percent, rounded to one decimal. Null when the previous month had no spend."}},"type":"object","required":["amount","percent"],"title":"PublicCostTrendResponse"},"PublicDailyCostAgentResponse":{"properties":{"token_cost":{"anyOf":[{"$ref":"#/components/schemas/PublicTokenCostResponse"},{"type":"null"}],"description":"Cost for this group, including judge evaluations. Null when there were no model calls."},"tokens":{"type":"integer","title":"Tokens","description":"Total tokens for this group, including judge evaluations."},"agent_name":{"type":"string","title":"Agent Name","description":"Agent the costs belong to (`group_by=agent`)."}},"type":"object","required":["token_cost","tokens","agent_name"],"title":"PublicDailyCostAgentResponse"},"PublicDailyCostContextResponse":{"properties":{"token_cost":{"anyOf":[{"$ref":"#/components/schemas/PublicTokenCostResponse"},{"type":"null"}],"description":"Cost for this group, including judge evaluations. Null when there were no model calls."},"tokens":{"type":"integer","title":"Tokens","description":"Total tokens for this group, including judge evaluations."},"context_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context Value","description":"Run context value at the `group_by` path. Null for runs that do not set it."}},"type":"object","required":["token_cost","tokens","context_value"],"title":"PublicDailyCostContextResponse"},"PublicDailyCostDayResponse":{"properties":{"date":{"type":"string","format":"date","title":"Date","description":"Calendar day in the timezone given by `tz_offset`, UTC by default."},"agents":{"items":{"anyOf":[{"$ref":"#/components/schemas/PublicDailyCostAgentResponse"},{"$ref":"#/components/schemas/PublicDailyCostModelResponse"},{"$ref":"#/components/schemas/PublicDailyCostContextResponse"}]},"type":"array","title":"Agents","description":"Spend per group on this day, highest token count first. Items match `group_by`."},"token_cost":{"anyOf":[{"$ref":"#/components/schemas/PublicTokenCostResponse"},{"type":"null"}],"description":"Total cost for the day. Null when there were no model calls."}},"type":"object","required":["date","agents","token_cost"],"title":"PublicDailyCostDayResponse"},"PublicDailyCostModelResponse":{"properties":{"token_cost":{"anyOf":[{"$ref":"#/components/schemas/PublicTokenCostResponse"},{"type":"null"}],"description":"Cost for this group, including judge evaluations. Null when there were no model calls."},"tokens":{"type":"integer","title":"Tokens","description":"Total tokens for this group, including judge evaluations."},"model_name":{"type":"string","title":"Model Name","description":"Model the costs belong to (`group_by=model`)."}},"type":"object","required":["token_cost","tokens","model_name"],"title":"PublicDailyCostModelResponse"},"PublicDailyCostResponse":{"properties":{"month":{"type":"string","title":"Month","description":"Month in `YYYY-MM` format."},"days":{"items":{"$ref":"#/components/schemas/PublicDailyCostDayResponse"},"type":"array","title":"Days","description":"One item per calendar day of the month."},"currencies":{"items":{"type":"string"},"type":"array","title":"Currencies","description":"Currency codes with a nonzero cost this month or last month."},"current_token_cost":{"anyOf":[{"$ref":"#/components/schemas/PublicTokenCostResponse"},{"type":"null"}],"description":"Total cost for the month, or for `start_date` to `end_date` when given. Null when there were no model calls."},"current_total_tokens":{"type":"integer","title":"Current Total Tokens","description":"Total tokens for the same period."},"projected_amounts":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Projected Amounts","description":"Estimated end-of-month cost keyed by currency code, extrapolated from the average daily spend so far. Null unless the month is in progress and every call could be priced."},"last_month_token_cost":{"anyOf":[{"$ref":"#/components/schemas/PublicTokenCostResponse"},{"type":"null"}],"description":"Total cost for the previous calendar month. Null when there were no model calls."},"last_month_total_tokens":{"type":"integer","title":"Last Month Total Tokens","description":"Total tokens for the previous calendar month."},"last_month_agents":{"items":{"anyOf":[{"$ref":"#/components/schemas/PublicDailyCostAgentResponse"},{"$ref":"#/components/schemas/PublicDailyCostModelResponse"},{"$ref":"#/components/schemas/PublicDailyCostContextResponse"}]},"type":"array","title":"Last Month Agents","description":"Previous month's spend per group, sorted by name."},"trends":{"additionalProperties":{"$ref":"#/components/schemas/PublicCostTrendResponse"},"type":"object","title":"Trends","description":"Change versus the previous month, keyed by currency code."},"agents":{"items":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"array","title":"Agents","description":"Groups with usage or spend in the period, sorted by name. Null stands for runs without the context value."}},"type":"object","required":["month","days","currencies","current_token_cost","current_total_tokens","projected_amounts","last_month_token_cost","last_month_total_tokens","last_month_agents","trends","agents"],"title":"PublicDailyCostResponse"},"PublicDeploymentCancelResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"Whether the operation succeeded."},"message":{"type":"string","enum":["Cancellation requested","Deployment is not building","Deployment is no longer building"],"title":"Message","description":"`Cancellation requested` when the build is being stopped. `Deployment is not building` or `Deployment is no longer building` when there was no build to cancel; `ok` is false."}},"type":"object","required":["ok","message"],"title":"PublicDeploymentCancelResponse"},"PublicEnvironmentResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project the environment belongs to."},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug","description":"URL-safe identifier derived from `name`, unique within the project."},"git_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Git Branch","description":"Git branch this environment deploys from. Null when deployments come from CLI uploads."},"is_active":{"type":"boolean","title":"Is Active","description":"Whether the environment is active. Git pushes and pull request tests only target active environments."},"is_default":{"type":"boolean","title":"Is Default","description":"Whether this is the project's default environment. A project has exactly one."},"env_type":{"type":"string","title":"Env Type","description":"`standard` for regular environments, `test` for dev environments created by `connic dev`."},"is_ephemeral":{"type":"boolean","title":"Is Ephemeral","description":"True for dev environments that are deleted when their `connic dev` session ends."},"test_environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Test Environment Id","description":"Environment the test suite runs in for deploy gate and pull request tests. Null runs the tests in this environment."},"pr_testing_enabled":{"type":"boolean","title":"Pr Testing Enabled","description":"Whether the test suite runs for pull requests that target `git_branch`."},"deploy_gate_tests_enabled":{"type":"boolean","title":"Deploy Gate Tests Enabled","description":"Whether deployments run the test suite before activating. A failing case stops the deployment."},"log_retention_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Log Retention Seconds","description":"How long run data is kept, in seconds. Null applies the plan's default retention."},"log_retention_max_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Log Retention Max Seconds","description":"Longest retention the project's plan allows, in seconds. Null means no limit."},"redacted_keys":{"items":{"type":"string"},"type":"array","title":"Redacted Keys","description":"Dot-separated JSON paths whose values are replaced with `[REDACTED]` in stored run data, traces and connector logs. A leading `*` matches at any depth, as in `*.password`."},"manual_deploy_group_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Manual Deploy Group Ids","description":"Permission groups whose members can deploy to this environment manually. Null allows everyone with deploy permission; an empty list allows only the project owner."},"copy_from_group_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Copy From Group Ids","description":"Permission groups whose members can copy from this environment into other environments. Null allows everyone; an empty list allows only the project owner."},"can_copy_from":{"type":"boolean","title":"Can Copy From","description":"Whether the caller can use this environment as a copy source. Always false for dev environments."},"can_deploy":{"type":"boolean","title":"Can Deploy","description":"Whether the caller can deploy to this environment manually."},"can_use_dev_session":{"type":"boolean","title":"Can Use Dev Session","description":"Whether the caller can run a `connic dev` session in this environment. Only dev environments allow it."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At","description":"Always null, because deleted environments are not returned."}},"type":"object","required":["id","project_id","name","slug","git_branch","is_active","is_default","env_type","is_ephemeral","test_environment_id","pr_testing_enabled","deploy_gate_tests_enabled","log_retention_seconds","log_retention_max_seconds","redacted_keys","manual_deploy_group_ids","copy_from_group_ids","can_copy_from","can_deploy","can_use_dev_session","created_at","updated_at","deleted_at"],"title":"PublicEnvironmentResponse"},"PublicGuardrailInterventionResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the custom guardrail. Null for built-in types."},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"Guardrail type, such as `prompt_injection`, `pii`, `moderation`, `topic_restriction`, `regex` or `custom`."},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction","description":"`input` when the rule checked the run input, `output` when it checked the agent output."},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode","description":"Action configured for the rule: `block`, `warn` or `redact`."},"status":{"type":"string","enum":["warned","blocked","redacted"],"title":"Status","description":"Outcome: `warned` let the content through with a warning, `blocked` stopped it, `redacted` removed the matched content."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Explanation from the guardrail. Empty after the run is deleted."}},"type":"object","required":["status"],"title":"PublicGuardrailInterventionResponse","description":"A guardrail rule that did not pass during a run."},"PublicJudgeBulkDryRunResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"Whether the operation succeeded."},"dry_run":{"type":"boolean","const":true,"title":"Dry Run","description":"True: nothing was queued."},"count":{"type":"integer","title":"Count","description":"Completed runs in the timeframe that would be evaluated."},"limit":{"type":"integer","title":"Limit","description":"Maximum number of runs one bulk request can queue."}},"type":"object","required":["ok","dry_run","count","limit"],"title":"PublicJudgeBulkDryRunResponse"},"PublicJudgeBulkQueuedResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"Whether the operation succeeded."},"dry_run":{"type":"boolean","const":false,"title":"Dry Run","description":"False: evaluations were queued."},"queued":{"type":"integer","title":"Queued","description":"Number of evaluations queued."}},"type":"object","required":["ok","dry_run","queued"],"title":"PublicJudgeBulkQueuedResponse"},"PublicJudgeBulkResponse":{"anyOf":[{"$ref":"#/components/schemas/PublicJudgeBulkQueuedResponse"},{"$ref":"#/components/schemas/PublicJudgeBulkDryRunResponse"}],"title":"PublicJudgeBulkResponse","description":"Queued evaluations, or the matching run count when `dry_run` is true."},"PublicJudgeTriggerResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"Whether the operation succeeded."},"judge_run_id":{"type":"string","format":"uuid","title":"Judge Run Id","description":"ID of the queued judge run."}},"type":"object","required":["ok","judge_run_id"],"title":"PublicJudgeTriggerResponse"},"PublicModelRankingItemResponse":{"properties":{"token_cost":{"anyOf":[{"$ref":"#/components/schemas/PublicTokenCostResponse"},{"type":"null"}],"description":"Total cost, including judge evaluations. Null when there were no model calls."},"agent_token_cost":{"anyOf":[{"$ref":"#/components/schemas/PublicTokenCostResponse"},{"type":"null"}],"description":"Cost of the agent's own model calls, without judges. Null when there were none."},"run_count":{"type":"integer","title":"Run Count","description":"Runs started in the period for this group."},"agent_token_usage":{"$ref":"#/components/schemas/PublicTokenUsageResponse","description":"Tokens used by the agent's own model calls."},"judge_token_usage":{"$ref":"#/components/schemas/PublicTokenUsageResponse","description":"Tokens used by judge evaluations."},"total_token_usage":{"$ref":"#/components/schemas/PublicTokenUsageResponse","description":"Agent and judge tokens combined."},"agent_token_usage_by_currency":{"additionalProperties":{"$ref":"#/components/schemas/PublicTokenUsageResponse"},"type":"object","title":"Agent Token Usage By Currency","description":"Agent tokens from priced calls, keyed by the currency they were priced in."},"judge_token_usage_by_currency":{"additionalProperties":{"$ref":"#/components/schemas/PublicTokenUsageResponse"},"type":"object","title":"Judge Token Usage By Currency","description":"Judge tokens from priced calls, keyed by the currency they were priced in."},"total_token_usage_by_currency":{"additionalProperties":{"$ref":"#/components/schemas/PublicTokenUsageResponse"},"type":"object","title":"Total Token Usage By Currency","description":"Agent and judge tokens from priced calls, keyed by the currency they were priced in."},"model_name":{"type":"string","title":"Model Name","description":"Model the row belongs to (`group_by=model`)."}},"type":"object","required":["token_cost","agent_token_cost","run_count","agent_token_usage","judge_token_usage","total_token_usage","agent_token_usage_by_currency","judge_token_usage_by_currency","total_token_usage_by_currency","model_name"],"title":"PublicModelRankingItemResponse"},"PublicModelTokenUsageResponse":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens","description":"Prompt tokens sent to the model, including cached tokens."},"output_tokens":{"type":"integer","title":"Output Tokens","description":"Tokens the model generated, excluding thinking tokens."},"cached_input_tokens":{"type":"integer","title":"Cached Input Tokens","description":"Part of `input_tokens` read from the provider's prompt cache."},"thinking_tokens":{"type":"integer","title":"Thinking Tokens","description":"Reasoning tokens the model generated."},"total_tokens":{"type":"integer","title":"Total Tokens","description":"Input, output and thinking tokens combined."},"audio_input_tokens":{"type":"integer","title":"Audio Input Tokens","description":"Part of `input_tokens` that was audio.","default":0},"audio_output_tokens":{"type":"integer","title":"Audio Output Tokens","description":"Part of `output_tokens` that was audio.","default":0},"audio_cached_input_tokens":{"type":"integer","title":"Audio Cached Input Tokens","description":"Part of `cached_input_tokens` that was audio.","default":0},"audio_thinking_tokens":{"type":"integer","title":"Audio Thinking Tokens","description":"Part of `thinking_tokens` that was audio.","default":0},"audio_usage_missing":{"type":"boolean","title":"Audio Usage Missing","description":"True when at least one model call did not report its audio breakdown, so audio counts may be too low.","default":false},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Model that served the request. Null when not recorded."}},"type":"object","required":["input_tokens","output_tokens","cached_input_tokens","thinking_tokens","total_tokens","model"],"title":"PublicModelTokenUsageResponse"},"PublicNamespaceResponse":{"properties":{"name":{"type":"string","title":"Name","description":"Full dot-separated namespace path, such as `docs.api`."},"entry_count":{"type":"integer","title":"Entry Count","description":"Entries stored directly in this namespace."},"chunk_count":{"type":"integer","title":"Chunk Count","description":"Chunks stored directly in this namespace."},"total_entry_count":{"type":"integer","title":"Total Entry Count","description":"Entries in this namespace and all of its descendants."},"has_children":{"type":"boolean","title":"Has Children","description":"Whether the namespace has child namespaces."}},"type":"object","required":["name","entry_count","chunk_count","total_entry_count","has_children"],"title":"PublicNamespaceResponse"},"PublicNamespacesResponse":{"properties":{"parent":{"anyOf":[{"$ref":"#/components/schemas/PublicNamespaceResponse"},{"type":"null"}],"description":"The namespace given in `parent`, with its counts. Null when `parent` is omitted."},"namespaces":{"items":{"$ref":"#/components/schemas/PublicNamespaceResponse"},"type":"array","title":"Namespaces","description":"Children of `parent`, or top-level namespaces without it, down to `depth` levels and sorted by name."}},"type":"object","required":["parent","namespaces"],"title":"PublicNamespacesResponse"},"PublicOkResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"Whether the operation succeeded."}},"type":"object","required":["ok"],"title":"PublicOkResponse"},"PublicProjectLogItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id","description":"Run that wrote the log entry."},"deployment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deployment Id","description":"Deployment that ran the agent. Null when none is recorded."},"agent_name":{"type":"string","title":"Agent Name","description":"Agent that wrote the log entry."},"run_status":{"$ref":"#/components/schemas/RunStatus","description":"Current state of the run."},"trace_name":{"type":"string","title":"Trace Name","description":"Source of the entry: `log:system`, or `log:tool:`, `log:middleware:`, `log:hook:` or `log:guardrail:` followed by a name."},"level":{"type":"string","title":"Level","description":"Log level, such as `debug`, `info`, `warning` or `error`."},"message":{"type":"string","title":"Message","description":"Log text, up to 2,048 characters, with secret values masked."},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp","description":"When the entry was written."},"queued_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Queued At","description":"When the run entered the queue."},"test_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Name","description":"A/B test variant that handled the run. Null for the base agent."}},"type":"object","required":["id","run_id","deployment_id","agent_name","run_status","trace_name","level","message","timestamp","queued_at","test_name"],"title":"PublicProjectLogItemResponse"},"PublicProjectLogsResponse":{"properties":{"logs":{"items":{"$ref":"#/components/schemas/PublicProjectLogItemResponse"},"type":"array","title":"Logs","description":"Log entries, newest first for `direction=older` and oldest first for `direction=newer`."},"has_more":{"type":"boolean","title":"Has More","description":"Whether more entries exist beyond this page in the same direction."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor` with the same `direction` to load the next page. Null when `has_more` is false."},"first_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Cursor","description":"Cursor of the first entry on this page. Pass it with `direction=newer` to load entries written after this page."},"last_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Cursor","description":"Cursor of the last entry on this page. Null when the page is empty."},"direction":{"type":"string","enum":["older","newer"],"title":"Direction","description":"Paging direction used: `older` pages back in time, `newer` pages forward."}},"type":"object","required":["logs","has_more","next_cursor","first_cursor","last_cursor","direction"],"title":"PublicProjectLogsResponse"},"PublicPurgeQueueResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"Whether the operation succeeded."},"purged_count":{"type":"integer","title":"Purged Count","description":"Number of queued runs that were cancelled."}},"type":"object","required":["ok","purged_count"],"title":"PublicPurgeQueueResponse"},"PublicRerunResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"Whether the operation succeeded."},"run_id":{"type":"string","format":"uuid","title":"Run Id","description":"ID of the new run."}},"type":"object","required":["ok","run_id"],"title":"PublicRerunResponse"},"PublicRetrievalChunkResponse":{"properties":{"entry_id":{"type":"string","title":"Entry Id","description":"Entry the chunk belongs to."},"content":{"type":"string","title":"Content","description":"Chunk text."},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type","description":"Source type, such as `text` or `pdf`."},"namespace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Namespace","description":"Namespace path. Null for the default namespace."},"page_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Number","description":"PDF page the chunk was taken from. Null for other content types."},"chunk_index":{"type":"integer","title":"Chunk Index","description":"Position of the chunk within the entry, starting at 0."},"token_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Token Count","description":"Tokens in the chunk. Null when not counted."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Metadata stored with the chunk: the `metadata` passed at upload, plus `original_filename` and `file_size` for files."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["entry_id","content","content_type","namespace","page_number","chunk_index","token_count","metadata","created_at"],"title":"PublicRetrievalChunkResponse"},"PublicRetrievalDeleteResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"Whether the operation succeeded."},"deleted_chunks":{"type":"integer","title":"Deleted Chunks","description":"Number of chunks removed."}},"type":"object","required":["ok","deleted_chunks"],"title":"PublicRetrievalDeleteResponse"},"PublicRetrievalEntriesResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/PublicRetrievalEntryResponse"},"type":"array","title":"Entries","description":"Entries on this page."},"total":{"type":"integer","title":"Total","description":"Entries matching the filters across all pages."}},"type":"object","required":["entries","total"],"title":"PublicRetrievalEntriesResponse"},"PublicRetrievalEntryDetailsResponse":{"properties":{"chunks":{"items":{"$ref":"#/components/schemas/PublicRetrievalChunkResponse"},"type":"array","title":"Chunks","description":"Chunks of the entry, ordered by `chunk_index`."}},"type":"object","required":["chunks"],"title":"PublicRetrievalEntryDetailsResponse"},"PublicRetrievalEntryResponse":{"properties":{"entry_id":{"type":"string","title":"Entry Id","description":"Entry identifier, unique within its namespace."},"namespace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Namespace","description":"Namespace path. Null for the default namespace."},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type","description":"Source type, such as `text` or `pdf`."},"chunk_count":{"type":"integer","title":"Chunk Count","description":"Chunks the entry was split into."},"page_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Count","description":"Pages in the source PDF. Null for other content types."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["entry_id","namespace","content_type","chunk_count","page_count","created_at"],"title":"PublicRetrievalEntryResponse"},"PublicRetrievalIngestionResponse":{"properties":{"job_id":{"type":"string","title":"Job Id","description":"ID of the ingestion job that chunks and indexes the content."},"status":{"type":"string","title":"Status","description":"Job status at submission, `pending`."},"entry_id":{"type":"string","title":"Entry Id","description":"Entry the content is stored under. Generated when not supplied."}},"type":"object","required":["job_id","status","entry_id"],"title":"PublicRetrievalIngestionResponse"},"PublicRetrievalStatsNamespaceResponse":{"properties":{"name":{"type":"string","title":"Name","description":"Full dot-separated namespace path."},"chunk_count":{"type":"integer","title":"Chunk Count","description":"Chunks stored directly in this namespace."}},"type":"object","required":["name","chunk_count"],"title":"PublicRetrievalStatsNamespaceResponse"},"PublicRetrievalStatsResponse":{"properties":{"total_entries":{"type":"integer","title":"Total Entries","description":"Entries across all namespaces."},"total_chunks":{"type":"integer","title":"Total Chunks","description":"Chunks across all namespaces."},"namespaces":{"items":{"$ref":"#/components/schemas/PublicRetrievalStatsNamespaceResponse"},"type":"array","title":"Namespaces","description":"Named namespaces with their chunk counts. The default namespace is not listed."},"content_types":{"additionalProperties":{"type":"integer"},"type":"object","title":"Content Types","description":"Number of entries per content type."}},"type":"object","required":["total_entries","total_chunks","namespaces","content_types"],"title":"PublicRetrievalStatsResponse"},"PublicRetrievalSyncResponse":{"properties":{"queued":{"type":"boolean","title":"Queued","description":"True when a sync was queued."}},"type":"object","required":["queued"],"title":"PublicRetrievalSyncResponse"},"PublicRunCancelResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"Whether the operation succeeded."},"message":{"type":"string","enum":["Run cancelled","Cancel signal sent"],"title":"Message","description":"`Run cancelled` when a scheduled or queued run was cancelled before it started. `Cancel signal sent` when the run was already executing and is being stopped."}},"type":"object","required":["ok","message"],"title":"PublicRunCancelResponse"},"PublicRunDataDeleteResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"Whether the operation succeeded."},"deleted_count":{"type":"integer","title":"Deleted Count","description":"Number of runs deleted. Runs that were already deleted are not counted."}},"type":"object","required":["ok","deleted_count"],"title":"PublicRunDataDeleteResponse"},"PublicRunHistoryItemResponse":{"properties":{"date":{"type":"string","format":"date","title":"Date","description":"UTC day the runs started."},"started":{"type":"integer","title":"Started","description":"Runs from this day that are still executing."},"failed":{"type":"integer","title":"Failed","description":"Runs from this day that failed."},"completed":{"type":"integer","title":"Completed","description":"Runs from this day that completed."},"cancelled":{"type":"integer","title":"Cancelled","description":"Runs from this day that were cancelled."}},"type":"object","required":["date","started","failed","completed","cancelled"],"title":"PublicRunHistoryItemResponse"},"PublicRunListItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"deployment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deployment Id","description":"Deployment that ran the agent. Null when none is recorded."},"agent_name":{"type":"string","title":"Agent Name","description":"Agent the run belongs to."},"test_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Name","description":"A/B test variant that handled the run. Null for the base agent."},"status":{"$ref":"#/components/schemas/RunStatus","description":"Current state of the run."},"queued_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Queued At","description":"When the run entered the queue."},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At","description":"When execution began. Null while the run is scheduled or queued."},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the run finished. Null while it is still active."},"duration_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Ms","description":"Execution time in milliseconds, excluding time spent waiting for approvals or child runs. Null until the run ends."},"data_deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Data Deleted At","description":"When the run was deleted. Its input, output, error and traces are removed; status, timing and usage remain."},"can_delete_data":{"type":"boolean","title":"Can Delete Data","description":"Whether the run can be deleted now: it and its background processing have finished and it is not deleted yet."},"token_usage":{"$ref":"#/components/schemas/PublicTokenUsageResponse","description":"Tokens used by the run and its judge evaluations."},"token_cost":{"anyOf":[{"$ref":"#/components/schemas/PublicTokenCostResponse"},{"type":"null"}],"description":"Cost of the run and its judge evaluations. Null when there were no model calls."},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At","description":"Time the run is scheduled to start. Null for runs that were not scheduled."},"guardrail_interventions":{"items":{"$ref":"#/components/schemas/PublicGuardrailInterventionResponse"},"type":"array","title":"Guardrail Interventions","description":"Guardrail rules that warned, blocked or redacted content during the run."},"connector_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connector Id","description":"Connector that triggered the run. Null for other triggers; omitted with `projection=summary`."},"ab_test_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Ab Test Ids","description":"A/B tests the run was assigned to. Omitted with `projection=summary`."},"input":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input","description":"Input payload of the run. Null after the run is deleted; omitted with `projection=summary`."},"output":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output","description":"Final agent output. Null until the run completes or after it is deleted; omitted with `projection=summary`."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error message for runs that did not complete. Null otherwise; omitted with `projection=summary`."},"triggered_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triggered By","description":"ID of the parent run when another agent started this run. Null otherwise; omitted with `projection=summary`."}},"type":"object","required":["id","deployment_id","agent_name","test_name","status","queued_at","started_at","ended_at","duration_ms","data_deleted_at","can_delete_data","token_usage","token_cost","scheduled_at","guardrail_interventions"],"title":"PublicRunListItemResponse"},"PublicRunListResponse":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/PublicRunListItemResponse"},"type":"array","title":"Runs","description":"Runs on this page."},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total","description":"Runs matching the filters across all pages. Null when `include_total=false`."},"limit":{"type":"integer","title":"Limit","description":"Page size used."},"offset":{"type":"integer","title":"Offset","description":"Number of runs skipped."}},"type":"object","required":["runs","total","limit","offset"],"title":"PublicRunListResponse"},"PublicRunTokenUsageResponse":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens","description":"Prompt tokens sent to the model, including cached tokens."},"output_tokens":{"type":"integer","title":"Output Tokens","description":"Tokens the model generated, excluding thinking tokens."},"cached_input_tokens":{"type":"integer","title":"Cached Input Tokens","description":"Part of `input_tokens` read from the provider's prompt cache."},"thinking_tokens":{"type":"integer","title":"Thinking Tokens","description":"Reasoning tokens the model generated."},"total_tokens":{"type":"integer","title":"Total Tokens","description":"Input, output and thinking tokens combined."},"audio_input_tokens":{"type":"integer","title":"Audio Input Tokens","description":"Part of `input_tokens` that was audio.","default":0},"audio_output_tokens":{"type":"integer","title":"Audio Output Tokens","description":"Part of `output_tokens` that was audio.","default":0},"audio_cached_input_tokens":{"type":"integer","title":"Audio Cached Input Tokens","description":"Part of `cached_input_tokens` that was audio.","default":0},"audio_thinking_tokens":{"type":"integer","title":"Audio Thinking Tokens","description":"Part of `thinking_tokens` that was audio.","default":0},"audio_usage_missing":{"type":"boolean","title":"Audio Usage Missing","description":"True when at least one model call did not report its audio breakdown, so audio counts may be too low.","default":false},"model_usages":{"items":{"$ref":"#/components/schemas/PublicModelTokenUsageResponse"},"type":"array","title":"Model Usages","description":"Usage of each model request, in call order."}},"type":"object","required":["input_tokens","output_tokens","cached_input_tokens","thinking_tokens","total_tokens","model_usages"],"title":"PublicRunTokenUsageResponse"},"PublicTokenCostBreakdownResponse":{"properties":{"input_cost":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Cost","description":"Cost of input tokens not served from cache, including audio. Null when the split by token type is unknown."},"output_cost":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Cost","description":"Cost of output tokens, including audio. Null when the split by token type is unknown."},"cached_input_cost":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cached Input Cost","description":"Cost of cached input tokens. Null when the split by token type is unknown."},"thinking_cost":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thinking Cost","description":"Cost of thinking tokens. Null when the split by token type is unknown."},"agent_cost":{"type":"string","title":"Agent Cost","description":"Cost of the agent's own model calls."},"judge_cost":{"type":"string","title":"Judge Cost","description":"Cost of judge evaluations."},"total_cost":{"type":"string","title":"Total Cost","description":"`agent_cost` plus `judge_cost`. Always exact, even when the token type split is null."},"audio_input_cost":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Input Cost","description":"Audio share of `input_cost`. Null when the split by token type is unknown.","default":"0.000000000000"},"audio_output_cost":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Output Cost","description":"Audio share of `output_cost`. Null when the split by token type is unknown.","default":"0.000000000000"},"audio_cached_input_cost":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Cached Input Cost","description":"Audio share of `cached_input_cost`. Null when the split by token type is unknown.","default":"0.000000000000"},"audio_thinking_cost":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Thinking Cost","description":"Audio share of `thinking_cost`. Null when the split by token type is unknown.","default":"0.000000000000"}},"type":"object","required":["input_cost","output_cost","cached_input_cost","thinking_cost","agent_cost","judge_cost","total_cost"],"title":"PublicTokenCostBreakdownResponse","description":"Cost in one currency, split by token type and by agent versus judge. Amounts are decimal strings."},"PublicTokenCostCoverageResponse":{"properties":{"complete":{"type":"boolean","title":"Complete","description":"True when every model call could be priced."},"call_count":{"type":"integer","title":"Call Count","description":"Model calls covered by the report."},"priced_call_count":{"type":"integer","title":"Priced Call Count","description":"Calls included in the cost amounts."},"unpriced_call_count":{"type":"integer","title":"Unpriced Call Count","description":"Calls without a known price or without reported token usage. They are left out of the amounts."},"unpriced_models":{"items":{"type":"string"},"type":"array","title":"Unpriced Models","description":"Models of the unpriced calls."}},"type":"object","required":["complete","call_count","priced_call_count","unpriced_call_count","unpriced_models"],"title":"PublicTokenCostCoverageResponse","description":"How many model calls could be priced."},"PublicTokenCostResponse":{"properties":{"amounts":{"additionalProperties":{"type":"string"},"type":"object","title":"Amounts","description":"Total cost keyed by currency code (`EUR` or `USD`), as a decimal string with 12 decimal places. Only currencies with a nonzero amount are included."},"breakdown":{"additionalProperties":{"$ref":"#/components/schemas/PublicTokenCostBreakdownResponse"},"type":"object","title":"Breakdown","description":"Cost split by token type and by agent versus judge, keyed by currency code."},"coverage":{"$ref":"#/components/schemas/PublicTokenCostCoverageResponse","description":"Whether every model call could be priced. Amounts exclude unpriced calls."},"converted_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Converted To","description":"Currency the amounts were converted to at the daily ECB reference rate of each call. Present only when `convert_costs_to` is set."},"native_amounts":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Native Amounts","description":"Totals in each model's pricing currency before conversion, as decimal strings keyed by currency code. Present only when `convert_costs_to` is set."}},"type":"object","required":["amounts","breakdown","coverage"],"title":"PublicTokenCostResponse","description":"Token cost in each model's pricing currency, or in one currency when `convert_costs_to` is set."},"PublicTokenCostStatisticsItemResponse":{"properties":{"average":{"type":"string","title":"Average","description":"Mean cost per run, as a decimal string."},"p50":{"type":"string","title":"P50","description":"Median cost per run, as a decimal string."},"p95":{"type":"string","title":"P95","description":"95th percentile cost per run, as a decimal string."}},"type":"object","required":["average","p50","p95"],"title":"PublicTokenCostStatisticsItemResponse"},"PublicTokenUsageResponse":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens","description":"Prompt tokens sent to the model, including cached tokens."},"output_tokens":{"type":"integer","title":"Output Tokens","description":"Tokens the model generated, excluding thinking tokens."},"cached_input_tokens":{"type":"integer","title":"Cached Input Tokens","description":"Part of `input_tokens` read from the provider's prompt cache."},"thinking_tokens":{"type":"integer","title":"Thinking Tokens","description":"Reasoning tokens the model generated."},"total_tokens":{"type":"integer","title":"Total Tokens","description":"Input, output and thinking tokens combined."},"audio_input_tokens":{"type":"integer","title":"Audio Input Tokens","description":"Part of `input_tokens` that was audio.","default":0},"audio_output_tokens":{"type":"integer","title":"Audio Output Tokens","description":"Part of `output_tokens` that was audio.","default":0},"audio_cached_input_tokens":{"type":"integer","title":"Audio Cached Input Tokens","description":"Part of `cached_input_tokens` that was audio.","default":0},"audio_thinking_tokens":{"type":"integer","title":"Audio Thinking Tokens","description":"Part of `thinking_tokens` that was audio.","default":0},"audio_usage_missing":{"type":"boolean","title":"Audio Usage Missing","description":"True when at least one model call did not report its audio breakdown, so audio counts may be too low.","default":false}},"type":"object","required":["input_tokens","output_tokens","cached_input_tokens","thinking_tokens","total_tokens"],"title":"PublicTokenUsageResponse","description":"Token counts summed over model calls."},"PurgeQueueRequest":{"properties":{"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name","description":"Only cancel queued runs of this agent; omit to cancel every queued run in the environment."}},"type":"object","title":"PurgeQueueRequest","description":"Which queued runs to cancel."},"QueuedCountResponse":{"properties":{"queued_count":{"type":"integer","title":"Queued Count","description":"Runs currently in `queued` status; scheduled runs are not counted."}},"type":"object","required":["queued_count"],"title":"QueuedCountResponse","description":"Number of runs waiting in the queue."},"RetrievalFileUploadRequest":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"File to index, up to 25 MB. The file name must end in a supported extension that matches the content; it is also the default entry ID."},"metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata","description":"JSON object as a string, stored with every chunk of the entry, up to 64 KB. `file_size` and `original_filename` are always set from the upload."}},"type":"object","required":["file"],"title":"RetrievalFileUploadRequest"},"RetrievalSourceResponse":{"properties":{"id":{"type":"string","title":"Id"},"environment_id":{"type":"string","title":"Environment Id","description":"Environment the source syncs into."},"type":{"type":"string","title":"Type","description":"Source type: `notion`, `confluence` (Confluence Cloud), `coda` (Superhuman Docs), `zendesk` (Zendesk Help Center), or `website`."},"name":{"type":"string","title":"Name"},"config":{"additionalProperties":true,"type":"object","title":"Config","description":"Provider settings without `integration_token` and `api_token`."},"status":{"type":"string","title":"Status","description":"`active`, or `error` after a failed sync. Updating `config` resets `error` to `active`."},"last_synced_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Synced At","description":"Start time of the most recent successful sync; null until one succeeds."},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error","description":"Message from the most recent sync that failed or was skipped, or a JSON string with a `file_issues` list when it completed with file problems; null otherwise."},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","environment_id","type","name","config","status","last_synced_at","last_error","created_at"],"title":"RetrievalSourceResponse"},"RetrievalSourceRunResponse":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status","description":"`running`, `completed`, `failed`, or `skipped` when the sync could not run, for example because Project credit ran out."},"trigger":{"type":"string","title":"Trigger","description":"`scheduled` for interval syncs, including the first sync after connecting, or `manual` for syncs started with `POST /retrieval/sources/{source_id}/sync`."},"items_seen":{"type":"integer","title":"Items Seen","description":"Items found at the source, such as pages, articles, or URLs."},"ingested":{"type":"integer","title":"Ingested","description":"New items added to retrieval."},"updated":{"type":"integer","title":"Updated","description":"Changed items ingested again."},"deleted":{"type":"integer","title":"Deleted","description":"Items removed from retrieval because they no longer exist at the source. Always 0 with `on_delete: keep`."},"billable_items":{"type":"integer","title":"Billable Items","description":"Items charged to Project credit: `ingested` plus `updated`."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Why the run failed or was skipped, or a JSON string with a `file_issues` list when it completed with file problems; null otherwise."},"started_at":{"type":"string","title":"Started At","description":"ISO 8601 timestamp in UTC."},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finished At","description":"ISO 8601 timestamp in UTC; null while the run is `running`."}},"type":"object","required":["id","status","trigger","items_seen","ingested","updated","deleted","billable_items","error","started_at","finished_at"],"title":"RetrievalSourceRunResponse","description":"One sync of a retrieval source."},"RetrievalTextUploadRequest":{"properties":{"content":{"type":"string","minLength":1,"title":"Content","description":"Text to index, up to 250,000 characters. Upload longer documents as a file or split them into several entries."},"namespace":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Namespace","description":"Dot-separated namespace such as `docs.api`, up to 10 levels. Omit for the default namespace."},"entry_id":{"anyOf":[{"type":"string","maxLength":1000,"minLength":1},{"type":"null"}],"title":"Entry Id","description":"Entry identifier. Uploading again with the same ID and namespace replaces the entry. Defaults to a generated UUID."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"JSON object stored with every chunk of the entry, up to 64 KB."},"chunk_size":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Chunk Size","description":"Target chunk length in characters. Defaults to 1800 when omitted or 0; values below 400 are raised to 400."},"chunk_overlap":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Chunk Overlap","description":"Characters repeated between consecutive chunks. Defaults to 200, capped at half of `chunk_size`."}},"type":"object","required":["content"],"title":"RetrievalTextUploadRequest"},"RunSessionInfo":{"properties":{"session_id":{"type":"string","title":"Session Id","description":"Session ID, unique within the app name and user."},"app_name":{"type":"string","title":"App Name","description":"Agent application name that owns the session."},"user_id":{"type":"string","title":"User Id","description":"Agent user identity the session belongs to."}},"type":"object","required":["session_id","app_name","user_id"],"title":"RunSessionInfo","description":"Persistent session a run belongs to."},"RunStatus":{"type":"string","enum":["scheduled","queued","started","awaiting_approval","completed","failed","cancelled","blocked"],"title":"RunStatus","description":"Run state: `scheduled` until its start time, `queued`, `started` while executing, `awaiting_approval` while paused for a human decision, then `completed`, `failed` or `cancelled`."},"SessionsResponse":{"properties":{"sessions":{"items":{"$ref":"#/components/schemas/PersistentSession"},"type":"array","maxItems":200,"title":"Sessions","description":"Sessions on this page, most recently updated first."},"total":{"type":"integer","minimum":0.0,"title":"Total","description":"Sessions matching the filters, ignoring `limit` and `offset`."},"app_names":{"items":{"type":"string","maxLength":255},"type":"array","title":"App Names","description":"Distinct `app_name` values across all sessions in the environment, regardless of filters."}},"type":"object","required":["sessions","total","app_names"],"title":"SessionsResponse"},"SpendAlertCreate":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","enum":["alert","limit"],"title":"Type","description":"`alert` sends a notification when spend reaches the threshold. `limit` also keeps new runs queued until the period resets or the limit is raised, disabled or deleted."},"threshold_amount":{"anyOf":[{"type":"number"},{"type":"string"}],"title":"Threshold Amount","description":"Spend that triggers the rule, as a positive decimal string in `currency`."},"currency":{"type":"string","enum":["USD","EUR"],"title":"Currency","description":"Currency of the threshold. Only token costs priced in this currency count toward the spend.","default":"USD"},"scope":{"type":"string","enum":["global","environment","agent"],"title":"Scope","description":"`global` counts all project spend, `environment` only the environments in `scope_ids`, `agent` only the agents named in `scope_ids`.","default":"global"},"scope_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scope Ids","description":"Environment IDs or agent names, depending on `scope`. Ignored for `global`."},"period":{"type":"string","enum":["monthly","daily"],"title":"Period","description":"Spend window: the current calendar month or the current day, in UTC.","default":"monthly"},"enabled":{"type":"boolean","title":"Enabled","description":"Whether the rule is evaluated.","default":true}},"type":"object","required":["name","type","threshold_amount"],"title":"SpendAlertCreate"},"SpendAlertResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project the rule belongs to."},"name":{"type":"string","title":"Name"},"type":{"type":"string","enum":["alert","limit"],"title":"Type","description":"`alert` sends a notification when spend reaches the threshold; `limit` also keeps new runs queued."},"threshold_amount":{"type":"string","title":"Threshold Amount","description":"Spend that triggers the rule, as a decimal string in `currency`."},"currency":{"type":"string","enum":["USD","EUR"],"title":"Currency","description":"Currency of the threshold and of `current_spend`."},"scope":{"type":"string","enum":["global","environment","agent"],"title":"Scope","description":"`global` counts all project spend, `environment` only the environments in `scope_ids`, `agent` only the agents named in `scope_ids`."},"scope_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scope Ids","description":"Environment IDs or agent names, depending on `scope`."},"period":{"type":"string","enum":["monthly","daily"],"title":"Period","description":"Spend window: the current calendar month or the current day, in UTC."},"enabled":{"type":"boolean","title":"Enabled","description":"Whether the rule is evaluated."},"last_triggered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Triggered At","description":"When the rule last fired. It fires at most once per period."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"current_spend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Spend","description":"Spend so far in the current period, as a decimal string in `currency`. Null when some model calls could not be priced."},"current_spend_coverage":{"additionalProperties":true,"type":"object","title":"Current Spend Coverage","description":"Pricing coverage of `current_spend`: `complete`, `call_count`, `priced_call_count`, `unpriced_call_count` and `unpriced_models`."}},"type":"object","required":["id","project_id","name","type","threshold_amount","currency","scope","period","enabled","created_at","updated_at"],"title":"SpendAlertResponse","description":"A spend notification (`alert`) or hard cap (`limit`) for the project."},"SpendAlertUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"type":{"anyOf":[{"type":"string","enum":["alert","limit"]},{"type":"null"}],"title":"Type","description":"`alert` sends a notification when spend reaches the threshold. `limit` also keeps new runs queued until the period resets or the limit is raised, disabled or deleted."},"threshold_amount":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Threshold Amount","description":"Spend that triggers the rule, as a positive decimal string in `currency`. Changing it clears `last_triggered_at`."},"currency":{"anyOf":[{"type":"string","enum":["EUR","USD"]},{"type":"null"}],"title":"Currency","description":"Currency of the threshold. Changing it clears `last_triggered_at`."},"scope":{"anyOf":[{"type":"string","enum":["global","environment","agent"]},{"type":"null"}],"title":"Scope","description":"`global` counts all project spend, `environment` only the environments in `scope_ids`, `agent` only the agents named in `scope_ids`."},"scope_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scope Ids","description":"Environment IDs or agent names, depending on `scope`. Ignored for `global`."},"period":{"anyOf":[{"type":"string","enum":["monthly","daily"]},{"type":"null"}],"title":"Period","description":"Spend window: the current calendar month or the current day, in UTC."},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled","description":"Whether the rule is evaluated."}},"type":"object","title":"SpendAlertUpdate","description":"Partial update of a spend rule. Omitted fields are unchanged."},"TestRunTokenUsage":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens","description":"Input tokens, including cached ones.","default":0},"output_tokens":{"type":"integer","title":"Output Tokens","description":"Output tokens.","default":0},"cached_input_tokens":{"type":"integer","title":"Cached Input Tokens","description":"Input tokens served from the provider's cache; part of `input_tokens`.","default":0},"thinking_tokens":{"type":"integer","title":"Thinking Tokens","description":"Reasoning tokens.","default":0},"audio_input_tokens":{"type":"integer","title":"Audio Input Tokens","description":"Audio part of `input_tokens`.","default":0},"audio_output_tokens":{"type":"integer","title":"Audio Output Tokens","description":"Audio part of `output_tokens`.","default":0},"audio_cached_input_tokens":{"type":"integer","title":"Audio Cached Input Tokens","description":"Audio part of `cached_input_tokens`.","default":0},"audio_thinking_tokens":{"type":"integer","title":"Audio Thinking Tokens","description":"Audio part of `thinking_tokens`.","default":0},"audio_usage_missing":{"type":"boolean","title":"Audio Usage Missing","description":"True when at least one model call did not report its audio token split, so audio counts may be low.","default":false},"total_tokens":{"type":"integer","title":"Total Tokens","description":"Total tokens as reported per model call, usually input plus output plus thinking.","default":0}},"type":"object","title":"TestRunTokenUsage","description":"Token counts summed over a test case's agent runs, including judge evaluations of those runs."},"TriggerSource":{"type":"string","enum":["manual","connector","agent","deploy_gate"],"title":"TriggerSource","description":"How a run was started: `manual` by a user, `connector` by an inbound connector event, `agent` by another agent, or `deploy_gate` as a deployment test run."},"TriggeredByRunInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_name":{"type":"string","title":"Agent Name","description":"Agent of the parent run."}},"type":"object","required":["id","agent_name"],"title":"TriggeredByRunInfo","description":"The run whose agent started this run."},"UpdateRetrievalSourceRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"New name. Omit to keep the current one."},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config","description":"Keys to change, merged into the current config; omitted keys and empty `integration_token` or `api_token` values keep their stored values. Clears `last_error` and resets an `error` status to `active`."}},"type":"object","title":"UpdateRetrievalSourceRequest"},"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"},"ErrorResponse":{"type":"object","properties":{"detail":{"anyOf":[{"type":"string"},{"type":"object"}],"description":"Error message, or an object with a `message` field when the error carries extra data."}},"required":["detail"]}},"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","description":"API key (cnc_...) passed as Bearer token"}}},"tags":[{"name":"ab-tests"},{"name":"agents"},{"name":"approvals"},{"name":"audit-logs"},{"name":"bridges"},{"name":"budgets"},{"name":"channels"},{"name":"compliance"},{"name":"connections"},{"name":"connectors"},{"name":"database"},{"name":"deployments"},{"name":"environments"},{"name":"files"},{"name":"judges"},{"name":"oauth-apps"},{"name":"retrieval"},{"name":"runs"},{"name":"sessions"},{"name":"stats"}],"servers":[{"url":"https://api.connic.co"}]}