diff --git a/api/ee/databases/postgres/migrations/core/versions/b2c3d4e5f7a8_add_events_ingested_meter.py b/api/ee/databases/postgres/migrations/core/versions/b2c3d4e5f7a8_add_events_ingested_meter.py new file mode 100644 index 0000000000..09abfa2aaa --- /dev/null +++ b/api/ee/databases/postgres/migrations/core/versions/b2c3d4e5f7a8_add_events_ingested_meter.py @@ -0,0 +1,71 @@ +"""Add EVENTS_INGESTED to meters_type + +Revision ID: b2c3d4e5f7a8 +Revises: a1b2c3d4e5f7 +Create Date: 2026-05-19 18:30:00.000000 +""" + +from typing import Sequence, Union + +from alembic import op +import sqlalchemy as sa + + +revision: str = "b2c3d4e5f7a8" +down_revision: Union[str, None] = "a1b2c3d4e5f7" +branch_labels: Union[str, Sequence[str], None] = None +depends_on: Union[str, Sequence[str], None] = None + +ENUM_NAME = "meters_type" +TEMP_ENUM_NAME = "meters_type_temp" +TABLE_NAME = "meters" +COLUMN_NAME = "key" + +NEW_ENUM_LABELS = ( + "USERS", + "EVALUATIONS_RUN", + "TRACES_INGESTED", + "TRACES_RETRIEVED", + "CREDITS_CONSUMED", + "EVENTS_INGESTED", +) + +OLD_ENUM_LABELS = ( + "USERS", + "EVALUATIONS_RUN", + "TRACES_INGESTED", + "TRACES_RETRIEVED", + "CREDITS_CONSUMED", +) + + +def _replace_enum(labels: tuple[str, ...]) -> None: + op.execute( + sa.text( + f"CREATE TYPE {TEMP_ENUM_NAME} AS ENUM (" + + ", ".join(f"'{label}'" for label in labels) + + ")" + ) + ) + op.execute( + sa.text( + f"ALTER TABLE {TABLE_NAME} " + f"ALTER COLUMN {COLUMN_NAME} TYPE {TEMP_ENUM_NAME} " + f"USING {COLUMN_NAME}::text::{TEMP_ENUM_NAME}" + ) + ) + op.execute(sa.text(f"DROP TYPE {ENUM_NAME}")) + op.execute(sa.text(f"ALTER TYPE {TEMP_ENUM_NAME} RENAME TO {ENUM_NAME}")) + + +def upgrade() -> None: + _replace_enum(NEW_ENUM_LABELS) + + +def downgrade() -> None: + op.execute( + sa.text( + f"DELETE FROM {TABLE_NAME} WHERE {COLUMN_NAME}::text = 'EVENTS_INGESTED'" + ) + ) + _replace_enum(OLD_ENUM_LABELS) diff --git a/api/ee/src/core/entitlements/types.py b/api/ee/src/core/entitlements/types.py index 5345156f21..39c1eb644b 100644 --- a/api/ee/src/core/entitlements/types.py +++ b/api/ee/src/core/entitlements/types.py @@ -57,6 +57,7 @@ class Tracker(str, Enum): class Flag(str, Enum): RBAC = "rbac" + AUDIT = "audit" ACCESS = "access" DOMAINS = "domains" SSO = "sso" @@ -347,6 +348,7 @@ class Throttle(BaseModel): DefaultPlan.CLOUD_V0_HOBBY: { Tracker.FLAGS: { Flag.RBAC: False, + Flag.AUDIT: False, Flag.ACCESS: False, Flag.DOMAINS: False, Flag.SSO: False, @@ -437,6 +439,7 @@ class Throttle(BaseModel): DefaultPlan.CLOUD_V0_PRO: { Tracker.FLAGS: { Flag.RBAC: False, + Flag.AUDIT: False, Flag.ACCESS: False, Flag.DOMAINS: False, Flag.SSO: False, @@ -524,6 +527,7 @@ class Throttle(BaseModel): DefaultPlan.CLOUD_V0_BUSINESS: { Tracker.FLAGS: { Flag.RBAC: True, + Flag.AUDIT: True, Flag.ACCESS: True, Flag.DOMAINS: True, Flag.SSO: True, @@ -609,6 +613,7 @@ class Throttle(BaseModel): DefaultPlan.CLOUD_V0_AGENTA_AI: { Tracker.FLAGS: { Flag.RBAC: True, + Flag.AUDIT: True, Flag.ACCESS: True, Flag.DOMAINS: True, Flag.SSO: True, @@ -645,6 +650,7 @@ class Throttle(BaseModel): DefaultPlan.SELF_HOSTED_ENTERPRISE: { Tracker.FLAGS: { Flag.RBAC: True, + Flag.AUDIT: True, Flag.ACCESS: True, Flag.DOMAINS: True, Flag.SSO: True, @@ -696,6 +702,7 @@ class Throttle(BaseModel): Flag.ACCESS, Flag.DOMAINS, Flag.SSO, + Flag.AUDIT, ], Tracker.GAUGES: [ Gauge.USERS, diff --git a/api/ee/src/core/meters/types.py b/api/ee/src/core/meters/types.py index 7d198f79dc..e249f03914 100644 --- a/api/ee/src/core/meters/types.py +++ b/api/ee/src/core/meters/types.py @@ -27,6 +27,7 @@ class Meters(str, Enum): TRACES_INGESTED = Counter.TRACES_INGESTED.value TRACES_RETRIEVED = Counter.TRACES_RETRIEVED.value CREDITS_CONSUMED = Counter.CREDITS_CONSUMED.value + EVENTS_INGESTED = Counter.EVENTS_INGESTED.value # GAUGES USERS = Gauge.USERS.value diff --git a/api/ee/src/core/subscriptions/settings.py b/api/ee/src/core/subscriptions/settings.py index bb7f6a07dc..c3b752a5ba 100644 --- a/api/ee/src/core/subscriptions/settings.py +++ b/api/ee/src/core/subscriptions/settings.py @@ -10,7 +10,6 @@ Pricing entries provide Stripe line items and the free-plan marker. """ -from os import getenv from typing import Any, Dict, List, Optional from pydantic import BaseModel, ConfigDict, ValidationError @@ -422,19 +421,12 @@ def require_pricing( return line_items plan = slug or "" - legacy_hint = "" - if env.billing.pricing is None and getenv("STRIPE_PRICING"): - legacy_hint = ( - " Legacy STRIPE_PRICING is ignored on this branch; migrate it to " - "AGENTA_BILLING_PRICING." - ) raise ValueError( f"{purpose} requires Stripe line items for plan '{plan}', but none " "are configured. Set AGENTA_BILLING_PRICING with an entry for this " "plan containing at least one Stripe slot, for example " f'{{"{plan}": {{"base": {{"price": "price_...", "quantity": 1}}}}}}.' - f"{legacy_hint}" ) diff --git a/api/ee/src/models/shared_models.py b/api/ee/src/models/shared_models.py index 0ceae0ea60..fccba1affd 100644 --- a/api/ee/src/models/shared_models.py +++ b/api/ee/src/models/shared_models.py @@ -153,6 +153,9 @@ class Permission(str, Enum): VIEW_EVALUATION_QUEUES = "view_evaluation_queues" EDIT_EVALUATION_QUEUES = "edit_evaluation_queues" + # Events + VIEW_EVENTS = "view_events" + # Tools VIEW_TOOLS = "view_tools" EDIT_TOOLS = "edit_tools" @@ -228,6 +231,7 @@ def default_permissions(cls, role): cls.EDIT_ENVIRONMENTS, cls.EDIT_APP_ENVIRONMENT_DEPLOYMENT, cls.CREATE_APP_ENVIRONMENT_DEPLOYMENT, + cls.VIEW_EVENTS, ] ADMIN_PERMISSIONS = DEVELOPER_PERMISSIONS + [ cls.EDIT_WORKSPACE, diff --git a/api/ee/src/services/db_manager_ee.py b/api/ee/src/services/db_manager_ee.py index e0991d1206..9b57ebf3c8 100644 --- a/api/ee/src/services/db_manager_ee.py +++ b/api/ee/src/services/db_manager_ee.py @@ -886,7 +886,7 @@ async def add_user_to_workspace_and_org( async def remove_user_from_workspace( workspace_id: str, email: str, -) -> WorkspaceResponse: +) -> bool: """ Remove a user from a workspace. @@ -894,9 +894,6 @@ async def remove_user_from_workspace( workspace_id (str): The ID of the workspace. payload (UserRole): The payload containing the user email and role to remove. - Returns: - workspace (WorkspaceResponse): The updated workspace. - Raises: HTTPException -- 403, from fastapi import Request """ @@ -995,8 +992,6 @@ async def remove_user_from_workspace( membership_id=member_joined_org.id, ) - await session.commit() - # If there's an invitation for the provided email address, delete it user_workspace_invitations_query = await session.execute( select(InvitationDB) @@ -1008,15 +1003,26 @@ async def remove_user_from_workspace( load_only( InvitationDB.id, # type: ignore InvitationDB.project_id, # type: ignore + InvitationDB.user_id, # type: ignore ) ) ) user_invitations = user_workspace_invitations_query.scalars().all() for invitation in user_invitations: - await delete_invitation(str(invitation.id)) + await session.delete(invitation) - workspace_db = await db_manager.get_workspace(workspace_id=workspace_id) - return await get_workspace_in_format(workspace_db) + log.info( + "[scopes] invitation deleted", + organization_id=str(workspace.organization_id), + workspace_id=str(workspace_id), + project_id=str(invitation.project_id), + user_id=str(invitation.user_id) if invitation.user_id else None, + membership_id=invitation.id, + ) + + await session.commit() + + return True async def create_organization( diff --git a/api/ee/src/services/selectors.py b/api/ee/src/services/selectors.py index afc27b7e6d..017229d7bb 100644 --- a/api/ee/src/services/selectors.py +++ b/api/ee/src/services/selectors.py @@ -102,4 +102,12 @@ async def get_org_default_workspace(organization: Organization) -> WorkspaceDB: ) ) workspace = result.scalars().first() - return workspace + if workspace is not None: + return workspace + + result = await session.execute( + select(WorkspaceDB).filter_by( + organization_id=organization.id, + ) + ) + return result.scalars().first() diff --git a/api/ee/src/services/workspace_manager.py b/api/ee/src/services/workspace_manager.py index a4271bf7e7..c3b9c11896 100644 --- a/api/ee/src/services/workspace_manager.py +++ b/api/ee/src/services/workspace_manager.py @@ -417,7 +417,7 @@ async def accept_workspace_invitation( async def remove_user_from_workspace( workspace_id: str, email: str, -) -> WorkspaceResponse: +) -> bool: """ Remove a user from a workspace. @@ -426,7 +426,7 @@ async def remove_user_from_workspace( payload (UserRole): The payload containing the user ID and role to remove. Returns: - WorkspaceResponse: The updated workspace. + bool: True when the member or pending invitation was removed. """ remove_user = await db_manager_ee.remove_user_from_workspace(workspace_id, email) diff --git a/api/ee/tests/pytest/acceptance/workspaces/test_workspace_members.py b/api/ee/tests/pytest/acceptance/workspaces/test_workspace_members.py new file mode 100644 index 0000000000..222cfb2877 --- /dev/null +++ b/api/ee/tests/pytest/acceptance/workspaces/test_workspace_members.py @@ -0,0 +1,102 @@ +from uuid import uuid4 + + +def _create_account(admin_api, *, email): + resp = admin_api( + "POST", + "/admin/simple/accounts/", + json={ + "accounts": { + "u": { + "user": {"email": email}, + "options": { + "create_api_keys": True, + "return_api_keys": True, + "seed_defaults": True, + }, + } + } + }, + ) + assert resp.status_code == 200, resp.text + return resp.json()["accounts"]["u"] + + +def _delete_account_by_email(admin_api, *, email): + resp = admin_api( + "DELETE", + "/admin/simple/accounts/", + json={"accounts": {"u": {"user": {"email": email}}}, "confirm": "delete"}, + ) + assert resp.status_code == 204, resp.text + + +def _first_id(values): + return next(iter(values.values()))["id"] + + +def _api_key(account): + return account["api_keys"]["key"] + + +def _member_emails(org_details): + return { + member["user"]["email"] + for member in org_details["default_workspace"].get("members", []) + } + + +class TestWorkspaceMembers: + def test_remove_pending_workspace_invitation(self, admin_api): + uid = uuid4().hex[:12] + owner_email = f"owner-{uid}@test.agenta.ai" + invite_email = f"pending-{uid}@agenta.ai" + + account = _create_account(admin_api, email=owner_email) + organization_id = _first_id(account["organizations"]) + workspace_id = _first_id(account["workspaces"]) + project_id = _first_id(account["projects"]) + headers = {"Authorization": f"ApiKey {_api_key(account)}"} + + try: + invite_resp = admin_api( + "POST", + f"/organizations/{organization_id}/workspaces/{workspace_id}/invite", + params={"project_id": project_id}, + headers=headers, + json=[{"email": invite_email, "roles": ["viewer"]}], + ) + assert invite_resp.status_code == 200, invite_resp.text + + org_resp = admin_api( + "GET", + f"/organizations/{organization_id}", + params={"project_id": project_id}, + headers=headers, + ) + assert org_resp.status_code == 200, org_resp.text + assert invite_email in _member_emails(org_resp.json()) + + remove_resp = admin_api( + "DELETE", + f"/workspaces/{workspace_id}/users", + params={ + "project_id": project_id, + "organization_id": organization_id, + "email": invite_email, + }, + headers=headers, + ) + assert remove_resp.status_code == 200, remove_resp.text + assert remove_resp.json() is True + + refreshed_resp = admin_api( + "GET", + f"/organizations/{organization_id}", + params={"project_id": project_id}, + headers=headers, + ) + assert refreshed_resp.status_code == 200, refreshed_resp.text + assert invite_email not in _member_emails(refreshed_resp.json()) + finally: + _delete_account_by_email(admin_api, email=owner_email) diff --git a/api/ee/tests/pytest/unit/services/test_db_manager_ee.py b/api/ee/tests/pytest/unit/services/test_db_manager_ee.py index c98c0078c3..89bbea5e31 100644 --- a/api/ee/tests/pytest/unit/services/test_db_manager_ee.py +++ b/api/ee/tests/pytest/unit/services/test_db_manager_ee.py @@ -52,6 +52,33 @@ def _patch_core_session(monkeypatch, memberships): ) +class _PendingInviteSession: + def __init__(self, invitations): + self._invitations = invitations + self.deleted = [] + self.committed = False + + async def execute(self, _query): + return _ExecuteResult(self._invitations) + + async def delete(self, item): + self.deleted.append(item) + + async def commit(self): + self.committed = True + + +class _PendingInviteSessionContext: + def __init__(self, session): + self._session = session + + async def __aenter__(self): + return self._session + + async def __aexit__(self, exc_type, exc, tb): + return False + + @pytest.mark.asyncio async def test_get_default_workspace_id_prefers_owner_membership(monkeypatch): owner_workspace_id = uuid4() @@ -112,3 +139,58 @@ async def test_get_default_workspace_id_raises_when_user_has_no_memberships( with pytest.raises(NoResultFound, match="No workspace membership found"): await db_manager_ee.get_default_workspace_id(str(uuid4())) + + +@pytest.mark.asyncio +async def test_remove_user_from_workspace_deletes_pending_invitation_without_user( + monkeypatch, +): + workspace_id = uuid4() + organization_id = uuid4() + project_id = uuid4() + invitation = SimpleNamespace(id=uuid4(), project_id=project_id, user_id=None) + session = _PendingInviteSession([invitation]) + + async def get_user_with_email(email): + assert email == "pending@test.agenta.ai" + return None + + async def get_workspace(workspace_id): + return SimpleNamespace(id=workspace_id, organization_id=organization_id) + + async def fetch_projects_by_workspace(workspace_id): + return [SimpleNamespace(id=project_id)] + + async def fail_if_nested_invitation_delete_is_used(invitation_id): + raise AssertionError(f"unexpected nested invitation delete: {invitation_id}") + + monkeypatch.setattr( + db_manager_ee.db_manager, + "get_user_with_email", + get_user_with_email, + ) + monkeypatch.setattr(db_manager_ee.db_manager, "get_workspace", get_workspace) + monkeypatch.setattr( + db_manager_ee.db_manager, + "fetch_projects_by_workspace", + fetch_projects_by_workspace, + ) + monkeypatch.setattr( + db_manager_ee, + "delete_invitation", + fail_if_nested_invitation_delete_is_used, + ) + monkeypatch.setattr( + db_manager_ee.engine, + "core_session", + lambda: _PendingInviteSessionContext(session), + ) + + result = await db_manager_ee.remove_user_from_workspace( + str(workspace_id), + "pending@test.agenta.ai", + ) + + assert result is True + assert session.deleted == [invitation] + assert session.committed is True diff --git a/api/ee/tests/pytest/unit/test_billing_settings.py b/api/ee/tests/pytest/unit/test_billing_settings.py index 770fa7dd81..f16451c9b8 100644 --- a/api/ee/tests/pytest/unit/test_billing_settings.py +++ b/api/ee/tests/pytest/unit/test_billing_settings.py @@ -208,6 +208,11 @@ def test_multiple_trial_entries_rejected(self): class TestDefaults: + @pytest.fixture(autouse=True) + def _no_pricing_env(self, monkeypatch): + monkeypatch.setattr(settings, "_PRICING", {}) + monkeypatch.setattr(settings, "_FREE_PLAN", None) + def test_get_catalog_returns_default_catalog(self): catalog = settings.get_catalog() assert len(catalog) > 0 @@ -247,7 +252,9 @@ def test_require_pricing_fails_with_clear_message(self): assert "AGENTA_BILLING_PRICING" in message assert "base" in message - def test_require_pricing_mentions_legacy_pricing(self, monkeypatch): + def test_require_pricing_does_not_warn_about_supported_legacy_alias( + self, monkeypatch + ): monkeypatch.setenv("STRIPE_PRICING", '{"cloud_v0_pro": {"base": {}}}') with pytest.raises(ValueError) as exc: @@ -256,7 +263,7 @@ def test_require_pricing_mentions_legacy_pricing(self, monkeypatch): purpose="Reverse trial signup", ) - assert "Legacy STRIPE_PRICING is ignored" in str(exc.value) + assert "Legacy STRIPE_PRICING is ignored" not in str(exc.value) def test_get_stripe_line_items_none_slug_returns_empty(self): assert settings.get_stripe_line_items(None) == [] @@ -275,10 +282,16 @@ def test_get_free_plan_falls_back_to_hobby(self): assert settings.get_free_plan() == DefaultPlan.CLOUD_V0_HOBBY.value def test_get_trial_plan_disabled_when_stripe_disabled_by_default(self): - assert settings.get_trial_plan() is None + if settings.env.stripe.enabled: + assert settings.get_trial_plan() == DefaultPlan.CLOUD_V0_PRO.value + else: + assert settings.get_trial_plan() is None def test_get_trial_days_disabled_when_stripe_disabled_by_default(self): - assert settings.get_trial_days() is None + if settings.env.stripe.enabled: + assert settings.get_trial_days() == 14 + else: + assert settings.get_trial_days() is None def test_trial_enabled_false_when_stripe_disabled_by_default(self): - assert settings.trial_enabled() is False + assert settings.trial_enabled() is settings.env.stripe.enabled diff --git a/api/ee/tests/pytest/unit/test_controls_env_override.py b/api/ee/tests/pytest/unit/test_controls_env_override.py index 004e7bc70e..6a32fb7f14 100644 --- a/api/ee/tests/pytest/unit/test_controls_env_override.py +++ b/api/ee/tests/pytest/unit/test_controls_env_override.py @@ -67,6 +67,48 @@ def test_no_env_uses_defaults(self): ) assert out.splitlines() == [str(expected_plans), str(expected_catalog)] + def test_billing_pricing_accepts_legacy_agenta_pricing_alias(self): + out = _ok( + "from oss.src.utils.env import env; " + "print(env.billing.pricing['cloud_v0_pro']['base']['price'])", + { + "AGENTA_PRICING": json.dumps( + {"cloud_v0_pro": {"base": {"price": "price_agenta"}}} + ), + }, + ) + assert out.strip() == "price_agenta" + + def test_billing_pricing_accepts_legacy_stripe_pricing_alias(self): + out = _ok( + "from oss.src.utils.env import env; " + "print(env.billing.pricing['cloud_v0_pro']['base']['price'])", + { + "STRIPE_PRICING": json.dumps( + {"cloud_v0_pro": {"base": {"price": "price_stripe"}}} + ), + }, + ) + assert out.strip() == "price_stripe" + + def test_billing_pricing_prefers_canonical_env_over_legacy_aliases(self): + out = _ok( + "from oss.src.utils.env import env; " + "print(env.billing.pricing['cloud_v0_pro']['base']['price'])", + { + "AGENTA_BILLING_PRICING": json.dumps( + {"cloud_v0_pro": {"base": {"price": "price_billing"}}} + ), + "AGENTA_PRICING": json.dumps( + {"cloud_v0_pro": {"base": {"price": "price_agenta"}}} + ), + "STRIPE_PRICING": json.dumps( + {"cloud_v0_pro": {"base": {"price": "price_stripe"}}} + ), + }, + ) + assert out.strip() == "price_billing" + # --------------------------------------------------------------------------- # Plans override diff --git a/api/ee/tests/pytest/unit/test_meters_types.py b/api/ee/tests/pytest/unit/test_meters_types.py new file mode 100644 index 0000000000..ec2ef97c94 --- /dev/null +++ b/api/ee/tests/pytest/unit/test_meters_types.py @@ -0,0 +1,12 @@ +from ee.src.core.entitlements.types import Counter, Gauge +from ee.src.core.meters.types import Meters + + +def test_every_counter_has_meter_key_mapping(): + for counter in Counter: + assert Meters[counter.name].value == counter.value + + +def test_every_gauge_has_meter_key_mapping(): + for gauge in Gauge: + assert Meters[gauge.name].value == gauge.value diff --git a/api/oss/src/apis/fastapi/applications/router.py b/api/oss/src/apis/fastapi/applications/router.py index c00c4ed17f..c6ce00c57d 100644 --- a/api/oss/src/apis/fastapi/applications/router.py +++ b/api/oss/src/apis/fastapi/applications/router.py @@ -8,6 +8,8 @@ from oss.src.utils.exceptions import intercept_exceptions, suppress_exceptions from oss.src.utils.caching import invalidate_cache +from oss.src.core.events.utils import publish_revision_event + from oss.src.core.git.types import VariantForkError from oss.src.core.shared.dtos import ( Reference, @@ -104,6 +106,12 @@ def _build_rename_apps_disabled_detail(*, existing_name: Optional[str]) -> str: class ApplicationsRouter: + # `applications.revisions.{retrieved,fetched,queried,logged}` READ events + # are emitted from this router after each handler materializes its + # response. `applications.revisions.committed` is a WRITE event and is + # emitted from `ApplicationsService.commit_application_revision`, not + # from this router. See core/events/utils.py module docstring for the + # read-vs-write split rationale. def __init__( self, *, @@ -1406,6 +1414,14 @@ async def retrieve_application_revision( resolution_info=resolution_info, ) + await publish_revision_event( + request=request, + domain="application", + action="retrieve", + revision=application_revision_response.application_revision, + count=application_revision_response.count, + ) + return application_revision_response @intercept_exceptions() @@ -1470,11 +1486,21 @@ async def fetch_application_revision( ) ) - return ApplicationRevisionResponse( + response = ApplicationRevisionResponse( count=1 if application_revision else 0, application_revision=application_revision, ) + await publish_revision_event( + request=request, + domain="application", + action="fetch", + revision=response.application_revision, + count=response.count, + ) + + return response + @intercept_exceptions() async def edit_application_revision( self, @@ -1640,11 +1666,21 @@ async def query_application_revisions( f"Failed to resolve embeds for revision {revision.id}: {e}" ) - return ApplicationRevisionsResponse( + response = ApplicationRevisionsResponse( count=len(application_revisions), application_revisions=application_revisions, ) + await publish_revision_event( + request=request, + domain="application", + action="query", + revisions=response.application_revisions or [], + count=response.count, + ) + + return response + @intercept_exceptions() async def commit_application_revision( self, @@ -1674,11 +1710,15 @@ async def commit_application_revision( application_revision_commit=application_revision_commit_request.application_revision_commit, ) - return ApplicationRevisionResponse( + response = ApplicationRevisionResponse( count=1 if application_revision else 0, application_revision=application_revision, ) + # commit emission lives in ApplicationsService.commit_application_revision + + return response + @intercept_exceptions() async def log_application_revisions( self, @@ -1714,6 +1754,14 @@ async def log_application_revisions( application_revisions=application_revisions, ) + await publish_revision_event( + request=request, + domain="application", + action="log", + revisions=revisions_response.application_revisions or [], + count=revisions_response.count, + ) + return revisions_response @intercept_exceptions() diff --git a/api/oss/src/apis/fastapi/environments/router.py b/api/oss/src/apis/fastapi/environments/router.py index cd5e37a172..110d63d19a 100644 --- a/api/oss/src/apis/fastapi/environments/router.py +++ b/api/oss/src/apis/fastapi/environments/router.py @@ -7,6 +7,8 @@ from oss.src.utils.logging import get_module_logger from oss.src.utils.exceptions import intercept_exceptions, suppress_exceptions +from oss.src.core.events.utils import publish_revision_event + from oss.src.core.shared.dtos import ( Reference, ) @@ -77,6 +79,12 @@ class EnvironmentsRouter: + # `environments.revisions.{retrieved,fetched,queried,logged}` READ events + # are emitted from this router after each handler materializes its + # response. `environments.revisions.committed` is a WRITE event and is + # emitted from `EnvironmentsService.commit_environment_revision`, not + # from this router. (This was the original precedent for the read-vs-write + # split.) See core/events/utils.py module docstring for the rationale. def __init__( self, *, @@ -766,6 +774,14 @@ async def retrieve_environment_revision( resolution_info=resolution_info, ) + await publish_revision_event( + request=request, + domain="environment", + action="retrieve", + revision=environment_revision_response.environment_revision, + count=environment_revision_response.count, + ) + return environment_revision_response @intercept_exceptions() @@ -878,11 +894,21 @@ async def fetch_environment_revision( ) ) - return EnvironmentRevisionResponse( + response = EnvironmentRevisionResponse( count=1 if environment_revision else 0, environment_revision=environment_revision, ) + await publish_revision_event( + request=request, + domain="environment", + action="fetch", + revision=response.environment_revision, + count=response.count, + ) + + return response + @intercept_exceptions() async def edit_environment_revision( self, @@ -1051,11 +1077,21 @@ async def query_environment_revisions( f"Failed to resolve embeds for revision {revision.id}: {e}" ) - return EnvironmentRevisionsResponse( + response = EnvironmentRevisionsResponse( count=len(environment_revisions), environment_revisions=environment_revisions, ) + await publish_revision_event( + request=request, + domain="environment", + action="query", + revisions=response.environment_revisions or [], + count=response.count, + ) + + return response + @intercept_exceptions() async def commit_environment_revision( self, @@ -1134,6 +1170,14 @@ async def log_environment_revisions( environment_revisions=environment_revisions, ) + await publish_revision_event( + request=request, + domain="environment", + action="log", + revisions=revisions_response.environment_revisions or [], + count=revisions_response.count, + ) + return revisions_response diff --git a/api/oss/src/apis/fastapi/evaluators/router.py b/api/oss/src/apis/fastapi/evaluators/router.py index 88c5518952..49f660a72c 100644 --- a/api/oss/src/apis/fastapi/evaluators/router.py +++ b/api/oss/src/apis/fastapi/evaluators/router.py @@ -8,6 +8,8 @@ from oss.src.utils.exceptions import intercept_exceptions, suppress_exceptions from oss.src.utils.caching import invalidate_cache +from oss.src.core.events.utils import publish_revision_event + from oss.src.core.git.types import VariantForkError from oss.src.core.shared.dtos import ( Reference, @@ -121,6 +123,12 @@ def _registry_entry_to_catalog_template( class EvaluatorsRouter: + # `evaluators.revisions.{retrieved,fetched,queried,logged}` READ events + # are emitted from this router after each handler materializes its + # response. `evaluators.revisions.committed` is a WRITE event and is + # emitted from `EvaluatorsService.commit_evaluator_revision`, not from + # this router. See core/events/utils.py module docstring for the + # read-vs-write split rationale. def __init__( self, *, @@ -1385,6 +1393,14 @@ async def retrieve_evaluator_revision( resolution_info=resolution_info, ) + await publish_revision_event( + request=request, + domain="evaluator", + action="retrieve", + revision=evaluator_revision_response.evaluator_revision, + count=evaluator_revision_response.count, + ) + return evaluator_revision_response @intercept_exceptions() @@ -1449,11 +1465,21 @@ async def fetch_evaluator_revision( evaluator_revision_ref=Reference(id=evaluator_revision_id), ) - return EvaluatorRevisionResponse( + response = EvaluatorRevisionResponse( count=1 if evaluator_revision else 0, evaluator_revision=evaluator_revision, ) + await publish_revision_event( + request=request, + domain="evaluator", + action="fetch", + revision=response.evaluator_revision, + count=response.count, + ) + + return response + @intercept_exceptions() async def edit_evaluator_revision( self, @@ -1608,11 +1634,21 @@ async def query_evaluator_revisions( f"Failed to resolve embeds for revision {revision.id}: {e}" ) - return EvaluatorRevisionsResponse( + response = EvaluatorRevisionsResponse( count=len(evaluator_revisions), evaluator_revisions=evaluator_revisions, ) + await publish_revision_event( + request=request, + domain="evaluator", + action="query", + revisions=response.evaluator_revisions or [], + count=response.count, + ) + + return response + @intercept_exceptions() async def commit_evaluator_revision( self, @@ -1641,11 +1677,15 @@ async def commit_evaluator_revision( evaluator_revision_commit=evaluator_revision_commit_request.evaluator_revision_commit, ) - return EvaluatorRevisionResponse( + response = EvaluatorRevisionResponse( count=1 if evaluator_revision else 0, evaluator_revision=evaluator_revision, ) + # commit emission lives in EvaluatorsService.commit_evaluator_revision + + return response + @intercept_exceptions() async def log_evaluator_revisions( self, @@ -1678,6 +1718,14 @@ async def log_evaluator_revisions( evaluator_revisions=evaluator_revisions, ) + await publish_revision_event( + request=request, + domain="evaluator", + action="log", + revisions=revisions_response.evaluator_revisions or [], + count=revisions_response.count, + ) + return revisions_response @intercept_exceptions() diff --git a/api/oss/src/apis/fastapi/events/router.py b/api/oss/src/apis/fastapi/events/router.py index 72352a5322..d95b2f1e7d 100644 --- a/api/oss/src/apis/fastapi/events/router.py +++ b/api/oss/src/apis/fastapi/events/router.py @@ -10,6 +10,12 @@ if is_ee(): from ee.src.models.shared_models import Permission from ee.src.utils.permissions import check_action_access, FORBIDDEN_EXCEPTION + from ee.src.utils.entitlements import ( + check_entitlements, + NOT_ENTITLED_RESPONSE, + Flag, + Tracker, + ) class EventsRouter: @@ -43,10 +49,16 @@ async def query_events( if not await check_action_access( # type: ignore user_uid=request.state.user_id, project_id=request.state.project_id, - permission=Permission.VIEW_SPANS, # type: ignore + permission=Permission.VIEW_EVENTS, # type: ignore ): raise FORBIDDEN_EXCEPTION # type: ignore + check, _, _ = await check_entitlements( # type: ignore + key=Flag.AUDIT, # type: ignore + ) + if not check: + return NOT_ENTITLED_RESPONSE(Tracker.FLAGS) # type: ignore + events = await self.events_service.query( project_id=UUID(request.state.project_id), # diff --git a/api/oss/src/apis/fastapi/queries/router.py b/api/oss/src/apis/fastapi/queries/router.py index d9be2b0b36..b50411440d 100644 --- a/api/oss/src/apis/fastapi/queries/router.py +++ b/api/oss/src/apis/fastapi/queries/router.py @@ -8,6 +8,8 @@ from oss.src.utils.exceptions import intercept_exceptions, suppress_exceptions from oss.src.utils.caching import get_cache, set_cache +from oss.src.core.events.utils import publish_revision_event + from oss.src.core.shared.dtos import ( Reference, ) @@ -72,6 +74,12 @@ def _to_plain_dict(value): class QueriesRouter: + # `queries.revisions.{retrieved,fetched,queried,logged}` READ events are + # emitted from this router after each handler materializes its response. + # `queries.revisions.committed` is a WRITE event and is emitted from + # `QueriesService.commit_query_revision`, not from this router. See + # core/events/utils.py module docstring for the read-vs-write split + # rationale. def __init__(self, *, queries_service: QueriesService): self.queries_service = queries_service self.router = APIRouter() @@ -733,6 +741,14 @@ async def fetch_query_revision( query_revision=query_revision, ) + await publish_revision_event( + request=request, + domain="query", + action="fetch", + revision=query_revision_response.query_revision, + count=query_revision_response.count, + ) + return query_revision_response @intercept_exceptions() @@ -862,6 +878,14 @@ async def query_query_revisions( query_revisions=query_revisions, ) + await publish_revision_event( + request=request, + domain="query", + action="query", + revisions=query_revisions_response.query_revisions or [], + count=query_revisions_response.count, + ) + return query_revisions_response @intercept_exceptions() @@ -891,6 +915,8 @@ async def commit_query_revision( query_revision=query_revision, ) + # commit emission lives in QueriesService.commit_query_revision + return query_revision_response @intercept_exceptions() @@ -920,6 +946,14 @@ async def log_query_revisions( query_revisions=query_revisions, ) + await publish_revision_event( + request=request, + domain="query", + action="log", + revisions=revisions_response.query_revisions or [], + count=revisions_response.count, + ) + return revisions_response @intercept_exceptions() @@ -1012,6 +1046,14 @@ async def retrieve_query_revision( query_revision=query_revision, ) + await publish_revision_event( + request=request, + domain="query", + action="retrieve", + revision=query_revision_response.query_revision, + count=query_revision_response.count, + ) + return query_revision_response diff --git a/api/oss/src/apis/fastapi/testcases/router.py b/api/oss/src/apis/fastapi/testcases/router.py index 348d8ba6cc..be309f68bc 100644 --- a/api/oss/src/apis/fastapi/testcases/router.py +++ b/api/oss/src/apis/fastapi/testcases/router.py @@ -8,6 +8,10 @@ from oss.src.utils.exceptions import intercept_exceptions, suppress_exceptions from oss.src.apis.fastapi.shared.utils import compute_next_windowing +from oss.src.core.events.utils import ( + publish_testcase_fetched, + publish_testcase_queried, +) from oss.src.core.shared.dtos import Windowing from oss.src.core.testcases.service import ( @@ -34,6 +38,12 @@ class TestcasesRouter: """ FastAPI router for testcase endpoints. + + Testcase READ events (`testcases.fetched` / `testcases.queried`) are + emitted from the router boundary, after the response is materialized. + This is the canonical place for read emission — see + `core/events/utils.py` module docstring for why reads emit at the router + and writes emit at the service. """ __test__ = False @@ -119,11 +129,21 @@ async def fetch_testcases( windowing=None, ) - return TestcasesResponse( + response = TestcasesResponse( count=len(testcases), testcases=testcases if testcases else [], ) + returned_ids = [getattr(tc, "id", None) for tc in (response.testcases or [])] + returned_ids = [t for t in returned_ids if t is not None] + await publish_testcase_fetched( + request=request, + count=response.count, + testcase_ids=returned_ids, + ) + + return response + @intercept_exceptions() @suppress_exceptions(default=TestcaseResponse(), exclude=[HTTPException]) async def fetch_testcase( @@ -153,6 +173,17 @@ async def fetch_testcase( testcase=testcase, ) + resolved_id = ( + getattr(testcase_response.testcase, "id", None) + if testcase_response.testcase + else None + ) + await publish_testcase_fetched( + request=request, + count=testcase_response.count, + testcase_id=resolved_id, + ) + return testcase_response @intercept_exceptions() @@ -247,6 +278,16 @@ async def query_testcases( windowing=next_windowing, ) + returned_ids = [ + getattr(tc, "id", None) for tc in (testcase_response.testcases or []) + ] + returned_ids = [t for t in returned_ids if t is not None] + await publish_testcase_queried( + request=request, + count=testcase_response.count, + testcase_ids=returned_ids, + ) + return testcase_response @staticmethod diff --git a/api/oss/src/apis/fastapi/testsets/router.py b/api/oss/src/apis/fastapi/testsets/router.py index de7314c224..27c6d39f3d 100644 --- a/api/oss/src/apis/fastapi/testsets/router.py +++ b/api/oss/src/apis/fastapi/testsets/router.py @@ -27,6 +27,7 @@ from oss.src.utils.caching import set_cache, get_cache from oss.src.apis.fastapi.shared.utils import compute_next_windowing +from oss.src.core.events.utils import publish_revision_event from oss.src.core.shared.dtos import ( Reference, @@ -252,6 +253,12 @@ def _build_testcase_export_row(testcase: Any) -> Dict[str, Any]: class TestsetsRouter: + # `testsets.revisions.{retrieved,fetched,queried,logged}` READ events are + # emitted from this router after each handler materializes its response. + # `testsets.revisions.committed` is a WRITE event and is emitted from + # `TestsetsService.commit_testset_revision`, not from this router. See + # core/events/utils.py module docstring for the read-vs-write split + # rationale. TESTCASES_FLAGS = TestsetFlags( has_testcases=True, has_traces=False, @@ -1028,6 +1035,14 @@ async def fetch_testset_revision( testset_revision=testset_revision, ) + await publish_revision_event( + request=request, + domain="testset", + action="fetch", + revision=testset_revision_response.testset_revision, + count=testset_revision_response.count, + ) + return testset_revision_response @intercept_exceptions() @@ -1372,6 +1387,14 @@ async def query_testset_revisions( testset_revisions=testset_revisions, ) + await publish_revision_event( + request=request, + domain="testset", + action="query", + revisions=testset_revisions_response.testset_revisions or [], + count=testset_revisions_response.count, + ) + return testset_revisions_response @intercept_exceptions() @@ -1414,6 +1437,8 @@ async def commit_testset_revision( testset_revision=testset_revision, ) + # commit emission lives in TestsetsService.commit_testset_revision + return testset_revision_response @intercept_exceptions() @@ -1499,6 +1524,14 @@ async def retrieve_testset_revision( testset_revision=testset_revision, ) + await publish_revision_event( + request=request, + domain="testset", + action="retrieve", + revision=testset_revision_response.testset_revision, + count=testset_revision_response.count, + ) + return testset_revision_response @intercept_exceptions() @@ -1529,6 +1562,14 @@ async def log_testset_revisions( testset_revisions=testset_revisions, ) + await publish_revision_event( + request=request, + domain="testset", + action="log", + revisions=testset_revisions_response.testset_revisions or [], + count=testset_revisions_response.count, + ) + return testset_revisions_response diff --git a/api/oss/src/apis/fastapi/tracing/router.py b/api/oss/src/apis/fastapi/tracing/router.py index c0172d1021..ccb24e5ed2 100644 --- a/api/oss/src/apis/fastapi/tracing/router.py +++ b/api/oss/src/apis/fastapi/tracing/router.py @@ -34,6 +34,10 @@ UsersQueryRequest, UserIdsResponse, ) +from oss.src.core.events.utils import ( + publish_trace_fetched, + publish_trace_queried, +) from oss.src.core.tracing.service import TracingService from oss.src.core.tracing.utils.parsing import parse_trace_id_to_uuid from oss.src.core.tracing.utils.trees import traces_to_trace_map @@ -1341,6 +1345,10 @@ async def query_users( class TracesRouter: + # Trace READ events (`traces.fetched` / `traces.queried`) are emitted from + # the router boundary, after the response is materialized. This is the + # canonical place for read emission — see core/events/utils.py module + # docstring for why reads emit at the router and writes emit at the service. def __init__( self, *, @@ -1553,7 +1561,19 @@ async def query_traces( # QUERY detail="You have reached your trace retrieval quota for this period.", ) - return TracesResponse(count=len(traces), traces=traces) + traces_response = TracesResponse(count=len(traces), traces=traces) + + trace_ids = [ + getattr(trace, "trace_id", None) for trace in (traces_response.traces or []) + ] + trace_ids = [t for t in trace_ids if t is not None] + await publish_trace_queried( + request=request, + count=traces_response.count, + trace_ids=trace_ids, + ) + + return traces_response @intercept_exceptions() async def create_trace( @@ -1817,11 +1837,23 @@ async def fetch_traces( detail="You have reached your trace retrieval quota for this period.", ) - return TracesResponse( + traces_response = TracesResponse( count=len(traces_list), traces=traces_list, ) + trace_ids_out = [ + getattr(trace, "trace_id", None) for trace in (traces_response.traces or []) + ] + trace_ids_out = [t for t in trace_ids_out if t is not None] + await publish_trace_fetched( + request=request, + count=traces_response.count, + trace_ids=trace_ids_out, + ) + + return traces_response + @intercept_exceptions() @suppress_exceptions(default=TraceResponse(), exclude=[HTTPException]) async def fetch_trace( @@ -1871,11 +1903,24 @@ async def fetch_trace( detail="You have reached your trace retrieval quota for this period.", ) - return TraceResponse( + trace_response = TraceResponse( count=1 if trace else 0, trace=trace, ) + resolved_trace_id = ( + getattr(trace_response.trace, "trace_id", None) + if trace_response.trace + else None + ) + await publish_trace_fetched( + request=request, + count=trace_response.count, + trace_id=resolved_trace_id, + ) + + return trace_response + @intercept_exceptions() async def delete_trace( # DELETE self, diff --git a/api/oss/src/core/applications/service.py b/api/oss/src/core/applications/service.py index ede96b41d3..2269030b59 100644 --- a/api/oss/src/core/applications/service.py +++ b/api/oss/src/core/applications/service.py @@ -2,6 +2,7 @@ from uuid import UUID, uuid4 from oss.src.utils.logging import get_module_logger +from oss.src.core.events.utils import publish_revision_event from oss.src.core.workflows.dtos import ( WorkflowCreate, WorkflowEdit, @@ -805,6 +806,20 @@ async def commit_application_revision( ) ) + # Write-action emission lives in the SERVICE layer (read actions live + # in the router). Every caller of commit_application_revision — direct + # commit route, simple-service create/edit, deploy paths — therefore + # emits exactly one `applications.revisions.committed` event. See + # core/events/utils.py for the read-vs-write split rationale. + await publish_revision_event( + domain="application", + action="commit", + project_id=project_id, + user_id=user_id, + revision=application_revision, + message=application_revision_commit.message, + ) + return application_revision async def log_application_revisions( diff --git a/api/oss/src/core/environments/service.py b/api/oss/src/core/environments/service.py index 947dc692aa..10525b49f1 100644 --- a/api/oss/src/core/environments/service.py +++ b/api/oss/src/core/environments/service.py @@ -1,8 +1,6 @@ -from datetime import datetime, timezone from typing import Any, Dict, List, Optional from uuid import UUID, uuid4 -import uuid_utils.compat as uuid_compat from pydantic import BaseModel from oss.src.core.environments.dtos import ( @@ -36,9 +34,7 @@ ResolutionInfo, ) -from oss.src.core.events.dtos import Event -from oss.src.core.events.streaming import publish_event -from oss.src.core.events.types import EventType, RequestType +from oss.src.core.events.utils import publish_revision_event from oss.src.core.git.dtos import ( ArtifactCreate, ArtifactEdit, @@ -980,47 +976,28 @@ async def commit_environment_revision( new=current_references, ) - # --- THIS WILL BE IMPROVED LATER ------------------------------------ # - request_id = uuid_compat.uuid7() - event_id = uuid_compat.uuid7() - - request_type = RequestType.UNKNOWN - event_type = EventType.ENVIRONMENTS_REVISIONS_COMMITTED - - timestamp = datetime.now(timezone.utc) - - attributes = dict( - user_id=str(user_id), - references=dict( - environment=dict( - id=str(environment_revision.environment_id), - ), - environment_variant=dict( - id=str(environment_revision.environment_variant_id), - ), - environment_revision=dict( - id=str(environment_revision.id), - slug=environment_revision.slug, - version=environment_revision.version, - ), - ), - state=current_state, - diff=references_diff, - ) - # --- THIS WILL BE IMPROVED LATER ------------------------------------ # - - event = Event( - request_id=request_id, - event_id=event_id, - request_type=request_type, - event_type=event_type, - timestamp=timestamp, - attributes=attributes, - ) - - await publish_event( + # Write-action emission lives in the SERVICE layer (read actions live + # in the router). Every caller of commit_environment_revision — direct + # commit route, deploy paths from applications/evaluators/workflows + # routers, defaults seeding, delta commits that re-enter this method, + # etc. — therefore emits exactly one `environments.revisions.committed` + # event. This was the original precedent for the read-vs-write split; + # see core/events/utils.py for the full rationale. + # + # The `extra` kwarg carries the environment-specific `state` and `diff` + # attributes that this event has always had. + await publish_revision_event( + domain="environment", + action="commit", + organization_id=None, project_id=project_id, - event=event, + user_id=user_id, + revision=environment_revision, + message=environment_revision_commit.message, + extra={ + "state": current_state, + "diff": references_diff, + }, ) return environment_revision diff --git a/api/oss/src/core/evaluators/service.py b/api/oss/src/core/evaluators/service.py index 953f7a5e41..390001084b 100644 --- a/api/oss/src/core/evaluators/service.py +++ b/api/oss/src/core/evaluators/service.py @@ -1,6 +1,7 @@ from typing import Any, Dict, Optional, List from uuid import UUID, uuid4 +from oss.src.core.events.utils import publish_revision_event from oss.src.core.workflows.dtos import ( WorkflowCreate, WorkflowEdit, @@ -806,6 +807,20 @@ async def commit_evaluator_revision( ) ) + # Write-action emission lives in the SERVICE layer (read actions live + # in the router). Every caller of commit_evaluator_revision — direct + # commit route, simple-service create/edit, etc. — therefore emits + # exactly one `evaluators.revisions.committed` event. See + # core/events/utils.py for the read-vs-write split rationale. + await publish_revision_event( + domain="evaluator", + action="commit", + project_id=project_id, + user_id=user_id, + revision=evaluator_revision, + message=evaluator_revision_commit.message, + ) + return evaluator_revision async def log_evaluator_revisions( diff --git a/api/oss/src/core/events/types.py b/api/oss/src/core/events/types.py index 10d11ff3b3..fd0beb636e 100644 --- a/api/oss/src/core/events/types.py +++ b/api/oss/src/core/events/types.py @@ -12,9 +12,51 @@ class RequestType(str, Enum): class EventType(str, Enum): UNKNOWN = "unknown" - ENVIRONMENTS_REVISIONS_COMMITTED = "environments.revisions.committed" WEBHOOKS_SUBSCRIPTIONS_TESTED = "webhooks.subscriptions.tested" + # Tracing reads + TRACES_FETCHED = "traces.fetched" + TRACES_QUERIED = "traces.queried" + + # Testcase reads + TESTCASES_FETCHED = "testcases.fetched" + TESTCASES_QUERIED = "testcases.queried" + + # Application revisions + APPLICATIONS_REVISIONS_RETRIEVED = "applications.revisions.retrieved" + APPLICATIONS_REVISIONS_FETCHED = "applications.revisions.fetched" + APPLICATIONS_REVISIONS_QUERIED = "applications.revisions.queried" + APPLICATIONS_REVISIONS_LOGGED = "applications.revisions.logged" + APPLICATIONS_REVISIONS_COMMITTED = "applications.revisions.committed" + + # Query revisions + QUERIES_REVISIONS_RETRIEVED = "queries.revisions.retrieved" + QUERIES_REVISIONS_FETCHED = "queries.revisions.fetched" + QUERIES_REVISIONS_QUERIED = "queries.revisions.queried" + QUERIES_REVISIONS_LOGGED = "queries.revisions.logged" + QUERIES_REVISIONS_COMMITTED = "queries.revisions.committed" + + # Testset revisions + TESTSETS_REVISIONS_RETRIEVED = "testsets.revisions.retrieved" + TESTSETS_REVISIONS_FETCHED = "testsets.revisions.fetched" + TESTSETS_REVISIONS_QUERIED = "testsets.revisions.queried" + TESTSETS_REVISIONS_LOGGED = "testsets.revisions.logged" + TESTSETS_REVISIONS_COMMITTED = "testsets.revisions.committed" + + # Evaluator revisions + EVALUATORS_REVISIONS_RETRIEVED = "evaluators.revisions.retrieved" + EVALUATORS_REVISIONS_FETCHED = "evaluators.revisions.fetched" + EVALUATORS_REVISIONS_QUERIED = "evaluators.revisions.queried" + EVALUATORS_REVISIONS_LOGGED = "evaluators.revisions.logged" + EVALUATORS_REVISIONS_COMMITTED = "evaluators.revisions.committed" + + # Environment revisions + ENVIRONMENTS_REVISIONS_RETRIEVED = "environments.revisions.retrieved" + ENVIRONMENTS_REVISIONS_FETCHED = "environments.revisions.fetched" + ENVIRONMENTS_REVISIONS_QUERIED = "environments.revisions.queried" + ENVIRONMENTS_REVISIONS_LOGGED = "environments.revisions.logged" + ENVIRONMENTS_REVISIONS_COMMITTED = "environments.revisions.committed" + class RequestID(BaseModel): request_id: UUID diff --git a/api/oss/src/core/events/utils.py b/api/oss/src/core/events/utils.py new file mode 100644 index 0000000000..c3aa5fe455 --- /dev/null +++ b/api/oss/src/core/events/utils.py @@ -0,0 +1,802 @@ +"""Shared event-construction and publish utilities. + +These utilities build `Event` objects and publish them through +`publish_event(...)` for the new read/commit event families: + +- traces.fetched, traces.queried +- testcases.fetched, testcases.queried +- .revisions.{retrieved,fetched,queried,logged,committed} + +============================================================================ +WHERE TO EMIT — CANONICAL POLICY (read this before adding a new call site) +============================================================================ + +The emission point is *intentionally asymmetric* between read actions and +write actions. + + read action → emit at the **router** (after the response is materialized) + write action → emit at the **service** (at the operation's seam, e.g. + inside `commit_*_revision`) + +Currently in scope: + + read actions: retrieve, fetch, query, log + write actions: commit + (future writes — archive, unarchive, etc. — should follow + the same service-layer rule when they are instrumented) + +### Why reads emit from the ROUTER layer + + publish_trace_fetched / publish_trace_queried + publish_testcase_fetched / publish_testcase_queried + publish_revision_event(action="retrieve" | "fetch" | "query" | "log") + +Service methods like `fetch_query_revision`, `fetch_application_revision`, +`fetch_evaluator_revision`, `fetch_environment_revision`, and the matching +`query_*_revisions` are called both: + + 1. directly by router handlers (user-initiated read — should emit) + 2. internally by other services to resolve refs / hydrate state + (NOT user-initiated — must NOT emit) + +Examples of (2) that would produce spurious events if reads emitted in the +service layer: + + - `EnvironmentsService.commit_environment_revision` calls + `self.query_environment_revisions` to compute the diff. Every commit + would also fire `environments.revisions.queried`. + - `TracingService.query_traces` calls `queries_service.fetch_query_revision` + to resolve the saved query. Every trace query that uses a saved query + would falsely fire `queries.revisions.fetched`. + - Evaluation runs call `fetch_query_revision`, `fetch_application_revision`, + `fetch_evaluator_revision` many times per scenario. One evaluation + request would produce hundreds of stray `*.revisions.fetched` events. + +Keeping read emission at the router boundary keeps the event about API +retrieval — not low-level helper activity — and avoids double counting +nested service calls. + +### Why writes emit from the SERVICE layer + + publish_revision_event(action="commit", project_id=..., user_id=..., ...) + + Service-layer commit sites (one per domain): + - core/applications/service.py::commit_application_revision + - core/queries/service.py::commit_query_revision + - core/testsets/service.py::commit_testset_revision + - core/evaluators/service.py::commit_evaluator_revision + - core/environments/service.py::commit_environment_revision + +A write action is *always* a deliberate user-initiated state transition. +There is no "internal write happening as a side effect of a read" pattern +in this codebase. Every caller of `commit_*_revision()` — direct commit +route, simple-service create/edit, deploy paths, fork, defaults seeding — +is a real commit that should emit exactly one event. + +If write emission lived at the router, the simple-service create/edit +paths and the deploy paths (which call commit through the service without +hitting `//revisions/commit`) would silently miss the event. + +### Adding a new call site + +When adding a new domain or call site, follow this split. If you find a new +internal caller of a read method, you do nothing — internal callers are +already silent by virtue of where emission lives. If you find a new external +path that lands in `commit_*_revision`, you do nothing — service-layer +emission already covers it. + +For a new write action (e.g. `archive_*_revision`), emit from the service +method, not the router. + +============================================================================ + +Behavior: + +- Build the `Event` envelope with a generated `request_id`/`event_id`, + `RequestType.UNKNOWN`, and the supplied event type. +- Skip publishing when `count == 0` for read/query/log events, or when the + commit revision is missing. +- Skip publishing when the request has no usable `project_id` and `user_id` + in scope (no caller-side None-checks required). +- Cap event-specific reference lists at `MAX_REFERENCES` while keeping the + uncapped `count`. +- Always include `user_id` in `attributes`. +- Always include `count` for read/query/log events. +- Treat all references as partial identity objects — fields are included only + when the DTO exposes them. +- Log publish failures and never raise. +""" + +from datetime import datetime, timezone +from typing import Any, Dict, Iterable, List, Optional, Sequence +from uuid import UUID + +import uuid_utils.compat as uuid_compat + +from oss.src.core.events.dtos import Event +from oss.src.core.events.streaming import publish_event +from oss.src.core.events.types import EventType, RequestType +from oss.src.utils.common import is_ee +from oss.src.utils.context import AuthContextMissing, get_auth_scope +from oss.src.utils.logging import get_module_logger + +log = get_module_logger(__name__) + + +# Cap event-specific reference lists at 1000. `count` stays uncapped. +MAX_REFERENCES = 1000 + + +# --- request scope --------------------------------------------------------- # + + +class _Scope: + """Resolved scope for event publication. + + Carries the fullest scope available at emit time so downstream + consumers (L1 / L2 entitlements, retention flush, future workspace- + granularity reporting) never have to re-resolve identity from a + `project_id`. `AuthScope` always populates all four UUIDs when set, + and `request.state` populates them on authenticated requests. + + `enabled` is True only when the scope carries at minimum a usable + `project_id` and `user_id`. Callers should pass scope to a publish + helper unconditionally — the helper short-circuits when not enabled. + """ + + __slots__ = ( + "organization_id", + "workspace_id", + "project_id", + "user_id", + "enabled", + ) + + def __init__( + self, + *, + organization_id: Optional[UUID], + workspace_id: Optional[UUID] = None, + project_id: Optional[UUID], + user_id: Optional[UUID], + ) -> None: + self.organization_id = organization_id + self.workspace_id = workspace_id + self.project_id = project_id + self.user_id = user_id + self.enabled = project_id is not None and user_id is not None + + +def _parse_uuid(value: Any) -> Optional[UUID]: + if value is None: + return None + if isinstance(value, UUID): + return value + try: + return UUID(str(value)) + except (TypeError, ValueError): + return None + + +def _scope_from_auth_context() -> Optional[_Scope]: + """Resolve scope from the ambient `AuthScope` ContextVar. + + Returns `None` when no auth context is set (admin/Access endpoints, + public endpoints, background tasks without explicit setup). Returns + a populated `_Scope` otherwise — `AuthScope` always carries all four + UUIDs (organization, workspace, project, user) when present. + """ + try: + auth_scope = get_auth_scope() + except AuthContextMissing: + return None + return _Scope( + organization_id=auth_scope.organization_id, + workspace_id=auth_scope.workspace_id, + project_id=auth_scope.project_id, + user_id=auth_scope.user_id, + ) + + +def request_scope(request: Any) -> _Scope: + """Resolve scope for event publication. + + Prefers the ambient `AuthScope` (set by the auth middleware on every + authenticated tenant request and propagated through nested async + work) because it always carries `organization_id`. Falls back to + `request.state` so unit tests that hand-craft a `SimpleNamespace` + `state` still work, and so that publish call sites that legitimately + run outside an auth context (none today) keep their current behavior. + + Returns a `_Scope` whose `enabled` flag is True only when project_id + and user_id are usable. Callers do not need to None-check fields. + """ + auth_scope = _scope_from_auth_context() + if auth_scope is not None and auth_scope.enabled: + return auth_scope + + state = getattr(request, "state", None) + if state is None: + return auth_scope or _Scope(organization_id=None, project_id=None, user_id=None) + + return _Scope( + organization_id=_parse_uuid(getattr(state, "organization_id", None)), + workspace_id=_parse_uuid(getattr(state, "workspace_id", None)), + project_id=_parse_uuid(getattr(state, "project_id", None)), + user_id=_parse_uuid(getattr(state, "user_id", None)), + ) + + +# --- low-level helpers ----------------------------------------------------- # + + +def _build_event( + *, + event_type: EventType, + attributes: Dict[str, Any], +) -> Event: + return Event( + request_id=uuid_compat.uuid7(), + event_id=uuid_compat.uuid7(), + request_type=RequestType.UNKNOWN, + event_type=event_type, + timestamp=datetime.now(timezone.utc), + attributes=attributes, + ) + + +async def _check_l1_events_quota( + *, + organization_id: Optional[UUID], + event_type_value: str, +) -> bool: + """L1 soft check for `Counter.EVENTS_INGESTED` at the publish boundary. + + Returns True when the event is allowed (over-quota orgs return False + and the caller drops the publish silently — no HTTP error). Mirrors + the `cache=True` soft-check pattern used by `Counter.TRACES_INGESTED` + at trace-ingest call sites, but never raises so the caller's response + is unaffected by an entitlements glitch. + + No-ops on OSS (no EE entitlements stack) and when `organization_id` + is unknown (cannot scope the check). Authoritative consumption + happens in the events worker's L2 check. + """ + if not is_ee(): + return True + + if organization_id is None: + # Without an org we cannot scope the soft check. The events worker + # still gets a chance to perform the authoritative L2 check using + # whichever scope the envelope (or DB lookup) provides. + return True + + try: + # Deferred import: EE-only symbols stay out of the OSS import graph. + from ee.src.utils.entitlements import ( # noqa: PLC0415 + check_entitlements, + scope_from, + ) + from ee.src.core.entitlements.types import Counter # noqa: PLC0415 + + allowed, _, _ = await check_entitlements( + key=Counter.EVENTS_INGESTED, + delta=1, + cache=True, + scope=scope_from(organization_id=organization_id), + ) + return bool(allowed) + except Exception: # pylint: disable=broad-exception-caught + # Fail open — a meter glitch must never block the caller. The L2 + # authoritative check in the worker is the source of truth. + log.warning( + "[EVENTS] L1 quota soft-check failed for %s; failing open", + event_type_value, + exc_info=True, + ) + return True + + +async def _safe_publish( + *, + organization_id: Optional[UUID], + project_id: UUID, + event: Event, +) -> None: + """Publish an event, swallowing failures after logging. + + The caller's HTTP response must not be affected by publish failures. + Runs the L1 `Counter.EVENTS_INGESTED` soft check first; over-quota + orgs drop the event silently. The authoritative L2 check + adjust + runs in `EventsWorker.process_batch`. + """ + allowed = await _check_l1_events_quota( + organization_id=organization_id, + event_type_value=event.event_type.value, + ) + if not allowed: + log.info( + "[EVENTS] L1 quota exceeded, dropping %s", + event.event_type.value, + ) + return + + try: + await publish_event( + organization_id=organization_id, + project_id=project_id, + event=event, + ) + except Exception as exc: # pragma: no cover - defensive + log.error( + "[EVENTS] Failed to publish %s: %s", + event.event_type.value, + exc, + exc_info=True, + ) + + +def _str_or_none(value: Any) -> Optional[str]: + if value is None: + return None + return str(value) + + +# --- trace events ---------------------------------------------------------- # + + +def build_trace_fetched_attributes( + *, + user_id: UUID, + count: int, + trace_id: Optional[str] = None, + trace_ids: Optional[Sequence[str]] = None, +) -> Dict[str, Any]: + attributes: Dict[str, Any] = { + "user_id": str(user_id), + "count": count, + } + if trace_id is not None: + attributes["trace_id"] = str(trace_id) + if trace_ids is not None: + attributes["trace_ids"] = [str(t) for t in list(trace_ids)[:MAX_REFERENCES]] + return attributes + + +def build_trace_queried_attributes( + *, + user_id: UUID, + count: int, + trace_ids: Optional[Sequence[str]] = None, +) -> Dict[str, Any]: + attributes: Dict[str, Any] = { + "user_id": str(user_id), + "count": count, + } + if trace_ids is not None: + attributes["trace_ids"] = [str(t) for t in list(trace_ids)[:MAX_REFERENCES]] + return attributes + + +async def publish_trace_fetched( + *, + request: Any, + count: int, + trace_id: Optional[str] = None, + trace_ids: Optional[Sequence[str]] = None, +) -> None: + if count <= 0: + return + scope = request_scope(request) + if not scope.enabled: + return + attributes = build_trace_fetched_attributes( + user_id=scope.user_id, # type: ignore[arg-type] + count=count, + trace_id=trace_id, + trace_ids=trace_ids, + ) + await _safe_publish( + organization_id=scope.organization_id, + project_id=scope.project_id, # type: ignore[arg-type] + event=_build_event( + event_type=EventType.TRACES_FETCHED, + attributes=attributes, + ), + ) + + +async def publish_trace_queried( + *, + request: Any, + count: int, + trace_ids: Optional[Sequence[str]] = None, +) -> None: + if count <= 0: + return + scope = request_scope(request) + if not scope.enabled: + return + attributes = build_trace_queried_attributes( + user_id=scope.user_id, # type: ignore[arg-type] + count=count, + trace_ids=trace_ids, + ) + await _safe_publish( + organization_id=scope.organization_id, + project_id=scope.project_id, # type: ignore[arg-type] + event=_build_event( + event_type=EventType.TRACES_QUERIED, + attributes=attributes, + ), + ) + + +# --- testcase events ------------------------------------------------------- # + + +def build_testcase_fetched_attributes( + *, + user_id: UUID, + count: int, + testcase_id: Optional[Any] = None, + testcase_ids: Optional[Sequence[Any]] = None, +) -> Dict[str, Any]: + attributes: Dict[str, Any] = { + "user_id": str(user_id), + "count": count, + } + if testcase_id is not None: + attributes["testcase_id"] = str(testcase_id) + if testcase_ids is not None: + attributes["testcase_ids"] = [ + str(t) for t in list(testcase_ids)[:MAX_REFERENCES] + ] + return attributes + + +def build_testcase_queried_attributes( + *, + user_id: UUID, + count: int, + testcase_ids: Optional[Sequence[Any]] = None, +) -> Dict[str, Any]: + attributes: Dict[str, Any] = { + "user_id": str(user_id), + "count": count, + } + if testcase_ids is not None: + attributes["testcase_ids"] = [ + str(t) for t in list(testcase_ids)[:MAX_REFERENCES] + ] + return attributes + + +async def publish_testcase_fetched( + *, + request: Any, + count: int, + testcase_id: Optional[Any] = None, + testcase_ids: Optional[Sequence[Any]] = None, +) -> None: + if count <= 0: + return + scope = request_scope(request) + if not scope.enabled: + return + attributes = build_testcase_fetched_attributes( + user_id=scope.user_id, # type: ignore[arg-type] + count=count, + testcase_id=testcase_id, + testcase_ids=testcase_ids, + ) + await _safe_publish( + organization_id=scope.organization_id, + project_id=scope.project_id, # type: ignore[arg-type] + event=_build_event( + event_type=EventType.TESTCASES_FETCHED, + attributes=attributes, + ), + ) + + +async def publish_testcase_queried( + *, + request: Any, + count: int, + testcase_ids: Optional[Sequence[Any]] = None, +) -> None: + if count <= 0: + return + scope = request_scope(request) + if not scope.enabled: + return + attributes = build_testcase_queried_attributes( + user_id=scope.user_id, # type: ignore[arg-type] + count=count, + testcase_ids=testcase_ids, + ) + await _safe_publish( + organization_id=scope.organization_id, + project_id=scope.project_id, # type: ignore[arg-type] + event=_build_event( + event_type=EventType.TESTCASES_QUERIED, + attributes=attributes, + ), + ) + + +# --- revision events ------------------------------------------------------- # + + +REVISION_EVENT_TYPES: Dict[str, Dict[str, EventType]] = { + "application": { + "retrieve": EventType.APPLICATIONS_REVISIONS_RETRIEVED, + "fetch": EventType.APPLICATIONS_REVISIONS_FETCHED, + "query": EventType.APPLICATIONS_REVISIONS_QUERIED, + "log": EventType.APPLICATIONS_REVISIONS_LOGGED, + "commit": EventType.APPLICATIONS_REVISIONS_COMMITTED, + }, + "query": { + "retrieve": EventType.QUERIES_REVISIONS_RETRIEVED, + "fetch": EventType.QUERIES_REVISIONS_FETCHED, + "query": EventType.QUERIES_REVISIONS_QUERIED, + "log": EventType.QUERIES_REVISIONS_LOGGED, + "commit": EventType.QUERIES_REVISIONS_COMMITTED, + }, + "testset": { + "retrieve": EventType.TESTSETS_REVISIONS_RETRIEVED, + "fetch": EventType.TESTSETS_REVISIONS_FETCHED, + "query": EventType.TESTSETS_REVISIONS_QUERIED, + "log": EventType.TESTSETS_REVISIONS_LOGGED, + "commit": EventType.TESTSETS_REVISIONS_COMMITTED, + }, + "evaluator": { + "retrieve": EventType.EVALUATORS_REVISIONS_RETRIEVED, + "fetch": EventType.EVALUATORS_REVISIONS_FETCHED, + "query": EventType.EVALUATORS_REVISIONS_QUERIED, + "log": EventType.EVALUATORS_REVISIONS_LOGGED, + "commit": EventType.EVALUATORS_REVISIONS_COMMITTED, + }, + "environment": { + "retrieve": EventType.ENVIRONMENTS_REVISIONS_RETRIEVED, + "fetch": EventType.ENVIRONMENTS_REVISIONS_FETCHED, + "query": EventType.ENVIRONMENTS_REVISIONS_QUERIED, + "log": EventType.ENVIRONMENTS_REVISIONS_LOGGED, + "commit": EventType.ENVIRONMENTS_REVISIONS_COMMITTED, + }, +} + + +def _extract_revision_reference( + *, + domain: str, + revision: Any, +) -> Dict[str, Dict[str, Any]]: + """Build a partial identity object for a single revision. + + `domain` is `"application"`, `"query"`, `"testset"`, `"evaluator"`, or + `"environment"`. The returned dict uses keys like: + + { + "": {"id": "..."}, + "_variant": {"id": "..."}, + "_revision": {"id": "...", "slug": "...", "version": ...}, + } + + Missing fields are omitted; missing artifact or variant subsections are + omitted entirely. + """ + artifact_id = _str_or_none(getattr(revision, f"{domain}_id", None)) or _str_or_none( + getattr(revision, "artifact_id", None) + ) + variant_id = _str_or_none( + getattr(revision, f"{domain}_variant_id", None) + ) or _str_or_none(getattr(revision, "variant_id", None)) + revision_id = _str_or_none(getattr(revision, "id", None)) + revision_slug = getattr(revision, "slug", None) + revision_version = getattr(revision, "version", None) + + references: Dict[str, Dict[str, Any]] = {} + + if artifact_id is not None: + references[domain] = {"id": artifact_id} + + if variant_id is not None: + references[f"{domain}_variant"] = {"id": variant_id} + + revision_block: Dict[str, Any] = {} + if revision_id is not None: + revision_block["id"] = revision_id + if revision_slug is not None: + revision_block["slug"] = revision_slug + if revision_version is not None: + revision_block["version"] = revision_version + + if revision_block: + references[f"{domain}_revision"] = revision_block + + return references + + +def _extract_revision_references_list( + *, + domain: str, + revisions: Iterable[Any], +) -> List[Dict[str, Dict[str, Any]]]: + refs: List[Dict[str, Dict[str, Any]]] = [] + for idx, revision in enumerate(revisions): + if idx >= MAX_REFERENCES: + break + refs.append(_extract_revision_reference(domain=domain, revision=revision)) + return refs + + +def build_revision_event_attributes( + *, + domain: str, + action: str, + user_id: UUID, + revision: Optional[Any] = None, + revisions: Optional[Sequence[Any]] = None, + count: Optional[int] = None, + message: Optional[str] = None, + extra: Optional[Dict[str, Any]] = None, +) -> Dict[str, Any]: + """Build event attributes for a revision event. + + For single-revision events (retrieve, fetch, commit) pass `revision`. + For multi-revision events (query, log) pass `revisions`. + `count` defaults to 1 for single events and `len(revisions)` for list + events when not given explicitly. Commit events omit `count`. + """ + attributes: Dict[str, Any] = { + "user_id": str(user_id), + } + + if revisions is not None: + revisions_list = list(revisions) + attributes["count"] = count if count is not None else len(revisions_list) + references = _extract_revision_references_list( + domain=domain, + revisions=revisions_list, + ) + if references: + attributes["references"] = references + else: + if revision is not None: + references = _extract_revision_reference( + domain=domain, + revision=revision, + ) + if references: + attributes["references"] = references + if action != "commit": + attributes["count"] = count if count is not None else (1 if revision else 0) + + if message: + attributes["message"] = message + + if extra: + attributes.update(extra) + + return attributes + + +async def publish_revision_event( + *, + request: Any = None, + organization_id: Optional[UUID] = None, + project_id: Optional[UUID] = None, + user_id: Optional[UUID] = None, + # + domain: str, + action: str, + revision: Optional[Any] = None, + revisions: Optional[Sequence[Any]] = None, + count: Optional[int] = None, + message: Optional[str] = None, + extra: Optional[Dict[str, Any]] = None, +) -> None: + """Build and publish a revision event for the given domain/action. + + EMISSION-LAYER RULE (see module docstring for the full rationale): + + read action (retrieve/fetch/query/log) → call from the ROUTER + write action (commit, future writes) → call from the SERVICE + (inside the domain's commit_*_revision method) + + Read calls pass `request`; write calls pass explicit `project_id` / + `user_id` (since service-layer code does not have a `Request` object). Do + not call this helper from a service method for a read action — internal + lookups happen all the time and would produce duplicate/spurious events. + + Scope resolution order: + 1. explicit kwargs (`organization_id` / `project_id` / `user_id`), + 2. the ambient `AuthScope` (set by the auth middleware on every + authenticated tenant request and propagated through nested async + work — this is how service-layer commits pick up `organization_id`), + 3. `request.state` (legacy fallback for tests that hand-craft a state). + + Skips publishing when scope cannot be resolved (no `project_id` / + `user_id`), or when the action's payload is empty: + - single-shape action (retrieve/fetch/commit): no revision returned, or + explicit count <= 0 + - list-shape (query/log) action: empty result list + """ + # Resolve organization_id from the ambient AuthScope when not explicitly + # passed in. Service-layer commits do not have a `request`, but the auth + # middleware has already set the AuthScope ContextVar for the originating + # HTTP request, and ContextVars propagate through nested async work. + if organization_id is None: + auth_scope = _scope_from_auth_context() + if auth_scope is not None: + organization_id = auth_scope.organization_id + project_id = project_id or auth_scope.project_id + user_id = user_id or auth_scope.user_id + + if request is not None: + scope = request_scope(request) + if not scope.enabled: + return + # `request_scope` already prefers AuthScope; only override fields + # that were not explicitly passed in. + organization_id = organization_id or scope.organization_id + project_id = project_id or scope.project_id + user_id = user_id or scope.user_id + + if project_id is None or user_id is None: + return + + event_type = REVISION_EVENT_TYPES[domain][action] + + if action in {"query", "log"}: + list_count = ( + count + if count is not None + else (len(list(revisions)) if revisions is not None else 0) + ) + if list_count <= 0: + return + elif action in {"retrieve", "fetch", "commit"}: + if revision is None: + return + if count is not None and count <= 0: + return + + attributes = build_revision_event_attributes( + domain=domain, + action=action, + user_id=user_id, + revision=revision, + revisions=revisions, + count=count, + message=message, + extra=extra, + ) + + await _safe_publish( + organization_id=organization_id, + project_id=project_id, + event=_build_event( + event_type=event_type, + attributes=attributes, + ), + ) + + +__all__ = [ + "MAX_REFERENCES", + "REVISION_EVENT_TYPES", + "build_trace_fetched_attributes", + "build_trace_queried_attributes", + "build_testcase_fetched_attributes", + "build_testcase_queried_attributes", + "build_revision_event_attributes", + "publish_trace_fetched", + "publish_trace_queried", + "publish_testcase_fetched", + "publish_testcase_queried", + "publish_revision_event", + "request_scope", +] diff --git a/api/oss/src/core/queries/service.py b/api/oss/src/core/queries/service.py index aeda7d8f4e..f4786bca52 100644 --- a/api/oss/src/core/queries/service.py +++ b/api/oss/src/core/queries/service.py @@ -4,6 +4,7 @@ from oss.src.utils.logging import get_module_logger +from oss.src.core.events.utils import publish_revision_event from oss.src.core.git.interfaces import GitDAOInterface from oss.src.core.shared.dtos import Reference, Windowing, Trace, Traces from oss.src.core.tracing.dtos import ( @@ -874,6 +875,20 @@ async def commit_query_revision( **revision.model_dump(mode="json"), ) + # Write-action emission lives in the SERVICE layer (read actions live + # in the router). Every caller of commit_query_revision — direct + # commit route, simple-service create/edit, etc. — therefore emits + # exactly one `queries.revisions.committed` event. See + # core/events/utils.py for the read-vs-write split rationale. + await publish_revision_event( + domain="query", + action="commit", + project_id=project_id, + user_id=user_id, + revision=_query_revision, + message=query_revision_commit.message, + ) + return _query_revision async def log_query_revisions( diff --git a/api/oss/src/core/testsets/service.py b/api/oss/src/core/testsets/service.py index 4c594ad14a..818fcece67 100644 --- a/api/oss/src/core/testsets/service.py +++ b/api/oss/src/core/testsets/service.py @@ -2,6 +2,7 @@ from uuid import UUID, uuid4 from oss.src.utils.logging import get_module_logger +from oss.src.core.events.utils import publish_revision_event from oss.src.core.git.interfaces import GitDAOInterface from oss.src.core.testcases.service import TestcasesService from oss.src.core.shared.dtos import Reference, Windowing @@ -920,6 +921,21 @@ async def commit_testset_revision( include_testcases=include_testcases, ) + # Write-action emission lives in the SERVICE layer (read actions live + # in the router). Every caller of commit_testset_revision — direct + # commit route, simple-service create/edit, delta commits that re-enter + # this method, etc. — therefore emits exactly one + # `testsets.revisions.committed` event. See core/events/utils.py for + # the read-vs-write split rationale. + await publish_revision_event( + domain="testset", + action="commit", + project_id=project_id, + user_id=user_id, + revision=testset_revision, + message=testset_revision_commit.message, + ) + return testset_revision async def log_testset_revisions( diff --git a/api/oss/src/core/webhooks/types.py b/api/oss/src/core/webhooks/types.py index fe28624493..57e011e7f7 100644 --- a/api/oss/src/core/webhooks/types.py +++ b/api/oss/src/core/webhooks/types.py @@ -49,11 +49,55 @@ class WebhookEventType(str, Enum): Values are derived from EventType so the strings stay in sync. To add a new subscribable event type, it must first exist in EventType. + When extending this enum, regenerate Fern clients and update the + "Available event types" section in `04-webhooks.mdx`. """ - ENVIRONMENTS_REVISIONS_COMMITTED = EventType.ENVIRONMENTS_REVISIONS_COMMITTED.value WEBHOOKS_SUBSCRIPTIONS_TESTED = EventType.WEBHOOKS_SUBSCRIPTIONS_TESTED.value + # Tracing reads + TRACES_FETCHED = EventType.TRACES_FETCHED.value + TRACES_QUERIED = EventType.TRACES_QUERIED.value + + # Testcase reads + TESTCASES_FETCHED = EventType.TESTCASES_FETCHED.value + TESTCASES_QUERIED = EventType.TESTCASES_QUERIED.value + + # Application revisions + APPLICATIONS_REVISIONS_RETRIEVED = EventType.APPLICATIONS_REVISIONS_RETRIEVED.value + APPLICATIONS_REVISIONS_FETCHED = EventType.APPLICATIONS_REVISIONS_FETCHED.value + APPLICATIONS_REVISIONS_QUERIED = EventType.APPLICATIONS_REVISIONS_QUERIED.value + APPLICATIONS_REVISIONS_LOGGED = EventType.APPLICATIONS_REVISIONS_LOGGED.value + APPLICATIONS_REVISIONS_COMMITTED = EventType.APPLICATIONS_REVISIONS_COMMITTED.value + + # Query revisions + QUERIES_REVISIONS_RETRIEVED = EventType.QUERIES_REVISIONS_RETRIEVED.value + QUERIES_REVISIONS_FETCHED = EventType.QUERIES_REVISIONS_FETCHED.value + QUERIES_REVISIONS_QUERIED = EventType.QUERIES_REVISIONS_QUERIED.value + QUERIES_REVISIONS_LOGGED = EventType.QUERIES_REVISIONS_LOGGED.value + QUERIES_REVISIONS_COMMITTED = EventType.QUERIES_REVISIONS_COMMITTED.value + + # Testset revisions + TESTSETS_REVISIONS_RETRIEVED = EventType.TESTSETS_REVISIONS_RETRIEVED.value + TESTSETS_REVISIONS_FETCHED = EventType.TESTSETS_REVISIONS_FETCHED.value + TESTSETS_REVISIONS_QUERIED = EventType.TESTSETS_REVISIONS_QUERIED.value + TESTSETS_REVISIONS_LOGGED = EventType.TESTSETS_REVISIONS_LOGGED.value + TESTSETS_REVISIONS_COMMITTED = EventType.TESTSETS_REVISIONS_COMMITTED.value + + # Evaluator revisions + EVALUATORS_REVISIONS_RETRIEVED = EventType.EVALUATORS_REVISIONS_RETRIEVED.value + EVALUATORS_REVISIONS_FETCHED = EventType.EVALUATORS_REVISIONS_FETCHED.value + EVALUATORS_REVISIONS_QUERIED = EventType.EVALUATORS_REVISIONS_QUERIED.value + EVALUATORS_REVISIONS_LOGGED = EventType.EVALUATORS_REVISIONS_LOGGED.value + EVALUATORS_REVISIONS_COMMITTED = EventType.EVALUATORS_REVISIONS_COMMITTED.value + + # Environment revisions + ENVIRONMENTS_REVISIONS_RETRIEVED = EventType.ENVIRONMENTS_REVISIONS_RETRIEVED.value + ENVIRONMENTS_REVISIONS_FETCHED = EventType.ENVIRONMENTS_REVISIONS_FETCHED.value + ENVIRONMENTS_REVISIONS_QUERIED = EventType.ENVIRONMENTS_REVISIONS_QUERIED.value + ENVIRONMENTS_REVISIONS_LOGGED = EventType.ENVIRONMENTS_REVISIONS_LOGGED.value + ENVIRONMENTS_REVISIONS_COMMITTED = EventType.ENVIRONMENTS_REVISIONS_COMMITTED.value + @classmethod def values(cls) -> List[str]: return [e.value for e in cls] diff --git a/api/oss/src/core/workflows/service.py b/api/oss/src/core/workflows/service.py index 4a173ed6d6..0e2fcd9106 100644 --- a/api/oss/src/core/workflows/service.py +++ b/api/oss/src/core/workflows/service.py @@ -1414,6 +1414,10 @@ async def commit_workflow_revision( **revision.model_dump(mode="json"), ) + # Do not publish workflow commits here: applications/evaluators delegate + # through this method and would double-emit their own commit events. + # await publish_revision_event(domain="workflow", action="commit", ...) + return await self._normalize_revision_for_read( project_id=project_id, revision=_workflow_revision, diff --git a/api/oss/src/routers/workspace_router.py b/api/oss/src/routers/workspace_router.py index aa198a7914..64a574d315 100644 --- a/api/oss/src/routers/workspace_router.py +++ b/api/oss/src/routers/workspace_router.py @@ -130,7 +130,7 @@ async def remove_user_from_workspace( # Load the owner of the *target* workspace's org (not the caller's # ambient org) so the agenta.ai skip-meter exemption and the meter # decrement below agree on which organization is being acted on. - owner = await db_manager.get_organization_owner(project.organization_id) + owner = await db_manager.get_organization_owner(str(project.organization_id)) owner_domain = owner.email.split("@")[-1].lower() if owner else "" user_domain = email.split("@")[-1].lower() skip_meter = owner_domain != "agenta.ai" and user_domain == "agenta.ai" @@ -146,9 +146,20 @@ async def remove_user_from_workspace( scope=scope_from(organization_id=project.organization_id), # type: ignore ) - delete_user_from_workspace = await workspace_manager.remove_user_from_workspace( - workspace_id, email - ) + try: + delete_user_from_workspace = ( + await workspace_manager.remove_user_from_workspace(workspace_id, email) + ) + except Exception: + log.error( + "Failed to remove user from EE workspace", + workspace_id=workspace_id, + project_id=str(project.id), + organization_id=str(project.organization_id), + email=email, + exc_info=True, + ) + raise else: delete_user_from_workspace = await db_manager.remove_user_from_workspace( diff --git a/api/oss/src/tasks/asyncio/events/worker.py b/api/oss/src/tasks/asyncio/events/worker.py index 866cfc474f..f21e71cd7b 100644 --- a/api/oss/src/tasks/asyncio/events/worker.py +++ b/api/oss/src/tasks/asyncio/events/worker.py @@ -14,7 +14,8 @@ log = get_module_logger(__name__) if is_ee(): - from ee.src.utils.entitlements import check_entitlements, scope_from, Flag + from ee.src.utils.entitlements import check_entitlements, scope_from + from ee.src.core.entitlements.types import Counter if TYPE_CHECKING: from oss.src.tasks.asyncio.webhooks.dispatcher import WebhooksDispatcher @@ -31,8 +32,11 @@ class EventsWorker: 1. Read batch from Redis Streams (XREADGROUP) 2. Deserialize events from bytes 3. Group by project_id - 4. Check entitlements per org (EE only) - 5. Ingest events per project if allowed + 4. Authoritative L2 quota per org (EE only): + `Counter.EVENTS_INGESTED` — atomic adjust per org with the full + per-org delta. Mirrors the tracing worker's + `Counter.TRACES_INGESTED` pattern. Over-quota orgs are dropped. + 5. Ingest events per project if the org is within quota 6. Dispatch to webhooks (if configured) 7. ACK + DEL messages """ @@ -200,35 +204,69 @@ async def process_batch( total_ingested = 0 allowed_batches = [] - for project_batch in batches: - if project_batch["organization_id"] and is_ee(): + # L2 `Counter.EVENTS_INGESTED` — authoritative usage meter charged + # once per org with the full per-org delta in this batch. Mirrors + # the tracing worker's per-org quota pattern. + # + # The "is the org entitled to the events feature at all?" question + # is intentionally NOT enforced at ingest — retention (configured + # per plan via `Counter.EVENTS_INGESTED.retention`) takes care of + # plan-tier scoping, and `Flag.AUDIT` is enforced at the query side + # (`POST /events/query`). Always-accept-at-ingest means an upgrade + # makes historical events queryable immediately, without backfill. + org_allowed: Dict[UUID, bool] = {} + events_per_org: Dict[UUID, int] = {} + + if is_ee(): + for project_batch in batches: + org_id = project_batch["organization_id"] + if org_id is None: + continue + events_per_org[org_id] = events_per_org.get(org_id, 0) + len( + project_batch["events"] + ) + + for org_id, delta in events_per_org.items(): + if delta <= 0: + org_allowed[org_id] = True + continue + try: - allowed, _, _ = await check_entitlements( # type: ignore - key=Flag.ACCESS, # type: ignore - cache=True, - scope=scope_from( # type: ignore - organization_id=project_batch["organization_id"] - ), + # L2: authoritative counter check + adjust. Charge the + # full per-org delta in one call so the meter advances + # atomically. + quota_allowed, _, _ = await check_entitlements( # type: ignore + key=Counter.EVENTS_INGESTED, # type: ignore + delta=delta, + scope=scope_from(organization_id=org_id), # type: ignore ) except Exception: + # On error, drop the org's events to stay conservative. + # Matches the tracing worker's safety stance. log.error( - "[EVENTS] Entitlements check failed", - organization_id=str(project_batch["organization_id"]), + "[EVENTS] L2 quota check failed", + organization_id=str(org_id), exc_info=True, ) + org_allowed[org_id] = False continue - if not allowed: + if not quota_allowed: log.warning( - "[EVENTS] Access denied by entitlements, dropping org batch", - organization_id=str(project_batch["organization_id"]), - batch_size=len(project_batch["events"]), + "[EVENTS] Quota exceeded, dropping org batch", + organization_id=str(org_id), + delta=delta, ) - # Intentionally drop and ACK: events for an org that isn't - # entitled will never become processable in this batch. Keeping - # them in the PEL would block the consumer — wontfix by design. + org_allowed[org_id] = False continue + org_allowed[org_id] = True + + for project_batch in batches: + org_id = project_batch["organization_id"] + if is_ee() and org_id and not org_allowed.get(org_id, True): + continue + total_ingested += await self.service.ingest( project_id=project_batch["project_id"], events=[msg.to_event() for msg in project_batch["events"]], diff --git a/api/oss/src/utils/env.py b/api/oss/src/utils/env.py index ed56481218..bfdef670ad 100644 --- a/api/oss/src/utils/env.py +++ b/api/oss/src/utils/env.py @@ -405,6 +405,15 @@ def _load_json_env_dict(name: str) -> dict | None: return value +def _load_json_env_dict_first(*names: str) -> dict | None: + """Parse the first set JSON object from `names`, or return None.""" + for name in names: + value = _load_json_env_dict(name) + if value is not None: + return value + return None + + def _load_json_env_list(name: str) -> list | None: """Parse `name` as a JSON array, or return None if unset/empty.""" value = _load_json_env_raw(name) @@ -454,7 +463,11 @@ class BillingSettings(BaseModel): """ catalog: list | None = _load_json_env_list("AGENTA_BILLING_CATALOG") - pricing: dict | None = _load_json_env_dict("AGENTA_BILLING_PRICING") + pricing: dict | None = _load_json_env_dict_first( + "AGENTA_BILLING_PRICING", + "AGENTA_PRICING", + "STRIPE_PRICING", + ) model_config = ConfigDict(extra="ignore") diff --git a/api/oss/tests/pytest/acceptance/events/test_events_basics.py b/api/oss/tests/pytest/acceptance/events/test_events_basics.py index c4dd87c17a..32e70141fc 100644 --- a/api/oss/tests/pytest/acceptance/events/test_events_basics.py +++ b/api/oss/tests/pytest/acceptance/events/test_events_basics.py @@ -5,12 +5,97 @@ exist in the system at query time — the events worker is a separate process. """ +from uuid import uuid4 + +import pytest +import requests + +from utils.constants import BASE_TIMEOUT + + +def _create_developer_business_account(admin_api): + uid = uuid4().hex[:12] + email = f"events-dev-{uid}@test.agenta.ai" + resp = admin_api( + "POST", + "/admin/simple/accounts/", + json={ + "accounts": { + "u": { + "user": {"email": email}, + "options": { + "create_api_keys": True, + "return_api_keys": True, + "seed_defaults": False, + }, + "subscription": {"plan": "cloud_v0_business"}, + "organization_memberships": [ + { + "organization_ref": {"ref": "org"}, + "user_ref": {"ref": "user"}, + "role": "developer", + } + ], + "workspace_memberships": [ + { + "workspace_ref": {"ref": "wrk"}, + "user_ref": {"ref": "user"}, + "role": "developer", + } + ], + "project_memberships": [ + { + "project_ref": {"ref": "prj"}, + "user_ref": {"ref": "user"}, + "role": "developer", + } + ], + } + } + }, + ) + assert resp.status_code == 200, resp.text + account = resp.json()["accounts"]["u"] + return { + "email": email, + "credentials": f"ApiKey {account['api_keys']['key']}", + } + + +def _delete_account_by_email(admin_api, *, email): + resp = admin_api( + "DELETE", + "/admin/simple/accounts/", + json={"accounts": {"u": {"user": {"email": email}}}, "confirm": "delete"}, + ) + assert resp.status_code == 204, resp.text + + +@pytest.fixture(scope="class") +def events_api(admin_api, ag_env): + account = _create_developer_business_account(admin_api) + + def _request(method: str, endpoint: str, **kwargs): + headers = kwargs.pop("headers", {}) + headers.setdefault("Authorization", account["credentials"]) + return requests.request( + method=method, + url=f"{ag_env['api_url']}{endpoint}", + headers=headers, + timeout=BASE_TIMEOUT, + **kwargs, + ) + + yield _request + + _delete_account_by_email(admin_api, email=account["email"]) + class TestEventsBasics: - def test_query_events_returns_valid_response(self, authed_api): + def test_query_events_returns_valid_response(self, events_api): """POST /events/query with an empty body returns a valid response.""" # ACT ------------------------------------------------------------------ - response = authed_api("POST", "/events/query", json={}) + response = events_api("POST", "/events/query", json={}) # ---------------------------------------------------------------------- # ASSERT --------------------------------------------------------------- @@ -22,10 +107,10 @@ def test_query_events_returns_valid_response(self, authed_api): assert body["count"] == len(body["events"]) # ---------------------------------------------------------------------- - def test_query_events_by_event_type(self, authed_api): + def test_query_events_by_event_type(self, events_api): """Filtering by event_type returns only matching events.""" # ACT ------------------------------------------------------------------ - response = authed_api( + response = events_api( "POST", "/events/query", json={ @@ -44,10 +129,10 @@ def test_query_events_by_event_type(self, authed_api): assert event["event_type"] == "environments.revisions.committed" # ---------------------------------------------------------------------- - def test_query_events_by_unknown_event_type(self, authed_api): + def test_query_events_by_unknown_event_type(self, events_api): """Filtering by UNKNOWN event_type returns only unknown events.""" # ACT ------------------------------------------------------------------ - response = authed_api( + response = events_api( "POST", "/events/query", json={ @@ -63,10 +148,10 @@ def test_query_events_by_unknown_event_type(self, authed_api): assert event["event_type"] == "unknown" # ---------------------------------------------------------------------- - def test_query_events_with_windowing_limit(self, authed_api): + def test_query_events_with_windowing_limit(self, events_api): """Windowing limit=1 returns at most 1 event.""" # ACT ------------------------------------------------------------------ - response = authed_api( + response = events_api( "POST", "/events/query", json={"windowing": {"limit": 1}}, @@ -80,10 +165,10 @@ def test_query_events_with_windowing_limit(self, authed_api): assert len(body["events"]) <= 1 # ---------------------------------------------------------------------- - def test_query_events_invalid_event_type_rejected(self, authed_api): + def test_query_events_invalid_event_type_rejected(self, events_api): """Sending an unrecognised event_type value should be rejected (422).""" # ACT ------------------------------------------------------------------ - response = authed_api( + response = events_api( "POST", "/events/query", json={ diff --git a/api/oss/tests/pytest/unit/events/test_events_router_audit.py b/api/oss/tests/pytest/unit/events/test_events_router_audit.py new file mode 100644 index 0000000000..bdb175dee3 --- /dev/null +++ b/api/oss/tests/pytest/unit/events/test_events_router_audit.py @@ -0,0 +1,124 @@ +from types import SimpleNamespace +from unittest.mock import AsyncMock, patch +from uuid import uuid4 + +import pytest +from fastapi.responses import JSONResponse + +from oss.src.apis.fastapi.events.models import EventQueryRequest, EventsQueryResponse +from oss.src.apis.fastapi.events.router import EventsRouter + + +@pytest.mark.asyncio +async def test_query_events_allows_audit_entitled_org(): + events_service = SimpleNamespace(query=AsyncMock(return_value=[])) + router = EventsRouter(events_service=events_service) + request = SimpleNamespace( + state=SimpleNamespace( + user_id=str(uuid4()), + project_id=str(uuid4()), + ) + ) + + async def _allow_action_access(**_kwargs): + return True + + async def _allow_entitlement(**_kwargs): + return True, None, None + + with ( + patch("oss.src.apis.fastapi.events.router.is_ee", return_value=True), + patch( + "oss.src.apis.fastapi.events.router.check_action_access", + new=_allow_action_access, + create=True, + ), + patch( + "oss.src.apis.fastapi.events.router.check_entitlements", + new=_allow_entitlement, + create=True, + ), + patch( + "oss.src.apis.fastapi.events.router.Permission", + new=SimpleNamespace(VIEW_EVENTS="view_events"), + create=True, + ), + patch( + "oss.src.apis.fastapi.events.router.Flag", + new=SimpleNamespace(AUDIT="audit"), + create=True, + ), + ): + response = await router.query_events( + request=request, + query_request=EventQueryRequest(), + ) + + assert response == EventsQueryResponse(count=0, events=[]) + events_service.query.assert_awaited_once() + + +@pytest.mark.asyncio +async def test_query_events_blocks_audit_unentitled_org(): + events_service = SimpleNamespace(query=AsyncMock(return_value=[])) + router = EventsRouter(events_service=events_service) + request = SimpleNamespace( + state=SimpleNamespace( + user_id=str(uuid4()), + project_id=str(uuid4()), + ) + ) + + async def _allow_action_access(**_kwargs): + return True + + async def _deny_entitlement(**_kwargs): + return False, None, None + + def _not_entitled_response(_tracker): + return JSONResponse( + status_code=403, + content={"detail": "feature disabled"}, + ) + + with ( + patch("oss.src.apis.fastapi.events.router.is_ee", return_value=True), + patch( + "oss.src.apis.fastapi.events.router.check_action_access", + new=_allow_action_access, + create=True, + ), + patch( + "oss.src.apis.fastapi.events.router.check_entitlements", + new=_deny_entitlement, + create=True, + ), + patch( + "oss.src.apis.fastapi.events.router.NOT_ENTITLED_RESPONSE", + new=_not_entitled_response, + create=True, + ), + patch( + "oss.src.apis.fastapi.events.router.Permission", + new=SimpleNamespace(VIEW_EVENTS="view_events"), + create=True, + ), + patch( + "oss.src.apis.fastapi.events.router.Tracker", + new=SimpleNamespace(FLAGS="flags"), + create=True, + ), + patch( + "oss.src.apis.fastapi.events.router.Flag", + new=SimpleNamespace(AUDIT="audit"), + create=True, + ), + ): + response = await router.query_events( + request=request, + query_request=EventQueryRequest(), + ) + + assert isinstance(response, JSONResponse) + assert response.status_code == 403 + events_service.query.assert_not_called() diff --git a/api/oss/tests/pytest/unit/events/test_events_utils.py b/api/oss/tests/pytest/unit/events/test_events_utils.py new file mode 100644 index 0000000000..0b4b65fd9a --- /dev/null +++ b/api/oss/tests/pytest/unit/events/test_events_utils.py @@ -0,0 +1,852 @@ +"""Unit tests for core/events/utils.py. + +These cover: +- WebhookEventType / EventType parity for all new events +- Reference extraction and capping +- publish_*_event scope and count short-circuit semantics +- Publish failures are swallowed and never propagate +""" + +from types import SimpleNamespace +from typing import Any, List, Optional +from unittest.mock import patch +from uuid import UUID, uuid4 + +import pytest + +from oss.src.core.events.types import EventType +from oss.src.core.events.utils import ( + MAX_REFERENCES, + REVISION_EVENT_TYPES, + _Scope, + build_revision_event_attributes, + build_testcase_fetched_attributes, + build_testcase_queried_attributes, + build_trace_fetched_attributes, + build_trace_queried_attributes, + publish_revision_event, + publish_testcase_fetched, + publish_testcase_queried, + publish_trace_fetched, + publish_trace_queried, + request_scope, +) +from oss.src.core.webhooks.types import WebhookEventType + + +# --------------------------------------------------------------------------- +# Helpers +# --------------------------------------------------------------------------- + + +def _make_request( + *, + project_id: Optional[Any] = "11111111-1111-1111-1111-111111111111", + user_id: Optional[Any] = "22222222-2222-2222-2222-222222222222", + organization_id: Optional[Any] = "33333333-3333-3333-3333-333333333333", +) -> Any: + state = SimpleNamespace( + project_id=project_id, + user_id=user_id, + organization_id=organization_id, + ) + return SimpleNamespace(state=state) + + +def _captured_publishes(captured: List[dict]): + """Return an async patch target that records publish_event calls.""" + + async def _capture(**kwargs): + captured.append(kwargs) + return True + + return _capture + + +def _revision( + *, + domain: str, + revision_id: str, + artifact_id: Optional[str] = "a-id", + variant_id: Optional[str] = "v-id", + slug: Optional[str] = "v1", + version: Optional[int] = 1, +) -> Any: + obj = SimpleNamespace(id=revision_id, slug=slug, version=version) + if artifact_id is not None: + setattr(obj, f"{domain}_id", artifact_id) + if variant_id is not None: + setattr(obj, f"{domain}_variant_id", variant_id) + return obj + + +# --------------------------------------------------------------------------- +# EventType <-> WebhookEventType parity +# --------------------------------------------------------------------------- + + +def test_event_type_includes_all_new_events(): + expected = { + "traces.fetched", + "traces.queried", + "testcases.fetched", + "testcases.queried", + "applications.revisions.retrieved", + "applications.revisions.fetched", + "applications.revisions.queried", + "applications.revisions.logged", + "applications.revisions.committed", + "queries.revisions.retrieved", + "queries.revisions.fetched", + "queries.revisions.queried", + "queries.revisions.logged", + "queries.revisions.committed", + "testsets.revisions.retrieved", + "testsets.revisions.fetched", + "testsets.revisions.queried", + "testsets.revisions.logged", + "testsets.revisions.committed", + "evaluators.revisions.retrieved", + "evaluators.revisions.fetched", + "evaluators.revisions.queried", + "evaluators.revisions.logged", + "evaluators.revisions.committed", + "environments.revisions.retrieved", + "environments.revisions.fetched", + "environments.revisions.queried", + "environments.revisions.logged", + "environments.revisions.committed", + } + actual = {e.value for e in EventType} + missing = expected - actual + assert not missing, f"Missing from EventType: {missing}" + + +def test_webhook_event_type_is_subset_and_includes_all_new_events(): + event_values = {e.value for e in EventType} + webhook_values = {e.value for e in WebhookEventType} + + # All webhook values must exist in EventType. + assert webhook_values <= event_values + + # All new event types should also be subscribable. + new_event_values = { + v for v in event_values if v.startswith(("traces.", "testcases.")) + } | {v for v in event_values if ".revisions." in v} + assert new_event_values <= webhook_values + + +# --------------------------------------------------------------------------- +# Attribute builders +# --------------------------------------------------------------------------- + + +def test_trace_fetched_attributes_single(): + user = uuid4() + attrs = build_trace_fetched_attributes( + user_id=user, + count=1, + trace_id="abc", + ) + assert attrs == { + "user_id": str(user), + "count": 1, + "trace_id": "abc", + } + + +def test_trace_fetched_attributes_plural_caps_at_1000(): + """fetched can carry multiple trace_ids when the GET handler returns a list.""" + user = uuid4() + ids = [f"t-{i}" for i in range(MAX_REFERENCES + 25)] + attrs = build_trace_fetched_attributes( + user_id=user, + count=len(ids), + trace_ids=ids, + ) + assert attrs["count"] == MAX_REFERENCES + 25 + assert "trace_id" not in attrs + assert len(attrs["trace_ids"]) == MAX_REFERENCES + + +def test_trace_queried_attributes_caps_at_1000(): + user = uuid4() + ids = [f"t-{i}" for i in range(MAX_REFERENCES + 50)] + attrs = build_trace_queried_attributes( + user_id=user, + count=len(ids), + trace_ids=ids, + ) + assert attrs["count"] == MAX_REFERENCES + 50 + assert len(attrs["trace_ids"]) == MAX_REFERENCES + + +def test_testcase_fetched_attributes_includes_id_only_when_present(): + user = uuid4() + no_id = build_testcase_fetched_attributes(user_id=user, count=0) + assert "testcase_id" not in no_id + assert "testcase_ids" not in no_id + + with_id = build_testcase_fetched_attributes(user_id=user, count=1, testcase_id="t1") + assert with_id["testcase_id"] == "t1" + + +def test_testcase_queried_attributes_caps_at_1000(): + user = uuid4() + ids = list(range(MAX_REFERENCES + 5)) + attrs = build_testcase_queried_attributes( + user_id=user, count=len(ids), testcase_ids=ids + ) + assert attrs["count"] == MAX_REFERENCES + 5 + assert len(attrs["testcase_ids"]) == MAX_REFERENCES + + +# --------------------------------------------------------------------------- +# Revision attribute construction +# --------------------------------------------------------------------------- + + +@pytest.mark.parametrize( + "domain,plural", + [ + ("application", "applications"), + ("query", "queries"), + ("testset", "testsets"), + ("evaluator", "evaluators"), + ("environment", "environments"), + ], +) +def test_revision_event_types_cover_all_actions(domain, plural): + for action in ("retrieve", "fetch", "query", "log", "commit"): + et = REVISION_EVENT_TYPES[domain][action] + assert ( + et.value + == f"{plural}.revisions." + + { + "retrieve": "retrieved", + "fetch": "fetched", + "query": "queried", + "log": "logged", + "commit": "committed", + }[action] + ) + + +def test_revision_attributes_single(): + user = uuid4() + rev = _revision(domain="application", revision_id="r-1") + attrs = build_revision_event_attributes( + domain="application", + action="retrieve", + user_id=user, + revision=rev, + ) + assert attrs["user_id"] == str(user) + assert attrs["count"] == 1 + refs = attrs["references"] + assert refs["application"] == {"id": "a-id"} + assert refs["application_variant"] == {"id": "v-id"} + assert refs["application_revision"] == { + "id": "r-1", + "slug": "v1", + "version": 1, + } + + +def test_revision_attributes_partial_identity_omits_missing_fields(): + """Artifact/variant absent → those subsections drop out, but emission proceeds.""" + user = uuid4() + rev = _revision( + domain="query", + revision_id="r-2", + artifact_id=None, + variant_id=None, + slug=None, + version=None, + ) + attrs = build_revision_event_attributes( + domain="query", + action="fetch", + user_id=user, + revision=rev, + ) + refs = attrs.get("references", {}) + assert "query" not in refs + assert "query_variant" not in refs + assert refs["query_revision"] == {"id": "r-2"} + + +def test_revision_attributes_list_caps_references(): + user = uuid4() + revs = [ + _revision(domain="testset", revision_id=f"r-{i}") + for i in range(MAX_REFERENCES + 25) + ] + attrs = build_revision_event_attributes( + domain="testset", + action="query", + user_id=user, + revisions=revs, + ) + assert attrs["count"] == MAX_REFERENCES + 25 + assert len(attrs["references"]) == MAX_REFERENCES + + +def test_revision_attributes_commit_omits_count_and_includes_message(): + user = uuid4() + rev = _revision(domain="evaluator", revision_id="r-3") + attrs = build_revision_event_attributes( + domain="evaluator", + action="commit", + user_id=user, + revision=rev, + message="Promote eval", + ) + assert "count" not in attrs + assert attrs["message"] == "Promote eval" + + +def test_revision_attributes_extra_merges(): + user = uuid4() + rev = _revision(domain="environment", revision_id="r-4") + attrs = build_revision_event_attributes( + domain="environment", + action="commit", + user_id=user, + revision=rev, + extra={ + "state": {"references": {}}, + "diff": {"created": {}, "updated": {}, "deleted": {}}, + }, + ) + assert attrs["state"] == {"references": {}} + assert attrs["diff"] == {"created": {}, "updated": {}, "deleted": {}} + + +# --------------------------------------------------------------------------- +# request_scope +# --------------------------------------------------------------------------- + + +def test_request_scope_resolves_string_uuids(): + scope = request_scope(_make_request()) + assert isinstance(scope, _Scope) + assert scope.enabled is True + assert scope.project_id == UUID("11111111-1111-1111-1111-111111111111") + assert scope.user_id == UUID("22222222-2222-2222-2222-222222222222") + assert scope.organization_id == UUID("33333333-3333-3333-3333-333333333333") + + +def test_request_scope_disabled_when_project_missing(): + scope = request_scope(_make_request(project_id=None)) + assert scope.enabled is False + + +def test_request_scope_disabled_when_user_missing(): + scope = request_scope(_make_request(user_id=None)) + assert scope.enabled is False + + +def test_request_scope_tolerates_bad_uuid_strings(): + scope = request_scope(_make_request(project_id="not-a-uuid")) + assert scope.enabled is False + + +def test_request_scope_no_state(): + scope = request_scope(SimpleNamespace()) + assert scope.enabled is False + + +# --------------------------------------------------------------------------- +# AuthScope precedence +# --------------------------------------------------------------------------- + + +def _set_auth_scope(*, organization_id, workspace_id, project_id, user_id): + """Set a populated AuthContext on the ContextVar; returns the reset token.""" + from oss.src.utils.context import ( + AuthContext, + AuthScope, + ApiKeyCredentials, + set_auth_context, + ) + + return set_auth_context( + AuthContext( + credentials=ApiKeyCredentials(value="test-key"), + scope=AuthScope( + organization_id=organization_id, + workspace_id=workspace_id, + project_id=project_id, + user_id=user_id, + ), + ) + ) + + +def test_request_scope_prefers_auth_context_over_request_state(): + """When AuthScope is set, it wins over request.state — and carries + organization_id even when request.state is missing it. + """ + from oss.src.utils.context import reset_auth_context + + auth_org = uuid4() + auth_ws = uuid4() + auth_proj = uuid4() + auth_user = uuid4() + + token = _set_auth_scope( + organization_id=auth_org, + workspace_id=auth_ws, + project_id=auth_proj, + user_id=auth_user, + ) + try: + # `request.state` carries a different (stale) project_id; AuthScope + # should be the source of truth. + scope = request_scope(_make_request()) + assert scope.enabled is True + assert scope.organization_id == auth_org + assert scope.workspace_id == auth_ws + assert scope.project_id == auth_proj + assert scope.user_id == auth_user + finally: + reset_auth_context(token) + + +def test_request_scope_falls_back_to_state_when_no_auth_context(): + """No AuthContext set → use request.state. (Backward compatible with + tests that hand-craft `SimpleNamespace` state.) + """ + scope = request_scope(_make_request()) + assert scope.enabled is True + # organization_id comes from state in this path. + assert scope.organization_id == UUID("33333333-3333-3333-3333-333333333333") + + +# --------------------------------------------------------------------------- +# Publish semantics — counts, scope, and failure containment +# --------------------------------------------------------------------------- + + +@pytest.mark.asyncio +async def test_publish_trace_fetched_skips_when_count_zero(): + captured: List[dict] = [] + with patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ): + await publish_trace_fetched(request=_make_request(), count=0) + assert captured == [] + + +@pytest.mark.asyncio +async def test_publish_trace_fetched_publishes_when_scope_valid(): + captured: List[dict] = [] + with patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ): + await publish_trace_fetched( + request=_make_request(), + count=1, + trace_id="trace-xyz", + ) + assert len(captured) == 1 + msg = captured[0] + assert msg["project_id"] == UUID("11111111-1111-1111-1111-111111111111") + assert msg["organization_id"] == UUID("33333333-3333-3333-3333-333333333333") + event = msg["event"] + assert event.event_type == EventType.TRACES_FETCHED + assert event.attributes["trace_id"] == "trace-xyz" + assert event.attributes["count"] == 1 + + +@pytest.mark.asyncio +async def test_publish_trace_fetched_plural_emits_trace_ids(): + """List GET /traces/ → traces.fetched with capped trace_ids, no trace_id.""" + captured: List[dict] = [] + ids = [f"t-{i}" for i in range(MAX_REFERENCES + 5)] + with patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ): + await publish_trace_fetched( + request=_make_request(), + count=len(ids), + trace_ids=ids, + ) + event = captured[0]["event"] + assert event.event_type == EventType.TRACES_FETCHED + assert event.attributes["count"] == MAX_REFERENCES + 5 + assert len(event.attributes["trace_ids"]) == MAX_REFERENCES + assert "trace_id" not in event.attributes + + +@pytest.mark.asyncio +async def test_publish_testcase_fetched_plural_emits_testcase_ids(): + """List GET /testcases/ → testcases.fetched with capped testcase_ids.""" + captured: List[dict] = [] + ids = [f"tc-{i}" for i in range(MAX_REFERENCES + 3)] + with patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ): + await publish_testcase_fetched( + request=_make_request(), + count=len(ids), + testcase_ids=ids, + ) + event = captured[0]["event"] + assert event.event_type == EventType.TESTCASES_FETCHED + assert event.attributes["count"] == MAX_REFERENCES + 3 + assert len(event.attributes["testcase_ids"]) == MAX_REFERENCES + assert "testcase_id" not in event.attributes + + +@pytest.mark.asyncio +async def test_publish_trace_queried_skips_when_scope_disabled(): + captured: List[dict] = [] + request = _make_request(project_id=None) + with patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ): + await publish_trace_queried(request=request, count=3, trace_ids=["a", "b", "c"]) + assert captured == [] + + +@pytest.mark.asyncio +async def test_publish_testcase_queried_caps_ids_and_keeps_count(): + captured: List[dict] = [] + ids = [f"t-{i}" for i in range(MAX_REFERENCES + 10)] + with patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ): + await publish_testcase_queried( + request=_make_request(), + count=len(ids), + testcase_ids=ids, + ) + event = captured[0]["event"] + assert event.attributes["count"] == MAX_REFERENCES + 10 + assert len(event.attributes["testcase_ids"]) == MAX_REFERENCES + + +@pytest.mark.asyncio +async def test_publish_testcase_fetched_zero_count_suppressed(): + captured: List[dict] = [] + with patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ): + await publish_testcase_fetched(request=_make_request(), count=0) + assert captured == [] + + +@pytest.mark.asyncio +async def test_publish_revision_event_routes_action_to_event_type(): + captured: List[dict] = [] + rev = _revision(domain="application", revision_id="r-1") + with patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ): + await publish_revision_event( + request=_make_request(), + domain="application", + action="retrieve", + revision=rev, + ) + await publish_revision_event( + request=_make_request(), + domain="application", + action="fetch", + revision=rev, + ) + await publish_revision_event( + request=_make_request(), + domain="application", + action="commit", + revision=rev, + message="Commit changes", + ) + await publish_revision_event( + request=_make_request(), + domain="application", + action="query", + revisions=[rev], + ) + await publish_revision_event( + request=_make_request(), + domain="application", + action="log", + revisions=[rev], + ) + + types = [m["event"].event_type for m in captured] + assert types == [ + EventType.APPLICATIONS_REVISIONS_RETRIEVED, + EventType.APPLICATIONS_REVISIONS_FETCHED, + EventType.APPLICATIONS_REVISIONS_COMMITTED, + EventType.APPLICATIONS_REVISIONS_QUERIED, + EventType.APPLICATIONS_REVISIONS_LOGGED, + ] + # commit event must carry message and skip count + commit_attrs = captured[2]["event"].attributes + assert commit_attrs["message"] == "Commit changes" + assert "count" not in commit_attrs + + +@pytest.mark.asyncio +async def test_publish_revision_event_zero_revisions_suppresses(): + captured: List[dict] = [] + with patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ): + await publish_revision_event( + request=_make_request(), + domain="testset", + action="query", + revisions=[], + ) + await publish_revision_event( + request=_make_request(), + domain="testset", + action="log", + revisions=[], + ) + await publish_revision_event( + request=_make_request(), + domain="testset", + action="retrieve", + revision=None, + ) + await publish_revision_event( + request=_make_request(), + domain="testset", + action="commit", + revision=None, + ) + assert captured == [] + + +@pytest.mark.asyncio +async def test_publish_revision_event_skips_single_when_count_zero(): + """retrieve/fetch/commit must not publish when explicit count <= 0.""" + captured: List[dict] = [] + rev = _revision(domain="application", revision_id="r-1") + with patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ): + for action in ("retrieve", "fetch", "commit"): + await publish_revision_event( + request=_make_request(), + domain="application", + action=action, + revision=rev, + count=0, + ) + assert captured == [] + + +@pytest.mark.asyncio +async def test_publish_revision_event_accepts_explicit_scope_without_request(): + """Service-layer paths (e.g., environments commit) pass explicit scope.""" + captured: List[dict] = [] + rev = _revision(domain="environment", revision_id="r-5", slug="v3", version=3) + project_id = uuid4() + user_id = uuid4() + with patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ): + await publish_revision_event( + project_id=project_id, + user_id=user_id, + domain="environment", + action="commit", + revision=rev, + message="Promote", + extra={ + "state": {"references": {}}, + "diff": {"created": {}, "updated": {}, "deleted": {}}, + }, + ) + assert len(captured) == 1 + msg = captured[0] + assert msg["project_id"] == project_id + event = msg["event"] + assert event.event_type == EventType.ENVIRONMENTS_REVISIONS_COMMITTED + assert event.attributes["state"] == {"references": {}} + assert event.attributes["message"] == "Promote" + + +@pytest.mark.asyncio +async def test_publish_failure_is_swallowed(): + async def _raise(**kwargs): + raise RuntimeError("redis down") + + with patch("oss.src.core.events.utils.publish_event", new=_raise): + # Must not raise. + await publish_trace_fetched( + request=_make_request(), + count=1, + trace_id="abc", + ) + await publish_revision_event( + request=_make_request(), + domain="query", + action="fetch", + revision=_revision(domain="query", revision_id="r-7"), + ) + + +# --------------------------------------------------------------------------- +# L1 `Counter.EVENTS_INGESTED` soft check +# --------------------------------------------------------------------------- + + +@pytest.mark.asyncio +async def test_l1_quota_soft_check_drops_when_over_quota(): + """L1 over-quota → no publish, no raise (silent drop).""" + captured: List[dict] = [] + + async def _fake_check(**kwargs): + return False, None, None + + with ( + patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ), + patch("oss.src.core.events.utils.is_ee", return_value=True), + patch( + "ee.src.utils.entitlements.check_entitlements", new=_fake_check, create=True + ), + patch("ee.src.utils.entitlements.scope_from", new=lambda **kw: kw, create=True), + ): + await publish_trace_fetched( + request=_make_request(), + count=1, + trace_id="abc", + ) + assert captured == [] + + +@pytest.mark.asyncio +async def test_l1_quota_soft_check_allows_under_quota(): + """L1 allowed → publish proceeds.""" + captured: List[dict] = [] + + async def _fake_check(**kwargs): + return True, None, None + + with ( + patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ), + patch("oss.src.core.events.utils.is_ee", return_value=True), + patch( + "ee.src.utils.entitlements.check_entitlements", new=_fake_check, create=True + ), + patch("ee.src.utils.entitlements.scope_from", new=lambda **kw: kw, create=True), + ): + await publish_trace_fetched( + request=_make_request(), + count=1, + trace_id="abc", + ) + assert len(captured) == 1 + + +@pytest.mark.asyncio +async def test_l1_quota_soft_check_fails_open_on_exception(): + """L1 entitlements glitch → publish still proceeds (fail-open).""" + captured: List[dict] = [] + + async def _fake_check(**kwargs): + raise RuntimeError("entitlements down") + + with ( + patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ), + patch("oss.src.core.events.utils.is_ee", return_value=True), + patch( + "ee.src.utils.entitlements.check_entitlements", new=_fake_check, create=True + ), + patch("ee.src.utils.entitlements.scope_from", new=lambda **kw: kw, create=True), + ): + await publish_trace_fetched( + request=_make_request(), + count=1, + trace_id="abc", + ) + assert len(captured) == 1 + + +@pytest.mark.asyncio +async def test_l1_quota_soft_check_skipped_when_org_unknown(): + """No organization_id on scope → skip L1, let L2 handle it.""" + captured: List[dict] = [] + calls: List[dict] = [] + + async def _fake_check(**kwargs): + calls.append(kwargs) + return True, None, None + + request = _make_request(organization_id=None) + with ( + patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ), + patch("oss.src.core.events.utils.is_ee", return_value=True), + patch( + "ee.src.utils.entitlements.check_entitlements", new=_fake_check, create=True + ), + patch("ee.src.utils.entitlements.scope_from", new=lambda **kw: kw, create=True), + ): + await publish_trace_fetched( + request=request, + count=1, + trace_id="abc", + ) + assert len(captured) == 1 + assert calls == [] # L1 was not invoked + + +@pytest.mark.asyncio +async def test_l1_quota_soft_check_skipped_on_oss(): + """OSS (is_ee()=False) → skip L1 entirely.""" + captured: List[dict] = [] + calls: List[dict] = [] + + async def _fake_check(**kwargs): + calls.append(kwargs) + return True, None, None + + with ( + patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ), + patch("oss.src.core.events.utils.is_ee", return_value=False), + patch( + "ee.src.utils.entitlements.check_entitlements", new=_fake_check, create=True + ), + patch("ee.src.utils.entitlements.scope_from", new=lambda **kw: kw, create=True), + ): + await publish_trace_fetched( + request=_make_request(), + count=1, + trace_id="abc", + ) + assert len(captured) == 1 + assert calls == [] diff --git a/api/oss/tests/pytest/unit/events/test_events_worker_l2.py b/api/oss/tests/pytest/unit/events/test_events_worker_l2.py new file mode 100644 index 0000000000..c93f6af0b4 --- /dev/null +++ b/api/oss/tests/pytest/unit/events/test_events_worker_l2.py @@ -0,0 +1,291 @@ +"""Unit tests for the L2 `Counter.EVENTS_INGESTED` enforcement in +`EventsWorker.process_batch`. + +These mirror the L1 tests in `test_events_utils.py` but exercise the +authoritative server-side check + adjust path that runs in the events +worker. They do not touch Redis or the database — `process_batch` is +called directly with synthetic Redis-stream payloads, and the +entitlements helpers are patched. + +Note: feature-gating (audit-log access) is intentionally NOT enforced +at ingest; only the counter quota is. The audit flag lives at the +query side (`POST /events/query`). +""" + +import zlib +from datetime import datetime, timezone +from types import SimpleNamespace +from typing import Any, Dict, List, Tuple +from unittest.mock import AsyncMock, patch +from uuid import UUID, uuid4 + +import orjson as json_lib +import pytest + +from oss.src.core.events.dtos import Event +from oss.src.core.events.types import EventType, RequestType +from oss.src.tasks.asyncio.events.worker import EventsWorker + + +# --------------------------------------------------------------------------- +# Test helpers +# --------------------------------------------------------------------------- + + +def _make_worker(ingest_return: int = 0) -> EventsWorker: + """Construct an `EventsWorker` without touching Redis or the DB.""" + worker = EventsWorker.__new__(EventsWorker) + worker.service = SimpleNamespace(ingest=AsyncMock(return_value=ingest_return)) + worker.redis = None + worker.stream_name = "test:events" + worker.consumer_group = "test-group" + worker.consumer_name = "test-consumer" + worker.max_batch_size = 50 + worker.max_block_ms = 100 + worker.max_batch_mb = 50 + worker.max_delay_ms = 50 + worker.webhooks_dispatcher = None + return worker + + +def _make_event_message( + *, + organization_id: UUID, + project_id: UUID, + event_type: EventType = EventType.TRACES_FETCHED, +) -> bytes: + """Build a zlib-compressed wire payload matching `EventMessage`.""" + event = Event( + request_id=uuid4(), + event_id=uuid4(), + request_type=RequestType.UNKNOWN, + event_type=event_type, + timestamp=datetime.now(timezone.utc), + attributes={"user_id": str(uuid4()), "count": 1}, + ) + message = { + "organization_id": str(organization_id), + "project_id": str(project_id), + "event": event.model_dump(mode="json"), + } + payload = json_lib.dumps(message) + return zlib.compress(payload) + + +def _make_batch( + payloads: List[bytes], +) -> List[Tuple[bytes, Dict[bytes, bytes]]]: + return [ + (f"msg-{i}".encode(), {b"data": payload}) for i, payload in enumerate(payloads) + ] + + +# --------------------------------------------------------------------------- +# Patch shims for EE entitlements +# +# `EventsWorker` imports `check_entitlements`, `scope_from`, and +# `Counter` at module top under `if is_ee():`. The OSS test runner has +# `is_ee()` False, so those imports never happened. We attach our fakes +# to the worker module namespace and toggle the module-level `is_ee`. +# --------------------------------------------------------------------------- + + +class _FakeCounter: + EVENTS_INGESTED = "events_ingested" + + +def _fake_scope_from(*, organization_id=None, **_kwargs): + return {"organization_id": organization_id} + + +# --------------------------------------------------------------------------- +# Tests +# --------------------------------------------------------------------------- + + +@pytest.mark.asyncio +async def test_l2_allows_under_quota_and_ingests_org_batch(): + """check_entitlements(EVENTS_INGESTED) returns allowed → events ingested.""" + org_id = uuid4() + proj_id = uuid4() + payload = _make_event_message(organization_id=org_id, project_id=proj_id) + batch = _make_batch([payload, payload]) + + worker = _make_worker(ingest_return=2) + + calls: List[Dict[str, Any]] = [] + + async def _fake_check(**kwargs): + calls.append(kwargs) + return True, None, None + + with ( + patch("oss.src.tasks.asyncio.events.worker.is_ee", return_value=True), + patch( + "oss.src.tasks.asyncio.events.worker.check_entitlements", + new=_fake_check, + create=True, + ), + patch( + "oss.src.tasks.asyncio.events.worker.scope_from", + new=_fake_scope_from, + create=True, + ), + patch( + "oss.src.tasks.asyncio.events.worker.Counter", + new=_FakeCounter, + create=True, + ), + ): + total, processed_ids, allowed = await worker.process_batch(batch) + + assert total == 2 + assert len(processed_ids) == 2 + assert len(allowed) == 1 + # Exactly one entitlements call: the Counter quota check. + assert len(calls) == 1 + assert calls[0]["key"] == _FakeCounter.EVENTS_INGESTED + assert calls[0]["delta"] == 2 + worker.service.ingest.assert_awaited_once() + + +@pytest.mark.asyncio +async def test_l2_over_quota_drops_org_batch(): + """check_entitlements(EVENTS_INGESTED) returns not-allowed → events dropped.""" + org_id = uuid4() + proj_id = uuid4() + payload = _make_event_message(organization_id=org_id, project_id=proj_id) + batch = _make_batch([payload, payload, payload]) + + worker = _make_worker() + + async def _fake_check(**kwargs): + return False, None, None + + with ( + patch("oss.src.tasks.asyncio.events.worker.is_ee", return_value=True), + patch( + "oss.src.tasks.asyncio.events.worker.check_entitlements", + new=_fake_check, + create=True, + ), + patch( + "oss.src.tasks.asyncio.events.worker.scope_from", + new=_fake_scope_from, + create=True, + ), + patch( + "oss.src.tasks.asyncio.events.worker.Counter", + new=_FakeCounter, + create=True, + ), + ): + total, processed_ids, allowed = await worker.process_batch(batch) + + # Messages are still ACKed (processed_ids) so they don't block the PEL. + assert len(processed_ids) == 3 + # But no ingest happened. + assert total == 0 + assert allowed == [] + worker.service.ingest.assert_not_called() + + +@pytest.mark.asyncio +async def test_l2_per_org_delta_aggregates_across_projects(): + """Two projects in the same org → single Counter check with total delta.""" + org_id = uuid4() + proj_a = uuid4() + proj_b = uuid4() + payload_a = _make_event_message(organization_id=org_id, project_id=proj_a) + payload_b = _make_event_message(organization_id=org_id, project_id=proj_b) + batch = _make_batch([payload_a, payload_a, payload_b]) # 2 in A, 1 in B + + worker = _make_worker(ingest_return=1) + + calls: List[Dict[str, Any]] = [] + + async def _fake_check(**kwargs): + calls.append(kwargs) + return True, None, None + + with ( + patch("oss.src.tasks.asyncio.events.worker.is_ee", return_value=True), + patch( + "oss.src.tasks.asyncio.events.worker.check_entitlements", + new=_fake_check, + create=True, + ), + patch( + "oss.src.tasks.asyncio.events.worker.scope_from", + new=_fake_scope_from, + create=True, + ), + patch( + "oss.src.tasks.asyncio.events.worker.Counter", + new=_FakeCounter, + create=True, + ), + ): + total, processed_ids, allowed = await worker.process_batch(batch) + + # One Counter check for the whole org (not one per project). + assert len(calls) == 1 + assert calls[0]["delta"] == 3 + assert len(allowed) == 2 # two project batches ingested + assert worker.service.ingest.await_count == 2 + + +@pytest.mark.asyncio +async def test_l2_skipped_on_oss(): + """OSS (is_ee=False) → no Counter check, ingest proceeds.""" + org_id = uuid4() + proj_id = uuid4() + payload = _make_event_message(organization_id=org_id, project_id=proj_id) + batch = _make_batch([payload]) + + worker = _make_worker(ingest_return=1) + + with patch("oss.src.tasks.asyncio.events.worker.is_ee", return_value=False): + total, processed_ids, allowed = await worker.process_batch(batch) + + assert total == 1 + assert len(allowed) == 1 + worker.service.ingest.assert_awaited_once() + + +@pytest.mark.asyncio +async def test_l2_check_failure_drops_org_batch(): + """Entitlements adapter raises → drop the org's events conservatively.""" + org_id = uuid4() + proj_id = uuid4() + payload = _make_event_message(organization_id=org_id, project_id=proj_id) + batch = _make_batch([payload, payload]) + + worker = _make_worker() + + async def _fake_check(**kwargs): + raise RuntimeError("meters DB unavailable") + + with ( + patch("oss.src.tasks.asyncio.events.worker.is_ee", return_value=True), + patch( + "oss.src.tasks.asyncio.events.worker.check_entitlements", + new=_fake_check, + create=True, + ), + patch( + "oss.src.tasks.asyncio.events.worker.scope_from", + new=_fake_scope_from, + create=True, + ), + patch( + "oss.src.tasks.asyncio.events.worker.Counter", + new=_FakeCounter, + create=True, + ), + ): + total, processed_ids, allowed = await worker.process_batch(batch) + + assert total == 0 + assert allowed == [] + worker.service.ingest.assert_not_called() diff --git a/api/oss/tests/pytest/unit/events/test_service_commit_emission.py b/api/oss/tests/pytest/unit/events/test_service_commit_emission.py new file mode 100644 index 0000000000..1e2494e81f --- /dev/null +++ b/api/oss/tests/pytest/unit/events/test_service_commit_emission.py @@ -0,0 +1,567 @@ +"""Unit tests for service-layer commit-event emission. + +Verifies that calling `commit_*_revision(...)` on each domain service emits +exactly one `*.revisions.committed` event, regardless of whether the caller +is a direct commit route or a higher-level path (simple-service create/edit, +deploy, defaults seeding, etc.). + +These tests mock the DAO/workflow-service boundary so they do not need a DB +or redis connection. They patch `publish_event` to capture envelopes. +""" + +from types import SimpleNamespace +from typing import Any, List +from unittest.mock import AsyncMock, patch +from uuid import UUID, uuid4 + +import pytest + +from oss.src.core.events.types import EventType + + +# --------------------------------------------------------------------------- +# Helpers +# --------------------------------------------------------------------------- + + +def _captured_publishes(captured: List[dict]): + async def _capture(**kwargs): + captured.append(kwargs) + return True + + return _capture + + +def _make_revision( + *, + artifact_id: UUID, + variant_id: UUID, + revision_id: UUID, + slug: str = "v1", + version: str = "v1", +) -> Any: + return SimpleNamespace( + id=revision_id, + slug=slug, + version=version, + artifact_id=artifact_id, + variant_id=variant_id, + model_dump=lambda **_: { + "id": str(revision_id), + "slug": slug, + "version": version, + "artifact_id": str(artifact_id), + "variant_id": str(variant_id), + }, + ) + + +# --------------------------------------------------------------------------- +# Applications — commit_application_revision delegates to WorkflowsService +# --------------------------------------------------------------------------- + + +@pytest.mark.asyncio +async def test_applications_service_commit_emits_event_once(): + from oss.src.core.applications.dtos import ApplicationRevisionCommit + from oss.src.core.applications.service import ApplicationsService + + project_id = uuid4() + user_id = uuid4() + revision_id = uuid4() + artifact_id = uuid4() + variant_id = uuid4() + + workflows_service = SimpleNamespace( + commit_workflow_revision=AsyncMock( + return_value=_make_revision( + artifact_id=artifact_id, + variant_id=variant_id, + revision_id=revision_id, + slug="v4", + version="v4", + ) + ) + ) + svc = ApplicationsService.__new__(ApplicationsService) + svc.workflows_service = workflows_service + + commit = ApplicationRevisionCommit( + slug="v4", + message="Commit changes", + application_id=artifact_id, + application_variant_id=variant_id, + ) + + captured: List[dict] = [] + with patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ): + result = await svc.commit_application_revision( + project_id=project_id, + user_id=user_id, + application_revision_commit=commit, + ) + + assert result is not None + assert len(captured) == 1 + msg = captured[0] + assert msg["project_id"] == project_id + event = msg["event"] + assert event.event_type == EventType.APPLICATIONS_REVISIONS_COMMITTED + assert event.attributes["user_id"] == str(user_id) + assert event.attributes["message"] == "Commit changes" + refs = event.attributes["references"] + assert refs["application"]["id"] == str(artifact_id) + assert refs["application_variant"]["id"] == str(variant_id) + assert refs["application_revision"]["id"] == str(revision_id) + + +# --------------------------------------------------------------------------- +# Queries — commit_query_revision calls queries_dao.commit_revision +# --------------------------------------------------------------------------- + + +@pytest.mark.asyncio +async def test_queries_service_commit_emits_event_once(): + from oss.src.core.queries.dtos import QueryRevisionCommit + from oss.src.core.queries.service import QueriesService + + project_id = uuid4() + user_id = uuid4() + revision_id = uuid4() + artifact_id = uuid4() + variant_id = uuid4() + + queries_dao = SimpleNamespace( + commit_revision=AsyncMock( + return_value=_make_revision( + artifact_id=artifact_id, + variant_id=variant_id, + revision_id=revision_id, + slug="v3", + version="v3", + ) + ) + ) + svc = QueriesService.__new__(QueriesService) + svc.queries_dao = queries_dao + + commit = QueryRevisionCommit( + slug="v3", + message="Commit query", + query_id=artifact_id, + query_variant_id=variant_id, + ) + + captured: List[dict] = [] + with patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ): + result = await svc.commit_query_revision( + project_id=project_id, + user_id=user_id, + query_revision_commit=commit, + ) + + assert result is not None + assert len(captured) == 1 + event = captured[0]["event"] + assert event.event_type == EventType.QUERIES_REVISIONS_COMMITTED + assert event.attributes["message"] == "Commit query" + refs = event.attributes["references"] + assert refs["query"]["id"] == str(artifact_id) + assert refs["query_variant"]["id"] == str(variant_id) + assert refs["query_revision"]["id"] == str(revision_id) + + +# --------------------------------------------------------------------------- +# Testsets — commit_testset_revision calls testsets_dao.commit_revision +# --------------------------------------------------------------------------- + + +@pytest.mark.asyncio +async def test_testsets_service_commit_emits_event_once(): + from oss.src.core.testsets.dtos import TestsetRevisionCommit, TestsetRevisionData + from oss.src.core.testsets.service import TestsetsService + + project_id = uuid4() + user_id = uuid4() + revision_id = uuid4() + artifact_id = uuid4() + variant_id = uuid4() + + testsets_dao = SimpleNamespace( + commit_revision=AsyncMock( + return_value=_make_revision( + artifact_id=artifact_id, + variant_id=variant_id, + revision_id=revision_id, + slug="v5", + version="v5", + ) + ) + ) + svc = TestsetsService.__new__(TestsetsService) + svc.testsets_dao = testsets_dao + # _populate_testcases is a no-op when nothing to populate + svc._populate_testcases = AsyncMock(return_value=None) + + commit = TestsetRevisionCommit( + slug="v5", + message="Commit testset", + testset_id=artifact_id, + testset_variant_id=variant_id, + data=TestsetRevisionData(testcase_ids=[]), + ) + + captured: List[dict] = [] + with patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ): + result = await svc.commit_testset_revision( + project_id=project_id, + user_id=user_id, + testset_revision_commit=commit, + ) + + assert result is not None + assert len(captured) == 1 + event = captured[0]["event"] + assert event.event_type == EventType.TESTSETS_REVISIONS_COMMITTED + assert event.attributes["message"] == "Commit testset" + refs = event.attributes["references"] + assert refs["testset"]["id"] == str(artifact_id) + assert refs["testset_variant"]["id"] == str(variant_id) + assert refs["testset_revision"]["id"] == str(revision_id) + + +# --------------------------------------------------------------------------- +# Evaluators — commit_evaluator_revision delegates to WorkflowsService +# --------------------------------------------------------------------------- + + +@pytest.mark.asyncio +async def test_evaluators_service_commit_emits_event_once(): + from oss.src.core.evaluators.dtos import EvaluatorRevisionCommit + from oss.src.core.evaluators.service import EvaluatorsService + + project_id = uuid4() + user_id = uuid4() + revision_id = uuid4() + artifact_id = uuid4() + variant_id = uuid4() + + workflows_service = SimpleNamespace( + commit_workflow_revision=AsyncMock( + return_value=_make_revision( + artifact_id=artifact_id, + variant_id=variant_id, + revision_id=revision_id, + slug="v2", + version="v2", + ) + ) + ) + svc = EvaluatorsService.__new__(EvaluatorsService) + svc.workflows_service = workflows_service + + commit = EvaluatorRevisionCommit( + slug="v2", + message="Commit eval", + evaluator_id=artifact_id, + evaluator_variant_id=variant_id, + ) + + captured: List[dict] = [] + with patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ): + result = await svc.commit_evaluator_revision( + project_id=project_id, + user_id=user_id, + evaluator_revision_commit=commit, + ) + + assert result is not None + assert len(captured) == 1 + event = captured[0]["event"] + assert event.event_type == EventType.EVALUATORS_REVISIONS_COMMITTED + assert event.attributes["message"] == "Commit eval" + refs = event.attributes["references"] + assert refs["evaluator"]["id"] == str(artifact_id) + assert refs["evaluator_variant"]["id"] == str(variant_id) + assert refs["evaluator_revision"]["id"] == str(revision_id) + + +# --------------------------------------------------------------------------- +# Environments — commit_environment_revision preserves state + diff + message +# --------------------------------------------------------------------------- + + +@pytest.mark.asyncio +async def test_environments_service_commit_emits_event_with_state_and_diff(): + from oss.src.core.environments.dtos import ( + EnvironmentRevisionCommit, + EnvironmentRevisionData, + ) + from oss.src.core.environments.service import EnvironmentsService + + project_id = uuid4() + user_id = uuid4() + revision_id = uuid4() + artifact_id = uuid4() + variant_id = uuid4() + + environments_dao = SimpleNamespace( + commit_revision=AsyncMock( + return_value=_make_revision( + artifact_id=artifact_id, + variant_id=variant_id, + revision_id=revision_id, + slug="v6", + version="v6", + ) + ) + ) + # commit_environment_revision also reads previous references via + # _get_previous_environment_references → query_environment_revisions. + svc = EnvironmentsService.__new__(EnvironmentsService) + svc.environments_dao = environments_dao + svc.embeds_service = None + svc._get_previous_environment_references = AsyncMock(return_value={}) + + commit = EnvironmentRevisionCommit( + slug="v6", + message="Promote prompt changes", + environment_id=artifact_id, + environment_variant_id=variant_id, + data=EnvironmentRevisionData(references={}), + ) + + captured: List[dict] = [] + with patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ): + result = await svc.commit_environment_revision( + project_id=project_id, + user_id=user_id, + environment_revision_commit=commit, + ) + + assert result is not None + assert len(captured) == 1 + event = captured[0]["event"] + assert event.event_type == EventType.ENVIRONMENTS_REVISIONS_COMMITTED + assert event.attributes["user_id"] == str(user_id) + assert event.attributes["message"] == "Promote prompt changes" + refs = event.attributes["references"] + assert refs["environment"]["id"] == str(artifact_id) + assert refs["environment_variant"]["id"] == str(variant_id) + assert refs["environment_revision"]["id"] == str(revision_id) + # Legacy attributes preserved. + assert "state" in event.attributes + assert event.attributes["diff"] == { + "created": {}, + "updated": {}, + "deleted": {}, + } + + +@pytest.mark.asyncio +async def test_environments_service_delta_commit_emits_event_once(): + from oss.src.core.environments.dtos import ( + EnvironmentRevisionCommit, + EnvironmentRevisionData, + EnvironmentRevisionDelta, + ) + from oss.src.core.environments.service import EnvironmentsService + from oss.src.core.shared.dtos import Reference + + project_id = uuid4() + user_id = uuid4() + revision_id = uuid4() + artifact_id = uuid4() + variant_id = uuid4() + app_revision_id = uuid4() + + environments_dao = SimpleNamespace( + commit_revision=AsyncMock( + return_value=_make_revision( + artifact_id=artifact_id, + variant_id=variant_id, + revision_id=revision_id, + slug="v7", + version="v7", + ) + ) + ) + + svc = EnvironmentsService.__new__(EnvironmentsService) + svc.environments_dao = environments_dao + svc.embeds_service = None + svc.query_environment_revisions = AsyncMock( + return_value=[ + SimpleNamespace( + data=EnvironmentRevisionData( + references={ + "app": { + "application_revision": Reference(id=uuid4()), + } + } + ) + ) + ] + ) + svc._get_previous_environment_references = AsyncMock(return_value={}) + + commit = EnvironmentRevisionCommit( + slug="v7", + message="Delta commit", + environment_id=artifact_id, + environment_variant_id=variant_id, + delta=EnvironmentRevisionDelta( + set={ + "app": { + "application_revision": Reference(id=app_revision_id), + } + } + ), + ) + + captured: List[dict] = [] + with patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ): + result = await svc.commit_environment_revision( + project_id=project_id, + user_id=user_id, + environment_revision_commit=commit, + ) + + assert result is not None + assert environments_dao.commit_revision.await_count == 1 + assert len(captured) == 1 + assert captured[0]["event"].event_type == EventType.ENVIRONMENTS_REVISIONS_COMMITTED + + +@pytest.mark.asyncio +async def test_testsets_service_delta_commit_emits_event_once(): + from oss.src.core.testcases.dtos import Testcase + from oss.src.core.testsets.dtos import ( + TestsetRevisionCommit, + TestsetRevisionData, + TestsetRevisionDelta, + TestsetRevisionDeltaColumns, + ) + from oss.src.core.testsets.service import TestsetsService + + project_id = uuid4() + user_id = uuid4() + revision_id = uuid4() + artifact_id = uuid4() + variant_id = uuid4() + + testsets_dao = SimpleNamespace( + commit_revision=AsyncMock( + return_value=_make_revision( + artifact_id=artifact_id, + variant_id=variant_id, + revision_id=revision_id, + slug="v8", + version="v8", + ) + ) + ) + + svc = TestsetsService.__new__(TestsetsService) + svc.testsets_dao = testsets_dao + svc.testcases_service = SimpleNamespace( + create_testcases=AsyncMock( + return_value=[ + Testcase(id=uuid4(), set_id=artifact_id, data={"prompt": "hello"}) + ] + ) + ) + svc.fetch_testset_revision = AsyncMock( + return_value=SimpleNamespace( + testset_variant_id=variant_id, + description="Base revision", + data=TestsetRevisionData( + testcases=[ + Testcase(id=uuid4(), set_id=artifact_id, data={"prompt": "hello"}) + ] + ), + ) + ) + svc._populate_testcases = AsyncMock(return_value=None) + + commit = TestsetRevisionCommit( + message="Delta testset", + testset_id=artifact_id, + delta=TestsetRevisionDelta( + columns=TestsetRevisionDeltaColumns(add=["expected"]) + ), + ) + + captured: List[dict] = [] + with patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ): + result = await svc.commit_testset_revision( + project_id=project_id, + user_id=user_id, + testset_revision_commit=commit, + ) + + assert result is not None + assert testsets_dao.commit_revision.await_count == 1 + assert len(captured) == 1 + assert captured[0]["event"].event_type == EventType.TESTSETS_REVISIONS_COMMITTED + + +# --------------------------------------------------------------------------- +# DAO returns None → no event published +# --------------------------------------------------------------------------- + + +@pytest.mark.asyncio +async def test_queries_service_commit_no_revision_no_event(): + from oss.src.core.queries.dtos import QueryRevisionCommit + from oss.src.core.queries.service import QueriesService + + project_id = uuid4() + user_id = uuid4() + artifact_id = uuid4() + variant_id = uuid4() + + queries_dao = SimpleNamespace(commit_revision=AsyncMock(return_value=None)) + svc = QueriesService.__new__(QueriesService) + svc.queries_dao = queries_dao + + commit = QueryRevisionCommit( + slug="v1", + query_id=artifact_id, + query_variant_id=variant_id, + ) + + captured: List[dict] = [] + with patch( + "oss.src.core.events.utils.publish_event", + new=_captured_publishes(captured), + ): + result = await svc.commit_query_revision( + project_id=project_id, + user_id=user_id, + query_revision_commit=commit, + ) + + assert result is None + assert captured == [] diff --git a/api/oss/tests/pytest/unit/test_environments_service.py b/api/oss/tests/pytest/unit/test_environments_service.py index 22d36d7be7..a62dfaa311 100644 --- a/api/oss/tests/pytest/unit/test_environments_service.py +++ b/api/oss/tests/pytest/unit/test_environments_service.py @@ -114,8 +114,11 @@ async def test_commit_environment_revision_publishes_state_and_grouped_diff(): ), ) + # The environments service now delegates emission to the shared + # `publish_revision_event` helper, which calls `publish_event` from + # `core.events.utils`. Patch at the new site. with patch( - "oss.src.core.environments.service.publish_event", + "oss.src.core.events.utils.publish_event", new=AsyncMock(), ) as publish_event: await service.commit_environment_revision( diff --git a/clients/python/agenta_client/types/webhook_event_type.py b/clients/python/agenta_client/types/webhook_event_type.py index 81262ef695..d5f0416200 100644 --- a/clients/python/agenta_client/types/webhook_event_type.py +++ b/clients/python/agenta_client/types/webhook_event_type.py @@ -2,4 +2,4 @@ import typing -WebhookEventType = typing.Union[typing.Literal["environments.revisions.committed", "webhooks.subscriptions.tested"], typing.Any] +WebhookEventType = typing.Union[typing.Literal["webhooks.subscriptions.tested", "traces.fetched", "traces.queried", "testcases.fetched", "testcases.queried", "applications.revisions.retrieved", "applications.revisions.fetched", "applications.revisions.queried", "applications.revisions.logged", "applications.revisions.committed", "queries.revisions.retrieved", "queries.revisions.fetched", "queries.revisions.queried", "queries.revisions.logged", "queries.revisions.committed", "testsets.revisions.retrieved", "testsets.revisions.fetched", "testsets.revisions.queried", "testsets.revisions.logged", "testsets.revisions.committed", "evaluators.revisions.retrieved", "evaluators.revisions.fetched", "evaluators.revisions.queried", "evaluators.revisions.logged", "evaluators.revisions.committed", "environments.revisions.retrieved", "environments.revisions.fetched", "environments.revisions.queried", "environments.revisions.logged", "environments.revisions.committed"], typing.Any] diff --git a/docs/designs/dynamic-access-and-billing/gap.md b/docs/designs/dynamic-access-and-billing/gap.md index 6f2faf5f35..2129180740 100644 --- a/docs/designs/dynamic-access-and-billing/gap.md +++ b/docs/designs/dynamic-access-and-billing/gap.md @@ -70,9 +70,10 @@ section freezes the pre-change state of the system. admin endpoints: `POST /admin/spans/flush` and `POST /admin/events/flush`. Each owns its own service, DAO, cron, and Redis lock namespace. `Counter.EVENTS_INGESTED` added to the - entitlement system as a retention-only counter (not metered; not in - `meters_type` Postgres enum; not in `REPORTS`); per-plan defaults - align with each plan's trace-retention window — + entitlement system as an independent events usage + retention counter; + the event publisher performs the soft quota check and the worker applies + the authoritative meter adjustment. Per-plan retention defaults align + with each plan's trace-retention window — `Quota(period=Period.MONTHLY, retention=Retention.MONTHLY)` on Hobby, `QUARTERLY` on Pro, `YEARLY` on Business, and `retention=None` (unlimited) on Agenta and Self-hosted Enterprise. diff --git a/docs/designs/dynamic-access-and-billing/proposal.md b/docs/designs/dynamic-access-and-billing/proposal.md index 7f4cc1de78..053c70e385 100644 --- a/docs/designs/dynamic-access-and-billing/proposal.md +++ b/docs/designs/dynamic-access-and-billing/proposal.md @@ -336,11 +336,11 @@ Spans and events are completely independent: separate DAOs (`SpansAdminRouter`, `EventsAdminRouter`), separate cron files, separate Redis locks. The two flushes can run concurrently. -`Counter.EVENTS_INGESTED` is part of the entitlement system as a -retention-only counter: there is no write-path that adjusts an -`events_ingested` meter row, the slug is deliberately not in the -`meters_type` Postgres enum, and the counter is not in `REPORTS`. The -events flush job walks the effective plan map and respects each plan's +`Counter.EVENTS_INGESTED` is part of the entitlement system as an +enforced event-usage counter with an independent retention dimension. +Event publishing performs the L1 soft check and the events worker applies +the authoritative L2 meter adjustment; operators may configure both +`limit` and `retention` per plan. The events flush job walks the effective plan map and respects each plan's `Counter.EVENTS_INGESTED.retention`. Per-plan defaults align with each plan's `Counter.TRACES_INGESTED` retention: `Quota(period=Period.MONTHLY, retention=Retention.MONTHLY)` on Hobby, diff --git a/docs/designs/dynamic-access-and-billing/research.md b/docs/designs/dynamic-access-and-billing/research.md index b584e12e38..9171b10ae6 100644 --- a/docs/designs/dynamic-access-and-billing/research.md +++ b/docs/designs/dynamic-access-and-billing/research.md @@ -285,10 +285,10 @@ These weren't in the original research but emerged from `scan-codebase` / `env.agenta.default_plan`; now `env.access_controls.default_plan` since it's part of the access-controls surface (used even when Stripe is disabled). -- **`Counter.EVENTS_INGESTED` added.** Events are not metered today - (no write-path adjusts an `events_ingested` meter row, and the slug is - not in the `meters_type` Postgres enum), but the retention dimension - applies. Per-plan defaults align with each plan's +- **`Counter.EVENTS_INGESTED` added.** Events now have an independent + usage counter as well as a retention dimension: the publish path runs + a soft quota check and the events worker performs the authoritative + meter adjustment. Per-plan defaults align with each plan's `Counter.TRACES_INGESTED` retention: `Quota(period=Period.MONTHLY, retention=Retention.MONTHLY)` on Hobby, `QUARTERLY` on Pro, `YEARLY` on Business, and `retention=None` (unlimited) on Agenta and diff --git a/docs/designs/dynamic-access-and-billing/summary.md b/docs/designs/dynamic-access-and-billing/summary.md index c967983b4b..76589346c2 100644 --- a/docs/designs/dynamic-access-and-billing/summary.md +++ b/docs/designs/dynamic-access-and-billing/summary.md @@ -6,7 +6,7 @@ This PR turns the previously code-locked plan/role/catalog/pricing surface into The immediate capabilities this lights up are: **define a custom plan with a custom entitlement profile** (new counter limits, new gauges, new throttle buckets, new flags), **tweak a single quota on an existing plan** without restating the rest (`AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY` merges field-by-field into whichever plan `AGENTA_ACCESS_DEFAULT_PLAN` points to), **add a custom role** at the project (and workspace, by symmetry) scope without restating the platform-managed minima or the default workspace roles (`AGENTA_ACCESS_ROLES_OVERLAY`), **mark the free and trial plan slugs inline in pricing** (`{free: true}` / `{trial: N}` markers on the pricing entries themselves — no cross-env-var consistency burden), and **separate display catalog from purchase pricing** so the pricing modal and the Stripe line-item / per-meter-price configuration evolve independently. The closed `Plan` enum is gone; `subscriptions.plan` is a plain `str`, and the auth-side role serialization widened to `str` too — env-defined custom roles flow cleanly through `WorkspacePermission.role_name` and `InviteRequest.roles` without enum-coercion failures. -A second hard cut shipped alongside: **events retention split out of billing**. The old `POST /admin/billing/usage/flush` (spans-only) is gone; spans now flush at `POST /admin/spans/flush` (cron `crons/spans.sh` at `0,30 * * * *`, lock namespace `spans:flush`) and events flush at `POST /admin/events/flush` (cron `crons/events.sh` at `7,37 * * * *`, lock namespace `events:flush`). They share nothing — separate DAOs, services, routers, cron files, Redis locks — so the two flushes can run concurrently and a failure in one never blocks the other. `Counter.EVENTS_INGESTED` was added to the entitlement system as a retention-only counter (no write-path adjusts a meter row for it, no entry in the `meters_type` Postgres enum, deliberately not in `REPORTS`); the events flush job walks the effective plan map and respects each plan's `Counter.EVENTS_INGESTED.retention`. Per-plan defaults align with each plan's `Counter.TRACES_INGESTED` retention: `Quota(period=Period.MONTHLY, retention=Retention.MONTHLY)` on Hobby, `QUARTERLY` on Pro, `YEARLY` on Business, and `retention=None` (unlimited) on Agenta and Self-hosted Enterprise. +A second hard cut shipped alongside: **events retention split out of billing**. The old `POST /admin/billing/usage/flush` (spans-only) is gone; spans now flush at `POST /admin/spans/flush` (cron `crons/spans.sh` at `0,30 * * * *`, lock namespace `spans:flush`) and events flush at `POST /admin/events/flush` (cron `crons/events.sh` at `7,37 * * * *`, lock namespace `events:flush`). They share nothing — separate DAOs, services, routers, cron files, Redis locks — so the two flushes can run concurrently and a failure in one never blocks the other. `Counter.EVENTS_INGESTED` was added to the entitlement system as an independent events usage + retention counter: event publishing performs a soft quota check and the events worker applies the authoritative meter adjustment, while the events flush job respects each plan's `Counter.EVENTS_INGESTED.retention`. Per-plan defaults align with each plan's `Counter.TRACES_INGESTED` retention: `Quota(period=Period.MONTHLY, retention=Retention.MONTHLY)` on Hobby, `QUARTERLY` on Pro, `YEARLY` on Business, and `retention=None` (unlimited) on Agenta and Self-hosted Enterprise. ## What changed under the hood diff --git a/docs/designs/dynamic-access-and-billing/tasks.md b/docs/designs/dynamic-access-and-billing/tasks.md index ae8db353ed..c9b0968ae8 100644 --- a/docs/designs/dynamic-access-and-billing/tasks.md +++ b/docs/designs/dynamic-access-and-billing/tasks.md @@ -131,7 +131,7 @@ operators without requiring full plan overrides. User-driven design change: events become a retainable domain; retention moves out of billing. -- [x] Add `Counter.EVENTS_INGESTED` to `entitlements/types.py` (retention-only counter — not metered, not in the `meters_type` Postgres enum, not in `REPORTS`). +- [x] Add `Counter.EVENTS_INGESTED` to `entitlements/types.py` as the independent events usage + retention counter. - [x] Declare `Counter.EVENTS_INGESTED` on every plan in `DEFAULT_ENTITLEMENTS` with per-plan retention aligned to the plan's `Counter.TRACES_INGESTED` retention: `Quota(period=Period.MONTHLY, retention=Retention.MONTHLY)` on Hobby, `QUARTERLY` on Pro, `YEARLY` on Business, and `retention=None` (unlimited) on Agenta and Self-hosted Enterprise. - [x] Add `Counter.EVENTS_INGESTED` to `CONSTRAINTS[Constraint.READ_ONLY]`. - [x] New `EventsRetentionDAO` at `api/ee/src/dbs/postgres/events/dao.py` (independent from OSS `EventsDAO`). diff --git a/docs/designs/extend-events-beyond-deployments/events.md b/docs/designs/extend-events-beyond-deployments/events.md new file mode 100644 index 0000000000..7497426d2e --- /dev/null +++ b/docs/designs/extend-events-beyond-deployments/events.md @@ -0,0 +1,773 @@ +# Extend Events Beyond Deployments - Event Catalog + +## Rules + +- Add every event below to both `EventType` and `WebhookEventType`. +- **Read actions** (`retrieve` / `fetch` / `query` / `log`, plus trace and testcase reads) emit from the **router** boundary, after the response is materialized. The same handler emits whether mounted at the stable path or at a `/preview/*` duplicate (both prefixes share one handler instance, so each call still emits exactly once). +- **Write actions** (currently just `commit`) emit from the **service layer**, at the operation's seam — e.g. `commit_*_revision(...)`. This covers direct commit routes, simple-service create/edit, deploy paths, and any other caller of the same service method. Future write actions (`archive`, `unarchive`, …) should follow the same service-layer rule. +- The read/write split is asymmetric on purpose: reads have legitimate internal callers that must stay silent; writes do not. See `core/events/utils.py` module docstring for the full rationale. +- Do not emit from `TracingRouter` or `SpansRouter` (legacy / out-of-scope span endpoints). +- Do not emit workflow revision events for now. +- Suppress emission when `count == 0` (and for commits when the revision is not returned). +- Do not put generic `links` in every payload. Use event-specific fields only where useful. +- Cap event-specific reference lists at 1000 entries. `count` stays uncapped. + +## Existing Environment Commit Event + +Current producer: + +- `api/oss/src/core/environments/service.py::commit_environment_revision` +- Event type: `environments.revisions.committed` + +Current attributes body: + +```json +{ + "user_id": "user-id", + "references": { + "environment": { + "id": "environment-id" + }, + "environment_variant": { + "id": "environment-variant-id" + }, + "environment_revision": { + "id": "environment-revision-id", + "slug": "v3", + "version": 3 + } + }, + "state": { + "references": { + "app": { + "application_revision": { + "id": "application-revision-id" + } + } + } + }, + "diff": { + "created": { + "app": { + "new": { + "application_revision": { + "id": "application-revision-id" + } + } + } + }, + "updated": {}, + "deleted": {} + } +} +``` + +Current-code detail: + +- `EnvironmentRevisionCommit` accepts `data` and `delta`. +- Delta commits are resolved into full `data` before the DAO commit. +- The existing event records the committed revision references, normalized committed `state`, and a references `diff`. +- The current `diff` shape is `{created, updated, deleted}`. Created entries contain `new`; updated entries contain `old` and `new`; deleted entries contain `old`. + +Commit payload rule: + +- Keep the existing `environments.revisions.committed` `references`, `state`, and `diff`. +- Add optional `message` to `environments.revisions.committed` for commit-event uniformity. +- For the new application, query, testset, and evaluator commit events, do not include `state` or `diff` in the first version. +- Include `message` on new commit events when present. +- Delta commits emit exactly one `*.revisions.committed` event, after the delta is resolved into full committed data. + +Environment commit body shape: + +```json +{ + "user_id": "user-id", + "references": { + "environment": {"id": "environment-id"}, + "environment_variant": {"id": "environment-variant-id"}, + "environment_revision": {"id": "environment-revision-id", "slug": "v3", "version": 3} + }, + "message": "Promote prompt changes", + "state": { + "references": { + "app-id": { + "application": {"id": "application-id"}, + "application_variant": {"id": "application-variant-id"}, + "application_revision": {"id": "application-revision-id"} + } + } + }, + "diff": { + "created": { + "app-id": { + "new": { + "application": {"id": "application-id"}, + "application_variant": {"id": "application-variant-id"}, + "application_revision": {"id": "application-revision-id"} + } + } + }, + "updated": {}, + "deleted": {} + } +} +``` + +For delta commits, the event still describes the resulting committed state and diff: + +```json +{ + "user_id": "user-id", + "references": { + "environment": {"id": "environment-id"}, + "environment_variant": {"id": "environment-variant-id"}, + "environment_revision": {"id": "environment-revision-id", "slug": "v4", "version": 4} + }, + "message": "Update one app reference", + "state": { + "references": { + "app-id": { + "application_revision": {"id": "application-revision-id-new"} + } + } + }, + "diff": { + "created": {}, + "updated": { + "app-id": { + "old": {"application_revision": {"id": "application-revision-id-old"}}, + "new": {"application_revision": {"id": "application-revision-id-new"}} + } + }, + "deleted": {} + } +} +``` + +For remove delta commits: + +```json +{ + "user_id": "user-id", + "references": { + "environment": {"id": "environment-id"}, + "environment_variant": {"id": "environment-variant-id"}, + "environment_revision": {"id": "environment-revision-id", "slug": "v5", "version": 5} + }, + "message": "Remove retired app reference", + "state": { + "references": {} + }, + "diff": { + "created": {}, + "updated": {}, + "deleted": { + "app-id": { + "old": {"application_revision": {"id": "application-revision-id-old"}} + } + } + } +} +``` + +## Revision Payload Pattern + +Read events (`retrieved` / `fetched` / `queried` / `logged`) always include `count`. Commit events (`committed`) omit `count` — the helper drops it automatically. Per-event examples below reflect this; the generic shapes in this section apply to read events. + +Single revision read events use domain-specific `references`: + +```json +{ + "user_id": "00000000-0000-0000-0000-000000000001", + "count": 1, + "references": { + "application": {"id": "app-id"}, + "application_variant": {"id": "variant-id"}, + "application_revision": {"id": "revision-id", "slug": "v1", "version": 1} + } +} +``` + +Multi-result revision query/log events may include capped `references`: + +```json +{ + "user_id": "00000000-0000-0000-0000-000000000001", + "count": 2, + "references": [ + { + "artifact": {"id": "entity-id"}, + "variant": {"id": "variant-id"}, + "revision": {"id": "revision-id-1", "slug": "v2", "version": 2} + }, + { + "artifact": {"id": "entity-id"}, + "variant": {"id": "variant-id"}, + "revision": {"id": "revision-id-2", "slug": "v1", "version": 1} + } + ] +} +``` + +Cap `references` at 1000 and keep `count` uncapped. + +`references` are partial identity objects, not full entity snapshots. Include the fields available on the returned DTO. Artifact and variant references may only have `id`; revision references commonly have `id`, `slug`, and `version`, but missing fields are acceptable. + +## Applications + +### `applications.revisions.retrieved` + +Route: `POST /applications/revisions/retrieve` + +```json +{ + "user_id": "user-id", + "count": 1, + "references": { + "application": {"id": "application-id"}, + "application_variant": {"id": "application-variant-id"}, + "application_revision": {"id": "application-revision-id", "slug": "v3", "version": 3} + } +} +``` + +### `applications.revisions.fetched` + +Route: `GET /applications/revisions/{application_revision_id}` + +```json +{ + "user_id": "user-id", + "count": 1, + "references": { + "application": {"id": "application-id"}, + "application_variant": {"id": "application-variant-id"}, + "application_revision": {"id": "application-revision-id", "slug": "v3", "version": 3} + } +} +``` + +### `applications.revisions.queried` + +Route: `POST /applications/revisions/query` + +```json +{ + "user_id": "user-id", + "count": 2, + "references": [ + { + "application": {"id": "application-id"}, + "application_variant": {"id": "application-variant-id"}, + "application_revision": {"id": "application-revision-id-1", "slug": "v3", "version": 3} + }, + { + "application": {"id": "application-id"}, + "application_variant": {"id": "application-variant-id"}, + "application_revision": {"id": "application-revision-id-2", "slug": "v2", "version": 2} + } + ] +} +``` + +### `applications.revisions.logged` + +Route: `POST /applications/revisions/log` + +```json +{ + "user_id": "user-id", + "count": 2, + "references": [ + { + "application": {"id": "application-id"}, + "application_variant": {"id": "application-variant-id"}, + "application_revision": {"id": "application-revision-id-1", "slug": "v3", "version": 3} + }, + { + "application": {"id": "application-id"}, + "application_variant": {"id": "application-variant-id"}, + "application_revision": {"id": "application-revision-id-2", "slug": "v2", "version": 2} + } + ] +} +``` + +### `applications.revisions.committed` + +Route: `POST /applications/revisions/commit`, or any path that reaches successful application revision commit logic. + +```json +{ + "user_id": "user-id", + "references": { + "application": {"id": "application-id"}, + "application_variant": {"id": "application-variant-id"}, + "application_revision": {"id": "application-revision-id", "slug": "v4", "version": 4} + }, + "message": "Commit application changes" +} +``` + +## Queries + +### `queries.revisions.retrieved` + +Route: `POST /queries/revisions/retrieve` + +```json +{ + "user_id": "user-id", + "count": 1, + "references": { + "query": {"id": "query-id"}, + "query_variant": {"id": "query-variant-id"}, + "query_revision": {"id": "query-revision-id", "slug": "v1", "version": 1} + } +} +``` + +### `queries.revisions.fetched` + +Route: `GET /queries/revisions/{query_revision_id}` + +```json +{ + "user_id": "user-id", + "count": 1, + "references": { + "query": {"id": "query-id"}, + "query_variant": {"id": "query-variant-id"}, + "query_revision": {"id": "query-revision-id", "slug": "v1", "version": 1} + } +} +``` + +### `queries.revisions.queried` + +Route: `POST /queries/revisions/query` + +```json +{ + "user_id": "user-id", + "count": 2, + "references": [ + { + "query": {"id": "query-id"}, + "query_variant": {"id": "query-variant-id"}, + "query_revision": {"id": "query-revision-id-1", "slug": "v2", "version": 2} + }, + { + "query": {"id": "query-id"}, + "query_variant": {"id": "query-variant-id"}, + "query_revision": {"id": "query-revision-id-2", "slug": "v1", "version": 1} + } + ] +} +``` + +### `queries.revisions.logged` + +Route: `POST /queries/revisions/log` + +```json +{ + "user_id": "user-id", + "count": 2, + "references": [ + { + "query": {"id": "query-id"}, + "query_variant": {"id": "query-variant-id"}, + "query_revision": {"id": "query-revision-id-1", "slug": "v2", "version": 2} + }, + { + "query": {"id": "query-id"}, + "query_variant": {"id": "query-variant-id"}, + "query_revision": {"id": "query-revision-id-2", "slug": "v1", "version": 1} + } + ] +} +``` + +### `queries.revisions.committed` + +Route: `POST /queries/revisions/commit`, or any path that reaches successful query revision commit logic. + +```json +{ + "user_id": "user-id", + "references": { + "query": {"id": "query-id"}, + "query_variant": {"id": "query-variant-id"}, + "query_revision": {"id": "query-revision-id", "slug": "v3", "version": 3} + }, + "message": "Commit query changes" +} +``` + +## Testsets + +### `testsets.revisions.retrieved` + +Route: `POST /testsets/revisions/retrieve` + +```json +{ + "user_id": "user-id", + "count": 1, + "references": { + "testset": {"id": "testset-id"}, + "testset_variant": {"id": "testset-variant-id"}, + "testset_revision": {"id": "testset-revision-id", "slug": "v1", "version": 1} + } +} +``` + +### `testsets.revisions.fetched` + +Route: `GET /testsets/revisions/{testset_revision_id}` + +```json +{ + "user_id": "user-id", + "count": 1, + "references": { + "testset": {"id": "testset-id"}, + "testset_variant": {"id": "testset-variant-id"}, + "testset_revision": {"id": "testset-revision-id", "slug": "v1", "version": 1} + } +} +``` + +### `testsets.revisions.queried` + +Route: `POST /testsets/revisions/query` + +```json +{ + "user_id": "user-id", + "count": 2, + "references": [ + { + "testset": {"id": "testset-id"}, + "testset_variant": {"id": "testset-variant-id"}, + "testset_revision": {"id": "testset-revision-id-1", "slug": "v2", "version": 2} + }, + { + "testset": {"id": "testset-id"}, + "testset_variant": {"id": "testset-variant-id"}, + "testset_revision": {"id": "testset-revision-id-2", "slug": "v1", "version": 1} + } + ] +} +``` + +### `testsets.revisions.logged` + +Route: `POST /testsets/revisions/log` + +```json +{ + "user_id": "user-id", + "count": 2, + "references": [ + { + "testset": {"id": "testset-id"}, + "testset_variant": {"id": "testset-variant-id"}, + "testset_revision": {"id": "testset-revision-id-1", "slug": "v2", "version": 2} + }, + { + "testset": {"id": "testset-id"}, + "testset_variant": {"id": "testset-variant-id"}, + "testset_revision": {"id": "testset-revision-id-2", "slug": "v1", "version": 1} + } + ] +} +``` + +### `testsets.revisions.committed` + +Route: `POST /testsets/revisions/commit`, or any path that reaches successful testset revision commit logic. + +```json +{ + "user_id": "user-id", + "references": { + "testset": {"id": "testset-id"}, + "testset_variant": {"id": "testset-variant-id"}, + "testset_revision": {"id": "testset-revision-id", "slug": "v3", "version": 3} + }, + "message": "Commit testset changes" +} +``` + +## Evaluators + +### `evaluators.revisions.retrieved` + +Route: `POST /evaluators/revisions/retrieve` + +```json +{ + "user_id": "user-id", + "count": 1, + "references": { + "evaluator": {"id": "evaluator-id"}, + "evaluator_variant": {"id": "evaluator-variant-id"}, + "evaluator_revision": {"id": "evaluator-revision-id", "slug": "v1", "version": 1} + } +} +``` + +### `evaluators.revisions.fetched` + +Route: `GET /evaluators/revisions/{evaluator_revision_id}` + +```json +{ + "user_id": "user-id", + "count": 1, + "references": { + "evaluator": {"id": "evaluator-id"}, + "evaluator_variant": {"id": "evaluator-variant-id"}, + "evaluator_revision": {"id": "evaluator-revision-id", "slug": "v1", "version": 1} + } +} +``` + +### `evaluators.revisions.queried` + +Route: `POST /evaluators/revisions/query` + +```json +{ + "user_id": "user-id", + "count": 2, + "references": [ + { + "evaluator": {"id": "evaluator-id"}, + "evaluator_variant": {"id": "evaluator-variant-id"}, + "evaluator_revision": {"id": "evaluator-revision-id-1", "slug": "v2", "version": 2} + }, + { + "evaluator": {"id": "evaluator-id"}, + "evaluator_variant": {"id": "evaluator-variant-id"}, + "evaluator_revision": {"id": "evaluator-revision-id-2", "slug": "v1", "version": 1} + } + ] +} +``` + +### `evaluators.revisions.logged` + +Route: `POST /evaluators/revisions/log` + +```json +{ + "user_id": "user-id", + "count": 2, + "references": [ + { + "evaluator": {"id": "evaluator-id"}, + "evaluator_variant": {"id": "evaluator-variant-id"}, + "evaluator_revision": {"id": "evaluator-revision-id-1", "slug": "v2", "version": 2} + }, + { + "evaluator": {"id": "evaluator-id"}, + "evaluator_variant": {"id": "evaluator-variant-id"}, + "evaluator_revision": {"id": "evaluator-revision-id-2", "slug": "v1", "version": 1} + } + ] +} +``` + +### `evaluators.revisions.committed` + +Route: `POST /evaluators/revisions/commit`, or any path that reaches successful evaluator revision commit logic. + +```json +{ + "user_id": "user-id", + "references": { + "evaluator": {"id": "evaluator-id"}, + "evaluator_variant": {"id": "evaluator-variant-id"}, + "evaluator_revision": {"id": "evaluator-revision-id", "slug": "v3", "version": 3} + }, + "message": "Commit evaluator changes" +} +``` + +## Environments + +### `environments.revisions.retrieved` + +Route: `POST /environments/revisions/retrieve` + +```json +{ + "user_id": "user-id", + "count": 1, + "references": { + "environment": {"id": "environment-id"}, + "environment_variant": {"id": "environment-variant-id"}, + "environment_revision": {"id": "environment-revision-id", "slug": "v1", "version": 1} + } +} +``` + +### `environments.revisions.fetched` + +Route: `GET /environments/revisions/{environment_revision_id}` + +```json +{ + "user_id": "user-id", + "count": 1, + "references": { + "environment": {"id": "environment-id"}, + "environment_variant": {"id": "environment-variant-id"}, + "environment_revision": {"id": "environment-revision-id", "slug": "v1", "version": 1} + } +} +``` + +### `environments.revisions.queried` + +Route: `POST /environments/revisions/query` + +```json +{ + "user_id": "user-id", + "count": 2, + "references": [ + { + "environment": {"id": "environment-id"}, + "environment_variant": {"id": "environment-variant-id"}, + "environment_revision": {"id": "environment-revision-id-1", "slug": "v2", "version": 2} + }, + { + "environment": {"id": "environment-id"}, + "environment_variant": {"id": "environment-variant-id"}, + "environment_revision": {"id": "environment-revision-id-2", "slug": "v1", "version": 1} + } + ] +} +``` + +### `environments.revisions.logged` + +Route: `POST /environments/revisions/log` + +```json +{ + "user_id": "user-id", + "count": 2, + "references": [ + { + "environment": {"id": "environment-id"}, + "environment_variant": {"id": "environment-variant-id"}, + "environment_revision": {"id": "environment-revision-id-1", "slug": "v2", "version": 2} + }, + { + "environment": {"id": "environment-id"}, + "environment_variant": {"id": "environment-variant-id"}, + "environment_revision": {"id": "environment-revision-id-2", "slug": "v1", "version": 1} + } + ] +} +``` + +### `environments.revisions.committed` + +Route: `POST /environments/revisions/commit`, or any path that reaches successful environment revision commit logic. + +Delta commits emit exactly one `environments.revisions.committed` event, after the delta is resolved into the resulting committed state. + +```json +{ + "user_id": "user-id", + "references": { + "environment": {"id": "environment-id"}, + "environment_variant": {"id": "environment-variant-id"}, + "environment_revision": {"id": "environment-revision-id", "slug": "v3", "version": 3} + }, + "message": "Commit environment changes", + "state": { + "references": { + "app-id": { + "application_revision": {"id": "application-revision-id"} + } + } + }, + "diff": { + "created": { + "app-id": { + "new": { + "application_revision": {"id": "application-revision-id"} + } + } + }, + "updated": {}, + "deleted": {} + } +} +``` + +## Testcases + +### `testcases.fetched` + +Routes: `GET /testcases/`, `GET /testcases/{testcase_id}` + +```json +{ + "user_id": "user-id", + "count": 1, + "testcase_id": "testcase-id" +} +``` + +### `testcases.queried` + +Route: `POST /testcases/query` + +```json +{ + "user_id": "user-id", + "count": 2, + "testcase_ids": ["testcase-id-1", "testcase-id-2"] +} +``` + +## Traces + +### `traces.fetched` + +Route: stable trace fetch endpoint. + +```json +{ + "user_id": "user-id", + "count": 1, + "trace_id": "trace-id" +} +``` + +### `traces.queried` + +Route: stable trace query endpoint. + +```json +{ + "user_id": "user-id", + "count": 2, + "trace_ids": ["trace-id-1", "trace-id-2"] +} +``` + +## Limits + +- Cap reference lists at 1000. +- Keep `count` as the uncapped returned count. +- Do not store raw filter/query expressions by default. +- Do not emit read events when `count == 0`. diff --git a/docs/designs/extend-events-beyond-deployments/findings.md b/docs/designs/extend-events-beyond-deployments/findings.md new file mode 100644 index 0000000000..cc3fac9340 --- /dev/null +++ b/docs/designs/extend-events-beyond-deployments/findings.md @@ -0,0 +1,531 @@ +# Extend Events Beyond Deployments — Findings + +## Sources + +- Branch: `feat/extend-events-beyond-deployments` +- Base: `feat/add-access-controls-in-env-vars` +- Path: `docs/designs/extend-events-beyond-deployments/` +- Scope: fresh `scan-codebase` pass at `depth=deep`. Re-read code, tests, routes, schemas, design docs from scratch against [proposal.md](./proposal.md), [events.md](./events.md), [research.md](./research.md), [gap.md](./gap.md), and [tasks.md](./tasks.md). + +## Summary + +Deep scans against the actual base branch (`feat/add-access-controls-in-env-vars`) confirm the core event-emission implementation is now mostly sound: + +- All 29 new event types are present in [EventType](../../../api/oss/src/core/events/types.py) and [WebhookEventType](../../../api/oss/src/core/webhooks/types.py). +- Shared helpers in [core/events/utils.py](../../../api/oss/src/core/events/utils.py) enforce the read=router / write=service split, swallow publish failures, and now run the L1 `Counter.EVENTS_INGESTED` soft check. +- `EventsWorker.process_batch` now performs the L2 authoritative per-org `Counter.EVENTS_INGESTED` adjustment. +- Service-layer commit events now resolve organization scope through AuthScope-first scope resolution rather than dropping `organization_id`. +- Generated TS/Python clients, `openapi.json`, and user-facing webhook docs include the new event types. + +All scan findings that were actionable in this pass have been resolved or explicitly closed. The remaining closed record below preserves the review history and rationale. + + +## Rules + +- Read emission lives at the router. Write emission lives at the service. See [core/events/utils.py:10-90](../../../api/oss/src/core/events/utils.py#L10-L90). +- `TracingRouter` and `SpansRouter` must **not** emit; `TracesRouter` is the only trace-event source. +- Workflow revision events stay out of scope until workflows are confirmed durable. +- All new event types are webhook-subscribable. +- Double-emission on simple-service create (initial empty commit + first data commit in `SimpleApplicationsService.create` and `SimpleEvaluatorsService.create`) is **intentional** — each revision is a real commit and emits its own event. + +## Notes + +- This scan is verification-only. No runtime tests were executed. +- `count` in revision events reflects the response payload size, not the unpaginated population. This matches the proposal phrasing ("Keep `count` as the uncapped total") which refers to truncation of the references list, not pagination of the underlying query. + +## Open Questions + +_None._ + +## Open Findings + +_None._ + +## Closed Findings + +### F-010 — [CLOSED] Delta-commit re-entry path is not covered by the exactly-once commit tests + +- ID: F-010 +- Origin: scan +- Lens: verification +- Severity: P3 +- Confidence: high +- Status: fixed +- Category: Testing +- Files: + - [api/oss/src/core/environments/service.py:918-1003](../../../api/oss/src/core/environments/service.py#L918-L1003) + - [api/oss/src/core/environments/service.py:1005-1071](../../../api/oss/src/core/environments/service.py#L1005-L1071) + - [api/oss/src/core/testsets/service.py:855-939](../../../api/oss/src/core/testsets/service.py#L855-L939) + - [api/oss/src/core/testsets/service.py:981-1112](../../../api/oss/src/core/testsets/service.py#L981-L1112) + - [api/oss/tests/pytest/unit/events/test_service_commit_emission.py:306-373](../../../api/oss/tests/pytest/unit/events/test_service_commit_emission.py#L306-L373) +- Summary: `commit_environment_revision` and `commit_testset_revision` early-return into `_commit_*_revision_delta` whenever the request carries `delta` instead of `data`. The delta helper resolves the delta into full data and then re-enters `commit_*_revision`, which now takes the non-delta branch and reaches the single `publish_revision_event` call. The structure is sound, but the existing unit tests only construct non-delta commits (`EnvironmentRevisionData(references={})`, `TestsetRevisionData(testcase_ids=[])`). There is no test asserting that a delta commit emits exactly one event — neither zero (regression: early-return missing the emit) nor two (regression: emit added to the delta helper as well). +- Evidence: + - [environments/service.py:918-1071](../../../api/oss/src/core/environments/service.py#L918-L1071) and [testsets/service.py:855-1112](../../../api/oss/src/core/testsets/service.py#L855-L1112) route delta commits through a re-entry helper. + - [test_service_commit_emission.py:306-373](../../../api/oss/tests/pytest/unit/events/test_service_commit_emission.py#L306-L373) covers non-delta commits only. +- Cause: The first exactly-once tests were written around the straightforward full-data path, not the less common delta normalization path. +- Explanation: The current implementation is sound, but the uncovered branch is precisely where an apparently harmless refactor could introduce zero or duplicate emission. +- Impact: A future refactor that, for example, moves the `publish_revision_event` call out of the non-delta branch and into a shared helper at the top of `commit_*_revision` could either silently double-emit on delta commits (if it fires before the early return) or silently miss the event (if it fires only inside the delta helper without re-entry). Neither case would be caught by the current test suite. +- Suggested Fix: + - Add one test per service that constructs a delta commit, mocks `_get_previous_environment_references` / equivalent so the delta resolves to full data, and asserts `len(captured_events) == 1`. +- Alternatives: Accept the latent gap, but then future refactors of delta normalization remain unguarded. +- Resolution: Closed as fixed. Added delta-commit exactly-once coverage for both environment and testset service commit paths in `test_service_commit_emission.py`; each test drives the delta branch through re-entry and asserts exactly one commit event is published. +- Sources: Second `scan-codebase` pass. + +### F-011 — [CLOSED] `events.md` per-event reference does not document the delta-commit emission rule + +- ID: F-011 +- Origin: scan +- Lens: verification +- Severity: P3 +- Confidence: medium +- Status: fixed +- Category: Completeness +- Files: + - [docs/designs/extend-events-beyond-deployments/events.md:679-712](./events.md#L679-L712) + - [api/oss/src/core/environments/service.py:918-1003](../../../api/oss/src/core/environments/service.py#L918-L1003) +- Summary: [events.md](./events.md) describes per-event payloads in detail but does not document how the `*.revisions.committed` event interacts with delta commits. A reader implementing a webhook consumer would not know from this doc that a `POST /environments/revisions/commit` with `delta` (instead of `data`) produces exactly one event — the same as a full-data commit — because the resolved-delta re-entry path is what actually publishes. +- Evidence: + - [events.md:679-712](./events.md#L679-L712) documents commit payloads but does not state the delta-commit rule. + - [environments/service.py:918-1003](../../../api/oss/src/core/environments/service.py#L918-L1003) implements delta resolution followed by one re-entered commit publish. +- Cause: The event catalog focused on payload shapes and did not capture a behavior that is encoded in service control flow rather than the payload schema. +- Explanation: Consumers can infer the rule only by reading code, even though it affects deduplication expectations for commit webhooks. +- Impact: Consumers planning idempotency / deduplication around commit events have to read the service code to confirm the semantics. Low-impact because the implementation is already correct. +- Suggested Fix: Add a one-line note under the commit-event sections (or in the [proposal.md](./proposal.md) "Create and Commit Note") stating "delta commits emit exactly one `*.revisions.committed` event, after the delta is resolved into full data." +- Alternatives: Leave the rule implicit in service code, at the cost of making consumer-facing semantics harder to discover. +- Resolution: Closed as fixed. Updated `events.md` to state that delta commits emit exactly one `*.revisions.committed` event after the delta is resolved into full committed data, with an environment-specific note under `environments.revisions.committed`. +- Sources: Second `scan-codebase` pass. + +### F-012 — [CLOSED] Webhook event-type list in user docs and TS client can drift from `WebhookEventType` + +- ID: F-012 +- Origin: scan +- Lens: verification +- Severity: P3 +- Confidence: high +- Status: fixed +- Category: Migration +- Files: + - [docs/docs/prompt-engineering/integrating-prompts/04-webhooks.mdx:239-285](../../../docs/docs/prompt-engineering/integrating-prompts/04-webhooks.mdx#L239-L285) + - [api/oss/src/core/webhooks/types.py:47-101](../../../api/oss/src/core/webhooks/types.py#L47-L101) + - [web/packages/agenta-api-client/src/generated/api/types/WebhookEventType.ts](../../../web/packages/agenta-api-client/src/generated/api/types/WebhookEventType.ts) +- Summary: The user-facing webhook docs and the TS client both enumerate the subscribable event types. Today they are in sync with `WebhookEventType` because they were updated together with this PR, but there is no automated check (or even a contributing note) tying the three artifacts together. The next person to add a `WebhookEventType` value can ship a green build with stale docs or a stale generated client. +- Evidence: + - [core/webhooks/types.py](../../../api/oss/src/core/webhooks/types.py), [WebhookEventType.ts](../../../web/packages/agenta-api-client/src/generated/api/types/WebhookEventType.ts), and [04-webhooks.mdx](../../../docs/docs/prompt-engineering/integrating-prompts/04-webhooks.mdx) each maintain their own event-type surface. + - No automated check or contribution note ties the three artifacts together. +- Cause: The enum, generated clients, and hand-authored documentation are updated through different workflows. +- Explanation: They are synchronized in this branch, but nothing makes future synchronization fail closed. +- Impact: Webhook subscribers reading the docs would see a partial event-type list and miss new subscriptions; the Fern client would not type-check against new event values until regenerated. +- Suggested Fix: + - Primary: add a contributing checklist entry ("when extending `WebhookEventType`, regenerate the Fern client and update `04-webhooks.mdx`") next to the enum definition in `core/webhooks/types.py`. + - Alternative: add a small unit test that loads the markdown file, scrapes the bullet list under "Available event types", and compares it to `WebhookEventType.values()`. Fragile but catches drift mechanically. +- Alternatives: Keep a manual checklist only; weaker than a generated/checking path but still better than no coupling note. +- Resolution: Closed as fixed. Added a maintainer note to `WebhookEventType` documenting that extending the enum requires regenerating Fern clients and updating the `04-webhooks.mdx` Available event types section. +- Sources: Second `scan-codebase` pass. + +### F-016 — [CLOSED] Webhook user docs say commit events carry `count`, but commit payloads intentionally omit it + +- ID: F-016 +- Origin: scan +- Lens: verification +- Severity: P2 +- Confidence: high +- Status: fixed +- Category: Correctness +- Summary: The user-facing webhook guide says “Revision events carry `references`, `count`, and `user_id`. Commit events also carry optional `message`.” The implementation and event catalog intentionally do the opposite for commits: `build_revision_event_attributes()` skips `count` when `action == "commit"`, and `events.md` explicitly says commit events omit `count`. +- Evidence: + - [04-webhooks.mdx:263-270](../../../docs/docs/prompt-engineering/integrating-prompts/04-webhooks.mdx#L263-L270) claims revision events carry `count` before introducing commit events. + - [events.md:151-152](./events.md#L151-L152) states commit events omit `count`. + - [core/events/utils.py:636-683](../../../api/oss/src/core/events/utils.py#L636-L683) only adds `count` for non-commit single-revision actions. +- Files: + - [docs/docs/prompt-engineering/integrating-prompts/04-webhooks.mdx](../../../docs/docs/prompt-engineering/integrating-prompts/04-webhooks.mdx) + - [docs/designs/extend-events-beyond-deployments/events.md](./events.md) + - [api/oss/src/core/events/utils.py](../../../api/oss/src/core/events/utils.py) +- Cause: The public webhook copy generalized the read-event payload sentence across all revision events after commit events were added, while the implementation preserved the older environment-commit contract that intentionally omits `count`. +- Explanation: Read/log revision events and commit revision events have different payload contracts. The current MDX collapses them into one sentence, so the public contract no longer matches the emitted JSON for `*.revisions.committed`. +- Impact: Webhook consumers following the public docs may build schemas or downstream logic that require `count` on `*.revisions.committed`, then fail on valid production payloads. +- Suggested Fix: Split the sentence by action family: read/log revision events carry `count`; commit events carry `references`, `user_id`, and optional `message` but omit `count`. +- Alternatives: Add `count=1` to commit payloads for uniformity, but that would intentionally change the as-shipped contract and contradict the current proposal/event catalog. +- Resolution: Closed as fixed. Updated the public webhook docs to distinguish revision read/log payloads from commit payloads: read/log events carry `count`; commit events carry references, user_id, optional message, and no count. +- Sources: Fresh `scan-codebase` pass on 2026-05-18. + +### F-017 — [CLOSED] Design docs still preserve pre-AuthScope / pre-metering assumptions after the implementation changed + +- ID: F-017 +- Origin: scan +- Lens: verification +- Severity: P3 +- Confidence: high +- Status: fixed +- Category: Consistency +- Summary: The as-shipped helper now resolves scope `AuthScope`-first with `request.state` fallback, and the branch now enforces `Counter.EVENTS_INGESTED` through L1/L2 checks. Some design docs still describe the older model. +- Evidence: + - [proposal.md:214-219](./proposal.md#L214-L219) says helpers resolve scope from `request.state`. + - [research.md:238-247](./research.md#L238-L247) frames router emission only around `request.state`. + - [dynamic-access-and-billing/gap.md:69-77](../dynamic-access-and-billing/gap.md#L69-L77) still calls `EVENTS_INGESTED` a retention-only, unmetered counter. + - [core/events/utils.py:184-220](../../../api/oss/src/core/events/utils.py#L184-L220) implements AuthScope-first resolution. + - [core/events/utils.py:245-321](../../../api/oss/src/core/events/utils.py#L245-L321) implements the L1 events quota check. +- Files: + - [docs/designs/extend-events-beyond-deployments/proposal.md](./proposal.md) + - [docs/designs/extend-events-beyond-deployments/research.md](./research.md) + - [docs/designs/dynamic-access-and-billing/gap.md](../dynamic-access-and-billing/gap.md) + - [api/oss/src/core/events/utils.py](../../../api/oss/src/core/events/utils.py) +- Cause: The design docs were written before the F-009/F-013 implementation changes and were not fully reconciled after the branch adopted AuthScope-first scope propagation and event metering. +- Explanation: `summary.md` and the current code now describe the final shipped model, but `proposal.md`, `research.md`, and the adjacent gap doc still record the earlier implementation assumption without marking it historical. +- Impact: A future contributor reading proposal/gap instead of summary/code can reintroduce the exact asymmetry this branch just fixed, or make the wrong assumption about whether events usage is chargeable/enforced. +- Suggested Fix: Update proposal/research to describe AuthScope-first resolution with `request.state` fallback, and update the adjacent gap doc to the current usage + retention model or explicitly mark that paragraph historical. +- Alternatives: Leave historical docs untouched, but then add a clear “superseded by summary/current implementation” note at each stale paragraph. +- Resolution: Closed as fixed. Updated proposal/research wording to describe AuthScope-first scope resolution with `request.state` fallback, and updated the adjacent dynamic-access-and-billing gap doc to describe `EVENTS_INGESTED` as an events usage + retention counter. +- Sources: Fresh `scan-codebase` pass on 2026-05-18. + +### F-018 — [CLOSED] New `Flag.AUDIT` query gate has no direct test coverage + +- ID: F-018 +- Origin: scan +- Lens: verification +- Severity: P3 +- Confidence: high +- Status: fixed +- Category: Testing +- Summary: The branch adds a new entitlement decision at `POST /events/query`: after `Permission.VIEW_SPANS`, EE requests must pass `Flag.AUDIT` or receive `NOT_ENTITLED_RESPONSE(Tracker.FLAGS)`. Existing tests cover event-query happy-path behavior and worker-side `EVENTS_INGESTED` metering, but not the new `Flag.AUDIT` allow/deny branch. +- Evidence: + - [events/router.py:34-67](../../../api/oss/src/apis/fastapi/events/router.py#L34-L67) adds the `Flag.AUDIT` check. + - [test_events_basics.py](../../../api/oss/tests/pytest/acceptance/events/test_events_basics.py) covers only normal event-query responses and validation. + - [test_events_worker_l2.py](../../../api/oss/tests/pytest/unit/events/test_events_worker_l2.py) covers the worker quota path, not the query-router feature gate. + - Repo grep found no test references to `Flag.AUDIT` or `query_events` beyond the acceptance happy-path file. +- Files: + - [api/oss/src/apis/fastapi/events/router.py](../../../api/oss/src/apis/fastapi/events/router.py) + - [api/oss/tests/pytest/acceptance/events/test_events_basics.py](../../../api/oss/tests/pytest/acceptance/events/test_events_basics.py) + - [api/oss/tests/pytest/unit/events/test_events_worker_l2.py](../../../api/oss/tests/pytest/unit/events/test_events_worker_l2.py) +- Cause: The entitlement feature gate was added as part of the quota follow-up, but the added tests focused on scope propagation and L1/L2 metering rather than the new router branch. +- Explanation: The new code path is product-visible and has two materially different outcomes, yet current automated coverage exercises only the pre-existing query success surface. +- Impact: A future refactor could remove, invert, or bypass the audit-log gate while the current suite remains green. +- Suggested Fix: Add targeted router tests for the EE path: one asserting `Flag.AUDIT=True` returns the normal `EventsQueryResponse`, and one asserting `Flag.AUDIT=False` returns the 403 feature-gate response. +- Alternatives: Cover the same branch in EE acceptance tests instead, but a unit-style router test is smaller and does not require Redis or worker integration. +- Resolution: Closed as fixed. Added direct router tests for the `Flag.AUDIT` query gate covering both entitled success and unentitled 403 behavior in `test_events_router_audit.py`. +- Sources: Fresh `scan-codebase` pass on 2026-05-18. + +### F-008 — [CLOSED] Applications/evaluators commit emission is coupled to `WorkflowsService` being silent + +- ID: F-008 +- Origin: scan +- Lens: verification +- Severity: P3 +- Confidence: high +- Status: wontfix +- Category: Compatibility +- Files: + - [api/oss/src/core/applications/service.py:793-823](../../../api/oss/src/core/applications/service.py#L793-L823) + - [api/oss/src/core/evaluators/service.py:780-823](../../../api/oss/src/core/evaluators/service.py#L780-L823) + - [api/oss/src/core/workflows/service.py](../../../api/oss/src/core/workflows/service.py) +- Summary: `ApplicationsService.commit_application_revision` and `EvaluatorsService.commit_evaluator_revision` both delegate the actual write to `workflows_service.commit_workflow_revision(...)` and then publish their own `.revisions.committed` event. The "exactly once" invariant for application/evaluator commits depends on `WorkflowsService.commit_workflow_revision` **not** emitting anything itself. Today that holds (grep finds zero `publish_*` calls in `core/workflows/service.py`), but the workflows service has no test, comment, or interface contract that guarantees this. Any future change that adds an emission inside the workflows service — including the deferred `workflows.revisions.committed` event — would silently start producing two commit events per application/evaluator commit. +- Evidence: + - [applications/service.py:793-823](../../../api/oss/src/core/applications/service.py#L793-L823) and [evaluators/service.py:780-823](../../../api/oss/src/core/evaluators/service.py#L780-L823) delegate to `workflows_service.commit_workflow_revision(...)` and emit afterward. + - Repo grep finds no `publish_*` call in [core/workflows/service.py](../../../api/oss/src/core/workflows/service.py). +- Cause: Applications and evaluators reuse workflow persistence, while event emission is layered outside the shared workflow commit helper. +- Explanation: That layering is correct today but only by convention; there is no executable contract protecting it if workflows later gain their own commit event. +- Impact: A future workflows instrumentation PR would double-emit `applications.revisions.committed` and `evaluators.revisions.committed` without any test failing, because the unit tests in [test_service_commit_emission.py](../../../api/oss/tests/pytest/unit/events/test_service_commit_emission.py) mock the `workflows_service` and never observe what a real implementation would emit. +- Suggested Fix: + - Primary: add a one-line comment in `core/workflows/service.py::commit_workflow_revision` stating that the method must NOT call `publish_revision_event`, with a reference to the application/evaluator delegation; or equivalently, add a guard test that constructs a real (un-mocked) `WorkflowsService` and asserts exactly one `applications.revisions.committed` event fires. + - Alternative: when workflows are instrumented later, move application/evaluator commit emission into the workflows service and have the application/evaluator services pass a `domain` kwarg through. Out of scope here. +- Alternatives: When workflow revisions become durable/public, centralize domain-aware emission in the workflow service instead. +- Resolution: Wontfix by design. We are intentionally not adding workflow commit publishing because application/evaluator commits delegate through `WorkflowsService.commit_workflow_revision()` and already publish their domain-specific commit events afterward. Added a commented-out publish marker in `core/workflows/service.py::commit_workflow_revision` warning that enabling workflow publishing there would double-emit application/evaluator commit events. +- Sources: Second `scan-codebase` pass. + +### F-013 — [CLOSED] `Counter.EVENTS_INGESTED` quota was missing from event ingest + +- ID: F-013 +- Origin: scan +- Lens: verification +- Severity: P1 +- Confidence: high +- Status: fixed +- Category: Functionality +- Resolution notes: + - **L1 (silent drop, publisher side)**: added `_check_l1_events_quota` inside `core/events/utils.py::_safe_publish`. Soft-checks `Counter.EVENTS_INGESTED` with `cache=True` and drops the publish silently on over-quota. No HTTP 429 — read/commit responses are unaffected. + - **L2 (authoritative, worker side)**: added per-org `Counter.EVENTS_INGESTED` adjust in `EventsWorker.process_batch`. Charges the full per-org delta in one call (regroups by org from the project batches). Over-quota orgs drop their batch but messages are still ACKed. + - **Removed stale `Flag.ACCESS` check from the events worker.** That gate was a copy-paste from the org-flag-mutation context and would have dropped events for Hobby/Pro plans (which have `Flag.ACCESS=False` by design). + - **New `Flag.AUDIT`** added to `ee.src.core.entitlements.types`. Default values: Hobby=False, Pro=False, Business=True, Agenta=True, Self-hosted=True. Added to `CONSTRAINTS[BLOCKED]` so orgs cannot promote themselves. + - **Query-side gate**: `POST /events/query` now checks `Flag.AUDIT` and returns `NOT_ENTITLED_RESPONSE(Tracker.FLAGS)` when the org's plan doesn't include it. Ingest and webhook delivery remain unchanged so upgrade flows make historical events queryable immediately and webhook subscribers keep receiving events regardless of audit-log entitlement. + - **AuthScope propagation**: `request_scope()` and `publish_revision_event()` now resolve scope from the ambient `AuthScope` ContextVar first, falling back to `request.state`. This fixes F-009 — service-layer commits now ship `organization_id` derived from the auth middleware's AuthScope rather than `None`. + - **Tests**: 8 new tests in `test_events_utils.py` (AuthScope precedence, L1 allow/drop/fail-open/skip-on-OSS/skip-when-org-unknown) and 5 new tests in `test_events_worker_l2.py` (allow, deny, per-org aggregation across projects, OSS skip, check-failure drop). One pre-existing test in `test_environments_service.py` updated to patch `publish_event` at its new site. All 575 OSS unit tests pass. +- Files: + - [api/ee/src/core/entitlements/types.py:70](../../../api/ee/src/core/entitlements/types.py#L70) + - [api/ee/src/core/entitlements/types.py:378-381](../../../api/ee/src/core/entitlements/types.py#L378-L381) (Hobby) + - [api/ee/src/core/entitlements/types.py:465-468](../../../api/ee/src/core/entitlements/types.py#L465-L468) (Pro) + - [api/ee/src/core/entitlements/types.py:552-555](../../../api/ee/src/core/entitlements/types.py#L552-L555) (Business) + - [api/ee/src/core/entitlements/types.py:635-637](../../../api/ee/src/core/entitlements/types.py#L635-L637) (Agenta) + - [api/ee/src/core/entitlements/types.py:669-671](../../../api/ee/src/core/entitlements/types.py#L669-L671) (Self-hosted) + - [api/oss/src/tasks/asyncio/events/worker.py:151-238](../../../api/oss/src/tasks/asyncio/events/worker.py#L151-L238) + - [api/oss/src/core/events/utils.py:200-222](../../../api/oss/src/core/events/utils.py#L200-L222) + - [api/oss/src/apis/fastapi/tracing/router.py:270-289](../../../api/oss/src/apis/fastapi/tracing/router.py#L270-L289) (TRACES_INGESTED L1 pattern) + - [api/oss/src/tasks/asyncio/tracing/worker.py:250-285](../../../api/oss/src/tasks/asyncio/tracing/worker.py#L250-L285) (TRACES_INGESTED L2 pattern) +- Summary: `Counter.EVENTS_INGESTED` is declared in `entitlements/types.py` and wired into every default plan's quota map and the `READ_ONLY` constraint list, and the EE retention flush job ([api/ee/src/core/events/service.py](../../../api/ee/src/core/events/service.py)) reads its `retention`. But nothing in the event-publish path actually calls `check_entitlements(key=Counter.EVENTS_INGESTED, delta=..., ...)`: + - **L1 (router, soft check)**: the eight in-scope routers (`TracesRouter`, `TestcasesRouter`, plus the five `*Router.{retrieve,fetch,query,log,commit}_*_revision` handlers) call `publish_*` helpers without first calling `check_entitlements(key=Counter.EVENTS_INGESTED, ...)`. Compare to `tracing/router.py:280-289` where every trace-ingest path runs a `cache=True` soft check before queuing. + - **L2 (worker, authoritative)**: `EventsWorker.process_batch` ([worker.py:204-219](../../../api/oss/src/tasks/asyncio/events/worker.py#L204-L219)) only calls `check_entitlements(key=Flag.ACCESS, ...)` — an access flag, not the counter — and never increments `EVENTS_INGESTED`. Compare to `tracing/worker.py:261-285` where the spans worker runs `check_entitlements(key=Counter.TRACES_INGESTED, delta=delta, scope=scope_from(organization_id=...))` as the authoritative DB check + adjust. + Net effect: plans declare an `EVENTS_INGESTED` quota that is never enforced and a meter that is never bumped. Free/limit numbers in `DEFAULT_ENTITLEMENTS` (e.g. Hobby's monthly retention-only quota, Pro/Business's tiered allowances) are dead values. The Stripe billing path (`api/ee/src/apis/fastapi/billing/router.py:912-934`) and `Meters` row for `EVENTS_INGESTED` will never see usage. +- Evidence: + - Pre-fix diff showed no `Counter.EVENTS_INGESTED` check in the publish path and only `Flag.ACCESS` in `EventsWorker.process_batch`. + - The current in-progress resolution notes record the added L1 helper, L2 worker adjustment, AuthScope propagation, and new tests. +- Cause: The events counter was introduced for retention before the event-emission surface started using it for production quotas, so the meter existed in plan defaults without a write-path adjust. +- Explanation: Retention configuration and usage metering share the same counter enum, but only the tracing path had the two-layer enforcement pattern before this follow-up. +- Impact: + - Revenue/quota: customers cannot be metered or rate-limited on event production, and any future plan tier built on `EVENTS_INGESTED` (e.g. webhook-event allowances) silently has no effect. + - Observability: usage dashboards driven by `Meters` show zero for `EVENTS_INGESTED` regardless of actual volume. + - Cost: an unbounded event producer (e.g. an abusive trace-query loop) can write to `streams:events` and through `EventsService.ingest` without backpressure. +- Suggested Fix: + - **L1 (router-layer soft check)**: add a `check_entitlements(key=Counter.EVENTS_INGESTED, delta=1, cache=True)` call inside each `publish_*` helper in `core/events/utils.py` (or in `_safe_publish`) before the Redis publish, gated by `is_ee()` and skipped for `delta == 0`. Choose between fast-rejecting the originating HTTP request (matches `TRACES_INGESTED`) and silently dropping the event (less surprising for read events that the user did not opt into producing). The former matches the trace pattern; the latter avoids breaking unrelated read paths because of a quota on a meta-event. + - **L2 (worker authoritative check + adjust)**: in `EventsWorker.process_batch`, after the existing `Flag.ACCESS` check, add a per-org `check_entitlements(key=Counter.EVENTS_INGESTED, delta=len(events), scope=scope_from(organization_id=...))` (cache=False) and on `not allowed` drop the org's events. This is the only call site that can authoritatively bump the meter. + - **Scope dependency**: L2 needs `organization_id` per event. Today commit events emitted from the service layer publish with `organization_id=None` (see [F-009]). That defect must be resolved (or `EventMessage.organization_id` must be derived from `project_id` inside the worker) before L2 can charge commit events to the right org. + - **Tests**: add coverage in `test_events_utils.py` (L1 short-circuits when over quota) and `test_events_worker.py` (L2 drops events when `Counter.EVENTS_INGESTED` returns `allowed=False`). Mirror the existing TRACES_INGESTED tests as the template. +- Alternatives: + - Treat event production as free of charge and remove `EVENTS_INGESTED` quotas from the default plans, but keep retention. Reduces operator confusion at the cost of leaving the meter inert. + - Charge only "user-initiated" events (read events from routers) and exempt service-layer commit events, on the basis that commits are already counted indirectly via the revision write path. Requires a `count_for_meter: bool` knob on `publish_*`. +- Resolution: Closed as fixed. The working tree now implements the originally suggested L1 publish-side soft check in `core/events/utils.py::_safe_publish`, the L2 worker-side authoritative `Counter.EVENTS_INGESTED` adjustment in `EventsWorker.process_batch`, removes the stale `Flag.ACCESS` worker gate, adds `Flag.AUDIT` for event-query access, and resolves commit-event organization scope through AuthScope-first scope resolution. Remaining direct test coverage for the `Flag.AUDIT` query gate is tracked separately as F-018. +- Sources: Second `scan-codebase` pass plus in-progress resolution work. + +### F-009 — [CLOSED] Service-layer commit events drop `organization_id`; read events keep it + +- ID: F-009 +- Origin: scan +- Lens: verification +- Severity: P3 +- Confidence: high +- Status: fixed +- Category: Consistency +- Files: + - [api/oss/src/core/applications/service.py:814-821](../../../api/oss/src/core/applications/service.py#L814-L821) + - [api/oss/src/core/queries/service.py:883-890](../../../api/oss/src/core/queries/service.py#L883-L890) + - [api/oss/src/core/testsets/service.py:930-937](../../../api/oss/src/core/testsets/service.py#L930-L937) + - [api/oss/src/core/evaluators/service.py:815-822](../../../api/oss/src/core/evaluators/service.py#L815-L822) + - [api/oss/src/core/environments/service.py:989-1003](../../../api/oss/src/core/environments/service.py#L989-L1003) + - [api/oss/src/core/events/utils.py:617-654](../../../api/oss/src/core/events/utils.py#L617-L654) +- Summary: Read emissions go through `request_scope(request)` and pass the resolved `organization_id` to `_safe_publish`. Service-layer commit emissions cannot read `request.state` and call `publish_revision_event` without `organization_id` (four services omit the kwarg entirely; `environments/service.py` passes `organization_id=None` explicitly). As a result, the Redis envelope and downstream `EventMessage` for every commit event carries `organization_id=null`, while read events of the same shape carry the real org UUID. +- Evidence: + - Service-layer commit calls in the five listed services omit `organization_id` or passed `None` before the AuthScope follow-up. + - Router-layer read helpers resolve scope from the request and included `organization_id` in the event envelope. +- Cause: Commit emission moved to services to avoid missed write paths, but service methods originally lacked request-bound organization scope. +- Explanation: The event wire format already had an organization slot; the asymmetry came from where the publish helper was invoked, not from the event model. +- Impact: Today the persisted `events` table is project-scoped only — see [dbes.py:10-71](../../../api/oss/src/dbs/postgres/events/dbes.py#L10-L71) — and the webhook dispatcher routes by `project_id`, so the asymmetry has no functional effect. The wire-format `EventMessage` in [streaming.py:39-45](../../../api/oss/src/core/events/streaming.py#L39-L45) carries `organization_id` but no current consumer reads it on commit events. The asymmetry becomes a real bug the moment anything (analytics, future org-level filtering, the planned `OrganizationScopeDBA` hinted at in the `# TODO` at [dbes.py:7](../../../api/oss/src/dbs/postgres/events/dbes.py#L7)) starts relying on `organization_id` for commit events. +- Suggested Fix: + - Primary: have each commit-service method resolve `organization_id` from the project (e.g. `await projects_service.fetch(project_id=...)`) and pass it through. Adds one async lookup per commit. + - Alternative: thread `organization_id` from the router into each commit-service signature so the service does not have to re-resolve it. Pure plumbing change; matches how `user_id` is already threaded. + - Doc-only fallback: document the asymmetry in `core/events/utils.py` and `events.md` so subscribers do not assume commit events carry `organization_id`. +- Alternatives: Resolve organization scope from project lookup, thread it through service signatures, or rely on AuthScope propagation (the implemented follow-up path). +- Resolution: Closed as fixed by AuthScope-first scope resolution. `request_scope()` and `publish_revision_event()` now resolve scope from the ambient `AuthScope` before falling back to `request.state`, so service-layer commit emissions can populate `organization_id` without threading a request object through service signatures. +- Sources: Second `scan-codebase` pass. + + +### F-014 — [CLOSED] Self-host access-control docs omit the new `audit` flag + +- ID: F-014 +- Origin: scan +- Lens: verification +- Severity: P2 +- Confidence: high +- Status: fixed +- Category: Documentation +- Summary: The code introduced `Flag.AUDIT` and gated `POST /events/query` on it, but the operator-facing self-host docs still listed only `rbac`, `access`, `domains`, and `sso`, omitted `"audit": true` from the `self_hosted_enterprise` example, and still said “All four flags are `true`.” +- Evidence: + - [entitlements/types.py:57-71](../../../api/ee/src/core/entitlements/types.py#L57-L71) defines `Flag.AUDIT`. + - [events/router.py:47-60](../../../api/oss/src/apis/fastapi/events/router.py#L47-L60) gates event queries on `Flag.AUDIT`. + - Pre-fix [04-dynamic-access-controls.mdx:83-156](../../../docs/docs/self-host/04-dynamic-access-controls.mdx#L83-L156) omitted the flag from the key list, example, and prose. +- Files: + - [api/ee/src/core/entitlements/types.py](../../../api/ee/src/core/entitlements/types.py) + - [api/oss/src/apis/fastapi/events/router.py](../../../api/oss/src/apis/fastapi/events/router.py) + - [docs/docs/self-host/04-dynamic-access-controls.mdx](../../../docs/docs/self-host/04-dynamic-access-controls.mdx) +- Cause: The entitlement enum changed during the follow-up implementation, but the operator-facing dynamic access-controls guide was not updated in the same pass. +- Explanation: `audit` is part of the same env-configurable flag map as the older flags. Omitting it from the canonical self-host guide made the public configuration shape incomplete. +- Impact: Operators could not intentionally configure the new events-query entitlement surface from the canonical self-host guide, and the worked example no longer matched code defaults. +- Suggested Fix: Add `audit` to the flag-key list, the self-hosted example, and the default-shape prose. +- Alternatives: None preferred; hiding a configurable flag from the operator guide would be misleading. +- Resolution: Updated `04-dynamic-access-controls.mdx` to list `audit`, include `"audit": true` in the `self_hosted_enterprise` example, and describe the code-default shape as five enabled flags including audit-log access. +- Sources: Fresh `scan-codebase` pass on 2026-05-18. + +### F-015 — [CLOSED] Adjacent access-control docs still describe `events_ingested` as retention-only and unmetered + +- ID: F-015 +- Origin: scan +- Lens: verification +- Severity: P2 +- Confidence: high +- Status: fixed +- Category: Consistency +- Summary: The branch now performs both an L1 soft check and an L2 authoritative adjust for `Counter.EVENTS_INGESTED`, but several adjacent docs still said the counter was retention-only, unmetered, and had no write path. +- Evidence: + - [core/events/utils.py:245-321](../../../api/oss/src/core/events/utils.py#L245-L321) implements the L1 check. + - [events/worker.py:204-273](../../../api/oss/src/tasks/asyncio/events/worker.py#L204-L273) implements the L2 meter adjustment. + - Pre-fix docs in dynamic-access-and-billing proposal/research/tasks/summary plus the self-host guide still described the previous retention-only model. +- Files: + - [api/oss/src/core/events/utils.py](../../../api/oss/src/core/events/utils.py) + - [api/oss/src/tasks/asyncio/events/worker.py](../../../api/oss/src/tasks/asyncio/events/worker.py) + - [docs/designs/dynamic-access-and-billing/proposal.md](../dynamic-access-and-billing/proposal.md) + - [docs/designs/dynamic-access-and-billing/research.md](../dynamic-access-and-billing/research.md) + - [docs/designs/dynamic-access-and-billing/tasks.md](../dynamic-access-and-billing/tasks.md) + - [docs/designs/dynamic-access-and-billing/summary.md](../dynamic-access-and-billing/summary.md) + - [docs/docs/self-host/04-dynamic-access-controls.mdx](../../../docs/docs/self-host/04-dynamic-access-controls.mdx) +- Cause: Adjacent access-control docs were authored against the earlier retention-only design and were not reconciled after this branch made `EVENTS_INGESTED` an enforced usage counter. +- Explanation: The same enum slug now carries both retention and quota semantics. Leaving the old prose in place made the adjacent docs contradict the implementation and this feature folder's summary. +- Impact: Reviewers and operators would infer that `events_ingested` cannot enforce quotas or produce usage, while the current branch does both. +- Suggested Fix: Update adjacent docs to describe `events_ingested` as an independent usage + retention counter with L1 publish-side checks and L2 worker-side adjustment. +- Alternatives: Revert the metering implementation and keep the retention-only design, but that is not the direction reflected by the current branch. +- Resolution: Updated the self-host guide plus the adjacent dynamic-access-and-billing proposal, research, tasks, and summary docs to describe the current usage + retention model. +- Sources: Fresh `scan-codebase` pass on 2026-05-18. + +### F-001 — [CLOSED] Acceptance test coverage deferred for the event-emission surface + +- ID: F-001 +- Origin: scan +- Lens: verification +- Severity: P2 +- Confidence: high +- Status: wontfix +- Category: Testing +- Files: + - [docs/designs/extend-events-beyond-deployments/tasks.md:82-89](./tasks.md#L82-L89) + - [api/oss/tests/pytest/acceptance/events/test_events_basics.py](../../../api/oss/tests/pytest/acceptance/events/test_events_basics.py) +- Summary: Eight acceptance items in `tasks.md` remain unchecked, all labelled "Deferred — requires full HTTP + redis stack." There is no end-to-end test that drives an HTTP request through the real router → publisher → worker → `events` table and asserts the event appears in `POST /events/query`. +- Evidence: + - [tasks.md:82-89](./tasks.md#L82-L89) leaves the HTTP + Redis acceptance items unchecked and explicitly deferred. + - [test_events_basics.py](../../../api/oss/tests/pytest/acceptance/events/test_events_basics.py) exercises query shape only, not full router → publisher → worker persistence. +- Cause: The available test harness did not yet provide the full HTTP + durable Redis fixture needed for an end-to-end emission proof. +- Explanation: Unit coverage verifies helper and service behavior, but the complete deployed pipeline remains intentionally deferred. +- Suggested Fix: Add the deferred acceptance coverage once the HTTP + Redis fixture exists. +- Alternatives: Keep the branch at unit coverage only, which was accepted for this scope. +- Sources: Initial `scan-codebase` pass. +- Disposition: Deferred by design and accepted for this branch. Unit helper coverage ([test_events_utils.py](../../../api/oss/tests/pytest/unit/events/test_events_utils.py), 30 tests) and service-layer mock coverage ([test_service_commit_emission.py](../../../api/oss/tests/pytest/unit/events/test_service_commit_emission.py), 6 tests across all five commit services) are sufficient for merge. Full acceptance coverage stays deferred until the HTTP + Redis fixture lands. + +### F-002 — [CLOSED] `proposal.md` / `research.md` described the environments mount as a "gap to fix" + +- ID: F-002 +- Origin: scan +- Lens: verification +- Severity: P3 +- Confidence: high +- Status: fixed +- Category: Consistency +- Files: + - [docs/designs/extend-events-beyond-deployments/proposal.md](./proposal.md) + - [docs/designs/extend-events-beyond-deployments/research.md](./research.md) + - [api/entrypoints/routers.py:977-988](../../../api/entrypoints/routers.py#L977-L988) +- Summary: Both docs still claimed the domain-style `EnvironmentsRouter` was preview-mount-only and treated that as a gap. The code mounts it at both `/environments` and `/preview/environments` from a single shared instance. +- Evidence: + - Pre-fix proposal/research text described environments as preview-only. + - [entrypoints/routers.py:977-988](../../../api/entrypoints/routers.py#L977-L988) mounts one shared router instance at both `/environments` and `/preview/environments`. +- Cause: The design notes were written against an earlier route-mount understanding and were not updated when the router composition changed. +- Explanation: Because both prefixes share the same handler instance, instrumentation behavior is one publish per request, not one per mount. +- Suggested Fix: Keep the docs aligned with the dual-mount implementation. +- Alternatives: None preferred. +- Sources: Initial `scan-codebase` pass. +- Resolution: Rewrote the "Environment note" block in `proposal.md` and the "Environment caveat" block in `research.md` to describe the dual mount with a single shared instance, and to record that each request emits exactly once. + +### F-003 — [CLOSED] `proposal.md` showed an incorrect helper signature + +- ID: F-003 +- Origin: scan +- Lens: verification +- Severity: P3 +- Confidence: medium +- Status: fixed +- Category: Consistency +- Files: + - [docs/designs/extend-events-beyond-deployments/proposal.md](./proposal.md) + - [api/oss/src/core/events/utils.py:572-654](../../../api/oss/src/core/events/utils.py#L572-L654) +- Summary: `proposal.md` listed `publish_revision_event(domain, action, revision|revisions, ..., request=... | project_id/user_id explicit)`, which a reader could mistake for a positional call. The actual helper is keyword-only and exposes `organization_id`, `extra`, and `count` kwargs not shown in the doc. +- Evidence: + - Pre-fix proposal text showed an incomplete/positional-looking helper signature. + - [core/events/utils.py](../../../api/oss/src/core/events/utils.py) exposes a keyword-only helper with additional kwargs. +- Cause: The proposal signature was drafted before the final helper interface settled. +- Explanation: Incomplete signatures in design docs are easy to copy into new call sites and can obscure required scoping/extra arguments. +- Suggested Fix: Keep the proposal signature aligned with the implementation. +- Alternatives: None preferred. +- Sources: Initial `scan-codebase` pass. +- Resolution: Updated the "Emission Design" helper list in `proposal.md` to show the full keyword-only signatures of all five helpers, including `publish_revision_event`'s `organization_id`, `extra`, and `count` kwargs. + +### F-004 — [CLOSED] `events.md` overview included `count` in a shape that also applies to commits + +- ID: F-004 +- Origin: scan +- Lens: verification +- Severity: P3 +- Confidence: medium +- Status: fixed +- Category: Consistency +- Files: + - [docs/designs/extend-events-beyond-deployments/events.md](./events.md) + - [api/oss/src/core/events/utils.py:521-569](../../../api/oss/src/core/events/utils.py#L521-L569) +- Summary: The "Revision Payload Pattern" overview showed `count: 1` on a generic single-revision shape. Commit events deliberately omit `count` (the helper drops it). Per-event examples elsewhere in `events.md` are correct; only the overview was ambiguous. +- Evidence: + - Pre-fix `events.md` overview used a generic shape containing `count` for both reads and commits. + - The helper omits `count` for commit actions. +- Cause: A read-oriented generic payload example was reused for commit events without preserving their older contract. +- Explanation: Commits intentionally follow the existing environment precedent, so the generic overview needed to distinguish action families. +- Suggested Fix: Keep commit examples separate from read/log examples. +- Alternatives: Add `count` to commit events, but that would change the existing contract. +- Sources: Initial `scan-codebase` pass. +- Resolution: Added a clarifying sentence at the top of the "Revision Payload Pattern" section noting that read events include `count` and commit events omit it (enforced by the helper), and that the generic shapes apply to read events. + +### F-005 — [CLOSED] `environments.revisions.retrieved` does not include `resolution_info` + +- ID: F-005 +- Origin: scan +- Lens: verification +- Severity: P3 +- Confidence: medium +- Status: wontfix +- Category: Completeness +- Files: + - [api/oss/src/apis/fastapi/environments/router.py:771-783](../../../api/oss/src/apis/fastapi/environments/router.py#L771-L783) +- Summary: `EnvironmentsRouter.retrieve_environment_revision` returns `environment_revision` and `resolution_info`. The event only carries `environment_revision` references; `resolution_info` is dropped. +- Evidence: + - Pre-fix environment retrieve docs promised `resolution_info` in the event references. + - The emitted helper reads only identity fields exposed by the revision DTO. +- Cause: The docs inherited response-level information that the event contract never included. +- Explanation: Event references are intentionally partial identity objects, not full response mirrors. +- Suggested Fix: Keep the docs scoped to emitted identity references. +- Alternatives: Expand the event contract to include resolution info, which was not needed for this scope. +- Sources: Initial `scan-codebase` pass. +- Disposition: Wontfix. Retrieve events stay identity-only by design — consumers that need resolved app revisions should subscribe to `environments.revisions.committed` (which already carries `state`/`diff`). + +### F-006 — [CLOSED] No assertion that dual-mount domain routers do not double-emit + +- ID: F-006 +- Origin: scan +- Lens: verification +- Severity: P3 +- Confidence: high +- Status: wontfix +- Category: Testing +- Files: + - [api/entrypoints/routers.py:977-988](../../../api/entrypoints/routers.py#L977-L988) +- Summary: The exactly-once property of `/environments` + `/preview/environments` depends on both prefixes sharing one `EnvironmentsRouter` instance. No regression test enforces that invariant. +- Evidence: + - The route composition mounts some domain routers at multiple prefixes. + - The branch had no explicit test proving one request emits once despite shared instances. +- Cause: The dual-mount behavior is a composition-root invariant rather than a helper-local behavior, so it was easy to leave outside unit coverage. +- Explanation: The code is correct because one handler instance is shared, but a future mount refactor could accidentally duplicate emission without a guardrail. +- Suggested Fix: Add a focused guard test if this mount topology becomes less obvious or more dynamic. +- Alternatives: Retain the explanatory docs only, which was accepted for this branch. +- Sources: Initial `scan-codebase` pass. +- Disposition: Wontfix / false-positive. The single-instance pattern is held in place by the existing instantiation block in `routers.py`; the hypothetical refactor that would break it is not a real risk. + +### F-007 — [CLOSED] OpenAPI / Fern client regeneration not verifiable from scan + +- ID: F-007 +- Origin: scan +- Lens: verification +- Severity: P3 +- Confidence: low +- Status: wontfix +- Category: Consistency +- Files: + - [docs/designs/extend-events-beyond-deployments/tasks.md:92-93](./tasks.md#L92-L93) +- Summary: Tasks marks "Update API reference docs (OpenAPI / Fern client)" as `[x]`, but a scan cannot verify the generated artifacts include the new `WebhookEventType` values. +- Evidence: + - The original scan saw the task checked but could not yet verify regenerated OpenAPI/Fern artifacts. + - A later pass confirmed the generated client and OpenAPI now include the new event types. +- Cause: Generated artifacts were scheduled as a finalization step after the first scan. +- Explanation: The finding was process-oriented: a source-code scan cannot assume generated outputs exist until they are present in the diff. +- Suggested Fix: Regenerate generated artifacts before merge when event enums change. +- Alternatives: None preferred. +- Sources: Initial `scan-codebase` pass plus second scan verification. +- Disposition: Wontfix at scan time. Owner will regenerate Fern clients and API references as the final step before merge. (This second scan pass confirmed `openapi.json` and `WebhookEventType.ts` were regenerated and include all 29 new event types — see the parent PR diff.) diff --git a/docs/designs/extend-events-beyond-deployments/gap.md b/docs/designs/extend-events-beyond-deployments/gap.md new file mode 100644 index 0000000000..8cd9f9a133 --- /dev/null +++ b/docs/designs/extend-events-beyond-deployments/gap.md @@ -0,0 +1,287 @@ +# Extend Events Beyond Deployments - Gaps + +## Status + +All gaps in this document are now closed by the implementation in [proposal.md](./proposal.md), [events.md](./events.md), and [tasks.md](./tasks.md). The summary and gap list below are kept for historical context; they describe the pre-implementation state, not the current code. + +Key deviations from the originally listed gaps: + +- Preview / `/preview/*` route exclusion was dropped. Emission happens from every mount of an instrumented handler; the duplicate mounts share a single handler instance so each request emits exactly once. +- Commit emission was moved into the service layer (`commit_*_revision(...)`) for every domain, matching the existing `EnvironmentsService.commit_environment_revision` precedent. Router handlers do not emit commit events. +- The environments mount gap (point 11) was a non-issue at implementation time: `EnvironmentsRouter` is already mounted at non-preview `/environments`. + +## Summary + +The current docs were directionally correct, but they missed several important implementation realities: + +- the event system does not have typed per-event payload models today +- tracing reads currently visible in this tree are mounted through preview or legacy route prefixes +- revision read and commit tracking exists only partially, with environments commit as the main precedent +- a non-webhook event is already supported structurally +- the main missing seam is dependency wiring and exact emission placement + +This document lists the actual gaps between the prompt and the current codebase. + +## 1. Missing Event Type + +There is no tracing read event in `api/oss/src/core/events/types.py`. + +What is missing: + +- new `EventType` members such as: + - `traces.fetched` + - `traces.queried` + - `testcases.fetched` + - `testcases.queried` + +Constraint: + +- it should not be added to `WebhookEventType` in `api/oss/src/core/webhooks/types.py` + +Reason: + +- the event system needs explicit type coverage before producers can publish these events + +## 2. Missing Emission in Tracing Read Paths + +No stable, non-deprecated tracing read path currently publishes an event. + +Observed read paths include: + +- `SpansRouter.fetch_spans` +- `SpansRouter.fetch_span` +- `SpansRouter.query_spans` +- `TracesRouter.fetch_traces` +- `TracesRouter.fetch_trace` +- `TracesRouter.query_traces` +- deprecated `TracingRouter` read endpoints + +Code-level reality: + +- these routes eventually pass through `TracingService`, but they are mounted under `/preview/*` or `/tracing/*` in `api/entrypoints/routers.py` +- `/preview/*`, `/preview/tracing/*`, `/preview/spans/*`, `/preview/traces/*`, and `/tracing/*` are excluded from tracking because they are deprecated, legacy, or both + +Design gap: + +- the implementation needs the current stable tracing read API surface identified before router emission is wired +- if no stable tracing read endpoint exists, the implementation should not instrument deprecated or legacy routes just to produce the event + +## 3. Missing Core Helper for Router-Level Emission + +Given the current direction, the event should be emitted in stable routers after the final span or trace response is fully materialized. + +What is missing: + +- a shared core-layer helper to derive event payload data from router responses +- a helper that wraps both: + - the span counting / ID sampling logic + - the actual call to `publish_event(...)` +- consistent router instrumentation across all in-scope stable read endpoints + +Why this matters: + +- there may be multiple stable endpoints once the current API surface is identified +- counting spans correctly from `span`, `spans`, `trace`, or `traces` responses should not be duplicated inline in every handler +- router code already has access to `request.state.organization_id`, `request.state.project_id`, and `request.state.user_id` +- existing event producers already use the shared `publish_event(...)` utility directly, so the new helper should follow that pattern + +## 4. Missing Stable Payload Contract + +The prompt calls for a payload containing at least: + +- `project_id` +- `user_id` +- count of returned traces or testcases +- returned trace IDs + +Current state: + +- persisted `Event` has generic `attributes` +- producers manually pack event-specific fields into `attributes` +- there is no canonical schema for tracing read attributes yet + +What is missing: + +- an agreed attributes contract for the new event + +At minimum the contract should decide whether to include: + +- `user_id` +- `count` +- event-specific result lists, with: + - `trace_id` or `trace_ids` for trace results + - `testcase_id` or `testcase_ids` for testcase results + +Decisions now made: + +- event-specific result lists are capped at `1000` +- `count` remains the full uncapped total +- no separate truncation flag is needed when truncation is inferable from `count > len()` +- no event is emitted when `count == 0` + +## 5. Missing Decision on Event Cardinality and Duplication + +This is the most important unresolved design gap. + +Examples: + +- `fetch_span(...)` currently calls `fetch_spans(...)` +- `query_traces(...)` internally queries spans and then materializes traces +- some query requests become direct `fetch(...)` calls when the filter is only `trace_id` + +Without a clear rule, the implementation could accidentally emit: + +- one event for the low-level fetch and another for the higher-level read +- span events for trace reads, even though span events are out of scope for now +- accidental events from preview or legacy routers + +The intended approach is now: + +1. Emit one event per user-facing endpoint call. +2. Include only current stable, non-preview, non-legacy endpoints that return traces through the API. +3. Do not emit for internal service-only reads. +4. Do not emit for deprecated or legacy endpoints. + +The remaining gap is identifying the stable mounted endpoint set. The currently observed `/preview/*` and `/tracing/*` routes are explicitly out of scope. + +## 6. Missing Guidance on Sensitive and Large Payload Data + +The original docs noted payload size concerns but understated the security and operational tradeoff. + +Real risks: + +- returned trace IDs can be numerous +- storing full query/filter payloads may capture sensitive identifiers or search inputs +- large `attributes` blobs increase Redis stream payload size and event-table storage + +What is missing: + +- a size budget or truncation policy +- a rule for whether raw query filters should be recorded at all + +Chosen direction: + +- record `count`, references, and capped event-specific result lists only where useful +- avoid recording full raw filter expressions unless there is a clear audit requirement + +## 7. Missing Request Metadata Strategy + +Current event producers generate fresh `request_id` values and use `RequestType.UNKNOWN`. + +Decision now made: + +- keep using generated `request_id` and `RequestType.UNKNOWN`, matching current environment/webhook producers + +## 8. Missing Scope Mapping Decision + +`publish_event(...)` supports `organization_id`, but current producers do not consistently pass it. + +For a tracing read event, the docs need to decide exactly which request-scope values are used: + +- `organization_id` in the stream envelope when available +- `project_id` in the stream envelope +- `user_id` in attributes +- any workspace identifier only if it truly exists in request context for these routes + +Why: + +- `EventsWorker` groups and entitlement-checks with organization scope when present +- omitting it loses context and may be inconsistent with future EE expectations + +Decision now made: + +- include `organization_id` and `project_id` in the publish envelope +- include `user_id`, `count`, and event-specific fields in attributes + +## 9. Missing Test Plan Specificity + +The original docs said "add tests", but not enough detail. + +Missing coverage areas: + +- unit tests for event construction and truncation logic +- unit tests for subscribability: + - event in `EventType` + - event in `WebhookEventType` +- acceptance tests that a tracing read results in an event log entry +- tests covering stable trace fetch/query endpoints +- tests covering stable testcase fetch/query endpoints +- tests preventing double emission on nested helper flows +- tests proving zero-count responses do not emit events +- tests proving publish failures do not fail the API response +- tests proving preview and legacy tracing routes do not emit this event + +## 10. Missing Documentation Scope Decision + +The original docs suggested frontend typing and broad doc updates, but the codebase does not require that by default. + +What is actually missing: + +- backend design clarity first +- only then API/docs updates if the event is intended to be user-visible in event querying docs + +Not automatically required: + +- frontend automation type updates, because these event types are API-level event/webhook contracts first + +## 11. Missing Cross-Entity Revision Tracking + +The broader audit requirement is not only tracing reads. Major Git-style entities should also record revision read and commit activity. + +Current state: + +- `environments.revisions.committed` already exists and is emitted from `EnvironmentsService.commit_environment_revision`. +- No equivalent commit events were found for workflows, applications, queries, testsets, or evaluators. +- No revision read events were found for workflows, applications, queries, testsets, evaluators, or environments. + +In-scope revision operations: + +- `POST //revisions/retrieve` +- `GET //revisions/{revision_id}` +- `POST //revisions/query` +- `POST //revisions/log` +- `POST //revisions/commit` + +In-scope stable domains: + +- applications +- queries +- testsets +- evaluators +- environments, using non-preview domain-style endpoints only + +Intentionally deferred: + +- workflows, because tracking workflow events may expose a product concept that might not remain publicly available + +Additional non-revision read domains: + +- traces, with `traces.fetched` and `traces.queried`, emitted only from trace endpoints +- testcases, with `testcases.fetched` and `testcases.queried`, emitted only from testcase endpoints + +Out of scope: + +- span events for now +- artifact fetch/query routes +- variant fetch/query routes +- preview duplicate mounts +- all `/preview/*` endpoints +- legacy compatibility routers + +Main design gap: + +- event construction should be shared instead of copying the inline environment commit producer into every service +- retrieved, fetched, queried, and logged events should be emitted once at stable router boundaries after the response is known +- commit events can stay service-level because they represent state transitions and already have a service-layer precedent +- create routes should not be counted as commit events unless their code path actually calls commit logic +- the domain-style environments revision router should be available at non-preview `/environments/revisions/*`; the current preview-only mount is a mounting gap, not a product exclusion +- all new event types are intended to be webhook-subscribable + +## Recommended Gap Closure Priorities + +1. Identify the exact stable endpoint list that emits the event. +2. Implement the bounded payload contract. +3. Define the core helper that counts spans from final response objects and publishes through `publish_event(...)`. +4. Add the new event values to both `EventType` and `WebhookEventType`. +5. Add shared revision event helper coverage for retrieve, fetch, query, log, and commit actions with distinct event types. +6. Add tests that guard against duplicate emission, zero-count suppression, publish-failure behavior, oversized payloads, and accidental emission from preview or legacy routes. diff --git a/docs/designs/extend-events-beyond-deployments/proposal.md b/docs/designs/extend-events-beyond-deployments/proposal.md new file mode 100644 index 0000000000..95a4e7544e --- /dev/null +++ b/docs/designs/extend-events-beyond-deployments/proposal.md @@ -0,0 +1,356 @@ +# Extend Events Beyond Deployments - Proposal + +## Goal + +Add internal events that record entity read and commit activity, store them in the existing events pipeline, and make the new event types webhook-subscribable. + +## Scope + +Emit one event per API-level read operation (fetch / retrieve / query / log) that returns the target entity. + +Route-prefix policy: + +- Emission is **not** gated by the route prefix. The same handler emits the same event regardless of whether it is mounted at the stable path, the `/preview/*` duplicate, or a deprecated/legacy compatibility path. Suppressing preview emission would under-count real reads. The duplicate mounts share a single handler instance, so each call emits exactly once. +- `TracingRouter` and `SpansRouter` are still **not** instrumented, because span-level events are out of scope and the trace endpoints exposed on those routers are deprecated. Trace events come only from `TracesRouter` (mounted at `/traces` and `/preview/traces`). + +Do not emit for internal service-only reads (read events). + +Commit events follow a different rule: emit from the **service layer** at the `commit_*_revision(...)` boundary, so every code path that successfully commits — direct `POST //revisions/commit`, simple-service create/edit, deploy paths, defaults seeding — produces exactly one commit event. + +## Event Contract + +Add new `EventType` members in `api/oss/src/core/events/types.py`. + +Tracing read events: + +- `TRACES_FETCHED = "traces.fetched"` +- `TRACES_QUERIED = "traces.queried"` + +Trace read events are the only tracing read events in scope for now. Span endpoints, if tracked later, should not introduce span event types unless product semantics require them. + +Non-revision read events: + +- `testcases.fetched` +- `testcases.queried` + +Revision lifecycle events: + +- `.revisions.retrieved` +- `.revisions.fetched` +- `.revisions.queried` +- `.revisions.logged` +- `.revisions.committed` + +Initial revision domains: + +- `applications` +- `queries` +- `testsets` +- `evaluators` +- `environments` + +Workflows are intentionally omitted for now. Even though workflow revision APIs exist in this tree, tracking them may expose workflow concepts while that API surface is not expected to remain product-facing. + +Add all new event values to `WebhookEventType` in `api/oss/src/core/webhooks/types.py`. + +Today, `environments.revisions.committed` is already subscribable. The new read, log, and commit event types should follow the same subscribable-event path. + +Use the existing generic `Event` DTO: + +- `request_id` +- `event_id` +- `request_type` +- `event_type` +- `timestamp` +- `attributes` + +No event model or persistence schema refactor is required. + +## Attributes + +Use event-family-specific bounded attributes. Do not force a generic `links` field into every event. + +```json +{ + "user_id": "", + "count": 12 +} +``` + +Rules: + +- Always include `user_id`. +- Always include `count` for read, query, and log events. +- Commit events follow the existing `environments.revisions.committed` precedent and do not require `count`. +- Include event-specific returned reference lists only when useful. +- Cap event-specific result lists at 1000 entries. +- Keep `count` as the uncapped total. +- Do not emit an event when `count == 0`. +- Do not store full raw filtering expressions in the first version. +- A separate truncation flag is not needed when truncation is inferable from `count > len(references)`. + +## Revision Entity Tracking + +Track read and commit activity for major Git-style entities at the revision level, not artifact or variant reads. + +In scope: + +- revision retrieve RPCs: `POST //revisions/retrieve` +- revision fetch routes: `GET //revisions/{revision_id}` +- revision query routes: `POST //revisions/query` +- revision log routes: `POST //revisions/log` +- revision commit routes: `POST //revisions/commit` + +Out of scope: + +- artifact fetch/query routes such as `GET /workflows/{workflow_id}` or `POST /workflows/query` +- variant fetch/query routes such as `GET /workflows/variants/{variant_id}` or `POST /workflows/variants/query` +- preview duplicate mounts +- simple compatibility routers unless they are the only stable product API for that entity + +Stable mounted revision APIs found in this tree: + +- `/applications/revisions/retrieve`, `/applications/revisions/{application_revision_id}`, `/applications/revisions/query`, `/applications/revisions/log`, `/applications/revisions/commit` +- `/queries/revisions/retrieve`, `/queries/revisions/{query_revision_id}`, `/queries/revisions/query`, `/queries/revisions/log`, `/queries/revisions/commit` +- `/testsets/revisions/retrieve`, `/testsets/revisions/{testset_revision_id}`, `/testsets/revisions/query`, `/testsets/revisions/log`, `/testsets/revisions/commit` +- `/evaluators/revisions/retrieve`, `/evaluators/revisions/{evaluator_revision_id}`, `/evaluators/revisions/query`, `/evaluators/revisions/log`, `/evaluators/revisions/commit` +- `/environments/revisions/retrieve`, `/environments/revisions/{environment_revision_id}`, `/environments/revisions/query`, `/environments/revisions/log`, `/environments/revisions/commit` + +Stable workflow revision APIs exist at `/workflows/revisions/*`, but they are intentionally out of scope until workflows are confirmed as a durable exposed entity. + +Environment note: + +- `api/oss/src/apis/fastapi/environments/router.py::EnvironmentsRouter` has the same revision retrieve/fetch/query/commit shape as the other Git-style domains. +- `EnvironmentsRouter` is mounted at both `/environments` and `/preview/environments` from a single instance (`api/entrypoints/routers.py`). Both prefixes share the same handler object, so each request emits exactly once regardless of which prefix is hit. +- Emission is implemented at the route handler boundary; both mounts therefore inherit the same instrumentation automatically. +- Environments remain in scope as a major entity. +- The existing `environments.revisions.committed` producer in `core/environments/service.py` is the commit-event precedent. + +Create and Commit Note + +- The direct `POST //revisions/` handlers currently call `create_*_revision(...)`, which calls `create_revision(...)`, not `commit_revision(...)`. +- Some higher-level create/import/update compatibility paths do call `commit_*_revision(...)` internally. +- Emit `.revisions.committed` from any successful path that actually reaches domain commit logic. +- Do not infer commit from HTTP `POST` alone. +- Track the commit at the commit helper/service boundary once, not at both a compatibility route and the commit route. + +Recommended event names: + +- `applications.revisions.retrieved` +- `applications.revisions.fetched` +- `applications.revisions.queried` +- `applications.revisions.logged` +- `applications.revisions.committed` +- `queries.revisions.retrieved` +- `queries.revisions.fetched` +- `queries.revisions.queried` +- `queries.revisions.logged` +- `queries.revisions.committed` +- `testsets.revisions.retrieved` +- `testsets.revisions.fetched` +- `testsets.revisions.queried` +- `testsets.revisions.logged` +- `testsets.revisions.committed` +- `evaluators.revisions.retrieved` +- `evaluators.revisions.fetched` +- `evaluators.revisions.queried` +- `evaluators.revisions.logged` +- `evaluators.revisions.committed` +- `environments.revisions.retrieved` +- `environments.revisions.fetched` +- `environments.revisions.queried` +- `environments.revisions.logged` +- `environments.revisions.committed` +- `testcases.fetched` +- `testcases.queried` +- `traces.fetched` +- `traces.queried` + +Revision event attributes: + +```json +{ + "user_id": "", + "count": 1, + "references": { + "application": {"id": "..."}, + "application_variant": {"id": "..."}, + "application_revision": {"id": "...", "slug": "...", "version": 3} + } +} +``` + +Rules: + +- Use `*.revisions.retrieved` for `POST //revisions/retrieve`. +- Use `*.revisions.fetched` for `GET //revisions/{revision_id}`. +- Use `*.revisions.queried` for `POST //revisions/query`. +- Use `*.revisions.logged` for `POST //revisions/log`. +- Use `*.revisions.committed` for `POST //revisions/commit`. +- Use `count` for returned result count. +- Query/log events may include a domain-specific `references` list capped at 1000. +- For single revision fetch/retrieve, include `count = 1` and domain-specific `references`. +- For new application, query, testset, and evaluator commit events, include domain-specific `references`. +- Keep domain-specific `references` names compatible with existing environment commit events. +- Treat `references` as partial identity objects. Include artifact, variant, and revision fields when the returned DTO exposes them, but do not fail emission if artifact or variant details are incomplete. +- New commit events may include the commit `message` when present. +- Preserve the existing `environments.revisions.committed` `references`, `state`, and `diff` attributes. +- Add optional `message` to `environments.revisions.committed` for commit-event uniformity. +- Do not add `state` or `diff` to the new application, query, testset, or evaluator commit events in the first version. +- Skip revision read events when no revision is returned. + +## Emission Design + +Shared utilities live in `api/oss/src/core/events/utils.py`. All helpers use keyword-only arguments: + +- `publish_trace_fetched(*, request, count, trace_id=None, trace_ids=None)` +- `publish_trace_queried(*, request, count, trace_ids=None)` +- `publish_testcase_fetched(*, request, count, testcase_id=None, testcase_ids=None)` +- `publish_testcase_queried(*, request, count, testcase_ids=None)` +- `publish_revision_event(*, request=None, organization_id=None, project_id=None, user_id=None, domain, action, revision=None, revisions=None, count=None, message=None, extra=None)` + +Behavior: + +- Each helper resolves scope (`organization_id`, `project_id`, `user_id`) from ambient `AuthScope` first, then falls back to `request.state`, and short-circuits without raising if the scope is unusable. Callers do not need to None-check fields. +- Each helper builds an `Event` with generated `request_id`, generated `event_id`, `RequestType.UNKNOWN`, and the matching `EventType`. +- `publish_event(...)` is called with `organization_id` and `project_id` in the envelope. `attributes` always carries `user_id`. Read/query/log events carry `count`. Commit events do not carry `count` (matching the existing `environments.revisions.committed` precedent). +- Publish failures are caught, logged, and swallowed so the API response is unaffected. +- `publish_revision_event` accepts either a `request` (router-layer) **or** explicit `project_id`/`user_id`/`organization_id` (service-layer, e.g., environments commit). This lets the commit emission live at the service boundary even when no request context is available. + +For revision entities, the helper accepts: + +- domain: `application`, `query`, `testset`, `evaluator`, or `environment` +- action: `retrieve`, `fetch`, `query`, `log`, or `commit` +- one revision DTO (single-shape actions) **or** a list of revisions (`query`/`log`) +- optional `message` +- optional `extra` (used by `environments.revisions.committed` for `state` and `diff`) + +## Router and Service Instrumentation + +### Read events (retrieve, fetch, query, log) + +Emit at router boundaries after the full response object is materialized and just before returning it. + +Recommended flow per handler: + +1. Execute existing read logic. +2. Materialize the final response object. +3. Call the matching helper with `request` and the response. +4. The helper skips publishing when `count == 0`. +5. Return the response object normally even if publishing fails. + +Instrumentation targets: + +- `TracesRouter.fetch_trace`, `TracesRouter.fetch_traces`, `TracesRouter.query_traces` +- `TestcasesRouter.fetch_testcase`, `TestcasesRouter.fetch_testcases`, `TestcasesRouter.query_testcases` +- For each revision domain (`applications`, `queries`, `testsets`, `evaluators`, `environments`): + - `retrieve_*_revision` handler → `*.revisions.retrieved` + - `fetch_*_revision` handler → `*.revisions.fetched` + - `query_*_revisions` handler → `*.revisions.queried` + - `log_*_revisions` handler → `*.revisions.logged` + +Explicitly excluded: + +- `TracingRouter` (legacy deprecated trace endpoints) +- `SpansRouter` (span events out of scope) +- Workflows revisions (intentionally deferred) + +### Write events (commits, and any future write actions) + +Write emission lives in the **service layer**, at the operation's seam — currently `commit_*_revision(...)` — so that any code path that reaches the write logic emits exactly once. This matches the existing `EnvironmentsService.commit_environment_revision` precedent. + +Service-layer commit emission points: + +- `EnvironmentsService.commit_environment_revision` (already in place, normalized to the shared helper, now includes optional `message`) +- `ApplicationsService.commit_application_revision` +- `QueriesService.commit_query_revision` +- `TestsetsService.commit_testset_revision` +- `EvaluatorsService.commit_evaluator_revision` + +Compatibility / nested paths that funnel through these methods (deploy paths, simple-service create/edit, defaults seeding, fork) automatically emit once via the service layer. Router handlers do **not** also emit commit events — that would double-publish. + +### Why this split (read=router, write=service) + +The asymmetry is intentional and is documented in detail in the `core/events/utils.py` module docstring. Summary: + +- **Reads** are called both from routers (user-initiated, count-worthy) and internally from other services to resolve refs and hydrate state (not count-worthy). Emitting at the router is the only way to suppress the internal lookups. Examples that would mis-fire if reads emitted at the service: + - `commit_environment_revision` calls `query_environment_revisions` to compute the diff → every commit would also fire `environments.revisions.queried`. + - `TracingService.query_traces` calls `queries_service.fetch_query_revision` to resolve the saved query → every trace query would falsely fire `queries.revisions.fetched`. + - Evaluation runs call multiple revision fetches per scenario → one evaluation would produce hundreds of stray `*.revisions.fetched` events. +- **Writes** are *always* user-initiated state transitions. There is no "internal write happening as a side effect of a read" pattern in this codebase. Emitting at the service is the only way to cover compatibility paths (deploy, simple-service create/edit, defaults seeding, fork) that bypass `//revisions/commit`. + +Future write actions (e.g. `archive_*_revision`) should follow the same service-layer rule. + +## Tracing Event Shape + +For tracing, support trace-level read events. + +Use: + +- `traces.fetched` for stable trace fetch endpoints only, with `trace_id` when a single trace is returned +- `traces.queried` for stable trace query endpoints only, with capped `trace_ids` when multiple traces are returned + +Emission rule: + +- trace events are emitted only by stable trace API endpoints +- if a trace endpoint returns traces, emit the matching trace event +- trace events may include `trace_id` or capped `trace_ids` +- if a trace endpoint internally fetches spans to materialize traces, emit only the trace event +- query revision endpoints emit query revision events, not trace events +- loadable or query workflows do not emit trace events unless they call a trace endpoint that returns that entity + +This keeps trace endpoint access separate from query entity access and avoids double counting internal service calls. + +The helper should support at least: + +- `TraceResponse` +- `TracesResponse` + +## Testcase Tracking + +Testcases are blob-like records, not Git-style revisions. Track read access but do not add commit events. + +In scope: + +- `GET /testcases/` -> `testcases.fetched` +- `GET /testcases/{testcase_id}` -> `testcases.fetched` +- `POST /testcases/query` -> `testcases.queried` + +Attributes: + +- `testcase_id` for single testcase responses +- `testcase_ids` for list responses, capped at 1000 + +Out of scope: + +- `/preview/testcases/*` +- testcase save/create internals +- testset revision reads that merely include testcase IDs unless the testcase endpoint itself returns testcase records + +## Non-Goals + +Do not combine this work with: + +- a full event payload typing refactor +- request-context propagation changes +- webhook subscription behavior changes +- event table schema changes +- frontend automation type updates + +## Risks + +Duplicate events: + +- Emit only once per handler. +- Keep helper calls at the endpoint boundary. +- Add tests for exact event counts. + +Oversized payloads: + +- Store only `count`, revision references, testcase IDs, trace IDs, and other capped event-specific result lists where useful. + +Publish failures: + +- Fail open. +- Log errors. +- Keep tracing read responses unaffected. diff --git a/docs/designs/extend-events-beyond-deployments/research.md b/docs/designs/extend-events-beyond-deployments/research.md new file mode 100644 index 0000000000..73bed2e208 --- /dev/null +++ b/docs/designs/extend-events-beyond-deployments/research.md @@ -0,0 +1,323 @@ +# Extend Events Beyond Deployments - Research + +## Scope Restatement + +The requested work extends the existing event system beyond deployment events. New read, log, and commit events should be recorded in the existing events pipeline and made subscribable by webhooks. + +This document captures the current codebase state only. It does not assume implementation details that do not already exist. + +## Current Events Architecture + +### Event type system + +- Event types live in `api/oss/src/core/events/types.py`. +- The current enum contains: + - `unknown` + - `environments.revisions.committed` + - `webhooks.subscriptions.tested` +- Events are represented by the generic `Event` DTO in `api/oss/src/core/events/dtos.py`. +- `Event.attributes` is currently an untyped `Dict[str, Any] | None`. +- There is no per-event payload model registry today. + +### Event publishing and ingestion + +- New events are published to Redis Streams through `publish_event(...)` in `api/oss/src/core/events/streaming.py`. +- The stream message carries: + - `organization_id` + - `project_id` + - optional root-level `user_id` + - nested `event` +- The persisted `Event` itself does not have a first-class `user_id` field. User identity is currently stored inside `event.attributes` by producers that need it. +- `EventsWorker` in `api/oss/src/tasks/asyncio/events/worker.py` consumes `streams:events` and persists grouped batches through `EventsService` and `EventsDAO`. +- Events are stored in the tracing database via `api/oss/src/dbs/postgres/events/dao.py`. + +### Event query API + +- The event log query API is `POST /events/query`. +- The router is `api/oss/src/apis/fastapi/events/router.py`. +- The request model is `EventQueryRequest` in `api/oss/src/apis/fastapi/events/models.py`. +- The response shape is: + - `count` + - `events` +- Query filtering supports: + - `request_id` + - `request_type` + - `event_type` +- Acceptance tests already exist in `api/oss/tests/pytest/acceptance/events/test_events_basics.py`. + +## Current Webhooks Relationship + +### Webhooks subscribe to only a subset of events + +- `WebhookEventType` is defined in `api/oss/src/core/webhooks/types.py`. +- It is a strict subset of `EventType`, not the full list. +- Today the subscribable subset is: + - `environments.revisions.committed` + - `webhooks.subscriptions.tested` + +### Important implication for the new events + +- A new event can exist in `EventType` without being added to `WebhookEventType`, but this proposal intentionally makes the new events subscribable. +- New event values should therefore be added to both `EventType` and `WebhookEventType`. + +## Current Event Producers + +Only two real producers currently emit events: + +### Environment revision commit + +- Implemented in `api/oss/src/core/environments/service.py`. +- Builds an `Event` inline and publishes it with `publish_event(...)`. +- Stores `user_id` inside `attributes`. +- Stores environment revision `references`, normalized committed `state`, and a references `diff` inside `attributes`. +- The diff shape is `{created, updated, deleted}` with `old`/`new` values as applicable. +- Uses: + - generated `request_id` + - generated `event_id` + - `RequestType.UNKNOWN` + - `EventType.ENVIRONMENTS_REVISIONS_COMMITTED` + +### Webhook subscription test + +- Implemented in `api/oss/src/core/webhooks/service.py`. +- Also builds an `Event` inline and publishes it with `publish_event(...)`. +- Uses: + - generated `request_id` + - generated `event_id` + - `RequestType.UNKNOWN` + - `EventType.WEBHOOKS_SUBSCRIPTIONS_TESTED` + +### Producer pattern observations + +- There is no shared event-factory helper yet. +- There is no request-context propagation for `request_id` or `request_type`. +- Existing producers generate IDs ad hoc and use `RequestType.UNKNOWN`. +- Existing event payloads are small and stored in `attributes`. +- Existing producers publish through the shared `publish_event(...)` utility rather than through `EventsService`. + +## Current Revision Entity APIs + +The current domain-style Git pattern exposes revision retrieve/query/commit operations for several major entities. + +Stable mounted revision APIs: + +- Applications are mounted at `/applications` and expose: + - `POST /applications/revisions/retrieve` + - `GET /applications/revisions/{application_revision_id}` + - `POST /applications/revisions/query` + - `POST /applications/revisions/log` + - `POST /applications/revisions/commit` +- Workflows are mounted at `/workflows` and expose: + - `POST /workflows/revisions/retrieve` + - `GET /workflows/revisions/{workflow_revision_id}` + - `POST /workflows/revisions/query` + - `POST /workflows/revisions/log` + - `POST /workflows/revisions/commit` +- Queries are mounted at `/queries` and expose: + - `POST /queries/revisions/retrieve` + - `GET /queries/revisions/{query_revision_id}` + - `POST /queries/revisions/query` + - `POST /queries/revisions/log` + - `POST /queries/revisions/commit` +- Testsets are mounted at `/testsets` and expose: + - `POST /testsets/revisions/retrieve` + - `GET /testsets/revisions/{testset_revision_id}` + - `POST /testsets/revisions/query` + - `POST /testsets/revisions/log` + - `POST /testsets/revisions/commit` +- Evaluators are mounted at `/evaluators` and expose: + - `POST /evaluators/revisions/retrieve` + - `GET /evaluators/revisions/{evaluator_revision_id}` + - `POST /evaluators/revisions/query` + - `POST /evaluators/revisions/log` + - `POST /evaluators/revisions/commit` +- Environments are in scope with the same intended stable shape: + - `POST /environments/revisions/retrieve` + - `GET /environments/revisions/{environment_revision_id}` + - `POST /environments/revisions/query` + - `POST /environments/revisions/log` + - `POST /environments/revisions/commit` + +Environment caveat: + +- The domain-style `EnvironmentsRouter` (with revision retrieve/fetch/query/log/commit) is mounted at both `/environments` and `/preview/environments` from a single shared instance, so each request emits exactly once. +- `environments.revisions.committed` is already emitted from `core/environments/service.py`, matching the read-router / write-service split used by every other domain. +- Environments remain in scope as a major entity. + +Create route caveat: + +- The direct revision create handlers call `create_*_revision(...)`, which calls DAO `create_revision(...)` or delegates to another domain's `create_*_revision(...)`. +- They do not call `commit_revision(...)` in the direct workflow/application/query/testset/evaluator/environment revision create paths reviewed here. +- Some higher-level create/import/update compatibility paths do call `commit_*_revision(...)` internally. +- Commit events should be emitted from successful commit service/helper paths, regardless of which route initiated them. + +Notable exclusions for broad tracking: + +- Workflow revision APIs exist, but workflow events are intentionally skipped for now because workflows may stop being a durable exposed product entity. +- Artifact reads such as `query_workflows`, `query_applications`, and `query_testsets` should not be tracked by revision read events. +- Variant reads such as `query_workflow_variants` and `fetch_workflow_variant` should not be tracked by revision read events. +- Preview duplicate mounts should not double-emit for routers also mounted at stable paths. + +## Current Testcase APIs + +Testcases are mounted at `/testcases` and also duplicated at `/preview/testcases`. Stable testcase read endpoints are in scope for testcase read events; preview testcase endpoints are out of scope. + +## Current Tracing Read Paths + +The prompt originally considered both span-level and trace-level read event names. Current scope keeps only trace read event names. + +Query revision endpoints are query entity reads and should emit query revision events, even when query data is later used to fetch traces or spans. Loadable workflows should not emit trace events unless they call stable trace endpoints that return traces. + +### Observed preview spans API + +Observed preview read endpoints: + +- `GET /preview/spans/` -> `SpansRouter.fetch_spans` +- `GET /preview/spans/{trace_id}/{span_id}` -> `SpansRouter.fetch_span` +- `POST /preview/spans/query` -> `SpansRouter.query_spans` + +These are implemented in `api/oss/src/apis/fastapi/tracing/router.py`. + +These routes are not tracking targets for this event because `/preview/*` is deprecated or legacy surface. + +### Observed preview traces API + +Trace reads can also result in span fetch/query work: + +- `GET /preview/traces/` +- `GET /preview/traces/{trace_id}` +- `POST /preview/traces/query` + +These call `TracingService.fetch_traces`, `fetch_trace`, or `query_traces`, which internally operate on spans before formatting trace responses. + +These routes are not tracking targets for this event because `/preview/*` is deprecated or legacy surface. + +### Observed legacy tracing API + +There is also an older router still mounted at: + +- `POST /tracing/spans/query` +- `GET /tracing/traces/{trace_id}` + +This router lives in the same file and still performs tracing reads. It is not a tracking target for this event because `/tracing/*` is legacy surface. + +### Stable tracing read API + +No stable non-preview span or trace read router was found in the current tree during this review. + +Implementation implication: + +- Do not instrument `/preview/*`. +- Do not instrument `/tracing/*`. +- Do not instrument deprecated or legacy routers just to emit this event. +- Wire emission only when the current stable tracing read API surface is identified. + +### Service methods involved + +The main service methods are in `api/oss/src/core/tracing/service.py`: + +- `query(...)` +- `query_span_dtos(...)` +- `query_spans_or_traces(...)` +- `query_spans(...)` +- `query_traces(...)` +- `fetch(...)` +- `fetch_spans(...)` +- `fetch_span(...)` +- `fetch_traces(...)` +- `fetch_trace(...)` + +Important detail: + +- `query_spans(...)` and `query_traces(...)` both ultimately flow through `query_spans_or_traces(...)`. +- `fetch_span(...)` flows through `fetch_spans(...)`. +- `fetch_traces(...)` and `fetch_trace(...)` flow through `fetch(...)`. +- Some query paths short-circuit into `fetch(...)` when the query is effectively a direct trace-id lookup via `_extract_trace_ids_from_query(...)`. + +## Current Router Context Available for Emission + +If the event is emitted at the router boundary, the ambient `AuthScope` and the request state already expose the main auth/scope values needed for the event envelope and attributes. + +In current tracing routers, request handlers already read from `request.state` as a fallback when an ambient `AuthScope` is not available: + +- `organization_id` +- `project_id` +- `user_id` + +That makes router-level emission practical, especially if the event should be computed from the final response payload just before returning. + +## Current Tracing Service Wiring + +- `TracingService` currently depends only on `TracingDAOInterface`. +- It does not depend on `EventsService` and does not publish events today. +- Service wiring happens in `api/entrypoints/routers.py`. +- `EventsService` and `TracingService` are instantiated independently there. + +If emission stays at the router layer, no new `TracingService` dependency seam is strictly required for the first version. A core helper can be called from routers and can publish through `publish_event(...)`, following the same pattern already used by environment and webhook event producers. + +## Response Shapes Relevant to Event Payload Design + +### Span read responses + +- `SpansRouter.fetch_spans` returns `SpansResponse(count, spans)`. +- `SpansRouter.fetch_span` returns `SpanResponse(count, span)`. +- `SpansRouter.query_spans` returns `SpansResponse(count, spans)`. + +### Trace read responses + +- `TracesRouter.fetch_traces` returns `TracesResponse(count, traces)`. +- `TracesRouter.fetch_trace` returns `TraceResponse(count, trace)`. +- `TracesRouter.query_traces` returns `TracesResponse(count, traces)`. + +### Event payload sizing implication + +- Span reads can legitimately return many spans. +- Putting every returned span ID into `attributes` is possible in the current schema, but payload size could grow quickly. +- There is no event-specific size guard in the current pipeline beyond stream batch size handling in `EventsWorker`. + +## Existing Tests Relevant to This Work + +Relevant current coverage includes: + +- Event query acceptance tests: + - `api/oss/tests/pytest/acceptance/events/test_events_basics.py` +- Event stream deserialization tests: + - `api/oss/tests/pytest/unit/events/test_events_streaming.py` +- Tracing read acceptance tests: + - `api/oss/tests/pytest/acceptance/tracing/test_spans_basics.py` + - `api/oss/tests/pytest/acceptance/tracing/test_traces_basics.py` + - `api/oss/tests/pytest/acceptance/tracing/test_traces_preview.py` + - `api/oss/tests/pytest/e2e/loadables/test_loadable_strategies.py` + +There does not appear to be any current test asserting that tracing reads emit events. + +Because the currently observed tracing read routes are preview or legacy routes, new event-emission acceptance tests should target stable endpoints only. Add negative coverage for preview and legacy routes if those routes continue to exist during implementation. + +## Constraints Implied by the Current Codebase + +### What already fits the prompt + +- The platform already has: + - events + - event logs + - webhook subscriptions + - webhook deliveries +- The event log path can support a non-webhook event without structural changes. + +### What the current code does not have yet + +- No tracing read event type exists. +- No tracing read code path emits an event. +- Subscribability is controlled by presence in `WebhookEventType`. +- No typed event payload schema exists beyond generic `attributes`. +- No stable, propagated request metadata exists for tracing read events. + +## Research Conclusions + +1. The codebase already supports internal-only events. The new event should be added to `EventType` only, not `WebhookEventType`. +2. The existing event model stores event-specific data in generic `attributes`, so the first implementation will likely follow that pattern unless the broader event system is refactored. +3. The largest design choice is not naming; it is identifying the stable, non-preview, non-legacy tracing read API surface where reads should be captured exactly once. +4. The currently observed `/preview/*` and `/tracing/*` trace read routes are useful implementation references but should not emit this event. +5. Emitting in low-level helpers like `fetch(...)` and `query(...)` risks duplicate or overly broad events, including accidental emission from deprecated or legacy routes. +6. The intended semantics are now clearer: emit one event per stable endpoint response when traces are actually returned through the API, not when spans are only read internally inside service logic. +7. Router-level emission is the correct fit for that requirement because routers have both the auth context and the final response shape. diff --git a/docs/designs/extend-events-beyond-deployments/summary.md b/docs/designs/extend-events-beyond-deployments/summary.md new file mode 100644 index 0000000000..709e45e2e4 --- /dev/null +++ b/docs/designs/extend-events-beyond-deployments/summary.md @@ -0,0 +1,65 @@ +# Extend events beyond deployments — read/commit events, L1/L2 quota, audit-log feature flag + +## What this unlocks + +This PR turns the events pipeline from "one event type per deployment commit" into a general read/commit/log surface across the major Git-style entities, with a real quota meter and a real feature flag wired all the way through. + +Twenty-nine new event types ship in `EventType` and (subscribably) in `WebhookEventType`: trace reads (`traces.fetched`, `traces.queried`), testcase reads (`testcases.fetched`, `testcases.queried`), and the full `retrieved` / `fetched` / `queried` / `logged` / `committed` lifecycle for `applications`, `queries`, `testsets`, `evaluators`, and `environments` at the revision level. Every type is webhook-subscribable. Webhook subscribers and the `POST /events/query` audit log now see real-user activity, not just the pre-existing `environments.revisions.committed` deploy precedent. + +`Counter.EVENTS_INGESTED` is now a real, enforced meter — same two-layer pattern as `Counter.TRACES_INGESTED`. **L1** lives inside `core/events/utils.py::_safe_publish`: a `cache=True` soft check that silently drops the publish when the org is over quota (read/commit responses are never 429'd by event metering). **L2** lives in `EventsWorker.process_batch`: an authoritative `adjust()` per org with the full per-org delta in the batch, mirroring the tracing worker. Plans declare the quota inline (`Quota(retention=..., period=Period.MONTHLY)` for Hobby/Pro/Business, unlimited for Agenta and Self-hosted Enterprise) and operators can flip a `limit=...` per plan without any code change. + +`Flag.AUDIT` is a new entitlement flag that gates `POST /events/query` — the human-facing audit-log query surface. Hobby and Pro return `NOT_ENTITLED_RESPONSE(Tracker.FLAGS)` (Business / Agenta / Self-hosted are entitled). **Ingest and webhook delivery are not gated by `Flag.AUDIT`** — events keep flowing into the `events` table and to webhook subscribers regardless of audit-log entitlement, so an upgrade makes historical events queryable immediately and webhook integrations work for every paid plan. The flag is in `CONSTRAINTS[BLOCKED]` so orgs can't promote themselves. + +The new helper layer in `core/events/utils.py` enforces the read=router / write=service split: read events emit at the router boundary after the response is materialized (so internal service-to-service fetches that resolve refs or hydrate diff state stay silent), and commit events emit from inside `commit_*_revision(...)` at the service layer (so direct commit routes, simple-service create/edit, deploy paths, fork, and defaults seeding all produce exactly one event without double-publishing). The split is documented in the module docstring with the specific double-counting cases it prevents (`commit_environment_revision` calling `query_environment_revisions` to compute the diff; `TracingService.query_traces` calling `queries_service.fetch_query_revision` to resolve the saved query; evaluation runs fetching hundreds of revisions per scenario). + +The publisher side now reads scope from the ambient `AuthScope` (`ContextVar` set by the auth middleware) with `request.state` as legacy fallback. That single change closes a quiet pre-existing gap: service-layer commit emissions used to ship `organization_id=null` on the Redis envelope because the service had no `Request`. Today AuthScope propagates through nested async work, so every emitted `EventMessage` — read or commit, router or service — carries the full `(organization_id, workspace_id, project_id, user_id)`. + +## What changed under the hood + +**Event type surface.** `EventType` (`api/oss/src/core/events/types.py`) grows by 29 members across four groups: `traces.{fetched,queried}`, `testcases.{fetched,queried}`, and `{applications,queries,testsets,evaluators,environments}.revisions.{retrieved,fetched,queried,logged,committed}`. `WebhookEventType` (`api/oss/src/core/webhooks/types.py`) mirrors the new event types as a strict subset of `EventType`, derived by `.value` re-export so the two enums stay in lockstep. The pre-existing `environments.revisions.committed` precedent is preserved end-to-end (`state` / `diff` / `references` / `message` attributes intact). Workflow revision events are intentionally deferred until workflows are confirmed as a durable exposed entity; `SpansRouter` and the legacy `TracingRouter` are intentionally not instrumented. + +**Helper layer (`core/events/utils.py`).** Five keyword-only publishers: `publish_trace_fetched`, `publish_trace_queried`, `publish_testcase_fetched`, `publish_testcase_queried`, and a generic `publish_revision_event(domain, action, ...)` that fans out to the 25 revision events. Each helper resolves scope (`request_scope()` → AuthScope first, then `request.state`), short-circuits on `count == 0` / missing revision / empty list, builds the `Event` envelope with a generated `request_id` / `event_id` and `RequestType.UNKNOWN`, and calls `_safe_publish` which runs L1 then publishes. Attribute builders are exposed separately (`build_trace_fetched_attributes`, `build_revision_event_attributes`, etc.) so call sites can produce attributes without publishing — used by the existing unit tests. List-shaped events cap `references` / `trace_ids` / `testcase_ids` at `MAX_REFERENCES = 1000` while `count` stays uncapped (so consumers can detect truncation via `count > len(references)`). Commit events deliberately omit `count` and may carry an optional `message`. The single `extra=` kwarg preserves `environments.revisions.committed`'s historical `state` / `diff` attributes through the shared helper. + +**Router-layer read emission.** Eight router classes emit reads at the handler boundary after the response is materialized: `TracesRouter.{fetch_trace,fetch_traces,query_traces}`, `TestcasesRouter.{fetch_testcase,fetch_testcases,query_testcases}`, and the `retrieve` / `fetch` / `query` / `log` handlers on each of `ApplicationsRouter` / `QueriesRouter` / `TestsetsRouter` / `EvaluatorsRouter` / `EnvironmentsRouter`. Cached paths (the `retrieve_*_revision` flows in queries / testsets, which use `get_cache` / `set_cache`) emit on cache hit too — the helper call sits after the cache check so the count of "the user asked for this revision" is unaffected by whether the response was served from cache. Trace endpoints that internally fetch spans to materialize traces emit only the trace event (no span event). Query-revision endpoints emit query-revision events, not trace events, even when they internally drive a trace fetch. + +**Service-layer commit emission.** Five `commit_*_revision(...)` methods publish exactly one commit event each: `ApplicationsService`, `QueriesService`, `TestsetsService`, `EvaluatorsService`, `EnvironmentsService`. The delta-commit flow in `commit_environment_revision` and `commit_testset_revision` early-returns into a private `_commit_*_revision_delta(...)` helper that resolves the delta into full data and then re-enters `commit_*_revision` once, so the emission line at the bottom of each method fires exactly once even on delta commits. The existing `environments.revisions.committed` producer was normalized to use `publish_revision_event(extra={"state": ..., "diff": ...}, message=...)` instead of constructing the `Event` envelope inline, preserving every historical attribute. Higher-level compatibility paths (simple-service create / edit, deploy paths from the workflows and evaluators routers, defaults seeding, fork) keep flowing through the service-layer commit method without code change and automatically emit once per call. + +**L1 quota (publisher side, silent drop).** `_check_l1_events_quota` inside `_safe_publish` runs `check_entitlements(key=Counter.EVENTS_INGESTED, delta=1, cache=True, scope=scope_from(organization_id=...))` when `is_ee()` and the scope carries an `organization_id`. Over-quota orgs log `[EVENTS] L1 quota exceeded, dropping ` and return without publishing — no HTTP error, no 429. The user's read or commit response is unaffected by event metering. On any other exception the helper fails open (`return True`) and the publish proceeds; the authoritative check in the worker is the source of truth. OSS skips L1 entirely (the EE imports are deferred under `if is_ee():`). + +**L2 quota (worker side, authoritative).** `EventsWorker.process_batch` regroups the per-project batches by org, sums the per-org delta, and runs one `check_entitlements(key=Counter.EVENTS_INGESTED, delta=delta, scope=scope_from(organization_id=org_id))` per org (cache=False, the default — atomic DB upsert). Over-quota orgs drop their batch but messages are still ACKed so the consumer-group PEL doesn't back up. On adapter error (Redis / DB glitch) the worker drops the org's batch conservatively, mirroring the tracing worker's stance. The pre-existing per-project `Flag.ACCESS` check was removed: that flag is `False` on Hobby and Pro by design (it gates org-flag mutation in `organization_router`, not events), so the old check would have silently dropped events for every Hobby/Pro customer. + +**`Flag.AUDIT` at the query side.** `POST /events/query` (`api/oss/src/apis/fastapi/events/router.py`) now runs `check, _, _ = await check_entitlements(key=Flag.AUDIT)` after the existing `Permission.VIEW_SPANS` access check; on `not check` the handler returns `NOT_ENTITLED_RESPONSE(Tracker.FLAGS)`. Default plan map: Hobby=False, Pro=False, Business=True, Agenta=True, Self-hosted Enterprise=True. The flag is included in `CONSTRAINTS[BLOCKED]` so an org can't promote itself. Webhook subscription delivery is not gated by this flag; the audit log and the webhook delivery surface are independent consumers of the same `streams:events` topic. + +**AuthScope-first scope resolution.** `_Scope` widened to carry `workspace_id` in addition to `organization_id` / `project_id` / `user_id`. `request_scope()` now reads the ambient `AuthScope` first (via `get_auth_scope()` in `oss/src/utils/context.py`) and falls back to `request.state` only when no auth context is published (admin endpoints, public endpoints, unit tests that hand-craft `SimpleNamespace` state). `publish_revision_event` follows the same order: explicit kwargs → AuthScope → `request.state`. Service-layer commits no longer need to thread `organization_id` through service signatures — they pick it up from the AuthScope set by the auth middleware on the originating HTTP request, propagated through nested async work via the standard ContextVar mechanism. + +**Plan map.** `Counter.EVENTS_INGESTED` defaults across the five default plans: Hobby `Quota(retention=Retention.MONTHLY, period=Period.MONTHLY)`, Pro `QUARTERLY`, Business `YEARLY`, Agenta and Self-hosted Enterprise `period=Period.MONTHLY` with no retention (unlimited). `Flag.AUDIT` defaults: Hobby `False`, Pro `False`, Business `True`, Agenta `True`, Self-hosted Enterprise `True`. Both new gates are wired into `DEFAULT_ENTITLEMENTS` so operator overrides via `AGENTA_ACCESS_PLANS` / `AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY` flow through unchanged. + +## Tests + +| | acceptance | integration | unit | +|----------|----------------|----------------|-----------------| +| web | +0 / ~0 / -0 | +0 / ~0 / -0 | +0 / ~0 / -0 | +| services | +0 / ~0 / -0 | +0 / ~0 / -0 | +0 / ~0 / -0 | +| api | +0 / ~0 / -0 | +0 / ~0 / -0 | +48 / ~1 / -0 | +| sdk | +0 / ~0 / -0 | +0 / ~0 / -0 | +0 / ~0 / -0 | + +Unit additions (`api/oss/tests/pytest/unit/events/`): + +- `test_events_utils.py` (+~30 new cases on top of the 30 originally shipped): EventType / WebhookEventType parity, attribute builders + capping, revision attribute construction across all five domains, `request_scope` semantics, AuthScope-first precedence, L1 quota allow / drop / fail-open / skip-on-OSS / skip-when-org-unknown. +- `test_service_commit_emission.py` (existing): one commit-event-per-call across all five services, environment-specific `state` / `diff` preservation, DAO-returns-None suppression, and delta-commit exactly-once coverage for environments and testsets. +- `test_events_worker_l2.py` (new): per-org delta aggregation across projects, allow / deny / skip-on-OSS / check-failure-drop semantics. +- `test_events_router_audit.py` (new): direct `POST /events/query` router coverage for the `Flag.AUDIT` allow and deny branches. + +One edit in `api/oss/tests/pytest/unit/test_environments_service.py` repoints a `patch("oss.src.core.environments.service.publish_event")` to `patch("oss.src.core.events.utils.publish_event")` to match the normalized emission seam. Full OSS unit suite green: 575 passing. + +## Migrations + +**No migration in this PR.** The `events` table existed already, the `meters_type` Postgres enum was extended with `events_ingested` on the meters reshape (`9d3e8f0a1b2c_reshape_meters_table` from the `feat/clean-up-meters` branch, merged into this branch but not part of this PR's design scope), and `Flag.AUDIT` is a code-level Pydantic enum — no DB representation, no schema change. Plan-map changes ship as code defaults; operators consume them via the existing `AGENTA_ACCESS_PLANS` / `AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY` env-driven config layer. + +## Env vars + +**No env vars added, edited, or removed.** Operators have nothing to change in their `.env` for this PR. The new `Flag.AUDIT` and the `Counter.EVENTS_INGESTED` quota are wired into `DEFAULT_ENTITLEMENTS` and flow through the existing env-overlay surface; operators who want to override the per-plan defaults use `AGENTA_ACCESS_PLANS` / `AGENTA_ACCESS_DEFAULT_PLAN_OVERLAY` as they would for any other entitlement. + +## Tests and docs + +`docs/designs/extend-events-beyond-deployments/` carries the design story: `research.md` and `gap.md` as historical baselines, `proposal.md` for the as-shipped read/commit split and AuthScope-first scope resolution, `events.md` as the per-event reference (29 events with example payloads, capping rules, and delta-commit semantics), `tasks.md` as the execution checklist, and this `summary.md`. User-facing docs: `docs/docs/prompt-engineering/integrating-prompts/04-webhooks.mdx` lists every subscribable event type and now distinguishes read/log payloads (`count`) from commit payloads (no `count`, optional `message`); the generated Fern TS client (`web/packages/agenta-api-client/src/generated/api/types/WebhookEventType.ts`) and `docs/docs/reference/openapi.json` include all 29 new types. Internal API guidance (`AGENTS.md`) is unchanged — the helper layer follows the existing domain-folder + DTO-mapping conventions. diff --git a/docs/designs/extend-events-beyond-deployments/tasks.md b/docs/designs/extend-events-beyond-deployments/tasks.md new file mode 100644 index 0000000000..280a37ee4e --- /dev/null +++ b/docs/designs/extend-events-beyond-deployments/tasks.md @@ -0,0 +1,93 @@ +# Extend Events Beyond Deployments - Tasks + +## Event types + +- [x] Add trace read event types: `traces.fetched` and `traces.queried`. +- [x] Add testcase read event types: `testcases.fetched` and `testcases.queried`. +- [x] Add split revision read event types for stable major entities: `.revisions.retrieved`, `.revisions.fetched`, `.revisions.queried`, and `.revisions.logged`. +- [x] Add missing revision commit event types for stable major entities, using `environments.revisions.committed` as the existing precedent. +- [x] Do not add workflow revision event types until workflows are confirmed as a durable exposed entity. +- [x] Do not add span read event types for now. +- [x] Add all new trace, testcase, revision read, revision log, and revision commit event types to `WebhookEventType`. + +## Helpers + +- [x] Add core tracing/testcase event helpers (`publish_trace_fetched`, `publish_trace_queried`, `publish_testcase_fetched`, `publish_testcase_queried`) in `api/oss/src/core/events/utils.py`. +- [x] Add a shared revision event helper in the events/core layer (`publish_revision_event`) so each domain does not copy inline event construction. +- [x] Helper accepts domain, action, request scope (either `request` or explicit `project_id`/`user_id`), and one revision DTO or a revision list response. +- [x] Helper builds domain-specific `references` for single revision events and capped domain-specific `references` arrays for list revision events. +- [x] Treat revision `references` as partial identity objects; include artifact, variant, and revision fields only when the response exposes them. +- [x] Normalize the existing environment commit producer to the shared revision event helper. +- [x] Preserve the existing `environments.revisions.committed` `references`, `state`, and `diff` attributes (via the `extra=` kwarg). +- [x] Add optional `message` to `environments.revisions.committed` for commit-event uniformity. +- [x] For new application, query, testset, and evaluator commit events, include domain-specific `references` and optional `message`. +- [x] Do not add `state` or `diff` to the new application, query, testset, or evaluator commit events in the first version. +- [x] Trace `fetched` events carry `trace_id` (singular GET-by-path) or capped `trace_ids` (list GET / query). `traces.queried` always carries `trace_ids`. +- [x] Testcase `fetched` events carry `testcase_id` (singular GET-by-path) or capped `testcase_ids` (list GET). `testcases.queried` always carries `testcase_ids`. +- [x] Cap event-specific result lists at 1000 while preserving the uncapped `count`. +- [x] Suppress publishing when `count == 0` (and for single-shape revision actions when the revision is None). +- [x] Build events with generated `request_id`, generated `event_id`, `RequestType.UNKNOWN`, and the appropriate event type. +- [x] Publish through `publish_event(...)` with `organization_id` and `project_id` in the envelope. +- [x] Store `user_id`, `count`, and event-specific fields in event `attributes`. +- [x] Log publish failures and still return the API response normally. + +## Route policy (deviation from original design) + +- [x] **The original design excluded preview/tracing/deprecated routes from emission. Implementation supersedes this: emit from every mount of an instrumented handler. The duplicate `/preview/*` mounts share one handler instance, so each request still emits exactly once.** +- [x] Do not emit from `TracingRouter` (legacy deprecated trace endpoints). +- [x] Do not emit from `SpansRouter` (span events out of scope). +- [x] Trace events are only emitted by `TracesRouter`. + +## Read emission (router layer) + +- [x] Emit `traces.fetched` from `TracesRouter.fetch_trace` and `TracesRouter.fetch_traces` after the final response is materialized. +- [x] Emit `traces.queried` from `TracesRouter.query_traces` after the final response is materialized. +- [x] Trace endpoints that internally read spans emit only trace events. +- [x] Query revision endpoints emit query revision events, not trace events. +- [x] Loadable workflows do not emit trace events unless they call stable trace endpoints. +- [x] Emit `testcases.fetched` from `TestcasesRouter.fetch_testcase` and `TestcasesRouter.fetch_testcases`. +- [x] Emit `testcases.queried` from `TestcasesRouter.query_testcases`. +- [x] Emit `applications.revisions.retrieved`, `applications.revisions.fetched`, `applications.revisions.queried`, and `applications.revisions.logged` from the respective `ApplicationsRouter` handlers. +- [x] Emit `queries.revisions.retrieved/fetched/queried/logged` from the respective `QueriesRouter` handlers. +- [x] Emit `testsets.revisions.retrieved/fetched/queried/logged` from the respective `TestsetsRouter` handlers. +- [x] Emit `evaluators.revisions.retrieved/fetched/queried/logged` from the respective `EvaluatorsRouter` handlers. +- [x] Emit `environments.revisions.retrieved/fetched/queried/logged` from the respective `EnvironmentsRouter` handlers (already mounted at non-preview `/environments`). +- [x] Do not emit workflow revision events from `/workflows/revisions/*` yet. + +## Commit emission (service layer) + +- [x] Commit events emit from the **service-layer** `commit_*_revision(...)` for every domain. This ensures direct commit routes, simple-service create/edit, deploy paths, fork, and defaults seeding all produce exactly one commit event. +- [x] `EnvironmentsService.commit_environment_revision` — preserves `references`/`state`/`diff` and adds optional `message`. +- [x] `ApplicationsService.commit_application_revision`. +- [x] `QueriesService.commit_query_revision`. +- [x] `TestsetsService.commit_testset_revision`. +- [x] `EvaluatorsService.commit_evaluator_revision`. +- [x] Router handlers do **not** emit commit events; emission is exclusively at the service boundary, so compatibility routes do not double-publish. +- [x] Do not emit for artifact query/fetch routes such as `/workflows/query` or `/workflows/{workflow_id}`. +- [x] Do not emit for variant query/fetch routes such as `/workflows/variants/query` or `/workflows/variants/{workflow_variant_id}`. + +## Tests + +- [x] Add unit tests for event construction (`test_events_utils.py`). +- [x] Add unit tests for revision event construction across all supported domains, including incomplete references. +- [x] Add unit tests mapping retrieve, fetch, query, log, and commit actions to distinct event types per domain. +- [x] Add unit tests for stable trace and traces response counting (singular and plural). +- [x] Add unit tests for stable testcase and testcases response counting (singular and plural). +- [x] Add unit tests proving event-specific result lists are capped at 1000 and `count` remains accurate. +- [x] Add unit tests proving zero-count responses do not publish (read, query, log, commit). +- [x] Add unit tests proving publish failures are swallowed after logging. +- [x] Add tests proving trace and testcase read events are accepted by `EventType`. +- [x] Add tests proving all new event types are present in `WebhookEventType`. +- [x] Add service-layer commit unit tests proving exactly one commit event is emitted per commit call across all five domains. +- [ ] Acceptance coverage showing trace fetch emits exactly one `traces.fetched` event. *(Deferred — requires full HTTP + redis stack.)* +- [ ] Acceptance coverage showing trace query emits exactly one `traces.queried` event. *(Deferred.)* +- [ ] Acceptance coverage showing testcase fetch emits exactly one `testcases.fetched` event. *(Deferred.)* +- [ ] Acceptance coverage showing testcase query emits exactly one `testcases.queried` event. *(Deferred.)* +- [ ] Acceptance coverage proving the event appears in `POST /events/query`. *(Deferred.)* +- [ ] Acceptance coverage proving stable revision retrieve/fetch/query/log routes emit their distinct read event types exactly once. *(Deferred.)* +- [ ] Acceptance coverage proving stable revision commit routes emit commit events exactly once. *(Deferred.)* +- [ ] Acceptance coverage proving artifact and variant reads do not emit revision read events. *(Deferred.)* + +## Docs + +- [x] Update API reference docs (OpenAPI / Fern client) once event semantics are stable. diff --git a/docs/docs/prompt-engineering/integrating-prompts/04-webhooks.mdx b/docs/docs/prompt-engineering/integrating-prompts/04-webhooks.mdx index 5d9be5ec99..a8caff9e00 100644 --- a/docs/docs/prompt-engineering/integrating-prompts/04-webhooks.mdx +++ b/docs/docs/prompt-engineering/integrating-prompts/04-webhooks.mdx @@ -239,6 +239,47 @@ X-Agenta-Event-Id: Idempotency-Key: ``` +## Available event types + +Agenta emits events for both read access and Git-style revision lifecycle changes. You can subscribe to any subset of the events below. + +### Revision lifecycle events + +Each major entity that has revision history exposes the same five action events: + +| Action | Emitted when | +|---|---| +| `retrieved` | A revision is retrieved by reference (slug or id) | +| `fetched` | A revision is fetched by id (`GET //revisions/{id}`) | +| `queried` | A list of revisions is returned from `POST //revisions/query` | +| `logged` | A revision history log is returned from `POST //revisions/log` | +| `committed` | A new revision is committed (direct commit, simple-service create/edit, deploy, fork, etc.) | + +The supported domains and event names are: + +- `applications.revisions.{retrieved,fetched,queried,logged,committed}` +- `queries.revisions.{retrieved,fetched,queried,logged,committed}` +- `testsets.revisions.{retrieved,fetched,queried,logged,committed}` +- `evaluators.revisions.{retrieved,fetched,queried,logged,committed}` +- `environments.revisions.{retrieved,fetched,queried,logged,committed}` + +Revision read events (`retrieved`, `fetched`, `queried`, and `logged`) carry `references` (the artifact, variant, and revision identifiers — partial when the response does not expose all fields), `count`, and `user_id`. Commit events carry `references`, `user_id`, and optional `message`, but do not include `count`. The `environments.revisions.committed` event additionally carries `state` and `diff` describing the committed configuration, as shown in the examples above. + +For list events (`queried`, `logged`), `references` is an array capped at 1000 entries while `count` reflects the uncapped total. + +### Read events for traces and testcases + +- `traces.fetched` — fired by `GET /traces/{trace_id}` (carries `trace_id`) and `GET /traces/` (carries capped `trace_ids`) +- `traces.queried` — fired by `POST /traces/query` (carries capped `trace_ids`) +- `testcases.fetched` — fired by `GET /testcases/{testcase_id}` (carries `testcase_id`) and `GET /testcases/` (carries capped `testcase_ids`) +- `testcases.queried` — fired by `POST /testcases/query` (carries capped `testcase_ids`) + +Read events always carry `user_id` and `count`. They are only emitted when `count > 0`. + +### System events + +- `webhooks.subscriptions.tested` — fired when you click `Send test` on a webhook subscription + ## Authentication modes ### Using signature mode diff --git a/docs/docs/reference/api/create-webhook-delivery.RequestSchema.json b/docs/docs/reference/api/create-webhook-delivery.RequestSchema.json index 2f28703cc8..5c1b6aa49e 100644 --- a/docs/docs/reference/api/create-webhook-delivery.RequestSchema.json +++ b/docs/docs/reference/api/create-webhook-delivery.RequestSchema.json @@ -1 +1 @@ -{"title":"Body","body":{"content":{"application/json":{"schema":{"properties":{"delivery":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","title":"Status"},"data":{"anyOf":[{"properties":{"event_type":{"anyOf":[{"type":"string","enum":["environments.revisions.committed","webhooks.subscriptions.tested"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},{"type":"null"}]},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"},"response":{"anyOf":[{"properties":{"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"type":"object","title":"WebhookDeliveryResponseInfo"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["url"],"title":"WebhookDeliveryData"},{"type":"null"}]},"subscription_id":{"type":"string","format":"uuid","title":"Subscription Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"}},"type":"object","required":["status","subscription_id","event_id"],"title":"WebhookDeliveryCreate"}},"type":"object","required":["delivery"],"title":"WebhookDeliveryCreateRequest"}}},"required":true}} \ No newline at end of file +{"title":"Body","body":{"content":{"application/json":{"schema":{"properties":{"delivery":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","title":"Status"},"data":{"anyOf":[{"properties":{"event_type":{"anyOf":[{"type":"string","enum":["webhooks.subscriptions.tested","traces.fetched","traces.queried","testcases.fetched","testcases.queried","applications.revisions.retrieved","applications.revisions.fetched","applications.revisions.queried","applications.revisions.logged","applications.revisions.committed","queries.revisions.retrieved","queries.revisions.fetched","queries.revisions.queried","queries.revisions.logged","queries.revisions.committed","testsets.revisions.retrieved","testsets.revisions.fetched","testsets.revisions.queried","testsets.revisions.logged","testsets.revisions.committed","evaluators.revisions.retrieved","evaluators.revisions.fetched","evaluators.revisions.queried","evaluators.revisions.logged","evaluators.revisions.committed","environments.revisions.retrieved","environments.revisions.fetched","environments.revisions.queried","environments.revisions.logged","environments.revisions.committed"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},{"type":"null"}]},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"},"response":{"anyOf":[{"properties":{"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"type":"object","title":"WebhookDeliveryResponseInfo"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["url"],"title":"WebhookDeliveryData"},{"type":"null"}]},"subscription_id":{"type":"string","format":"uuid","title":"Subscription Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"}},"type":"object","required":["status","subscription_id","event_id"],"title":"WebhookDeliveryCreate"}},"type":"object","required":["delivery"],"title":"WebhookDeliveryCreateRequest"}}},"required":true}} \ No newline at end of file diff --git a/docs/docs/reference/api/create-webhook-delivery.StatusCodes.json b/docs/docs/reference/api/create-webhook-delivery.StatusCodes.json index 07556ef13f..21b0328241 100644 --- a/docs/docs/reference/api/create-webhook-delivery.StatusCodes.json +++ b/docs/docs/reference/api/create-webhook-delivery.StatusCodes.json @@ -1 +1 @@ -{"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"delivery":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","title":"Status"},"data":{"anyOf":[{"properties":{"event_type":{"anyOf":[{"type":"string","enum":["environments.revisions.committed","webhooks.subscriptions.tested"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},{"type":"null"}]},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"},"response":{"anyOf":[{"properties":{"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"type":"object","title":"WebhookDeliveryResponseInfo"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["url"],"title":"WebhookDeliveryData"},{"type":"null"}]},"subscription_id":{"type":"string","format":"uuid","title":"Subscription Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"}},"type":"object","required":["status","subscription_id","event_id"],"title":"WebhookDelivery"},{"type":"null"}]}},"type":"object","title":"WebhookDeliveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"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"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} \ No newline at end of file +{"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"delivery":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","title":"Status"},"data":{"anyOf":[{"properties":{"event_type":{"anyOf":[{"type":"string","enum":["webhooks.subscriptions.tested","traces.fetched","traces.queried","testcases.fetched","testcases.queried","applications.revisions.retrieved","applications.revisions.fetched","applications.revisions.queried","applications.revisions.logged","applications.revisions.committed","queries.revisions.retrieved","queries.revisions.fetched","queries.revisions.queried","queries.revisions.logged","queries.revisions.committed","testsets.revisions.retrieved","testsets.revisions.fetched","testsets.revisions.queried","testsets.revisions.logged","testsets.revisions.committed","evaluators.revisions.retrieved","evaluators.revisions.fetched","evaluators.revisions.queried","evaluators.revisions.logged","evaluators.revisions.committed","environments.revisions.retrieved","environments.revisions.fetched","environments.revisions.queried","environments.revisions.logged","environments.revisions.committed"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},{"type":"null"}]},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"},"response":{"anyOf":[{"properties":{"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"type":"object","title":"WebhookDeliveryResponseInfo"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["url"],"title":"WebhookDeliveryData"},{"type":"null"}]},"subscription_id":{"type":"string","format":"uuid","title":"Subscription Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"}},"type":"object","required":["status","subscription_id","event_id"],"title":"WebhookDelivery"},{"type":"null"}]}},"type":"object","title":"WebhookDeliveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"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"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} \ No newline at end of file diff --git a/docs/docs/reference/api/create-webhook-delivery.api.mdx b/docs/docs/reference/api/create-webhook-delivery.api.mdx index 992c797f0e..8a36486f10 100644 --- a/docs/docs/reference/api/create-webhook-delivery.api.mdx +++ b/docs/docs/reference/api/create-webhook-delivery.api.mdx @@ -5,7 +5,7 @@ description: "Create Delivery" sidebar_label: "Create Delivery" hide_title: true hide_table_of_contents: true -api: eJztWdtu2zgQ/RVinuVLnFvrp02bAg3axQat2wXWNQJaGtlsJVIlKSdeQ8B+xH7hfsliSN0cX5Ia7ZvzFFHkzHBmzpwTZQWWzwwMx/AnTudKfTMwCUBlqLkVSt5EMIRQI7d4d+833EWYiAXqJQSg8XuOxr5S0RKGKwiVtCgt/cqzLBGhs9H7apSkNRPOMeX0W6bJgxVo6Kk2uPFGRM6WXP4Rw3C8ArvMEIZgrBZyBgHESqfcwhDyXERQBPUOmScJFJMArLAJLdzQazCW29xs+rEiRWN5mrmHXU4ibrFDW6GxO6pPFkF5cnfA+wIc0XoRQKiig228prNFACkaw2cHm/m9PO4TFn6zmocHG/vYWCjqFIGafsXQwto2qkwRUJb5urP1WuECpb17KtUBoMxT6muUC6GVTFFa09W4EEYoabqhSlNhLUYQQNnZpmvyqQm1yKzbYtHQ+9ZlSoy8oRBcwQKIsD5B1/AGpnyaIHORMorLsP/++ZdxRsGFlpEbtEzFrLbU/SK/yM88ydEwrpFFqMUCIxZrlTa7mFHMzpH5SxpmLF8yIZlZyrD7RY4U41HEOJN4z8z2UAImLEtzY1kstLEMH4SxZKMJZUs9iwBynWxDR8of3qOc2TkMB/0XpwGkQlYLJ22EatEq9yedUK3nyCPUZr2QPIoEpZMnt+sgfdRzj3ppXxO+Lf0UAWR8mSgePcel1Tn+iJfb0nRBg9FkShrc18h+GN3tBLyQFmeon0KXzQ2rgD8tB/EhQHVDfB9Ey+a/Lqf1h/KKNzJW2zsGtVb60HDeuMPb4iHSERojAjc15SY+qxCvaZRsDa0N9DvPMvu5pZXy1lHmacWPpB8z4+Dmzj9xxZKzNmNu+d2dgteOu590UlPwU5Y+eMaHoijaFggqrbZ3/T3o9z27rw/IMERj4jxhVQNBcKhwCFXuDz1CTJsRaQdN6ZjniYVhnximpTd2gdNrnuiO22cqkEYc7GVob5Zd0SSBPIt+hZNP3mzpJMIEf4GTa2+2dFKla7q8+3marUrWq2WJsypfP9VLla3aS5Wwn+qlSlft5Shtj9L2KG2P0vYobY/S9ihtD5G2267/4zUmJVsEcDYYbIrVzzwRkZOizNfsYKUaoeXCDRlhMd1C04kK194+o69qEE2aW3Ot+bJ16ffKB+io08y2VXELNVYMtGurSwaraF3ILPcqvBIkboEI3z60zGxU5DXl8sE+2SaUGx9+ua/VE02JSlTtTMW1L8G+Fnk7Gt1uGPT9sd4YXpmy6+ZLaIp2ruhjaaYMmcw4sQT0Kv7tlX90ULkDMKgXjhzGK08+0OOZcMX1j3NrMzPs9TDvhonKoy6fobS8y4XfOCEbYa6FXTojV7c373DpuQCG40l7w0fqSd9l69vqyvBMvEO6heQpPV/ldq60+Nu3DlWYQvKnKBnU7R+aT79vHniaJfj4Uy4NDTiN+Yvz+OKsc355ctk5O78YdKancdgZhC8vTuOLCx7zC2ir15ZehUF/cNbpX3YGL0cn58Pzk+HgRbd/efIXBBut6ammxd2VTmyW2oKvRbWVKGuLr+coK1+o2nrD92tM/Igw14ixX7FaK5qSWForG/P8uTltRvfzThQOy7FqQ/nKtR27ur3Z0INrr2gs8tBNgaqH3Os6T1VDN31MEaZuKIJFnv5Wv6FLEzq8m373pNt36kYZm3LZcrGJwrUI6/amIdPLEi7cGCzFngfouBbIUH8XIIhOApgTkIdjWK2m3OAnnRQFLX/PXXuPJwEsuBYkQR3gqg5wcPyGy2q+Sdsp5fSCJLBD2yPeINj7E1dhiJndu3fSmjW3f3wcQSONUo8Bze9pgPJ7GALQ/3Kc5KcNbm0FCZez3IPD26Sf/wFHQexe +api: eJztWttu2zgQ/RWCz/IlzqWtnzZtCjRoFw3atAtsagS0NLLZSqRKUk68gYD9iP3C/ZLFkLpQlmynQbtP7pPFGc6M5nom6gM1bKHp9Ib+AfOllN80nQVUZqCY4VJcRnRKQwXMwO2dY7iNIOErUGsaUAXfc9DmpYzWdPpAQykMCIM/WZYlPLQyRl+1FHimwyWkDH9lCjUYDhqfaoEdCo+sLLF+H9PpzQM16wzolGqjuFjQgMZSpczQKc1zHtEiqDlEniS0mAXUcJPgwSWSqTbM5Lqrx/AUtGFpZh+2KYmYgQGy0kbudX2zCMqb2w3eZeA1nhcBDWX0ZBmv8G4R0BS0Zosni/m9vO4cFn4zioVPFvaxkVDULqJy/hVCQ1tsGJkiQC+ztrJ2rGAFwtzuc3VAQeQp5nWZtnqo87kOFc8wJ/XQgDYQoQVomx7GYMKlf/A9B8XdAWgTMt1mqs8aPi/n9VDBiuvyl1EcVrtYGrlbGPYqSeRisYseyjTlxr2xE7bNxC61sa5Lawzr0mqbuiTfHHSlBrPNnh5yOwwbxHbcNoi1ST003yZYsSRnRqptVvUyNHb1khvLesm1bb3UlnVixZUUKYitXtvC4lnYz+DZ2M/QWNlPb+z0mkA5W15j6dpGF9AI6mLE8ne1OWfzBIitcIL1rMm/f/9DGMGiDg3BCgZDZExqScMv4ov4zJIcNGEKSASKryAisZJpw0W0JGYJxDUHTbRha8IF0WsRDr+Ia0lYFBFGBNwR3W9KQLghaa4NibnShsA91wZlNKb09MEioLlK+qZKyu7fgViYJZ1Oxs+PA5pyUR0c+ZNNca9NflIJ9sglsAiUbjdAFkUc3cmSq/Zw2+jVGz14V/N+U+opApqxdSJZ9BiVRuXwI1quStEFAgqdSaFh1wBwQ/x266DkwsAC1L6pZHJNqoE5LwHMUwacBT+7RluZ/BclyvlQvuKliGV/xoBSUj3VnNf2cp89CNa4ggiHIiZltz4rEy9wBPea5s/QW4fOdmMyz+XeVeLgmBvlPybGlpu9v+cVS6zXtdnTu90Fryzm3aukhq77JH1wSJkWReFLwFLx0t7m92Q8dqi43SDDELSO84RUCUSDpwLuUObu0kbF+EgSObBLxyxPDJ2OEZl5OH1bcbpdIbpl5pHIvQHVO5GtE0vOsZPQPIt+hZJPTmypJIIEfoGSCye2VFK5a76+/Xm7TuWsl+uyzip//VQtlbdqLZXDfqqWyl21lsNKeFgJDyvhYSU8rISHlfCwEh5WwsNKeFgJ/5+VsO/1fzzGuAEWAT2ZTLpL3meW8MjOaeJi9uQNLwLDuG0y3EDaA28TGbaoj8iruohmzVszpdjae+l30hloIade9EWxB1JWyG0bq3UGqeAwF1nuttcKyNsDBMrm3hPTicgr9OW92Zsm6Btnfsnn5UQTorKqtrriwoVgV4q8ub6+6gh0+dFODLfRkYvmy1sKZinx41wmNYrMGE4JOqqg7ahc1jHcAdWgVnY43Dy44UNHLOM2uO5xaUw2HY0SGbJkKbVx5BneDHPFzdpePb+6fAtrNwHo9GbmM3zETHS51War48Ey/hbQdsFSfD7PzVIq/pdLGIwrGuJuoQswxz80Hxhf37M0S2DzgyG2Cnocs+en8dnJ4PTZ0bPByenZZDA/jsPBJHxxdhyfnbGYnVF/1/O2OzoZT04G42eDyYvro9Pp6dF08nw4fnb0Jw06CekGjDexq62qOfLXI2/AViuMv6rs3UNcbGrRzYhvDd+NGdmaheNqkHmmlLPEO+m08Mc6tOnWj7tR2PKNpV+95wsQhpHzq8sOBGyRsBOy0BZ+lUCWXPsJc1hPRyNmj4eMj9DC1PZBaoClv9UUfGksCKdmPDwaji2gkdqkTHgquoXXsrDObewroyxh3Ha+Et+5mmzWTVr/CQ2rchZQrDRkeHiYMw2fVFIUeIyAGwtuFtAVUxxRp622KgNsLX6DddXShBmUCBq3BFdqG6MCK93dOA9DyMxO3pnXXq7ef7ymDRpKXQEodoc9k93RKaX43wVs4iKDPXugCROL3FWGk4n//gN9nFr7 sidebar_class_name: "post api-method" info_path: reference/api/agenta-api custom_edit_url: null diff --git a/docs/docs/reference/api/create-webhook-subscription.RequestSchema.json b/docs/docs/reference/api/create-webhook-subscription.RequestSchema.json index 92517f6f94..9c338d355d 100644 --- a/docs/docs/reference/api/create-webhook-subscription.RequestSchema.json +++ b/docs/docs/reference/api/create-webhook-subscription.RequestSchema.json @@ -1 +1 @@ -{"title":"Body","body":{"content":{"application/json":{"schema":{"properties":{"subscription":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Input)","type":"object"}],"title":"LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Input)","type":"object"}],"title":"LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"data":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Fields"},"auth_mode":{"anyOf":[{"type":"string","enum":["signature","authorization"]},{"type":"null"}],"title":"Auth Mode"},"event_types":{"anyOf":[{"items":{"type":"string","enum":["environments.revisions.committed","webhooks.subscriptions.tested"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},"type":"array"},{"type":"null"}],"title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookSubscriptionData"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscriptionCreate"}},"type":"object","required":["subscription"],"title":"WebhookSubscriptionCreateRequest"}}},"required":true}} \ No newline at end of file +{"title":"Body","body":{"content":{"application/json":{"schema":{"properties":{"subscription":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Input)","type":"object"}],"title":"LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Input)","type":"object"}],"title":"LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"data":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Fields"},"auth_mode":{"anyOf":[{"type":"string","enum":["signature","authorization"]},{"type":"null"}],"title":"Auth Mode"},"event_types":{"anyOf":[{"items":{"type":"string","enum":["webhooks.subscriptions.tested","traces.fetched","traces.queried","testcases.fetched","testcases.queried","applications.revisions.retrieved","applications.revisions.fetched","applications.revisions.queried","applications.revisions.logged","applications.revisions.committed","queries.revisions.retrieved","queries.revisions.fetched","queries.revisions.queried","queries.revisions.logged","queries.revisions.committed","testsets.revisions.retrieved","testsets.revisions.fetched","testsets.revisions.queried","testsets.revisions.logged","testsets.revisions.committed","evaluators.revisions.retrieved","evaluators.revisions.fetched","evaluators.revisions.queried","evaluators.revisions.logged","evaluators.revisions.committed","environments.revisions.retrieved","environments.revisions.fetched","environments.revisions.queried","environments.revisions.logged","environments.revisions.committed"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},"type":"array"},{"type":"null"}],"title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookSubscriptionData"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscriptionCreate"}},"type":"object","required":["subscription"],"title":"WebhookSubscriptionCreateRequest"}}},"required":true}} \ No newline at end of file diff --git a/docs/docs/reference/api/create-webhook-subscription.StatusCodes.json b/docs/docs/reference/api/create-webhook-subscription.StatusCodes.json index b618d55494..215a1dea31 100644 --- a/docs/docs/reference/api/create-webhook-subscription.StatusCodes.json +++ b/docs/docs/reference/api/create-webhook-subscription.StatusCodes.json @@ -1 +1 @@ -{"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"subscription":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Output)","type":"object"}],"title":"LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Output)","type":"object"}],"title":"LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Fields"},"auth_mode":{"anyOf":[{"type":"string","enum":["signature","authorization"]},{"type":"null"}],"title":"Auth Mode"},"event_types":{"anyOf":[{"items":{"type":"string","enum":["environments.revisions.committed","webhooks.subscriptions.tested"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},"type":"array"},{"type":"null"}],"title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookSubscriptionData"},"secret_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Secret Id"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscription"},{"type":"null"}]}},"type":"object","title":"WebhookSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"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"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} \ No newline at end of file +{"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"subscription":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Output)","type":"object"}],"title":"LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Output)","type":"object"}],"title":"LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Fields"},"auth_mode":{"anyOf":[{"type":"string","enum":["signature","authorization"]},{"type":"null"}],"title":"Auth Mode"},"event_types":{"anyOf":[{"items":{"type":"string","enum":["webhooks.subscriptions.tested","traces.fetched","traces.queried","testcases.fetched","testcases.queried","applications.revisions.retrieved","applications.revisions.fetched","applications.revisions.queried","applications.revisions.logged","applications.revisions.committed","queries.revisions.retrieved","queries.revisions.fetched","queries.revisions.queried","queries.revisions.logged","queries.revisions.committed","testsets.revisions.retrieved","testsets.revisions.fetched","testsets.revisions.queried","testsets.revisions.logged","testsets.revisions.committed","evaluators.revisions.retrieved","evaluators.revisions.fetched","evaluators.revisions.queried","evaluators.revisions.logged","evaluators.revisions.committed","environments.revisions.retrieved","environments.revisions.fetched","environments.revisions.queried","environments.revisions.logged","environments.revisions.committed"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},"type":"array"},{"type":"null"}],"title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookSubscriptionData"},"secret_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Secret Id"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscription"},{"type":"null"}]}},"type":"object","title":"WebhookSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"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"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} \ No newline at end of file diff --git a/docs/docs/reference/api/create-webhook-subscription.api.mdx b/docs/docs/reference/api/create-webhook-subscription.api.mdx index f2f21e7ccb..89b67a78df 100644 --- a/docs/docs/reference/api/create-webhook-subscription.api.mdx +++ b/docs/docs/reference/api/create-webhook-subscription.api.mdx @@ -5,7 +5,7 @@ description: "Create Subscription" sidebar_label: "Create Subscription" hide_title: true hide_table_of_contents: true -api: eJztWV9v2zYQ/yrEPW2AaqfZHgY9LW1aNGu7Bo3bPaSGQYtnm61EqvzjxDUM7EPsE+6TDEdKlmQ7jhOkQDs0L46p493x7nd3P8pLcHxqIb2Ev3A80/qThWECukTDndTqTEAKmUHucHQVBUbWj21mZEnPIQGDnz1a90SLBaRLyLRyqBz9y8syl1nQ0/9otaI1m82w4PRfaciKk2jDelvp1tNJHpxcAleLNxNIL5fAhZAkzPPzjmgj4RYlQgpjrXPkClbJesk6I9U0rOxWA5k0mc+5+ekVH2P+h9Xq0ZkqvfsZklqJHn/EzMFqmICTLqelDWFYbQk3Piif553Nz8MZacv//6yD6qgFOn7Po7bOVa1I5XCKpmu4GHdX2hG6LR7Pfb4/HMkSpMPisE3cGL7Yj4DO1rtF9DVFcpWA4gUeGK8tHX/S3lUCAjuleB9Vpy0VpJG7HTXvTU4fXa0JFPz6Faqpm0F6fPTbLwkUUtULjxOYaFNwByl4I6Gx+M7kZGmGXKA5sH42z3OHeL+o7KwSKPki11yMJhJzcZBlZzzexdh5tMCeRwurBLh3s1Ghxd5cJ4DKF9TbrZwq7rxBiFu1kV9CX4bhPrsn3s3Ya7KySgDnqNyIRDfOWJXAzdZRzaXRqkDlbM/gXFqple1luiikcygggWq22F57DtieQ0vPWy5VU+oZOTMgextwhYuoYMzHObLgMws+s3///odxRs5ljpEZdExP2FpT74P6oN7z3KNl3CATaOQcBZsYXTRSzGrmZsjiIS2zji+YVMwuVNb7oAaacSEYZwqvmN3tSsKkY4W3jk2ksY7htbSOdDSutLB4e9sI29ggJGa1BeI4oKVBQamgktuO5kUr6Kc8NhKLmUF33/q/iLtvcyf0hf3+PA3k41ZNHf5wiMa3kbbAijQ3mqg0w4IttbIR6sdHR/SxibMsQ2snPmdvK2FI7st+Mu3jpo1R1pzjaZAgsE+4zx2kR5SjDdLUZOrbo09vvLsDp4jS3y+B+vqn/c4o1I0B2cuhtnbdgUTdJ6jfNouK9zAx4nvbcoshCe7wkZPBn5utxH4o2EkIli/F1zDyLqqtjAjM8SsYOY1qKyN1uMaLkRQH2vFeioOC9WTBzkQ7Xg9qpY7W2kodsAe1UodrbeXhVFde/6D9P2j/D9r//dH+B2wy8SZQNZhv5VKxw8wurXs0rDn/Klwgfj0+3r4ivOe5FKHe2DNjtLn//UCg4zJ0zXXVdQVynXWe3oXrDTdR16KoOjoYiKad7qr2hjpZy6fYQPhm0RCMgNwwdMLLLhKvZ0f99itz1y01W1l5SrG8vh0PFJvofiXXwkaTopihm0NxGlOwDyYvBoPzLYURH11gRBLBLrov0gt0M03v20ttSW3JafRBv26S/U6T7AOVk5mHqXdZTVXo81KGJMevM+dKm/b76HtZrr3o8Skqx3tcRsFhKElvpFsEJSfnZy9xEYccpJfDtsAFYTOirSu2zhAv5UukmEX6HOZIM3Io0+RS3EVBIdS/bX49eHbNizLHXb8G1BfY5nLX3HzWdL0BWjfazXJFR2Js1ssNd9g11btTtzNSO6PxgHk3bHXAdUGGCpjodgGchCSxk/OzrbN0HlEz4VmonTri4TEkG+lvsk5eF6GVgENe/L5+QsgnLEUzR73HvaNAcrR1BVctE7uxu3HZqQBB5dkvcy5DA6l4X4T15Xr2Q/c9Bn2nCp1REaSXsFyOucV3Jl+taPmzR0NYHSYw50bSjA1ArdMYYPwJF3V/UO5RxRfmNOMDSjf6LpVL3HGSZVi6vbLDVp2ev7kYQALj6pevCiGGX1ED4leQAtBPafFU6TKuLSHnauqpVaYQddLffzwpi7Y= +api: eJztWl9vGzcM/yqCnjbgaqfZHgY/LW1aNGu7BonbPaSGQd/RtlqddJV0TjzDwD7EPuE+yUDpfH98Z8cJUqDdkpfYJEVSFEnxd+cVdzCzfHDF/8DJXOvPlo8irjM04IRWZwkf8NggOBxfB4GxzSc2NiIjPo+4wS85WvdMJ0s+WPFYK4fK0UfIMilir6f/yWpFNBvPMQX6lBmy4gRaT68rbXGn0ju54qCW76Z8cLXikCSChEGeN0QrCbfMkA/4RGuJoPg6KknWGaFmntKthsfCxLkE88MbmKD8zWr15ExlufuRRxslevIJY8fXo4g74SSRtoT5uiVc+aByKRuLX/o90pL//l6HxVZTdHDPrdb2VVCEcjhD0zScTpqUeoRui8fLXO4PR7TiwmF62CIwBpb7M6Cx9G4RfUuRXEdcQYoHxqul43dau454go1SvI+q05oK0giuo+ZzI+lfU2vEU7h5g2rm5nxwfPTLTxFPhdoQnkZ8qk0Kjg94bgSvLL43kizNERI0B9bP9n7uEO9XhZ11xDNYSg3JeCpQJgdZdibHuxg7DxbYy2BhHXHI3Xyc6mTvWUccVZ5Sb7dipsDlBnlYqo340/dlPtpn9yR3c/aWrKwjjgtUbkyiW3ssSmC39eLisL16k7c9h9ZhQkdoIEbbm6KL53XClxyNCAS0LgbbFCpplVztxrE9gwthi0/OCFzsE6n07hC41YjUs9k+fqzTVLiw46Bsl4ttbuVdm1c51uaVPrVZdXcolBbdLn862M1j2GI2z22LWbrUwav7hAuQOThtdnnVKVD51cmuPOtkl751chveqYUwWqWodkZth0jNw26Bmo/dApWX3fzKz1opF9PdCyriIdXpVpvnl6E2JzCRyHytM1/r7J+//mbAqKhjx6iC0TE9ZaWm3kf1UX0AmaNlYJAlaMQCEzY1Oq2kmNXMzZGF5mCZdbBkQjG7VHHvoxpqBknCgCm8ZrbblYgJx9LcOjYVxjqGN8I60lG5Uuvht1+3fhkb+oa2bjX/MNgKgwm1MLqq2tG8rPWzUwgXsMXYoLvvvXkZVt/mjr9P9/vz3A/tt2pqzN2HaLwI4z5fk+ZKE11pnmAzrWy4Io6Pjujfdp7FMVo7zSW7KIR5dF/UEOs8LNoaAat9PPcSlOxTyKXjgyM6oy2wUZ3Utwc73uXuDrN4kP5+gcfX3+13Bj12BmQv9mitugP4uE9Qv230EZ5fJGPY25ZryCIBh0+c8P7sthL6YcJOfLDyLPkaRt4HtYWRBCV+BSOnQW1hZBOuyXIskgPt5LlIDgrWsyU7S+rxelArm2iVVjYBe1Arm3CVVh5OdeH1I1x+hMuPcPkRLj/C5Ue4/H+Ayw94OQcEXVzM3woY7zDTpXWPhhIrrz3w/vn4uA2tP4AUiW+k7IUx2twfVyfoQPhpo7ytmgJSxw3uXTDSaDvratBOBwc9QLOzrluyghzWwgyrFN4t6oPhM9cPa/7lColvZq7N25bY3dTUtE7lOcXy5vZ8oNgE9wu5Wm5URxROaHcoTsMR7EuTV8PheUthyI9mYoThm102X9ym6Oaa3u9m2pLaDGhk5P3N/NFvzB99TuVkFn5avCqmUd6HTPhDDl/nzmWDfl/qGORcWxfYI1+IuRFu6ZeenJ+9xmUYCfngalQXuKSMDDnWFCvPBTLxGilSAWz6qasa0Oh8yZGwikJBuX5RvaN+cQNpJrHrnfPmcU/1KKR6TlCC2yq9mjGuyMXwHiJSkqtJu2sGbs6ojQG0MUjeNh2Oak2vrEGf9FNdz/mTGSoH7OT8rLWRBov6B8S+XDbh9mwe1U7cDvp98OQeCMoTTH334A4h/bXkULJT+gQzR72nvSOPB7R1Kaiaie503XouUGQDVWQ/kyB8zyggUsjkKla8+ciPvlNRUoaS2Go1AYvvjVyviUwTBSXqKOILMIKuVZ+lmzP0OfwZl5uWoNyTYkSgMSik6FarpQoJK07iGDO3V3ZUK83zd5dDHvFJ8eOKIj0MXFPPgWs+4Jx+rRF2NVgF2opLULOcuuOAB5309y84G/pE sidebar_class_name: "post api-method" info_path: reference/api/agenta-api custom_edit_url: null diff --git a/docs/docs/reference/api/edit-webhook-subscription.RequestSchema.json b/docs/docs/reference/api/edit-webhook-subscription.RequestSchema.json index dc90db72ae..e48c779bc1 100644 --- a/docs/docs/reference/api/edit-webhook-subscription.RequestSchema.json +++ b/docs/docs/reference/api/edit-webhook-subscription.RequestSchema.json @@ -1 +1 @@ -{"title":"Body","body":{"required":true,"content":{"application/json":{"schema":{"properties":{"subscription":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Input)","type":"object"}],"title":"LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Input)","type":"object"}],"title":"LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Fields"},"auth_mode":{"anyOf":[{"type":"string","enum":["signature","authorization"]},{"type":"null"}],"title":"Auth Mode"},"event_types":{"anyOf":[{"items":{"type":"string","enum":["environments.revisions.committed","webhooks.subscriptions.tested"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},"type":"array"},{"type":"null"}],"title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookSubscriptionData"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscriptionEdit"}},"type":"object","required":["subscription"],"title":"WebhookSubscriptionEditRequest"}}}}} \ No newline at end of file +{"title":"Body","body":{"required":true,"content":{"application/json":{"schema":{"properties":{"subscription":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Input)","type":"object"}],"title":"LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Input)","type":"object"}],"title":"LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Fields"},"auth_mode":{"anyOf":[{"type":"string","enum":["signature","authorization"]},{"type":"null"}],"title":"Auth Mode"},"event_types":{"anyOf":[{"items":{"type":"string","enum":["webhooks.subscriptions.tested","traces.fetched","traces.queried","testcases.fetched","testcases.queried","applications.revisions.retrieved","applications.revisions.fetched","applications.revisions.queried","applications.revisions.logged","applications.revisions.committed","queries.revisions.retrieved","queries.revisions.fetched","queries.revisions.queried","queries.revisions.logged","queries.revisions.committed","testsets.revisions.retrieved","testsets.revisions.fetched","testsets.revisions.queried","testsets.revisions.logged","testsets.revisions.committed","evaluators.revisions.retrieved","evaluators.revisions.fetched","evaluators.revisions.queried","evaluators.revisions.logged","evaluators.revisions.committed","environments.revisions.retrieved","environments.revisions.fetched","environments.revisions.queried","environments.revisions.logged","environments.revisions.committed"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},"type":"array"},{"type":"null"}],"title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookSubscriptionData"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscriptionEdit"}},"type":"object","required":["subscription"],"title":"WebhookSubscriptionEditRequest"}}}}} \ No newline at end of file diff --git a/docs/docs/reference/api/edit-webhook-subscription.StatusCodes.json b/docs/docs/reference/api/edit-webhook-subscription.StatusCodes.json index b618d55494..215a1dea31 100644 --- a/docs/docs/reference/api/edit-webhook-subscription.StatusCodes.json +++ b/docs/docs/reference/api/edit-webhook-subscription.StatusCodes.json @@ -1 +1 @@ -{"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"subscription":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Output)","type":"object"}],"title":"LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Output)","type":"object"}],"title":"LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Fields"},"auth_mode":{"anyOf":[{"type":"string","enum":["signature","authorization"]},{"type":"null"}],"title":"Auth Mode"},"event_types":{"anyOf":[{"items":{"type":"string","enum":["environments.revisions.committed","webhooks.subscriptions.tested"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},"type":"array"},{"type":"null"}],"title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookSubscriptionData"},"secret_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Secret Id"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscription"},{"type":"null"}]}},"type":"object","title":"WebhookSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"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"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} \ No newline at end of file +{"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"subscription":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Output)","type":"object"}],"title":"LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Output)","type":"object"}],"title":"LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Fields"},"auth_mode":{"anyOf":[{"type":"string","enum":["signature","authorization"]},{"type":"null"}],"title":"Auth Mode"},"event_types":{"anyOf":[{"items":{"type":"string","enum":["webhooks.subscriptions.tested","traces.fetched","traces.queried","testcases.fetched","testcases.queried","applications.revisions.retrieved","applications.revisions.fetched","applications.revisions.queried","applications.revisions.logged","applications.revisions.committed","queries.revisions.retrieved","queries.revisions.fetched","queries.revisions.queried","queries.revisions.logged","queries.revisions.committed","testsets.revisions.retrieved","testsets.revisions.fetched","testsets.revisions.queried","testsets.revisions.logged","testsets.revisions.committed","evaluators.revisions.retrieved","evaluators.revisions.fetched","evaluators.revisions.queried","evaluators.revisions.logged","evaluators.revisions.committed","environments.revisions.retrieved","environments.revisions.fetched","environments.revisions.queried","environments.revisions.logged","environments.revisions.committed"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},"type":"array"},{"type":"null"}],"title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookSubscriptionData"},"secret_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Secret Id"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscription"},{"type":"null"}]}},"type":"object","title":"WebhookSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"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"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} \ No newline at end of file diff --git a/docs/docs/reference/api/edit-webhook-subscription.api.mdx b/docs/docs/reference/api/edit-webhook-subscription.api.mdx index cc52d76c65..a8cf7e39d0 100644 --- a/docs/docs/reference/api/edit-webhook-subscription.api.mdx +++ b/docs/docs/reference/api/edit-webhook-subscription.api.mdx @@ -5,7 +5,7 @@ description: "Edit Subscription" sidebar_label: "Edit Subscription" hide_title: true hide_table_of_contents: true -api: eJztWetu2zYUfhXi/GoB+RLn1urX0iZFs7ZrkDgdsNQIaOnIZiuRKkkl8QwBe4g94Z5kIClZFzuOE6RAuyV/HJPnxsPD73w056DpRIF/Ab/jeCrEVwUjD0SKkmom+HEIPmDI9OW1m75U2VgFkqVmFjxIqaQJapTGxhw4TRB8qAtdshA8YBx8SKmeggcSv2VMYgi+lhl6oIIpJhT8OehZatW1ZHwCHkRCJlSDD1lmrWimYyNwVrNPjkPI85Ezi0q/EuHM2Gp7CQTXyLWZomkas8AusPdFCW7GqiBSaZavGSo7Xl/v0mwU2+zNgfLZx8imgIYhM8I0PmmIVhLFKsdCxEg55F574WZktRkImAyymMpn7+kY41+V4J1jnmb6ucmOMyLGXzDQYFJS5qslDPmScBUDz+K4ofzGrtGo/PfXOiyWmqCmD1xqbV3FCOMaJyibjpNxc6Seobvy8SaL16fDmwPTmGymRKWks/UV0FC9X0Y/mEzmXoEMG+VrycZvRjf3IMTGUXyIqcOaidyDQCLVGF5Svc5gDYhCqrGjmY3ndi+vnVlyYJOVpeH3cHLuzBZOQozxOzg5dGYLJ2W6xjOD6pv5sdC9SbJezSyUV/l6VC9lthZeyoQ9qpcyXQsvj2e6iJrqFU0qk/Gq9pnQm/fIJ3oK/qD/YtuDhPFyYKvuW7Jacz2XsfE0RRratr4JCrYP4D0A4m3hJzdkYhYLGl5GDONwI8+utW/u7MR5IG+ch9wDmunpZSLCteDkAfIsMSxJsQmnOpMITlVI9qclEjBa5/cg01PywXjJPcAr5PrSiLbWWGD27d6RXzEpeIJcq67EK6aY4KobiCRhWqOhSAVPU906cVFdjcrM10Iq+N6RCWZo/LXwtSRZYzqOkdiYiY2Z/PPX34QSE1ygiXGDmoiILCx1P/PP/BONM1SESiQhSnaFIYmkSCopogTRUyRukYooTWeEcaJmPOh+5kNBaBgSSjheE7U6FI8wTZJMaRIxqTTBG6a0sVGFUqvFu/ucVSNDuzH5UhHXieuFPXLL2awT00PqOp/CQOJaVF4X05nTvisciwvr4zkK2d12GnT3bnunjnNDnhvDElUquHJlPej3zUe7poIAlYqymJwWwvBgah6IzCm1eFattVgJU9gRzWINft/sR4vRV7vy43H7j5m+B+F10j8vu//+q/3J+P2tCVlL8Je07sHwH5LUJ4r/RPGfKP4TxX+i+E8U//9M8R8RZBzrLwDmR7lArHCzyuoaCwvO7+4LO4PB8hXhE41ZaM8bOZJSyIffD0LUlFnUXJy6pkAsgsbsfbjeqF11NYoqXICWaKrJqtNeUSel6ASrEr5d1CbDVq5tOvaXWCNe9o7yp9lA39TMLO3Ka5PLm7vrweTGhV/I1Wqj2iK3Q7en4tBtwboyeTscniwZdPXRLAxz3yRnzeenBPVUmDcqs3jPPTD50CsRstdAyN689S6Vgzlc8qp8vbI9Fno0ZXbL3dep1qnyez3MukEssrBLJ8g17VLmBEf2gGaS6Zk1cnBy/A5nruWBfzGqC5yZSnW11xRb7BdN2Ts0GSxe0g4aDah4R3N922bVnIHT6uHr6IYmaYyrHq7K62x11avuQQvyXpVdM/eL4TqbhkF/sNPp73cGL4dbu/7ulj940e3vb/0BTUK8Tq7OadfJtWgpbEf0xW60t9PZ3d/a7+zs7g064+0o6AyCl3vb0d4ejegeLPHMTdVaxHFTtXu5KFieK7JFfitKtoosNclMg6k0GMcGNGJUaywLnLPAEok6rhzYaicHJ8dLRdGYMhhNAwtJZenaabMJjXNUHR8TdWIRGjTS5JfFjAEUcyidm353q9u33FEonVBec7EKElo3yOJcGczrpTFlFpULMu3g4mJBqKD545D57refskceTIXSRm0+H1OF5zLOczP8LUNpIGDkwRWVzBAZCwghU+b/EPyIxgqXIlx0N3h2WgDwc1Jd3puRlzDBDUZcGQIGPoAHX3G24t3ddqlpCUXzQuq1c9gpKGFpZam1Ggx0GgdBgKleKzuqgfHJ+RA8GBcP8UWxSnptWgy9dgGLIsXmpd6MzSGmfJKZZuiDM2n+/gXbLi2I +api: eJztWm1v2zYQ/ivEfVoB+SXOW6tPS5sUzdquQeJ0wFojoKWTzVYSVZJy4hkG9iP2C/dLBpKy3u04QQq0g/MlNu94dzwe7+6huQBFJxLcT/AHjqecf5UwcoAnKKhiPD73wQX0mbq5teQbmY6lJ1iiqeBAQgWNUKHQMhYQ0wjBhTLTDfPBARaDCwlVU3BA4LeUCfTBVSJFB6Q3xYiCuwA1T8x0JVg8AQcCLiKqwIU0NVIUU6FmuCrJJ+c+LJcjKxalesn9uZZV1+LxWGGsNIkmScg8s8DeF8ljPVYYkQi9fMVQmvHyehvUIDTeWwCN5x8C4wLq+0wz0/CiwlpwZKsccx4ijWHp1BeuR9rFgMeEl4ZU/PKOjjH8TfK4cx4nqXqmvWOF8PEX9BRol6z8VWOGZYO5sCFOw7Ay+bVZo57y/1/rMFtqhIo+cqmldWUjLFY4QVFVHI2rI2UP3eeP12m42R3OApjCaLtJVAg63xwBlakP8+h77cmlk2WGrfzVkPG7nrt0wMfKUXyMqNOSiKUDnkCq0L+hapPAUiLyqcKOYsae9VpeWbHkxDgrTfzvoeTais2U+Bjid1ByasVmSlbuGs91Vt9Oj0nd2zjr5dyk8sJfT6pl5a1cy8phT6pl5a5cy9OJzqymqqVIpSJsK58RvXuH8URNwR30n+87ELF4NbBX1i1Yqbhei1BrmiL1TVnfJgvWD+ADEsSbTM9SNxPzkFP/JmAY+ltptqV9e2UXVgN5bTUsHaCpmt5E3N+YnBzAOI10lyTZJKYqFQh2KhfsL9NIwGiT3pNUTcl7rWXpAM4wVjeatbbGLGev1541YbJb7kpkV6FUaPojQT2U3QCVNy0PfEtRMDuAUnlUVpnysYKv1CLJrsAZk9knJRjONrEUctcw3Ksk5JPJJrrHo4gpu2IrbJ2JTWphXZNWGNak5TY1SWVztCslqnX2tJCr21AjVvetRsxNaqGVbcIZDVOquFhnVStDYVcrubCslZzb1kqtWBfPmOBxhPFar61hKVnYzlCysZ2hsLKdXthZOsoZTjrTh3ioz2mtL1mBkzEdh0jMWSfmrJN///6HUKIPtaeIPsGoCA9ILqn7Of4cf6RhipJQgcRHwWbok0DwqOAikhM1RWKTgyRS0TlhMZHz2Ot+joecUN8nlMR4S2S7KQ5hikSpVCRgQiqCd0wqLaMwpZTD7+8PzTQyNAlt2Uj+ZcD3yZSqpjfLgO6U2o5RoidwYzezyaYrO/s+c0w93WzPmc/ul1OBiffLu7RYFZZLLVigTHgsbTkY9Pv6Xz2mPA+lDNKQXGbM8GhI6/HUTqrhk1JLZjh0YAc0DRW4fb0fNSRc7MqPh4k/pOoBQNFy/7yo+Puv9ifDxWsdshEYN2Y9ABk/xqk7aLyDxjtovIPGO2i8g8Y7aLyDxjtovIPGD4HGT1icLVrOCvOPArxb1LRJ3SAhx8oWZx8MBk1o/ZGGzDeJlJwJwcXjcbWPijLTbeTVqsoQcq9CfQhGGtWjrgTtuDXQADQ5aauSBeSQkk6wCOH1rMYZJnJNs2Z++dPsq55r9VOgp+5KYhq78kr78u7+eNC+seZnfKXYKLbI7tB6V5zaLdgUJm+Gw4uGQBsf1cDQ9zTkqvrcIUI15fpNhF68Yx80uNBbNR+9SvPRW9TeQSxBHy4xW72WML0p9GjCzJbbr1OlErfXC7lHwymXypJH5limgqm5mXpycf4W57ZBBPfTqMxwpePTRlyVLd8lmrC3qP2Wvdc4qbRr2WsN2+UaX+rIvyyeV5zd0SgJse15xOryp7gYKW4NcqhbBFvV4/lwGXvCoD846PSPO4MXw71D93DPHTzv9o/3/oQqfNzEV0aAm/hqIA72A/r8MDg66Bwe7x13Dg6PBp3xfuB1Bt6Lo/3g6IgG9AgaqGzbaTWYte20B6nIMJENrdy/BYBpgxbV1r/S11f68/ua7lGpluSpzeSSgJdTyckEY0XJycV5IyIqJJ2WqWey0CpuDVnvQH50pNvrUTPcpaynTY5MUgaFNPo1p+gcos+hVdPv7nX7BmZxqSIal1S0ZYHaZUt2qHSa6yUhZSYRZ7jTZojCU1C9R9Xf3fprqZED+uDraYvFmEq8FuFyqYd126bP/8iBGRVM9y4mG/hM6s8+uAENJTYszAsa/HKZ5dxnpLjnqlq+yhGxThC6R9XfwIGvOG952mUK03SVhxYZ1yursJN1gSspjWqq056dceJ5mKiNvKNS/r24HoID4+ytVxapgt7qqkJvrcE8c7F+DKbHFhDSeJLq+ueCFan//gMnXpwW sidebar_class_name: "put api-method" info_path: reference/api/agenta-api custom_edit_url: null diff --git a/docs/docs/reference/api/fetch-webhook-delivery.StatusCodes.json b/docs/docs/reference/api/fetch-webhook-delivery.StatusCodes.json index 07556ef13f..21b0328241 100644 --- a/docs/docs/reference/api/fetch-webhook-delivery.StatusCodes.json +++ b/docs/docs/reference/api/fetch-webhook-delivery.StatusCodes.json @@ -1 +1 @@ -{"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"delivery":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","title":"Status"},"data":{"anyOf":[{"properties":{"event_type":{"anyOf":[{"type":"string","enum":["environments.revisions.committed","webhooks.subscriptions.tested"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},{"type":"null"}]},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"},"response":{"anyOf":[{"properties":{"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"type":"object","title":"WebhookDeliveryResponseInfo"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["url"],"title":"WebhookDeliveryData"},{"type":"null"}]},"subscription_id":{"type":"string","format":"uuid","title":"Subscription Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"}},"type":"object","required":["status","subscription_id","event_id"],"title":"WebhookDelivery"},{"type":"null"}]}},"type":"object","title":"WebhookDeliveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"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"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} \ No newline at end of file +{"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"delivery":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","title":"Status"},"data":{"anyOf":[{"properties":{"event_type":{"anyOf":[{"type":"string","enum":["webhooks.subscriptions.tested","traces.fetched","traces.queried","testcases.fetched","testcases.queried","applications.revisions.retrieved","applications.revisions.fetched","applications.revisions.queried","applications.revisions.logged","applications.revisions.committed","queries.revisions.retrieved","queries.revisions.fetched","queries.revisions.queried","queries.revisions.logged","queries.revisions.committed","testsets.revisions.retrieved","testsets.revisions.fetched","testsets.revisions.queried","testsets.revisions.logged","testsets.revisions.committed","evaluators.revisions.retrieved","evaluators.revisions.fetched","evaluators.revisions.queried","evaluators.revisions.logged","evaluators.revisions.committed","environments.revisions.retrieved","environments.revisions.fetched","environments.revisions.queried","environments.revisions.logged","environments.revisions.committed"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},{"type":"null"}]},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"},"response":{"anyOf":[{"properties":{"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"type":"object","title":"WebhookDeliveryResponseInfo"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["url"],"title":"WebhookDeliveryData"},{"type":"null"}]},"subscription_id":{"type":"string","format":"uuid","title":"Subscription Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"}},"type":"object","required":["status","subscription_id","event_id"],"title":"WebhookDelivery"},{"type":"null"}]}},"type":"object","title":"WebhookDeliveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"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"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-webhook-delivery.api.mdx b/docs/docs/reference/api/fetch-webhook-delivery.api.mdx index c33c0b8a18..8e7dfb68b9 100644 --- a/docs/docs/reference/api/fetch-webhook-delivery.api.mdx +++ b/docs/docs/reference/api/fetch-webhook-delivery.api.mdx @@ -5,7 +5,7 @@ description: "Fetch Delivery" sidebar_label: "Fetch Delivery" hide_title: true hide_table_of_contents: true -api: eJy1WM1uGzcQfhViTi2wlRy3h2JPdWy3MZKiRmynB1swqOVIYrJLbshZxYqwQB+iT9gnKYbcXa2sHyuGc7K9HH4znPnmz0sgOfWQ3sLfOJ5Z+8nDKAFbopOkrblQkMIEKZvdf4nn9wpzPUe3gARK6WSBhI4BlmBkgZBCK3CvFSSgDaRQSppBAg4/V9qhgpRchQn4bIaFhHQJtCj5qienzRQSmFhXSIIUqiqgkKacBc4abHGhoK5HDOlLazx6Rjk+OuIfCn3mdMn2QwpXVZah95MqF+8bYUggs4bQEIvLssx1Fp47/Oj5zrJnWenYGaSjhsxW8VJjsDaEU3Q9C0+DRAIKJ7LKCdKjOulcEtSZxV+T4K9H0A4lobqXtC610zVKEv5EukCok07MVHkO7JjOnggrTgjqBKpSfQ8lNxG2UaIwx++g5CzCNkpad40Dzw7TE8h0iLNeR4Kt/PWiWlpvdVpah72oltZdnZaXg454niRVfjNHOJCeZFHuTexVzFe4193NOmlu7jZ4n4HX/J1JYtWzMU75bp1Agd7L6bNh/myuR4dln8jJ7NlgVyuEunMR2PFHzAjWxDgyzCxJcl/RwTkaun/K1QmgqQpuEmjm2llToCE/cDjXXlvjB5ktCk2EXKqbPuEHvhp3ddgPCD2f9x7TNJxzNiEELNmo3AFgLMc5imCpYLu8+O+ff4UUbFxGgtUgCTsRHdLgztyZDzKv0AvpUCh0eo5KTJwtVlLCW0EzFPGRXniSC6GN8AuTDe7MtRVSKSGFwS/CbzclEZpEUXkSE+08CXzQnhhjZcqWeHJdcfm27Cjkwzs0U5pBenz0688JFNq0H171M9TpXrhvXM6xnqFUoRX3AymV0uxOmV+uJ+kjzj3i0j4Svmn01DwALHIr1SEqY8c/XMtlA12vevw+IsdidL8z4dtG/UR2UeVFm/hjqxbPTdTXfHdfijbkb+eZdjK5MBO7nTHonHXPNec8XN5mz2okuw2k3MzP1sQzLiVbTesnetPADp3nrnpXmzYVS9K3wYR0izPh/ic2PWvT5p7e3S7Y9vxvjzHUNd/65fh4c1j9IHOtwigqYsyePakqJKlDkdGExZY2ndts7fQAXnVJNFq9WjonF71Hv7PRwNA6/XRbFLe0xrYD7RINzhBtW9emrOIU3g4k4QM3fHrowWxE5JR9+UBP0oR9E81v5HqcWIWoyaqdrjiLIdhHkTfX15cbgJEf68T4nXcwcbbavQqkmeXtbIoUVjHuETBsu++wWTk0+uGyt5HVzH1083ZnC40IhrLUIdDxzxlR6dPhEKtBlttKDeQUDcmB1FFwxBhZ5TQtAsjJ5cVbXMS+AOntqC9wxfyMjFsX66IkS/0W+UnN/nhS0cw6/TXSqNkgY3MLvtRcI3vBPwnGiZPLi40JYu2IE0lmgTetpnAMyaNnr17LZaEIaQSEsvitO+Gosw+jmqPBq8FR6IfWUyFNT8VG3NYM7HzArByWudQhb5rpIMb0tpuooFskOYUTSPub9iiBmfXE8svlWHq8cXld8+fPVdg8b0cJzKXTPMKEqCnt+XcF6UTmHjdM6woP/PC+yY0fBSTbTW5jafiNcx69IAVI4BMuHv1LIBSPWcuVZSNxkmVYUu/uRq1jUnWk/+P8Gur6f8RkvHs= +api: eJy1WN1u2zYUfhXiXG2AZqfZLgZdLU2yNWiHBU3aXTRGQEvHNluJVMkjN64hYA+xJ9yTDIfUnyPZSYP0Ko7O38fzT26B5NJB/AH+xvnKmE8OZhGYAq0kZfRFCjEskJLV7ZdAv00xU2u0G4igkFbmSGhZwRa0zBFiaBhuVQoRKA0xFJJWEIHFz6WymEJMtsQIXLLCXEK8BdoULOrIKr2ECBbG5pIghrL0WkhRxgxntW5xkUJVzVilK4x26FjL8dER/0nRJVYVjB9iuCqTBJ1blJl4WzNDBInRhJqYXRZFphJ/3OlHxzLbHrLCsjNIBQuJKYNQDVhpwiXaHsJTzxFBigtZZgTxURW1LvHm9OavhffXPdUWJWF6K2mXa69rUkn4E6kcoYpaNl1mGbBjWjxBrTghqCIoi/R7GHkX1NZGUszwOxg5C2prI4275j7PHmfHJ9NjnPUyJFjnr2e10nirtdI47FmtNO5qrTyf6qDPkaTSDWuEA+lI5sXBwu5i3um9biWrqJbcD/gQwGv+zkli0ifrOGXZKoIcnZPLJ6v5sxYPDks+kZXJk5VddRqq1kVg5h8xIdhh48hwZkmSh5oOrlHT7UOujgB1mfOQqIeAm7hy3jZZNyF0hL5PMzY38ROj/+FziVaFD+gokW6Xqf3W8fW6sptYXCtX/yKrcH2IpdO7h+FBI5lZLg/RE5PnisKJg7J9EIfUDt2Q1gEb0lpMQ1IfDrvSIe3DM0LeDcM94m7c7hFbSCO0PiZcy6yUZOw+VKMMHa5RcodslNxiG6XuoNNrZY3OUe/12h6WHsJxhh7GcYYO5Ti9w9lrAvWids6l6xtdNNh4fG3O5TxD4StccD078d8//wopuKgTElzBSMIsRKtpcqNv9HuZleiEtChStGqNqVhYk3dcwhlBKxShOTjhSG6E0sJtdDK50ddGyDQVUmj8Itw4lEgoEnnpSCyUdSTwTjliHR2UkT7I89hmY1Mll3dvUC9pBfHx0a8/R5Ar3Xx40Z9sVvXa5DubcY9coUz9CttvgDJNFbtTZpe7w+1er77Xgw8171e1nYoX501mZPoYk2FTfryVy1p11e3GhwZAGOK3ewdls+A+MJWodKIZmHOTbp464F6y7KHRVid/cw9oNvoLvTDjGYPWGvtUOOdeeAxPd5X54JNyWJ8NxDMewaPQ+jO0Xvweew+66onW610Y5d+mxpdbuEsdPmK96w0x9+zud8HY8b89xlBVLPXL8fHwkvdeZir1c1qEmD35hpciSeWbjCLMR9bbzCQ71EfkVVtEs+7U0lq56R36jQkA/crplmNRHFkpm81tH6t3hmjWYaWLMtxem0Xef+BFme56agYROWVf3tGDacK+CfBrvl5OdCGqq2qvK85CCA6lyKvr68uBwpAfu4nxO89ocda9WeRIK8OvGksk/4TBMwKmzWI7ra/qCt1023vJqDj30a6btw4/iGAqC+UDHf5dERXxdJqZRGYr4yiQZyyZlFbRxoueXF68xk2YBhB/mPUZrjgrQ57tsrWxkYV6jXyQ+rXlpKSVseprSJ76vSWMNO9BxZ2xF/KTJWqS4uTyYrA37JC4fGTis6Wx5MkQ9Q7r4ulU+s8TqabcDHJfPEAo899aCseaPRfMHE1eTI78FDSOcql7JgbR2gHY+oBzcVpkUvlqqXeCEMnuigLtswsXbgRx/11qFgEHiPm327l0+M5mVcWfeWfjOM0iWEureHHxUUuV498pxAuZORxAa9sN/PC2rogfBUTjkJtYaj4jL6j8H0TwCTf3HtB8y1g1ubKtOU6SBAvqyQ46HCdVm+p/nF9DVf0PY0jyuQ== sidebar_class_name: "get api-method" info_path: reference/api/agenta-api custom_edit_url: null diff --git a/docs/docs/reference/api/fetch-webhook-subscription.StatusCodes.json b/docs/docs/reference/api/fetch-webhook-subscription.StatusCodes.json index b618d55494..215a1dea31 100644 --- a/docs/docs/reference/api/fetch-webhook-subscription.StatusCodes.json +++ b/docs/docs/reference/api/fetch-webhook-subscription.StatusCodes.json @@ -1 +1 @@ -{"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"subscription":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Output)","type":"object"}],"title":"LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Output)","type":"object"}],"title":"LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Fields"},"auth_mode":{"anyOf":[{"type":"string","enum":["signature","authorization"]},{"type":"null"}],"title":"Auth Mode"},"event_types":{"anyOf":[{"items":{"type":"string","enum":["environments.revisions.committed","webhooks.subscriptions.tested"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},"type":"array"},{"type":"null"}],"title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookSubscriptionData"},"secret_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Secret Id"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscription"},{"type":"null"}]}},"type":"object","title":"WebhookSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"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"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} \ No newline at end of file +{"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"subscription":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Output)","type":"object"}],"title":"LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Output)","type":"object"}],"title":"LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Fields"},"auth_mode":{"anyOf":[{"type":"string","enum":["signature","authorization"]},{"type":"null"}],"title":"Auth Mode"},"event_types":{"anyOf":[{"items":{"type":"string","enum":["webhooks.subscriptions.tested","traces.fetched","traces.queried","testcases.fetched","testcases.queried","applications.revisions.retrieved","applications.revisions.fetched","applications.revisions.queried","applications.revisions.logged","applications.revisions.committed","queries.revisions.retrieved","queries.revisions.fetched","queries.revisions.queried","queries.revisions.logged","queries.revisions.committed","testsets.revisions.retrieved","testsets.revisions.fetched","testsets.revisions.queried","testsets.revisions.logged","testsets.revisions.committed","evaluators.revisions.retrieved","evaluators.revisions.fetched","evaluators.revisions.queried","evaluators.revisions.logged","evaluators.revisions.committed","environments.revisions.retrieved","environments.revisions.fetched","environments.revisions.queried","environments.revisions.logged","environments.revisions.committed"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},"type":"array"},{"type":"null"}],"title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookSubscriptionData"},"secret_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Secret Id"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscription"},{"type":"null"}]}},"type":"object","title":"WebhookSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"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"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} \ No newline at end of file diff --git a/docs/docs/reference/api/fetch-webhook-subscription.api.mdx b/docs/docs/reference/api/fetch-webhook-subscription.api.mdx index bdd2292613..0783a2a2f9 100644 --- a/docs/docs/reference/api/fetch-webhook-subscription.api.mdx +++ b/docs/docs/reference/api/fetch-webhook-subscription.api.mdx @@ -5,7 +5,7 @@ description: "Fetch Subscription" sidebar_label: "Fetch Subscription" hide_title: true hide_table_of_contents: true -api: eJzlWM1y2zYQfhXMnpIZRnLcHjo8RY3jxk3SeGI5PTgaDUSuRCQkwABLxaqGM32IPmGfpLMAJZGSLCse59STLWH3+/YPuwstgeTMQXwDf+IkM+aLg1EEpkQrSRl9kUIMU6QkG38L52NXTVxiVcnHEEEprSyQ0DLIErQsEGJoC41VChEoDTGUkjKIwOLXSllMISZbYQQuybCQEC+BFqVXJ6v0DCKYGltIghiqyqOQopwFrlr44iKFuh4xrCuNdugY6fTkhP+kuDGW1ZIEnZtWufjQCEMEidGEmlhclmWuEu96/7NjnWXLutJyYEgFhsRUQakxWmnCGdqWlS+9RAQpTmWVE8QnddQJjafUi/dTH7su/DT3iWkLyDRVrCbzy47oRqIxZWJMjlJDHW2HlL/ZDwOJskmVS/vkrZxg/rsz+tn7isqKnrJLAcVMPmNCwNFeObktDfWO9MYKXeV5R/vce8kq/wdvh42zBZJ8oLMtz7bqrkNcTLrftGN0X0TOq/yegERLUITFkVrSWrk4XAVd3e8L6jsOZh01reeokO1g/MG6ddRtFw+DOmtB1BEkFiVhOpZ0CLDV6VJJ+IyUt+dulpcBVgx8sKoy/REk1wG2IUkxxx9AchZgG5JVuCYLHhvH8fjZcEywfl34WbGJ16OyrKK1ZlkF7FFZVuFaszwedGO1pD3DrrL5vvlcyNu3qGeUQXx68stPERRKr7543ua2qjUXr23OTBnK1O8NxzTC7Qv4HQ3idcNT87ayyI1Mx1OFeXoUc9hQjie7DAziPDDUEciKsnFh0oPNKQLUVcF7mFMzLamyvJmwqrHqL7+QwOgQ76CiTLxjljoCnKOmMYtu+dh07bvZUc+VNbpATa5nca6cMtr1ElMUigh5B2sWQddrbzKuR+j4vGVSs1G+YmOGzBftrGMeYCInOQpvs/A2i3///kdIwcYlJJgGSZipWCP1PulP+qPMK3RCWhQpWjXHVEytKTZSwhlBGYrgpBOO5EIoLdxCJ71PemiETFMhhcZvwu03JRKKRFE5ElNlHQm8VY4YY2NKqxbvH3ReTQx9YuqdIm5vxjf+yu1Gs735nskw+RwmFukRm8yVB2waTEB/6DgMUPc667vOYW/30OxDPYCw3vnrmjV/Pj3dfSJ8lLlK/X0Tr6w19uHvgxRJKt8117euK5CbpHP6PbveaLvqWiuqCQb6RdPN9t32zerknJzhpoTvFvXB8JXrh47mNY3FV7NDN3tbQrctmJ2svORY3t5fDxybYH4j16qNTYpChu4OxVlIwaEyeT0cXu4AhvroFsY5v4LFVff1WyBlht/IMyT/GObBB/1Vi+x3WmR/ufUsroFvl52vHs9+yEJflsrnPHzMiEoX9/tY9ZLcVGlPzlCT7EkVBEf+hlZW0cKDDC4v3uAizDyIb0ZtgSsu1VB8XbF1wmSp3iCHsHnIDzoTqHnGh8Htw6r01LTrYOCNE4PLi51u3zniOyUTX0IrJn8M0ZbbG295ShX+RgGhLF6sT7gAOIaB5qT3vHfiZ71xVEjdotibwq2Vv4kDF2m/zKXy16jZfkJ6b9YTELqvef4cb//yMYogM45YbbmcSIfXNq9r/vprhZZTNopgLq3iyeMTmCrH/6cQT2XucMfCdTuCJx+aG/NUbF5bXctXadWc0zlPTIgBIviCiz0/0/i2kq1KZ9lIDZIES2rp73RBrrH1Vfjt1RDq+j9NR1LO +api: eJzlWN1u2zYUfhWCVy2g2mm2i0FX9ZpmzdquQeN2F61h0NKxzVYiVfLIjWcI2EPsCfckwyFli7Jkxw3Sq10l1vn7eP7JDUexsDz+yP+E2VLrL5ZPIq4LMAKlVlcpj/kcMFlOv3n61JYzmxhZEJlHvBBG5IBgSMmGK5EDj3nINJUpj7hUPOaFwCWPuIGvpTSQ8hhNCRG3yRJyweMNx3XhxNFIteARn2uTC+QxL0unBSVmxHAT6GdXKa+qCam1hVYWLGk6PzujPyk0YEksScDaeZmxdzUzj3iiFYJCYhdFkcnEHX342ZLMJkBXGHIMSm8h0aUXqkFLhbAAE6B87jginsJclBny+KyKWq5xJtX67dz5rq1+nrnAhAwiTSWJiey6xdpw1FBmWmcgFK+ifZfSl341PJEmKTNhHr0WM8h+t1o9eVtiUeJjOpLXomefIUFO3t4ecp+bVx3uBoUqs6wlfelOSSL/h9OO68PmgOKehw1Otpd3LcP5rP0l9NFdHrksszscEm24RMhPlBLGiPXxLGjLfp9T35Azq6huPSe5rKPjD5Ktona7uJ+qi0BFFfHEgEBIpwKPKQw6XSoQnqB0eA5bee7VspFzVlmkP8LIe6+2NpJCBj/AyIVXWxvZumu2prFxmh03G05x1q9rNysafz2ola23dla2DntQK1t37aw8nOoatcCeYVearG8+5+L2NagFLnl8fvbLTxHPpdp+eBraNjKYi+9NRpaWIFK3N5zSCPcL8DsaxMvaTkXbyjrTIp3OJWTpSZb9hnK6sWtvgV16C1XERYnLaa7To80p4qDKnPYwKxdKYGloMyFRbeRfbiHhk2N2RyUu2RuyUkUcVqBwSqx7Z6y79mHr9ZZnB+GaYgcIFsEtYEYkYAduJQw/fC3BSP8BLCbCtpl23xq+YNWyAwMraev/0EhYHWNp9B5guNNIpheLY/RE57lEf2Kv7BDELrVB16U1wLq0HaYuKYRDrrSAh/D0kNth2CO247ZH3EHqoYWYYCWyUqA2h1D1MjS4eskNsl7yDlsvtYVOraTRKgd10GsHWAKE/QwBxn6GBmU/vcEZlHJ9E3tBRTymOo061xhXmzMxy4C5Wmeu1tm/f//DBKOiTpBRBQMyPWc7TYNP6pP6ILISLBMGWApGriBlc6PzhotZzXAJzDcHyyyKNZOK2bVKBp/UWDORpkwwBd+Y7YcSMYksLy2yuTQWGdxKi6SjgRL08LsXRCfGxq6hVZ3mH94oP7pR1fVmeGO8EH5jtJAYwAcczjdOYT2Yvfb7rpFe1Z2HddP6+Gl7zPRpPaJhd1euKpL8+fy8e7X+IDKZukbKXhijzf3v1SmgkG7b2E2rNkOmkxb1e+5Ik/2sC6522gN0FzS76JuSzZXDWrGAJoUPszpnuMx1y5qi6w2xb3cuVd93ErwN1HSi8px8eXt3PpBvPPyaL8iNJkQ+QoddceFDcCxNXo7H1x2FPj/aiXFJTZTdtF+NcsClprelBaB7RKKFkQ+328ewtX0MN3vPSRWn6jKr7aOTW075UBTSxdz/XCIW8XCY6URkS23RkyeuLksjce1ER9dXr2DtN0Qef5yEDDeUoD7l2my7MIlCvgJyXP3sNWrta/Wjl19znTOlmusw+qMFKBRsdH3V6fEtElWSSFzibC05Mo+Cw9p4OBTu80DIIc2c3NURRxD5sx2Fwk6e82bOBk8HZ24z1hZzoQITvYHbuyDXfqDUHBaZkK546ruCD2qzUvL22xf9jvffCScRp1iR2GYzExbem6yq6DONWgrZJOIrYSTNGxfAVFr6P+XxXGQWOgh3TYg/elfXyWPWvE20kW/DqiimtFfQLx7xL7DuedR0zWS5TZ1NzTVKEigwkO/0PsqxXQH89mLMq+o/LvqJDA== sidebar_class_name: "get api-method" info_path: reference/api/agenta-api custom_edit_url: null diff --git a/docs/docs/reference/api/query-webhook-deliveries.StatusCodes.json b/docs/docs/reference/api/query-webhook-deliveries.StatusCodes.json index 96ed905391..0584f144ce 100644 --- a/docs/docs/reference/api/query-webhook-deliveries.StatusCodes.json +++ b/docs/docs/reference/api/query-webhook-deliveries.StatusCodes.json @@ -1 +1 @@ -{"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count"},"deliveries":{"items":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","title":"Status"},"data":{"anyOf":[{"properties":{"event_type":{"anyOf":[{"type":"string","enum":["environments.revisions.committed","webhooks.subscriptions.tested"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},{"type":"null"}]},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"},"response":{"anyOf":[{"properties":{"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"type":"object","title":"WebhookDeliveryResponseInfo"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["url"],"title":"WebhookDeliveryData"},{"type":"null"}]},"subscription_id":{"type":"string","format":"uuid","title":"Subscription Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"}},"type":"object","required":["status","subscription_id","event_id"],"title":"WebhookDelivery"},"type":"array","title":"Deliveries","default":[]}},"type":"object","required":["count"],"title":"WebhookDeliveriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"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"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} \ No newline at end of file +{"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count"},"deliveries":{"items":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","title":"Status"},"data":{"anyOf":[{"properties":{"event_type":{"anyOf":[{"type":"string","enum":["webhooks.subscriptions.tested","traces.fetched","traces.queried","testcases.fetched","testcases.queried","applications.revisions.retrieved","applications.revisions.fetched","applications.revisions.queried","applications.revisions.logged","applications.revisions.committed","queries.revisions.retrieved","queries.revisions.fetched","queries.revisions.queried","queries.revisions.logged","queries.revisions.committed","testsets.revisions.retrieved","testsets.revisions.fetched","testsets.revisions.queried","testsets.revisions.logged","testsets.revisions.committed","evaluators.revisions.retrieved","evaluators.revisions.fetched","evaluators.revisions.queried","evaluators.revisions.logged","evaluators.revisions.committed","environments.revisions.retrieved","environments.revisions.fetched","environments.revisions.queried","environments.revisions.logged","environments.revisions.committed"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},{"type":"null"}]},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"},"response":{"anyOf":[{"properties":{"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"type":"object","title":"WebhookDeliveryResponseInfo"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["url"],"title":"WebhookDeliveryData"},{"type":"null"}]},"subscription_id":{"type":"string","format":"uuid","title":"Subscription Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"}},"type":"object","required":["status","subscription_id","event_id"],"title":"WebhookDelivery"},"type":"array","title":"Deliveries","default":[]}},"type":"object","required":["count"],"title":"WebhookDeliveriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"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"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} \ No newline at end of file diff --git a/docs/docs/reference/api/query-webhook-deliveries.api.mdx b/docs/docs/reference/api/query-webhook-deliveries.api.mdx index 48ce37209a..195cab9fe2 100644 --- a/docs/docs/reference/api/query-webhook-deliveries.api.mdx +++ b/docs/docs/reference/api/query-webhook-deliveries.api.mdx @@ -5,7 +5,7 @@ description: "Query Deliveries" sidebar_label: "Query Deliveries" hide_title: true hide_table_of_contents: true -api: eJztWNuO2zYQ/RWCz/JlvbdET3UuQIykyXazSYE6xoKWxjYTiVRIyl7XENCP6Bf2S4ohdbOt1TqGA/Sh+7SmhmeGw7kczoYaNtfUH9PfYbqQ8pumE4/KBBQzXIpRSH36PQW1vl+57/chRHwJioOmHlXwPQVtXshwTf0NDaQwIAz+y5Ik4oEF6X3VUuCaDhYQM/wvUajCIIi/oTmkhWBi/WFG/fGujDbMpLpNwvAYtGFxYn+sE6A+1UZxMacenUkVM0N9GjIDHRSlHjXcRCh1V+7MvHxnXc02VuaVKyKNIppNakC4nnk0kOHRGC9xb+bRGLRm86Nhfs23Zx66LvhmFAuOBvtYIWSli6icfoXA0C0xvKN9JDQinepA8QQD4p6HbZbUbitNedhuWQ2WjFCWwhKEOaGK14hnsVuOnmfPqzySf8OUaXYEF0GUhnDPVLDgS2g2cyplBEy02jVyQGRYAGUeXXERyhWesCVRBKxAmwPdU+VLmy3vHWTmURmFpwb/4CAzjwp4OBT6yWt9j1iZRyMe82ZQLgzMQbWivLO78dwqBNVuG4g0xkrLdAAidGshlD8mrT6w8DZ8DKgli462eFQAZB5VzDTXBJHG0ydwbnFva0qUsdiQBz+YSreuz9AMN2LT4Qozx6gU7IJOpNAuugf9vuspZV2wZSIIQOtZGpHbXJh6x7arQKZu047X6zUcJTKP1pqlv6HcQKwb8BQwA+E9O23avHSwZGgtSZPwZyj55GBzJSFE8BOUvHKwuZLCXdP1CYt84awX67yLFP46qZbCW6WWwmEn1VK4q9RyOmiHV3Gx/xnYf5SBoZdZGwlwLOkpV1dNC8SSKyliEEZ3FSy55lLobiDjmBsDIfVo/kLQ3TrX010DGr9P9iq8JVb2wry9cm0BpmwaAbGWErRLk3/++pswgsYFhqAaMETOSInU/SK+iM8sSkETpoCEoJAakZmScSVFtCRmAcQdUhNt2JpwQfRaBN0v4k4SFoaEEQEroptN8Qg3JE61ITOutCHwwLVBjMqUZvqXqqgpO2L28A7E3CyoP+g/O/dozEWxcFbPUMVr1/1J2Ta+ABaC2nkcsTDk6E4W3Wwn6U7M7cRSWxC+yfVkHk3YOpIsPEQlNukf0XKTQ9ca+9MPw/tHE/4QTuTShhSJP82fs8ckqn0K/wC9KejISMxkc8SAUrKVWbY+XuzmJnsqFjW2Qbmfn4WJr7CUHPqoa+8tBz/cDoVpfZzVj5j3rH2ba3ofd0EtT5hSbE23um01DwlhxtLIUH/cSHHrBjkW+ahKDrpkqpmlvReDwT6x/cwiHlraStxVH81qQzCMRy00NZLB1tcDwrHMvcnj/nsnnYG24+p50+U3dNSicT0map1BCjbARZI6xl4+gnABeYJ5qMHsJetL9CW+E5+4TPSNMz+Xq91rdUV5MraEkr2Cturx5u7uZg/Qxcd2YNhnE9kKzhjMQuJAL5EaMROG3YX2ir7dq14rPTvzw2wBtbStZbxxrYv2WMLtHbufC2MS7fd6kHaDSKZhl81BGNZl3AlOECNIFTdrCzK8Gb2FteskNk1qAh8xNF2wbYuVF8QS/hbQLsFi/D1MzUIq/qeLILxoNMntQp9g0N9WM8rXDyxOItidOVZ8tsZg6aA/uOj0rzuD53dnl/7lmT941u1fn/1Bvb2oc82n1s0L5lgt1SlgrfnuVVB6PmPPLmdXF53L67PrzsXl1aAzPZ8FnUHw/Op8dnXFZuyqXrQO3NE4eXKteWtoVAyH2o5fzHjaZNyo5tDT5EOYfjlH2RqSVDOPfjGz6Gf2QDNZz+qhDT0yvBntMcqtT1ghWWALQhFH9jP1doK6imX0eGzrIzXA4l/KL+hYzBCnpt896/YtP5LaxEzUVDQk5JaJZYxjweklEeO2JOZ80eXquOTYdGu24LkZPVadBea2P6abzZRp+KSiLMNl990fTzy6ZIojm7XZV5BHm5vfYF3UPGE6OTNfIpu2qbfTS7AGuB3DIIDEtMpOauXn5sPHO1qxrNglj2IrLKpsRX2KMeZeDyhg1zY0YmKeuqxymPj3L8muaDg= +api: eJztWNtu2zgQ/RWCz/Ilzq3V06YXoEG7bTZNu8CmQUBLY5utRKok5cRrCNiP2C/cL1kMqQtly4obpMA+bJ5izvDMaDj3NTVsrml4TX+H6ULKb5reBFRmoJjhUpzHNKTfc1Cr2ztHv40h4UtQHDQNqILvOWjzQsYrGq5pJIUBYfBflmUJjyzI6KuWAs90tICU4X+ZQhEGQcI1LSEtBBOrDzMaXm/yaMNMrvs4DE9BG5Zm9scqAxpSbRQXcxrQmVQpMzSkMTMwQFYaUMNNglxX9c0iKG/6YtpYRVCfiDxJaHHjAeF5EdBIxo/GeIl3i4CmoDWbPxrm1/J6EaDpom9GsejRYB8bhKI2EZXTrxAZ2mLDN9pGQiXyqY4Uz9Ahbnncp4n3WnnO437NPFhyjrwUliDME4p4jXgWu+fTy+h5VXrybxgy3YbgIkryGG6ZihZ8Cd1qTqVMgIlevc4dEDmrgIqA3nERyzv8wp5AEXAH2uxpniZe+nR57yCLgMokfmrwDw6yCKiA+32hH3zW94hVBDThKe8G5cLAHFQvyjt7G79bxaD6dQORp5hpmY5AxO4shvrHTa8NLLx1HwNqyZJHa3xeARQBVcx05wSRp9MHcC7xbm9I1L7YEQc/GEqXrs7QAi9i0eEKI8eoHOyBzqTQzrsn47GrKXVesGkiikDrWZ6Qy5KZBo8tV5HM3aUNq/s5HDmKgHrFMlxTbiDVHXgKmIH4lj1t2Lx0sOTMapJn8c8Q8snBlkJiSOAnCHnlYEshlbmmqydM8pWxXqzKKlLZ60mlVNaqpVQGe1IplblqKU8H7fCaXuz/Duw/2oGhlVlfE+C6pIdM3RStsv3XQ7+R00MD2kCMGqBuejgDEy38AxweuDsAbSKm20z1WcPnpWI9VLDkuvzPKA7LPpYGdwfDg0ISOZ/30SOZpty4L3Zgu1TcpjbabdMaxbZptU7bJF8dNKUGs0ufDnL7GTaI7XfbINYqddB8nWDJkpwZqXZp1cnQ6NVJbjTrJNe6dVJb2oklV1KkIHZabQeLp2E3g6djN0OjZTe90fNmqzOyA4lNdMFWm2Njc8qmCRAb4QTjWZN//vqbMIJBHRmCEQyGyBmpkYZfxBfxmSU5aMIUkBgUjhRkpmTacBEtiVkAcclBE23YinBB9EpEwy/iShIWx4QRAXdEd6sSEG5ImmtDZlxpQ+Cea4MYjSrdY1Oukq6qkrL7dyDmZkHDyfjZYUBTLqqDA7+yKe6lyU/Ktr8LYDGojaUCi2OO5mTJRbu4beTqjRzcl7zflHKKgGZslUgW7yMSm9sfkXJRQnsN8cMLldudhXKfWcKVG1IVzGm5BnpMgbMrpB8YC6o2/lzMZLfHgFKydyLrHfrt5S59munj2jrldnxWKr7CErzvMqS/J9t74bEvTO9Sw//Estfb1tmTu9sEXpwwpdiKtrrUZo8Yw4zliaHhdedo6Cvkpq+dIjnoesIr7Lh4NJlsD4SfWcJjW96Je+pHT4MxGMaTnvEukVGLuoc71rF3s9t+76RT0Haqet71+B2daNXw7WK1xiBVF81FlrtJt14e4AH21+beg9kK1pdoS9yvPPCYaBunfsnnvWvzRGUw9riSfYK+7PHm6upiC9D5R9sx7LqBtJwzBbOQuAjPpEbMjGF1oaOqJR41U/7I7soxWkAtbWm5XrvSRUcs4/aN3c+FMVk4GiUyYslCauPIN3gzyhU3K3v17OL8Laxc/bDB4TF8RId0LtZmq5+FZfwtoDaCpfj7LDcLqfifzm/weVERdwstga5+2Wz0X9+zNEtgc0PfTH/evEcn48nRYHw6mDy/OjgOjw/CybPh+PTgDxps+ZorOV4Nr+as5sgfmLySu5U36eGMPTuenRwNjk8PTgdHxyeTwfRwFg0m0fOTw9nJCZuxEz9V7Xmjc0/rCnJrxVqtUvs+v9qI9vG4xea+X1OuLMf11rG1Umw2hONqwzcu7AfNpB/LZ3MQhpGzi/OtPrJFwrzIIpsGKj+yZBp4rqzD0YjZ4yHjI7R4arMiNcDSX2oKGhbjwokZDw+GY9sVSW1SJjwRHWHYUrH2cUwzoyxh3CbCskt0EdoMrbS1iXOT1ApzDUYeMq7XU6bhk0qKAo8dPby+CeiSKY49rI2+qmW0sfkNVlWmE2ZQ9uM4c7jQ26ggGPnuxlkUQWZ6eW+8pHPx4eMVbXqr1AWPYneYStkdDSn6mBvHkcGerWnCxDx3UeUw8e9funaedg== sidebar_class_name: "post api-method" info_path: reference/api/agenta-api custom_edit_url: null diff --git a/docs/docs/reference/api/query-webhook-subscriptions.StatusCodes.json b/docs/docs/reference/api/query-webhook-subscriptions.StatusCodes.json index 439759b3e1..a01255b82f 100644 --- a/docs/docs/reference/api/query-webhook-subscriptions.StatusCodes.json +++ b/docs/docs/reference/api/query-webhook-subscriptions.StatusCodes.json @@ -1 +1 @@ -{"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count"},"subscriptions":{"items":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Output)","type":"object"}],"title":"LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Output)","type":"object"}],"title":"LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Fields"},"auth_mode":{"anyOf":[{"type":"string","enum":["signature","authorization"]},{"type":"null"}],"title":"Auth Mode"},"event_types":{"anyOf":[{"items":{"type":"string","enum":["environments.revisions.committed","webhooks.subscriptions.tested"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},"type":"array"},{"type":"null"}],"title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookSubscriptionData"},"secret_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Secret Id"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscription"},"type":"array","title":"Subscriptions","default":[]}},"type":"object","required":["count"],"title":"WebhookSubscriptionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"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"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} \ No newline at end of file +{"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count"},"subscriptions":{"items":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Output)","type":"object"}],"title":"LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Output)","type":"object"}],"title":"LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Output)","type":"object"},{"items":"circular(FullJson-Output)","type":"array"},{"type":"null"}],"title":"FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Fields"},"auth_mode":{"anyOf":[{"type":"string","enum":["signature","authorization"]},{"type":"null"}],"title":"Auth Mode"},"event_types":{"anyOf":[{"items":{"type":"string","enum":["webhooks.subscriptions.tested","traces.fetched","traces.queried","testcases.fetched","testcases.queried","applications.revisions.retrieved","applications.revisions.fetched","applications.revisions.queried","applications.revisions.logged","applications.revisions.committed","queries.revisions.retrieved","queries.revisions.fetched","queries.revisions.queried","queries.revisions.logged","queries.revisions.committed","testsets.revisions.retrieved","testsets.revisions.fetched","testsets.revisions.queried","testsets.revisions.logged","testsets.revisions.committed","evaluators.revisions.retrieved","evaluators.revisions.fetched","evaluators.revisions.queried","evaluators.revisions.logged","evaluators.revisions.committed","environments.revisions.retrieved","environments.revisions.fetched","environments.revisions.queried","environments.revisions.logged","environments.revisions.committed"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},"type":"array"},{"type":"null"}],"title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookSubscriptionData"},"secret_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Secret Id"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscription"},"type":"array","title":"Subscriptions","default":[]}},"type":"object","required":["count"],"title":"WebhookSubscriptionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"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"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} \ No newline at end of file diff --git a/docs/docs/reference/api/query-webhook-subscriptions.api.mdx b/docs/docs/reference/api/query-webhook-subscriptions.api.mdx index 6ac8b63cab..36bf151196 100644 --- a/docs/docs/reference/api/query-webhook-subscriptions.api.mdx +++ b/docs/docs/reference/api/query-webhook-subscriptions.api.mdx @@ -5,7 +5,7 @@ description: "Query Subscriptions" sidebar_label: "Query Subscriptions" hide_title: true hide_table_of_contents: true -api: eJzdWdtuGzcQ/RWCTy2wuli+JftUJ04QN0nt2koKVBEEanckMdklNyRXtmos0I/oF/ZLiiH3KslrW3CApHmJzR2eGQ7ncji+pYbNNfVH9A+YLqT8ounYozIBxQyX4iykPv2aglpNrt33iU6nOlA8wc+aelTB1xS0eSHDFfVvaSCFAWHwR5YkEQ8sTu+zlgLXdLCAmOFPiUIthoO26zVUu1eszmfUH63LzSJrbl2AhSHHbSy6aIhWEmaVAPXpVMoImKCZVy5po7iY25XtMDTgKkgjpn56x6YQ/aql6JyJJDU/U68AkdPPEBiajT1quIlwaU2YZhvClQ0ijaLG5tf2jLjl/3/WYX7UGAzb8ai1c+UrXBiYg2oqjqfNlbqH7vPH6zRqd4d3S7mB+GGbmFJs1R4Bja2P8+h79GTmUcFieKC/NjB+w72ZR0O4IykfDnVag8g2DlLJ5eXnqlYHfse6swU88ygXQZSGMGEqWPAlhA/NgQ3zzhwQOSmAMo9ecxHKazxYSyEScA3atHnFozOpYmaoT0NmoGO4dWqL1x1k5lEZhU8Nfu4gMTDg5qHQacrDe0y+sZgRj/l20K25uIbyzu7Gc6sQVLttINIY2xXTAYjQrWGY5r+MW31g4W34GFBLFu1s8VkBkHlUMbM90TZrzgbOJe5tTYsyFrfkwQ7pdOm6Nc1wM7ZurjB7jErBLuhECu0ifNDv43+NGkCv0iAArWdpRC5zYert2vQDmbpNa56vjvHSSmQebbIOvyy33yM/OE/NI5qmk/5xGcK3P+0PxhHudEgrSdjY9QiWsItTv2ea4NFAATMQTtjTNsGXDpacWGelSfgtlHxwsLmSECL4BkpOHWyupHDXdDXh27nQDr29cNaLFTkL6/56Ui2Ft0othcOeVEvhrlLL00HnVjOzpcGlKqq1txI8ZjfvQMzNgvqD/rN9j8ZcFAt7dd2K13rhB2XpxgJYCOqBVX89AR9RIN7kejKPJmwVSRZOZhyi8EGakU88RtmF00BeOw2ZR1lqFpNYhq3FqaKDms8FM6lCNoJbpeJ/WRLSzghPUrMg71FL5lFYgjATFF07Y8k17tIOYsmVFDEIo7sKllwjTekGMo65MRBSj+bjE91tMJmuAY3fxxvM7RUaM0R93gYFswBTNo2AWJuJtZn8+/c/hBE0LjAE1YAhckZKpO4n8Ul8ZFEKmjAFJASFTx4yUzKupIiWxCyAuENqog1bES6IXomg+0kMJWFhSBgRcE30dlM8wg2JU23IjCttCNxwbRCjMqUWi/c3OruNDO3FbCO9FY8d2ZTb9GadB58y1/k0BArMExaZKwuYFxiHvms7dFD3HtZWnfbTbji6pmRtkhfCjKWRof5o69Oirtgx93bNunwgZPa1cTAYbL4nPrKIhzZRySulpNr9MRGCYTxqeRpEMmh8fQxJHN/txXfSGWgZqp5vKxMV59KazaG6krtFrTNsyLv3KvI7FC/fnznhC8xNDWbjGfgSfXlzfyChb5z5uVztaqsrcjd0tytO3RW0vUvfDIcXG4AuPpqBYV+rZD1EYzALiTPpRGqETRj2TNorqmuvUV17dnJNMRnV0vbMUd6TaY8l3N60+3VhTKL9Xg/SbhDJNOyyOQjDuow7wbFN6FRxs7IgJxdnb2HlWqTNl5rAFQaoC7mmWHlNLOFvAe1y5Nt2oaph4XWjSW4XegZD/7Ias7+6YXESwbaxefH8rZ6G1bupJPtVtDVdXrGEzfGaa+iNyVgxAaOD/uCg0z/uDJ4P9w79wz1/8KzbP977k1aDrDYZN4+i+zP27HB2dNA5PN477hwcHg060/1Z0BkEz4/2Z0dHbMaOaDlp6pfDosYkqBrs9IvBTD+zB5rJev6c2OslJxdnG15ofMJaxAKbesVd2c/UWwucKl6QFsS2ElEDLP6l/IKOxSh0avrdvW7fkiupTcxETcX20F97ZOWhhNndSyLGbf3J+abLilHJOej6/MRzf9PBLF9gIvkjens7ZRo+qCjLcNl990djjy6Z4tjgbZwX/NNmwRdYFTVGmE5OVpZIMGyQr9VuzDa34yQIIDGtsuNarl+cXw2pR6f5X5gcKaSKXWMRY9fUpxhp1WjIrt3SiIl5iuXWpw4T//0HPbJANA== +api: eJzdWW1v2zYQ/isEP22A/BLnrfWnpU2LZm2XLEk7YGkQ0NLZZkuRKkk58QIB+xH7hfslw5GyXixZeUEKtOuXOrzjc8fj3fHudEstmxk6vqB/wGSu1BdDLwOqEtDMciWPIjqmX1PQy6trT78y6cSEmidINjSgGr6mYOwLFS3p+JaGSlqQFn+yJBE8dDiDz0ZJXDPhHGKGvxKNUiwH49YrqG6vXB5P6fhinW8qnLpVBhZFHLcxcVJjLTnsMgE6phOlBDBJs6BYMlZzOXMr7TA05DpMBdM/vWMTEL8aJXtHMkntzzRYgajJZwgtzS4DarkVuLTGTLMGc6mDTIWobX7tzohb/v9nPc+PGoNljzxq5Vz5CpcWZqDrguNJfaVqobvs8ToV3eYIbim3EN9vE9OaLbs9oLb1YRZ9j5bMAipZDPe0VwPjN9ybBTSCDUF5f6jDCkTWOEjJl6efs0oe+B3zTgt4FlAuQ5FGcMV0OOcLiO4bAw31jjwQOVgBZQG95jJS13iwjkQk4RqM7bJKQKdKx8zSMY2YhZ7lzqgdVveQWUCViJ4a/NhDomPAzX2h05RHd6h84zAFj3k7aGssrqG8c7vx3DoC3a0byDTG54qZEGTk19BN8z8uO23g4J37WNALJh6t8dEKIAuoZrY90Jo5p4Fzins7w6LwxZY4eEQ4nfrXmma4GZ9urjF6rE7BLZhESeM9fDQc4n+1HEDP0jAEY6apIKc5Mw0e++iHKvWb1ixfHuOl48gCWq86xkW6/R7rg+PUPuDR9Nw/boXw7U/7g9UIGw3SWSQ0dj2gSniMUb/nMiGgoQZmIbpiT/sIvvSw5MAZK02ibyHkg4fNhUQg4BsIOfSwuZCVuSbLK95eCz3ibV8Z68WSHEVVez2plJW1Cikrgz2plJW5CilPB51rzWzLA5dqUXneCvCY3bwDObNzOh4Nn20HNOZytbBVla155S38oF25MQcWgb5n1l8PwAckiDe5nCygCVsKxaKrKQcR3Usy1hMPEXbiJZDXXkIWUJba+VWsos7kVJaDhs8ks6nGagS3Ks3/ckVId0V4kNo5eY9SsoDCAqS9Qta1Mxa1xibp+WzE9GtlSt+CsRDhFWoWgulPwYbz6gJOVrhfAGNDZupMxVrJVymvTF/Dgpv8l9UcFl0sJe4GhjuFCDWbddFDFcfc+hN7sE0qNqmldk1aqViTVujUJFXVQVMasJv0aSHXr2GNWL+3NWKhUgutqhMsmEiZVXqTVq0MpV6t5FKzVnKhWyu1pp1ccK1kDHKj1TawVDRsZ6jo2M5QatlOL/W8bHQ8rzCIzzFOg0br4mJzwiYCiIt14mKd/Pv3P4QRDOrQEoxgsERNSYHU/yQ/yY9MpGAI00Ai0DgqIFOt4pKLGEXsHIhPDoYYy5aES2KWMux/kueKsCgijEi4JqZdlYBwS+LUWDLl2lgCN9xYxChVqeTwuwtEt42cu4TW1iyW/d+Fe6qa1qz2j4fMV4wGQg32CR/nMweYP8we/bFlpIe687Dute4+bcPQFSFrE/AIpiwVlo4vWlvyqmDf8XZLNkVjnbkufWc0avbhH5ngkcvA5JXWSj++CY/AMi46Wmqhwhr1Ic3V5WYrvlNeQdfZmVnb81r2KsawGZRXspnVGcO5vJ/zYF+E7MXcJm+UQntTgWmMT16iLW/udiS0jVc/56tcbXlF/oY2m+LQX0HXPOfN+flJA9D7R90x3JSHrLtoDHau8FtOogzCJgxrTTpYFS6DWuEycF98KAajXrha8yKvZemAJdzdtP9zbm0yHgyECpmYK2M9+dKFcaq5XbqtBydHb2HpC0oXJRWGM3RL72h1tuJyWMLfAmrjW1VXs5XlHV4yKuJ3oT3Q4U/Lj1KvblicCGj7yLQaFpWDlHLKULTGpY/VDV3W1M1htC9/a3Pk1byYjoajnd5wvzd6fr61O97dGo+e9Yf7W3/ScuzbxeOnt3R7yp7tTvd2erv7W/u9nd29UW+yPQ17o/D53vZ0b49N2R4t5rLDYrRam5uWY9Dhaow5zNyBpqoaNQczkJaRg5OjhhVqJMxALHQBt7orR6ZBxV3MeDBgbrnP+AAf+djlH2qBxb8UFDQs+p4XM+xv9YeuFVHGxkxWRLQ7/NpIIncljOlBIhh3WSfvznwslEU8XZ82+uJyibGNPo68t7cTZuCDFlmGy54+vrgM6IJpjs+68/NVt+ai4AssV5lF2l5eomAZ5p18LWNjjPkdB2EIie3kvaxE+Mnx2TkN6CT/HutbKKrZNaYudk3HFD2tHKS6tVsqmJylmGTH1GPiv/8AdeR2cg== sidebar_class_name: "post api-method" info_path: reference/api/agenta-api custom_edit_url: null diff --git a/docs/docs/reference/api/test-webhook-subscription.RequestSchema.json b/docs/docs/reference/api/test-webhook-subscription.RequestSchema.json index 042495f070..fb76452ff1 100644 --- a/docs/docs/reference/api/test-webhook-subscription.RequestSchema.json +++ b/docs/docs/reference/api/test-webhook-subscription.RequestSchema.json @@ -1 +1 @@ -{"title":"Body","body":{"content":{"application/json":{"schema":{"properties":{"subscription_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subscription Id"},"subscription":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Input)","type":"object"}],"title":"LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Input)","type":"object"}],"title":"LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Fields"},"auth_mode":{"anyOf":[{"type":"string","enum":["signature","authorization"]},{"type":"null"}],"title":"Auth Mode"},"event_types":{"anyOf":[{"items":{"type":"string","enum":["environments.revisions.committed","webhooks.subscriptions.tested"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},"type":"array"},{"type":"null"}],"title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookSubscriptionData"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscriptionEdit"},{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Input)","type":"object"}],"title":"LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Input)","type":"object"}],"title":"LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"data":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Fields"},"auth_mode":{"anyOf":[{"type":"string","enum":["signature","authorization"]},{"type":"null"}],"title":"Auth Mode"},"event_types":{"anyOf":[{"items":{"type":"string","enum":["environments.revisions.committed","webhooks.subscriptions.tested"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},"type":"array"},{"type":"null"}],"title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookSubscriptionData"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscriptionCreate"},{"type":"null"}],"title":"Subscription"}},"type":"object","title":"WebhookSubscriptionTestRequest"}}},"required":true}} \ No newline at end of file +{"title":"Body","body":{"content":{"application/json":{"schema":{"properties":{"subscription_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subscription Id"},"subscription":{"anyOf":[{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Input)","type":"object"}],"title":"LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Input)","type":"object"}],"title":"LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Fields"},"auth_mode":{"anyOf":[{"type":"string","enum":["signature","authorization"]},{"type":"null"}],"title":"Auth Mode"},"event_types":{"anyOf":[{"items":{"type":"string","enum":["webhooks.subscriptions.tested","traces.fetched","traces.queried","testcases.fetched","testcases.queried","applications.revisions.retrieved","applications.revisions.fetched","applications.revisions.queried","applications.revisions.logged","applications.revisions.committed","queries.revisions.retrieved","queries.revisions.fetched","queries.revisions.queried","queries.revisions.logged","queries.revisions.committed","testsets.revisions.retrieved","testsets.revisions.fetched","testsets.revisions.queried","testsets.revisions.logged","testsets.revisions.committed","evaluators.revisions.retrieved","evaluators.revisions.fetched","evaluators.revisions.queried","evaluators.revisions.logged","evaluators.revisions.committed","environments.revisions.retrieved","environments.revisions.fetched","environments.revisions.queried","environments.revisions.logged","environments.revisions.committed"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},"type":"array"},{"type":"null"}],"title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookSubscriptionData"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscriptionEdit"},{"properties":{"flags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Input)","type":"object"}],"title":"LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":"circular(LabelJson-Input)","type":"object"}],"title":"LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":"circular(FullJson-Input)","type":"object"},{"items":"circular(FullJson-Input)","type":"array"},{"type":"null"}],"title":"FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"data":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Fields"},"auth_mode":{"anyOf":[{"type":"string","enum":["signature","authorization"]},{"type":"null"}],"title":"Auth Mode"},"event_types":{"anyOf":[{"items":{"type":"string","enum":["webhooks.subscriptions.tested","traces.fetched","traces.queried","testcases.fetched","testcases.queried","applications.revisions.retrieved","applications.revisions.fetched","applications.revisions.queried","applications.revisions.logged","applications.revisions.committed","queries.revisions.retrieved","queries.revisions.fetched","queries.revisions.queried","queries.revisions.logged","queries.revisions.committed","testsets.revisions.retrieved","testsets.revisions.fetched","testsets.revisions.queried","testsets.revisions.logged","testsets.revisions.committed","evaluators.revisions.retrieved","evaluators.revisions.fetched","evaluators.revisions.queried","evaluators.revisions.logged","evaluators.revisions.committed","environments.revisions.retrieved","environments.revisions.fetched","environments.revisions.queried","environments.revisions.logged","environments.revisions.committed"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},"type":"array"},{"type":"null"}],"title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookSubscriptionData"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscriptionCreate"},{"type":"null"}],"title":"Subscription"}},"type":"object","title":"WebhookSubscriptionTestRequest"}}},"required":true}} \ No newline at end of file diff --git a/docs/docs/reference/api/test-webhook-subscription.StatusCodes.json b/docs/docs/reference/api/test-webhook-subscription.StatusCodes.json index 07556ef13f..21b0328241 100644 --- a/docs/docs/reference/api/test-webhook-subscription.StatusCodes.json +++ b/docs/docs/reference/api/test-webhook-subscription.StatusCodes.json @@ -1 +1 @@ -{"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"delivery":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","title":"Status"},"data":{"anyOf":[{"properties":{"event_type":{"anyOf":[{"type":"string","enum":["environments.revisions.committed","webhooks.subscriptions.tested"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},{"type":"null"}]},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"},"response":{"anyOf":[{"properties":{"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"type":"object","title":"WebhookDeliveryResponseInfo"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["url"],"title":"WebhookDeliveryData"},{"type":"null"}]},"subscription_id":{"type":"string","format":"uuid","title":"Subscription Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"}},"type":"object","required":["status","subscription_id","event_id"],"title":"WebhookDelivery"},{"type":"null"}]}},"type":"object","title":"WebhookDeliveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"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"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} \ No newline at end of file +{"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"count":{"type":"integer","title":"Count","default":0},"delivery":{"anyOf":[{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","title":"Status"},"data":{"anyOf":[{"properties":{"event_type":{"anyOf":[{"type":"string","enum":["webhooks.subscriptions.tested","traces.fetched","traces.queried","testcases.fetched","testcases.queried","applications.revisions.retrieved","applications.revisions.fetched","applications.revisions.queried","applications.revisions.logged","applications.revisions.committed","queries.revisions.retrieved","queries.revisions.fetched","queries.revisions.queried","queries.revisions.logged","queries.revisions.committed","testsets.revisions.retrieved","testsets.revisions.fetched","testsets.revisions.queried","testsets.revisions.logged","testsets.revisions.committed","evaluators.revisions.retrieved","evaluators.revisions.fetched","evaluators.revisions.queried","evaluators.revisions.logged","evaluators.revisions.committed","environments.revisions.retrieved","environments.revisions.fetched","environments.revisions.queried","environments.revisions.logged","environments.revisions.committed"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},{"type":"null"}]},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"},"response":{"anyOf":[{"properties":{"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"type":"object","title":"WebhookDeliveryResponseInfo"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["url"],"title":"WebhookDeliveryData"},{"type":"null"}]},"subscription_id":{"type":"string","format":"uuid","title":"Subscription Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"}},"type":"object","required":["status","subscription_id","event_id"],"title":"WebhookDelivery"},{"type":"null"}]}},"type":"object","title":"WebhookDeliveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"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"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}} \ No newline at end of file diff --git a/docs/docs/reference/api/test-webhook-subscription.api.mdx b/docs/docs/reference/api/test-webhook-subscription.api.mdx index ceb86ebaa3..5e0ce5aa92 100644 --- a/docs/docs/reference/api/test-webhook-subscription.api.mdx +++ b/docs/docs/reference/api/test-webhook-subscription.api.mdx @@ -5,7 +5,7 @@ description: "Test Subscription" sidebar_label: "Test Subscription" hide_title: true hide_table_of_contents: true -api: eJztWt1u2zYUfhXiXG2A/BPnr/XV0iZFs7Zr0LgdsNQIaOnIZiuRKkk58QwDe4g94Z5kICnZkiwrjpFerHNuHFM8Pzw8/M7HY81B07GC/g38jqOJEF8VDD0QCUqqmeCXAfRBo9K3d+7xrUpHypcsMU/BA4nfUlT6hQhm0J+DL7hGrs2/NEki5lstnS9KcDOm/AnG1PyXSGNDM1R2vKD0lgVWnM/eh9C/mYOeJQh9UFoyPgYPQiFjqqEPacoCWHjLGTyNIlgMPdBMR2bguqCWXJq5JUtlM2WPwsiGpTiBBgEzYjS6Kk1d83QkRISUF13LnDcj9WrAZ9JPIyp/ektHGP2qBG9d8iTVP4OXKxGjL+jr0gork80KK5MbwvPKrtGI/PhrHWRLjVHTHZdaWFc2wrjGMcqy4XhUHilG6KF4vEqj5nB4c2Aa4+2EqJR01pwBJdHHRfSdieTCA05j3DJeazp+M7ILDwLccCi3V3VeULHwwJdINQa3VG8JJgHV2NLM+rPZykunlpzZYKVJ8D2MfHRqMyMBRvgdjJw7tZmRPFyj2RPCbx6sF7MMfPN4PamVPFpLK3nAntRKHq6lladTnXlNdU1hTGVkPqrKY3r/FvlYT6Df6z479CBmPB84KNqWDAqRkpGxNEEaoNwS8KsH8BEA8Tqzs/AgobNI0OA2ZBgFW1nWMsXHGLtyFsgrZ2HhAU315DYWQSM4eYA8jQ39UWzMqU4lghMVkv1pyQsMm+yepXpC3hkrCw9wilzfmqmVNWaYvdk68imTgsfItWpLnDLFBFdtX8Qx0xoD8CAjYKpdpDCqbcgZBlBwKSNyF8aZgbFXwdecFo3oKEJifSbWZ/LPX38TSoxzvibGDGoiQrLU1P7MP/NPNEpRESqRBCjZFAMSShGvZhEliJ4gcYtURGk6I4wTNeN++zMfCEKDgFDC8Y6oelc8wjSJU6VJyKTSBO+Z0kbHypVCLj5c56wYGdiNWawlsWOxTGJgtsIcufVoFqnkOXWVT6EvsRGVG8mpk37IHYsLzf5cBMwdjj2F/ZHXuqew/y8Ku2cEe0awZwR7RrADI3A3r617Y7UmG9QPUOkPrvEHCyO7cs+cUjugEsGVy/pet2s+qinn+6hUmEbkQzYZvF37h75InVClqhXuonaGyfuQppGGftfdFNkU5aypEbhvJOwbCf+pRoLSVKdq/YyYjVSaxkld1anZ8wLxXEouYWI3gLO1xyTJAzW4MReyyhqjUnS8s5p3mbgLmP9VS+rvrOx6paEJSa/dzhSo3SbQWdGG7ajKnizsQBaq+2lw5Yci19+RVUOhxjclsgOj240Hvvb6uX66dKpIfvBH2U+NuxxU+zPlFmTnPCMGOTO55KGozxiUUshd3bmwwrvRz9zFjHrWuFbzo2pzbWn84dRB0uPUOJJt5B9YYlaz1n0u2N0cgrrlP36PDZNdeHDU662T1U80YoGlosTt2c5MNUBNmQWZ5Q2wPCESfunpY3o4w+oNqNB5Es5BWzrVuG4Xa0pjXoE2TbXBIHlZZ7YDY6lGRkjyloyv7wtq1nbkpYnl/cM3HxMb5342r5ATqy3KTtXGUJy7LWhKkdeDwdWaQpcf5cQwNyFyXX4lIkY9Eea9iUQoozShpk5AJ6/AnVIF7pgKbDIf5dSWiZusxwMdmjC7ze7rROtE9TsdTNt+JNKgTcfINW1T5iYO7fUzlUzPrJKzq8s3OHNVAfo3w+KEa5OdLt/K05Z7RBP2Bk3UXG/MdjVWDRCz18YlJ2XCYvL+w+pdkIt7GicR1r7bAYchfXYcnhy1jk8PTltHxye91ugw9Fs9//nJYXhyQkN6AuuvauT97FW3d9UMXTbxVjla3qjlcPE+B71u76jVPW31ng8OjvvHB/3es3b39OAPKF/JmuYVb1VN8yoXo22DULnpbCtWubpsK/YoExmHddm5jO+K7tR1+cpduFKLrdQq24LSDgv9liUoWhQKRRGEzuwxIWdXl2tJUXpkAJ36Fr/ynLePwascwNW5M17HFs5BI41/WT4x6GNOszPTbR+0u5aXCaVjygsm6vCj0knODqQByE4SUWYhPCOqDlpuluS+cmrMdwsvQw8mBoz6NzCfj6jCjzJaLMzwt9T2P26GHkypZIZIW7DIN9JCyVec5SjNdSu7FEwNkbdIUal+BrKcxJnvY6Ib5w4LeHn1/noAK4KX5Yikd6YM0DvoA5hX09zK+nM3NoeI8nFqr4LgdJq/fwFLO1Lw +api: eJztW21v2zYQ/isEP22A/BK3SVt/Wtq0aNZ2DRq3A9YaAS2dbLaSqJKUGy8wsB+xX7hfMhypF0qWFcdoC6xzvyQh741H8u65o3pDNZsrOn5Pf4fZQohPik49KlKQTHORnAd0TDUoffXFTl+pbKZ8yVOcpR6V8DkDpR+LYEXHN9QXiYZE468sTSPuGymDj0okOKb8BcQMf0sl6tAclBl3hF7xwLAnq9chHb+/oXqVAh1TpSVP5tSjoZAx03RMs4wHdO2VFEkWRXQ99ajmOsKBS0csOUfamqa6mrpFYWTc4hKwIODIxqKLGumGpTMhImCJa1puPI60i6E+l34WMfnTSzaD6Fclkt55kmb6Z+oVQsTsI/i6tsIGMa6wQdzhnmdmjcjy4691ki81Bs32XKqzrnyEJxrmIOuK41l9xPXQbf54lkXd7vBuKNcQ78bEpGSr7hNQY72bR1+hJ9ceTVgMO/prQ8ZvyLv2aABbLuXuos4cEWuP+hKYhuCK6R2DScA09DQ39mzX8sSKJafGWVkafAslb63YXEkAEXwDJWdWbK6kcNds9RXDb+Gsx6s8+Bb++qpaCm+VWgqHfVUthbtKLV9PdG410y2JMZMR/mgKj9n1S0jmekHHo+HDex6NeVIMHLm6JaeOp2SEmhbAApA7BvzmBbxDgHie61l7NGWrSLDgKuQQBTtp1jKDuyi7sBrIM6th7VGW6cVVLILO4ORRSLIY4Y/i84TpTAK1rELyPw14odMuvaeZXpBXqGXtUVhCoq+QtLHGPGZv156jK9V38YnqI/KCALdQMh9UPwTtL9yBzxlIbgdAaZ+pOlE5VtE5sEz1JSy5yn/TksOyi6SSu4XgViWRmM+75n0Rx1zbFVth20zcnK2s25yrDNucK23anHLNQVcq0NvsaZmub0Njsr5vjcnSpJY51yZYsihjWshtVrUSVHa1TleWtU6XtrXO1qxLllyKJIZkq9e2kDgWthM4NrYTVFa2z1d2Olc5L4Ce4iWe4D1t4JKinJixWQTE3HVi7jr556+/CSN4qX1N8AaDJiIkpaT+h+RD8o5FGSjCJJAAJF9CQEIp4oqKKEH0AogNDooozVaEJ0StEr//IZkIwoKAMJLAF6LaTfEI1yTOlCYhl0oTuOZKo4zKFCeG344PDRuZmIC23gj+tvrjEgIMYZiqNr3plmBnzCJGBb6ETjTTWdRZ7tvMMfm0256nAbdJ5VD6/chrPZR+/6/S74CkD0j6gKQPSPqApA9I+oCkvwuStp2+nd9iWlV2iJ+A0m/sQxNdI29lHmY3M6BSkSibLUbDIf5oHjnfB6XCLCJvcmLq7fte5YvMMjXQoNP7NBR47kOWRZqOh7YzyZcgV10PT4fG9aFx/Z9qXCvNdKY27whupNIsTtvQWsueOwVbyVmGif0CnMk9eEhuwa6dZyFHpDEoxeZ7i3mVs1uH+Z8M6tw7cFcSuiLppd0ZpyTaFnQquL0bxD+A7APIPoDsA8j+LiC7GQcxH/9QzZxv2MWhDjbuSgA2iV9tTZSt7c7NrKQzRYqEOcs/CdsnwZnPyXYoEs5yQF0g+vMkFO0nBqQUcl9znhrm/cq2wsS8ZGsxreXjt25M1vmBm03ldxNji1Pkv2WJOdbbtNnRu90Fbcu/+x5jBbj26P3RaLPIe8ciHpg8Teye7V3hBaAZN0Gm7DjWCSLh12bv8mYwbXYOnJcOYQ00kFPN23axBVIWyG0bqXEGKeAwNx1/A9FzIF88Afj62hGzsSNP0JfXt3cM0DfW/JzOORPVFuW3aqsrzuwWdB2R55PJxYZAez7qBwM7COSy/ulqDHoh8PvWVCgUmjLME3RQgNtBDdwOEN3gyQe5NGniff6mQAcs5Wab7Z8LrdPxYBAJn0ULobSdnppmTSa5XhnW04vzF7CyuYCO309dgks8k/aU1cnKnWEpfwHoK/sCY3rnVZsddxgNsVzoDDztb6ovdZ9esziNoPXLW3ovZA+Pw5P7veMHRw96949PRr3ZvdDvjfxHJ/fCkxMWshO6+SFt8WpavSlWT27lU1F1MuvbUw673Q86Go7u94YPeqNHk6Pj8fHRePSwP3xw9AetNzC66NweRBddo42wqxMafYFd2RqF/q5sd1KRV3z2TJb+rUBO21tS/a2n9pBTe5C5rQCcOq3JMg6awBMKN+6cziHRjJxenG+ciNoUxnDmm5BVHHgzTT3nzqnxYMDMcJ/xAZocmwhONbD4l3IGAw5eYKtm2D/qDw0UE0rHLHFUtIWMxmNlfhsxJg7SiHETtXNsaqNJ5anGlVF5vYShEaMEkt7czJiCtzJar3EYywYMFlOPLpnkiJ1NpCh20cSRT7AqAnOie3kdgLWODRONhIdRynKc+j6kupN26oTIi9eXE1phuvyASPYFIz/7QseU4v8asCsb39ixGxqxZJ6Zrgm1MvHfv30U+xs= sidebar_class_name: "post api-method" info_path: reference/api/agenta-api custom_edit_url: null diff --git a/docs/docs/reference/openapi.json b/docs/docs/reference/openapi.json index ed0908105c..5eaa9f9604 100644 --- a/docs/docs/reference/openapi.json +++ b/docs/docs/reference/openapi.json @@ -1 +1 @@ -{"openapi":"3.1.0","info":{"title":"Agenta API","description":"Agenta API","contact":{"name":"Agenta","url":"https://agenta.ai/","email":"team@agenta.ai"},"version":"0.1.0"},"paths":{"/billing/stripe/events/":{"post":{"tags":["Billing"],"summary":"Handle Events","operationId":"handle_events","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/stripe/portals/":{"post":{"tags":["Billing"],"summary":"Create Portal User Route","operationId":"create_portal","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/stripe/checkouts/":{"post":{"tags":["Billing"],"summary":"Create Checkout User Route","operationId":"create_checkout","parameters":[{"name":"plan","in":"query","required":true,"schema":{"type":"string","title":"Plan"}},{"name":"success_url","in":"query","required":true,"schema":{"type":"string","title":"Success Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/plans":{"get":{"tags":["Billing"],"summary":"Fetch Plan User Route","operationId":"fetch_plans","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/plans/switch":{"post":{"tags":["Billing"],"summary":"Switch Plans User Route","operationId":"switch_plans","parameters":[{"name":"plan","in":"query","required":true,"schema":{"type":"string","title":"Plan"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/subscription":{"get":{"tags":["Billing"],"summary":"Fetch Subscription User Route","operationId":"fetch_subscription","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/subscription/cancel":{"post":{"tags":["Billing"],"summary":"Cancel Subscription User Route","operationId":"cancel_plan","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/usage":{"get":{"tags":["Billing"],"summary":"Fetch Usage User Route","operationId":"fetch_usage","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/organizations/domains/":{"get":{"tags":["Organizations"],"summary":"List Domains","description":"List all domains for the organization.","operationId":"list_organization_domains","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrganizationDomainResponse"},"type":"array","title":"Response List Organization Domains"}}}}}},"post":{"tags":["Organizations"],"summary":"Create Domain","description":"Create a new domain for verification.\n\nThis endpoint initiates the domain verification process by:\n1. Creating a domain record\n2. Generating a unique verification token\n3. Returning DNS configuration instructions\n\nThe user must add a DNS TXT record to verify ownership.","operationId":"create_organization_domain","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/domains/verify":{"post":{"tags":["Organizations"],"summary":"Verify Domain","description":"Verify domain ownership via DNS TXT record.\n\nThis endpoint checks for the presence of the verification TXT record\nand marks the domain as verified if found.","operationId":"verify_organization_domain","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainVerify"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/domains/{domain_id}/refresh":{"post":{"tags":["Organizations"],"summary":"Refresh Domain Token","description":"Refresh the verification token for an unverified domain.\n\nGenerates a new token and resets the 48-hour expiry window.\nThis is useful when the original token has expired.","operationId":"refresh_organization_domain_token","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/domains/{domain_id}/reset":{"post":{"tags":["Organizations"],"summary":"Reset Domain","description":"Reset a verified domain to unverified state for re-verification.\n\nGenerates a new token and marks the domain as unverified.\nThis allows re-verification of already verified domains.","operationId":"reset_organization_domain","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/domains/{domain_id}":{"delete":{"tags":["Organizations"],"summary":"Delete Domain","description":"Delete a domain.","operationId":"delete_organization_domain","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/providers/":{"get":{"tags":["Organizations"],"summary":"List Providers","description":"List all SSO providers for the organization.","operationId":"list_organization_providers","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrganizationProviderResponse"},"type":"array","title":"Response List Organization Providers"}}}}}},"post":{"tags":["Organizations"],"summary":"Create Provider","description":"Create a new SSO provider configuration.\n\nSupported provider types:\n- oidc: OpenID Connect\n- saml: SAML 2.0 (coming soon)","operationId":"create_organization_provider","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationProviderCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/providers/{provider_id}":{"patch":{"tags":["Organizations"],"summary":"Update Provider","description":"Update an SSO provider configuration.","operationId":"update_organization_provider","parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","title":"Provider Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationProviderUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Organizations"],"summary":"Delete Provider","description":"Delete an SSO provider configuration.","operationId":"delete_organization_provider","parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","title":"Provider Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/providers/{provider_id}/test":{"post":{"tags":["Organizations"],"summary":"Test Provider","description":"Test SSO provider connection.\n\nThis endpoint tests the OIDC provider configuration by fetching the\ndiscovery document and validating required endpoints exist.\nIf successful, marks the provider as valid (is_valid=true).\nIf failed, marks as invalid and deactivates (is_valid=false, is_active=false).","operationId":"test_organization_provider","parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","title":"Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}":{"get":{"tags":["Organizations"],"summary":"Fetch Organization Details","description":"Return the details of the organization.","operationId":"fetch_organization_details","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDetails"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Organizations"],"summary":"Update Organization","operationId":"patch_organization","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ee__src__models__api__organization_models__Organization"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Organizations"],"summary":"Update Organization","operationId":"update_organization","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ee__src__models__api__organization_models__Organization"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Organizations"],"summary":"Delete Organization","description":"Delete an organization (owner only).","operationId":"delete_organization","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces":{"post":{"tags":["Organizations"],"summary":"Create Workspace","operationId":"create_workspace","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspace"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces/{workspace_id}":{"put":{"tags":["Organizations"],"summary":"Update Workspace","operationId":"update_workspace","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkspace"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/transfer/{new_owner_id}":{"post":{"tags":["Organizations"],"summary":"Transfer Organization Ownership","description":"Transfer organization ownership to another member.","operationId":"transfer_organization_ownership","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"new_owner_id","in":"path","required":true,"schema":{"type":"string","title":"New Owner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations":{"get":{"tags":["Organizations"],"summary":"List Organizations","description":"Returns a list of organizations associated with the user's session.\n\nReturns:\n list[Organization]: A list of organizations associated with the user's session.\n\nRaises:\n HTTPException: If there is an error retrieving the organizations from the database.","operationId":"list_organizations","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/oss__src__models__api__organization_models__Organization"},"type":"array","title":"Response List Organizations"}}}}}},"post":{"tags":["Organizations"],"summary":"Create Organization","description":"Create a new organization.","operationId":"create_organization","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/permissions":{"get":{"tags":["Workspaces"],"summary":"Get All Workspace Permissions","description":"Get all workspace permissions.\n\nReturns a list of all available workspace permissions.\n\nReturns:\n List[Permission]: A list of Permission objects representing the available workspace permissions.\n\nRaises:\n HTTPException: If there is an error retrieving the workspace permissions.","operationId":"get_all_workspace_permissions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Permission"},"type":"array","title":"Response Get All Workspace Permissions"}}}}}}},"/workspaces/{workspace_id}/roles":{"post":{"tags":["Workspaces"],"summary":"Assign Role To User","description":"Assigns a role to a user in a workspace.\n\nArgs:\n payload (UserRole): The payload containing the organization id, user email, and role to assign.\n workspace_id (str): The ID of the workspace.\n request (Request): The FastAPI request object.\n\nReturns:\n bool: True if the role was successfully assigned, False otherwise.\n\nRaises:\n HTTPException: If the user does not have permission to perform this action.\n HTTPException: If there is an error assigning the role to the user.","operationId":"assign_role_to_user","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRole"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Workspaces"],"summary":"Unassign Role From User","description":"Delete a role assignment from a user in a workspace.\n\nArgs:\n workspace_id (str): The ID of the workspace.\n email (str): The email of the user to remove the role from.\n organization_id (str): The ID of the organization.\n role (str): The role to remove from the user.\n request (Request): The FastAPI request object.\n\nReturns:\n bool: True if the role assignment was successfully deleted.\n\nRaises:\n HTTPException: If there is an error in the request or the user does not have permission to perform the action.\n HTTPException: If there is an error in updating the user's roles.","operationId":"unassign_role_from_user","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}},{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"role","in":"query","required":true,"schema":{"type":"string","title":"Role"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/secrets/":{"get":{"tags":["Secrets"],"summary":"List Secrets","operationId":"list_secrets","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SecretResponseDTO"},"type":"array","title":"Response List Secrets"}}}}}},"post":{"tags":["Secrets"],"summary":"Create Secret","operationId":"create_secret","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSecretDTO"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretResponseDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/secrets/{secret_id}":{"get":{"tags":["Secrets"],"summary":"Read Secret","operationId":"read_secret","parameters":[{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretResponseDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Secrets"],"summary":"Update Secret","operationId":"update_secret","parameters":[{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSecretDTO"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretResponseDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Secrets"],"summary":"Delete Secret","operationId":"delete_secret","parameters":[{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/subscriptions/":{"post":{"tags":["Webhooks"],"summary":"Create Subscription","operationId":"create_webhook_subscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/subscriptions/test":{"post":{"tags":["Webhooks"],"summary":"Test Subscription","operationId":"test_webhook_subscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionTestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/subscriptions/{subscription_id}":{"get":{"tags":["Webhooks"],"summary":"Fetch Subscription","operationId":"fetch_webhook_subscription","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subscription Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Webhooks"],"summary":"Edit Subscription","operationId":"edit_webhook_subscription","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subscription Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete Subscription","operationId":"delete_webhook_subscription","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subscription Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/subscriptions/query":{"post":{"tags":["Webhooks"],"summary":"Query Subscriptions","operationId":"query_webhook_subscriptions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/deliveries":{"post":{"tags":["Webhooks"],"summary":"Create Delivery","operationId":"create_webhook_delivery","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/deliveries/{delivery_id}":{"get":{"tags":["Webhooks"],"summary":"Fetch Delivery","operationId":"fetch_webhook_delivery","parameters":[{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Delivery Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/deliveries/query":{"post":{"tags":["Webhooks"],"summary":"Query Deliveries","operationId":"query_webhook_deliveries","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/otlp/v1/traces":{"get":{"tags":["OpenTelemetry"],"summary":"Status check for OTLP","description":"Return the OTLP endpoint liveness status.\n\nLightweight readiness probe. Returns `{\"status\": \"ready\"}` when\nthe router is mounted. Intended for health checks from OTel\ncollectors before they start exporting traces.","operationId":"otlp_status","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectStatusResponse"}}}}}},"post":{"tags":["OpenTelemetry"],"summary":"Ingest traces via OTLP","description":"Ingest traces via the OTLP/HTTP protobuf protocol.\n\nThis endpoint accepts a serialized\n`ExportTraceServiceRequest` protobuf. Point any OTLP/HTTP\ncollector or SDK at `POST /otlp/v1/traces` and spans will flow\ninto the same ingest stream as the Agenta-native endpoints.\n\nUse this when you already have OTel instrumentation emitting\nOTLP. For new integrations that don't need raw OTLP, prefer\n`POST /tracing/spans/ingest` — it takes JSON, accepts Agenta's\nnested shape directly, and surfaces parse failures immediately.\n\n## Content-Type and size limit\n\nBinary protobuf only (`Content-Type: application/x-protobuf`).\nJSON OTLP is not accepted. Requests larger than the configured\nbatch limit (default 4 MB, see `OTLP_MAX_BATCH_BYTES`) return\n`413 Request Entity Too Large`.\n\n## Response\n\nSuccessful ingest returns `200 OK` with a serialized\n`ExportTraceServiceResponse` protobuf. Parse failures on the\nrequest body return `400`; malformed spans return `500`; quota\nexhaustion returns `403`. Like the native ingest paths, spans\nare queued on a Redis stream and persisted asynchronously — see\n[Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202).","operationId":"otlp_ingest","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectStatusResponse"}}}}}}},"/auth/discover":{"post":{"tags":["Access"],"summary":"Discover","description":"Discover authentication methods available for a given email.\n\nThis endpoint does NOT reveal:\n- Organization names\n- User existence (optionally - currently does for UX)\n- Detailed policy information\n\nReturns minimal information needed for authentication flow.","operationId":"discover_access","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoverRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoverResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/access":{"get":{"tags":["Access"],"summary":"Check Organization Access","description":"Check if the current session satisfies the organization's auth policy.\n\nReturns 200 when access is allowed, 403 with AUTH_UPGRADE_REQUIRED when not.","operationId":"check_organization_access","parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/session/identities":{"patch":{"tags":["Access"],"summary":"Update Session Identities","operationId":"update_session_identities","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionIdentitiesUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/sso/callback/{organization_slug}/{provider_slug}":{"get":{"tags":["Access"],"summary":"Sso Callback Redirect","description":"Custom SSO callback endpoint that redirects to SuperTokens.\n\nThis endpoint:\n1. Accepts clean URL path: /auth/sso/callback/{organization_slug}/{provider_slug}\n2. Validates the organization and provider exist\n3. Builds SuperTokens thirdPartyId: sso:{organization_slug}:{provider_slug}\n4. Redirects to SuperTokens callback: /auth/callback/{thirdPartyId}\n\nSuperTokens then handles:\n1. Exchange code for tokens (using our dynamic provider config)\n2. Get user info\n3. Call our sign_in_up override (creates user_identity, adds user_identities to session)\n4. Redirect to frontend with session cookie","operationId":"sso_callback_redirect","parameters":[{"name":"organization_slug","in":"path","required":true,"schema":{"type":"string","title":"Organization Slug"}},{"name":"provider_slug","in":"path","required":true,"schema":{"type":"string","title":"Provider Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tracing/spans/ingest":{"post":{"tags":["Deprecated"],"summary":"Ingest Spans","description":"Ingest spans into the tracing backend.\n\nUse this endpoint to write full OpenTelemetry-style spans — including\nmulti-span hierarchies (parent → child → grandchild), attributes,\nreferences, events and links. For simple single-span annotations or\nevaluator outputs, prefer `POST /preview/tracing/traces/`\n(`create_simple_trace`) — it's a higher-level helper on top of this\nendpoint.\n\n## Request body\n\nProvide exactly one of:\n\n- `spans`: a flat list of spans. Parent/child relationships are\n expressed via `parent_id` on each span.\n- `traces`: a nested tree keyed by `trace_id` then by span name,\n where each node may contain a `spans` dict of its children. The\n query endpoint (`POST /tracing/spans/query`) returns this shape.\n\nEach span requires `trace_id`, `span_id`, `start_time`, `end_time`.\n`trace_id` must be a 32-char hex UUID, `span_id` a 16-char hex.\nAttributes follow the Agenta convention under the `ag` namespace\n(`ag.type`, `ag.data`, `ag.metrics`, `ag.references`) and may be\nsubmitted either as a flat dotted map (OTel wire format) or as a\nnested object — both are accepted.\n\n## Response\n\nReturns `202 Accepted` with the links (`trace_id` + `span_id`) for\nthe spans that were parsed into the ingest stream. See\n[Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202)\nfor what `count < N submitted` means.\n\n## Example\n\n```json\n{\n \"spans\": [\n {\n \"trace_id\": \"f5a2efb40895881e938e2ebc070beca8\",\n \"span_id\": \"15f3df0731995245\",\n \"span_name\": \"completion_v0\",\n \"span_type\": \"workflow\",\n \"span_kind\": \"SPAN_KIND_SERVER\",\n \"start_time\": \"2026-04-16T18:18:18.491929Z\",\n \"end_time\": \"2026-04-16T18:18:20.415372Z\",\n \"attributes\": {\n \"ag.type.trace\": \"invocation\",\n \"ag.type.span\": \"workflow\",\n \"ag.data.inputs.country\": \"France\",\n \"ag.data.outputs\": \"Paris\"\n }\n }\n ]\n}\n```","operationId":"ingest_spans","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/tracing/spans/query":{"post":{"tags":["Deprecated"],"summary":"Query Spans","description":"Query spans and traces in the tracing backend.\n\nUse `focus` in the request body to control the response shape:\n\n- `\"trace\"` (default): returns a nested `traces` tree keyed by\n `trace_id` then by span name. Children hang off their parent's\n `spans` field. Best for rendering a trace waterfall.\n- `\"span\"`: returns a flat `spans` list. Best for paginating or\n filtering across all spans regardless of hierarchy.\n\nUse `oldest` / `newest` (unix seconds) to window the query and\n`limit` to cap the number of traces/spans returned.\n\nThe response preserves the Agenta `ag.*` attribute namespace and\nincludes computed metrics (`ag.metrics.duration`, `ag.metrics.tokens`,\n`ag.metrics.costs`) on each span. The `traces` tree returned here is\nthe same shape that `POST /tracing/spans/ingest` accepts as its\n`traces` field.","operationId":"query_spans_rpc","deprecated":true,"parameters":[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tracing/analytics/query":{"post":{"tags":["Deprecated"],"summary":"Fetch Analytics","description":"Aggregate span metrics into time buckets.\n\nRuns filtering and windowing identical to `POST /tracing/spans/query`,\nthen bucketizes the matched spans by time and computes one or more\nmetric summaries per bucket. Use this to build charts of latency,\ncost, token usage, or custom numeric and categorical attributes.\n\n## Request body\n\n- `filtering` — same shape as the query endpoint, scoped to the spans\n that contribute to the analytics.\n- `windowing` — `oldest`/`newest` for the time range and `interval`\n for bucket width (in seconds).\n- `specs` — a list of `MetricSpec` entries describing which\n attributes to summarize and how. Each spec declares a `type`\n (`numeric/continuous`, `numeric/discrete`, `binary`,\n `categorical/single`, `categorical/multiple`, `string`, `json`,\n or `*` for auto) and a dotted `path` into the span (for example\n `attributes.ag.metrics.costs.cumulative.total`).\n\n## Response\n\nBuckets are returned in chronological order. Each bucket carries a\n`metrics` dict keyed by spec path. See [Tracing — the ag.*\nnamespace](/reference/api-guide/tracing#the-ag-attribute-namespace)\nfor the cumulative/incremental metric layout on each span.","operationId":"query_analytics","deprecated":true,"parameters":[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}},{"name":"specs","in":"query","required":false,"schema":{"title":"Specs"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tracing/traces/":{"post":{"tags":["Deprecated"],"summary":"Create Trace","description":"Create a trace from one or more spans.\n\nThis is the single-trace counterpart to `POST /tracing/spans/ingest`.\nAccepts the same `OTelTracingRequest` body (either `spans` flat list\nor `traces` nested tree) but requires all spans to share a single\n`trace_id`.\n\nReturns `202 Accepted` with the links for the spans that entered\nthe ingest stream. See [Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202).\n\nMost callers should prefer `POST /tracing/spans/ingest` (no\nsingle-trace restriction) or `POST /simple/traces/` (helper for a\none-span payload).","operationId":"create_trace_tracing","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/tracing/traces/{trace_id}":{"get":{"tags":["Deprecated"],"summary":"Fetch Trace","description":"Fetch a single trace by `trace_id`.\n\nReturns the trace as a `traces` map keyed by `trace_id` → span\nname. The response is empty when the trace is not in the current\nproject. `trace_id` must be a 32-char hex UUID; any other format\nreturns `400`.\n\nFor flat-list retrieval across many traces, use\n`POST /tracing/spans/query` with `focus=\"span\"`.","operationId":"fetch_trace_tracing","deprecated":true,"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Deprecated"],"summary":"Edit Trace","description":"Replace the spans of an existing trace.\n\nThe path `trace_id` must match the `trace_id` in the payload.\nMismatches return `400`. The payload must contain exactly one\ntrace; submitting spans from more than one trace returns `400`.\n\nEdit is implemented as a re-ingest: the new spans are written\nthrough the same stream as `POST /tracing/spans/ingest`, and the\n`202 Accepted` response reports how many spans entered the stream.\nThe worker reconciles the trace asynchronously.","operationId":"edit_trace_tracing","deprecated":true,"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Deprecated"],"summary":"Delete Trace","description":"Delete a trace and all its spans.\n\nRemoves every span that shares this `trace_id` within the project.\nReturns `202 Accepted` with the links for the spans that were\nmarked for deletion. `trace_id` must be a 32-char hex UUID.\n\nDeletion is not reversible. For soft-removal semantics on a\nsingle-trace simple annotation, prefer\n`DELETE /simple/traces/{trace_id}`.","operationId":"delete_trace_tracing","deprecated":true,"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tracing/sessions/query":{"post":{"tags":["Deprecated"],"summary":"List Sessions","description":"List distinct session IDs from span attributes.\n\nReturns the distinct values of `ag.session.id` across spans in the\ncurrent project, in a windowed, cursor-paginated form. Use this to\ndrive a session-picker UI before drilling into the spans of each\nsession.\n\nThe `realtime` flag controls the cursor field:\n\n- `false` or unset — paginate by a stable `first_active` cursor\n (safe to iterate under heavy write load).\n- `true` — paginate by `last_active`, reflecting ongoing activity\n but less stable between pages.\n\nThe response includes a `windowing` cursor; pass it as `windowing.next`\non the next call to continue.","operationId":"query_sessions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionsQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/tracing/users/query":{"post":{"tags":["Deprecated"],"summary":"List Users","description":"List distinct user IDs from span attributes.\n\nReturns the distinct values of `ag.user.id` across spans in the\ncurrent project. Same pagination and `realtime` semantics as\n`POST /tracing/sessions/query`; pass the returned `windowing.next`\ncursor on subsequent calls.","operationId":"query_users","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsersQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/tracing/spans/analytics":{"post":{"tags":["Legacy"],"summary":"Fetch Legacy Analytics","description":"Aggregate span metrics using the fixed legacy schema.\n\nReturns time-bucketed aggregates with a fixed set of fields\n(`count`, `duration`, `costs`, `tokens`) split into `total` and\n`errors`. The shape predates `specs`-driven analytics and is kept\nfor the existing observability dashboards that consume it.\n\nNew integrations should prefer `POST /tracing/analytics/query`,\nwhich accepts `specs` and can summarize arbitrary span attributes,\nnot just the four fixed metrics.","operationId":"fetch_legacy_analytics","parameters":[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OldAnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/traces/":{"get":{"tags":["Traces"],"summary":"Fetch Traces","description":"Fetch multiple traces by known IDs.\n\nPoint lookup endpoint. Accepts either repeated query params\n(`?trace_id=a&trace_id=b`) or a comma-separated single param\n(`?trace_ids=a,b`). Results are deduplicated. Returns `400` when\nno IDs are supplied. Use `POST /traces/query` for filter-based\nretrieval.","operationId":"fetch_traces","parameters":[{"name":"trace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Trace Id"}},{"name":"trace_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TracesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Traces"],"summary":"Create Trace","description":"Create a single trace from the canonical `Trace` shape.\n\nAccepts one trace (`trace_id` plus a nested `spans` tree) and\nreturns the resulting `trace_id`. The payload is internally\nnormalized into the same ingest pipeline as\n`POST /tracing/spans/ingest`.\n\nReturns `202 Accepted`. The async write contract applies — see\n[Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202).\n\nUse this when you want to operate on whole traces in the\nlist-shaped `Trace` payload. For flat-list ingestion or multiple\ntraces in one call, use `POST /traces/ingest` (plural).","operationId":"create_trace","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/traces/query":{"post":{"tags":["Traces"],"summary":"Query Traces","description":"Query traces as a list of canonical `Trace` records.\n\nThin wrapper over the shared span-query backend that forces\n`focus = \"trace\"` and returns the list-shaped `Traces` payload\n(one entry per trace, each with its nested `spans` tree). Use this\nto build a table of runs, where each row is a trace.\n\n## Request body\n\n- `filtering` — span-level conditions, same dialect as\n `POST /spans/query`. A trace matches when any of its spans\n matches.\n- `windowing` — cursor pagination and time range.\n- `query_ref`, `query_variant_ref`, `query_revision_ref` — resolve\n filters and windowing from a saved query revision. If the\n revision's stored `formatting.focus` is `span`, this endpoint\n returns `409` — call `POST /spans/query` instead.\n\n## Response\n\nReturns `{count, traces: [...]}`. For the per-trace map shape\nkeyed by `trace_id`, call `POST /tracing/spans/query` with\n`focus=\"trace\"`.","operationId":"query_traces","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TracesQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TracesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/traces/{trace_id}":{"get":{"tags":["Traces"],"summary":"Fetch Trace","description":"Fetch a single trace by `trace_id` in the canonical `Trace` shape.\n\nReturns `{count: 1, trace}` when found and `{count: 0}` otherwise.\n`trace_id` must be a 32-char hex UUID; any other format returns\n`400`. The reserved path segments `query` and `ingest` return\n`405` to disambiguate from the sibling query/ingest endpoints.","operationId":"fetch_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Traces"],"summary":"Edit Trace","description":"Replace a trace's spans using the canonical `Trace` shape.\n\nPath `trace_id` must match the `trace_id` inside the payload's\n`trace.trace_id`. Mismatches return `400`. The payload must\ndescribe exactly one trace.\n\nEdit re-ingests the spans through the same stream as\n`POST /tracing/spans/ingest`. Returns `202 Accepted` once the\nspans are queued. The worker reconciles the trace asynchronously.","operationId":"edit_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Traces"],"summary":"Delete Trace","operationId":"delete_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/traces/ingest":{"post":{"tags":["Deprecated"],"summary":"Ingest Traces","description":"Ingest a batch of traces in the canonical `Traces` list shape.\n\nAccepts a list of trace records (each `trace_id` plus nested\n`spans`). Internally normalized into the same pipeline as\n`POST /tracing/spans/ingest`. Use this when you already hold\ndata in the `Traces` list shape — for example, replaying traces\nfrom another environment.\n\nReturns `202 Accepted` with the list of accepted `trace_ids`. See\n[Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202)\nfor what `count` means here.","operationId":"ingest_traces","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TracesRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/spans/":{"get":{"tags":["Traces"],"summary":"Fetch Spans","description":"Fetch spans by known IDs.\n\nPoint lookup endpoint. At least one of `trace_id` or `span_id`\nmust be present. Both accept either repeated query params\n(`?trace_id=a&trace_id=b`) or a comma-separated single param\n(`?trace_ids=a,b`); results are deduplicated.\n\nReturns `400` when neither IDs nor trace IDs are supplied.\nFor filter-based retrieval, use `POST /spans/query`.","operationId":"fetch_spans","parameters":[{"name":"trace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Trace Id"}},{"name":"trace_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Ids"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Span Id"}},{"name":"span_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpansResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spans/query":{"post":{"tags":["Traces"],"summary":"Query Spans","description":"Query spans as a flat list.\n\nThin wrapper over the shared span-query backend that forces\n`focus = \"span\"`. Use this when you want a paged list of spans\nregardless of trace hierarchy — for example, to surface all LLM\ncalls across traces or to stream spans into an external system.\n\n## Request body\n\n- `filtering` — span-level conditions (fields on `Span` and\n `attributes` paths).\n- `windowing` — cursor pagination and time range (see\n [Query Pattern](/reference/api-guide/query-pattern#windowing)).\n- `query_ref`, `query_variant_ref`, `query_revision_ref` — resolve\n filtering and windowing from a saved query revision. If the\n revision's stored `formatting.focus` is `trace`, this endpoint\n returns `409` — call `POST /traces/query` for that revision.\n\n## Response\n\nReturns `{count, spans}`. For the nested per-trace shape, call\n`POST /traces/query` or `POST /tracing/spans/query` with\n`focus=\"trace\"` instead.","operationId":"query_spans","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpansQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpansResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spans/analytics/query":{"post":{"tags":["Traces"],"summary":"Query Analytics","operationId":"query_spans_analytics","parameters":[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}},{"name":"specs","in":"query","required":false,"schema":{"title":"Specs"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spans/sessions/query":{"post":{"tags":["Traces"],"summary":"Query Sessions","operationId":"query_spans_sessions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionsQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spans/users/query":{"post":{"tags":["Traces"],"summary":"Query Users","operationId":"query_spans_users","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsersQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spans/{trace_id}/{span_id}":{"get":{"tags":["Traces"],"summary":"Fetch Span","description":"Fetch a single span by `trace_id` + `span_id`.\n\nReturns `{count: 1, span}` when found and `{count: 0}` otherwise.\nBoth IDs are required path parameters. Use this to drill in on one\nspan from a trace waterfall without pulling the full tree.","operationId":"fetch_span","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"path","required":true,"schema":{"type":"string","title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/traces/":{"post":{"tags":["Traces"],"summary":"Create Trace","description":"Create a single-span \"simple\" trace.\n\nThis endpoint is a higher-level helper for the common case of\nrecording one self-contained event — an evaluator output, a human\nannotation, a feedback entry, a manually-logged inference. It\ncreates one span under a fresh `trace_id` and returns the resulting\nhandle.\n\n## When to use this vs. `/tracing/spans/ingest`\n\n- **Use this endpoint** when you have a single payload to record\n with no internal hierarchy: evaluation results, human feedback,\n manual annotations, or a standalone completion. It takes care of\n `trace_id`/`span_id` generation, attribute namespacing, and link\n wiring for you.\n- **Use `POST /tracing/spans/ingest`** when you need multi-span\n traces (e.g. an agent run with nested tool calls and LLM spans),\n precise control over IDs, timings, or parent/child relationships,\n or when forwarding traces from another OTel-compatible source.\n\n## Request body\n\nSend a `trace` object with:\n\n- `origin` — who produced the trace (`human`, `auto`, `custom`).\n- `kind` — intent (`adhoc`, `eval`, `play`).\n- `channel` — transport that produced it (`sdk`, `api`, `web`, `otlp`).\n- `data` — required dict carrying the actual payload (inputs,\n outputs, or evaluator results).\n- `tags`, `meta` — optional free-form dicts for filtering and\n metadata.\n- `references` — optional links to Agenta entities (application,\n variant, revision, evaluator, testset, etc.).\n- `links` — optional OTel-style links to other traces/spans.\n\nUse `PATCH /preview/tracing/traces/{trace_id}` to update fields\nlater, `GET` to fetch, and `DELETE` to remove. See\n[Tracing — References and links](/reference/api-guide/tracing#references-and-entity-linking)\nfor when to use `references` vs. `links`.","operationId":"create_simple_trace","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceCreateRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/traces/{trace_id}":{"get":{"tags":["Traces"],"summary":"Fetch Trace","description":"Fetch a single \"simple\" trace by `trace_id`.\n\nReturns the high-level `SimpleTrace` view (origin, kind, channel,\ndata, references, links) rather than the raw OTel span shape. Use\nthis for evaluation results, feedback entries, and annotations\ncreated via `POST /simple/traces/`. For the span-level view of the\nsame trace, call `GET /tracing/traces/{trace_id}`.","operationId":"fetch_simple_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Traces"],"summary":"Edit Trace","description":"Update an existing \"simple\" trace.\n\nSupplied fields overwrite the existing trace. Fields not present\nin the request body are left unchanged. `data` is required (the\npayload being recorded); `tags`, `meta`, `references`, and\n`links` are optional.\n\nThis endpoint is intended for annotations and feedback entries,\nwhere the `data.outputs` is the part that typically gets revised.\nFor span-level edits, use `PUT /tracing/traces/{trace_id}`.","operationId":"edit_simple_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Traces"],"summary":"Delete Trace","description":"Delete a \"simple\" trace.\n\nRemoves the single-span trace created via\n`POST /simple/traces/`. Returns the `(trace_id, span_id)` pair\nthat was removed, for logging or downstream cleanup. Use\n`DELETE /tracing/traces/{trace_id}` when operating on a\nmulti-span trace.","operationId":"delete_simple_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/traces/query":{"post":{"tags":["Traces"],"summary":"Query Traces","description":"Query \"simple\" traces.\n\nFilter annotations and feedback by `origin`, `kind`, `channel`,\n`tags`, `meta`, `references`, and `links`. The shape of the\nrequest body is described in the\n[Simple Endpoints](/reference/api-guide/simple-endpoints#query-traces)\nguide, including the distinction between filtering via\n`trace.links` (inbound links on the trace) and the top-level\n`links` (batch GET by the trace's own IDs).\n\nUse this endpoint when building feedback or annotation UIs.\nFor span-level queries across all trace types, use\n`POST /tracing/spans/query`.","operationId":"query_simple_traces","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTracesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invocations/":{"post":{"tags":["Invocations"],"summary":"Create Invocation","operationId":"create_invocation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invocations/{trace_id}":{"get":{"tags":["Invocations"],"summary":"Fetch Invocation","operationId":"fetch_invocation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Invocations"],"summary":"Edit Invocation","operationId":"edit_invocation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Invocations"],"summary":"Delete Invocation","operationId":"delete_invocation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invocations/query":{"post":{"tags":["Invocations"],"summary":"Query Invocations","operationId":"query_invocations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/annotations/":{"post":{"tags":["Annotations"],"summary":"Create Annotation","operationId":"create_annotation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/annotations/{trace_id}":{"get":{"tags":["Annotations"],"summary":"Fetch Annotation","operationId":"fetch_annotation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Annotations"],"summary":"Edit Annotation","operationId":"edit_annotation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Annotations"],"summary":"Delete Annotation","operationId":"delete_annotation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/annotations/query":{"post":{"tags":["Annotations"],"summary":"Query Annotations","operationId":"query_annotations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testcases/":{"get":{"tags":["Testcases"],"summary":"Fetch Testcases","operationId":"fetch_testcases","parameters":[{"name":"testcase_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Testcase Id"}},{"name":"testcase_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testcase Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestcasesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testcases/{testcase_id}":{"get":{"tags":["Testcases"],"summary":"Fetch Testcase","operationId":"fetch_testcase","parameters":[{"name":"testcase_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testcase Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestcaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testcases/query":{"post":{"tags":["Testcases"],"summary":"Query Testcases","operationId":"query_testcases","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestcasesQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestcasesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/":{"post":{"tags":["Testsets"],"summary":"Create Testset","description":"Create an empty testset artifact.\n\nOnly creates the artifact row (name, slug, metadata). No variant or\nrevision is created; add testcases by committing a revision with\n`/testsets/revisions/commit`, or use `/simple/testsets/` to create\na testset with seed rows in a single call.","operationId":"create_testset","parameters":[{"name":"testset_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/{testset_id}":{"get":{"tags":["Testsets"],"summary":"Fetch Testset","description":"Fetch a testset artifact by ID.\n\nReturns the artifact row only; testcases are stored on revisions and\nmust be fetched via `/testsets/revisions/retrieve` or\n`/testcases/query`.","operationId":"fetch_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Testsets"],"summary":"Edit Testset","description":"Update metadata on a testset artifact.\n\nOnly artifact-level fields (name, description, slug, flags, tags,\nmeta, folder) are editable here. Testcase changes are committed as\nnew revisions via `/testsets/revisions/commit`.","operationId":"edit_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/{testset_id}/archive":{"post":{"tags":["Testsets"],"summary":"Archive Testset","description":"Soft-delete a testset artifact.\n\nSets `deleted_at` on the testset. Archived testsets are excluded\nfrom `/testsets/query` unless `include_archived` is true. Use\n`/testsets/{testset_id}/unarchive` to restore.","operationId":"archive_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/{testset_id}/unarchive":{"post":{"tags":["Testsets"],"summary":"Unarchive Testset","description":"Restore a previously archived testset artifact.\n\nClears `deleted_at` on the testset so it shows up in queries again.","operationId":"unarchive_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/query":{"post":{"tags":["Testsets"],"summary":"Query Testsets","description":"List and filter testset artifacts.\n\nFollows the shared query pattern: attribute filters on the testset\nbody, optional `testset_refs` to restrict by id/slug, cursor-based\npagination via `windowing`. Only artifact rows are returned — no\ntestcases. See the Query Pattern guide for the full body shape.","operationId":"query_testsets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/variants/":{"post":{"tags":["Testsets"],"summary":"Create Testset Variant","description":"Create a variant (history branch) on a testset.\n\nMost testsets only need one variant. Create additional variants to\nmaintain parallel revision histories (for example, a staging branch\nseparate from the main one).","operationId":"create_testset_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/variants/{testset_variant_id}":{"get":{"tags":["Testsets"],"summary":"Fetch Testset Variant","description":"Fetch a variant by ID.\n\nReturns the variant row (branch metadata). Use\n`/testsets/revisions/retrieve` to get the latest revision on this\nvariant.","operationId":"fetch_testset_variant","parameters":[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Testsets"],"summary":"Edit Testset Variant","description":"Update metadata on a testset variant.\n\nVariants hold only branch-level metadata (name, description, slug,\nflags, tags, meta). Testcase content belongs to revisions.","operationId":"edit_testset_variant","parameters":[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/variants/{testset_variant_id}/archive":{"post":{"tags":["Testsets"],"summary":"Archive Testset Variant","description":"Soft-delete a testset variant.\n\nArchiving a variant excludes it from `/testsets/variants/query`\nunless `include_archived` is true. Its revisions stay in place and\ncan still be retrieved by ID.","operationId":"archive_testset_variant","parameters":[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/variants/{testset_variant_id}/unarchive":{"post":{"tags":["Testsets"],"summary":"Unarchive Testset Variant","description":"Restore a previously archived testset variant.","operationId":"unarchive_testset_variant","parameters":[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/variants/query":{"post":{"tags":["Testsets"],"summary":"Query Testset Variants","description":"List and filter testset variants.\n\nUse `testset_refs` to scope to one or more parent testsets. Use\n`testset_variant_refs` to restrict by specific variant id/slug.","operationId":"query_testset_variants","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/":{"post":{"tags":["Testsets"],"summary":"Create Testset Revision","description":"Create a new revision on an existing variant.\n\nCreates a revision row without committing content. Most callers\ninstead use `/testsets/revisions/commit`, which writes the\ntestcases and the revision together.","operationId":"create_testset_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/{testset_revision_id}":{"get":{"tags":["Testsets"],"summary":"Fetch Testset Revision","operationId":"fetch_testset_revision","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}},{"name":"include_testcases","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Include full testcase objects. Default (null/true): include testcases. False: return only testcase IDs.","title":"Include Testcases"},"description":"Include full testcase objects. Default (null/true): include testcases. False: return only testcase IDs."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Testsets"],"summary":"Edit Testset Revision","operationId":"edit_testset_revision","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/{testset_revision_id}/archive":{"post":{"tags":["Testsets"],"summary":"Archive Testset Revision","operationId":"archive_testset_revision","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/{testset_revision_id}/unarchive":{"post":{"tags":["Testsets"],"summary":"Unarchive Testset Revision","operationId":"unarchive_testset_revision","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/{testset_revision_id}/download":{"post":{"tags":["Testsets"],"summary":"Fetch Testset Revision To File","operationId":"fetch_testset_revision_to_file","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}},{"name":"file_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["csv","json"],"type":"string"},{"type":"null"}],"description":"File type to download. Supported: 'csv' or 'json'. Default: 'csv'.","default":"csv","title":"File Type"},"description":"File type to download. Supported: 'csv' or 'json'. Default: 'csv'."},{"name":"file_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional custom filename for the download.","title":"File Name"},"description":"Optional custom filename for the download."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/{testset_revision_id}/upload":{"post":{"tags":["Testsets"],"summary":"Create Testset Revision From File","operationId":"create_testset_revision_from_file","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_testset_revision_from_file"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/query":{"post":{"tags":["Testsets"],"summary":"Query Testset Revisions","operationId":"query_testset_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/commit":{"post":{"tags":["Testsets"],"summary":"Commit Testset Revision","operationId":"commit_testset_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/retrieve":{"post":{"tags":["Testsets"],"summary":"Retrieve Testset Revision","operationId":"retrieve_testset_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/log":{"post":{"tags":["Testsets"],"summary":"Log Testset Revisions","operationId":"log_testset_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/":{"post":{"tags":["Testsets"],"summary":"Create Simple Testset","operationId":"create_simple_testset","parameters":[{"name":"testset_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/{testset_id}":{"get":{"tags":["Testsets"],"summary":"Fetch Simple Testset","operationId":"fetch_simple_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Testsets"],"summary":"Edit Simple Testset","operationId":"edit_simple_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/{testset_id}/archive":{"post":{"tags":["Testsets"],"summary":"Archive Simple Testset","operationId":"archive_simple_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/{testset_id}/unarchive":{"post":{"tags":["Testsets"],"summary":"Unarchive Simple Testset","operationId":"unarchive_simple_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/{testset_id}/upload":{"post":{"tags":["Testsets"],"summary":"Edit Simple Testset From File","operationId":"edit_simple_testset_from_file","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_edit_simple_testset_from_file"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/{testset_id}/download":{"post":{"tags":["Testsets"],"summary":"Fetch Simple Testset To File","operationId":"fetch_simple_testset_to_file","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}},{"name":"file_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["csv","json"],"type":"string"},{"type":"null"}],"title":"File Type"}},{"name":"file_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/query":{"post":{"tags":["Testsets"],"summary":"Query Simple Testsets","operationId":"query_simple_testsets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/upload":{"post":{"tags":["Testsets"],"summary":"Create Simple Testset From File","operationId":"create_simple_testset_from_file","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_simple_testset_from_file"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/":{"post":{"tags":["Queries"],"summary":"Create Query","operationId":"create_query","parameters":[{"name":"query_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/{query_id}":{"get":{"tags":["Queries"],"summary":"Fetch Query","operationId":"fetch_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Queries"],"summary":"Edit Query","operationId":"edit_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/{query_id}/archive":{"post":{"tags":["Queries"],"summary":"Archive Query","operationId":"archive_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/{query_id}/unarchive":{"post":{"tags":["Queries"],"summary":"Unarchive Query","operationId":"unarchive_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/query":{"post":{"tags":["Queries"],"summary":"Query Queries","operationId":"query_queries","parameters":[{"name":"query_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"}},{"name":"query_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Query Ids"}},{"name":"query_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query Slug"}},{"name":"query_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Query Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/variants/":{"post":{"tags":["Queries"],"summary":"Create Query Variant","operationId":"create_query_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/variants/{query_variant_id}":{"get":{"tags":["Queries"],"summary":"Fetch Query Variant","operationId":"fetch_query_variant","parameters":[{"name":"query_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Queries"],"summary":"Edit Query Variant","operationId":"edit_query_variant","parameters":[{"name":"query_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/variants/{query_variant_id}/archive":{"post":{"tags":["Queries"],"summary":"Archive Query Variant","operationId":"archive_query_variant","parameters":[{"name":"query_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/variants/{query_variant_id}/unarchive":{"post":{"tags":["Queries"],"summary":"Unarchive Query Variant","operationId":"unarchive_query_variant","parameters":[{"name":"query_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/variants/query":{"post":{"tags":["Queries"],"summary":"Query Query Variants","operationId":"query_query_variants","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/retrieve":{"post":{"tags":["Queries"],"summary":"Retrieve Query Revision","operationId":"retrieve_query_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/":{"post":{"tags":["Queries"],"summary":"Create Query Revision","operationId":"create_query_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/{query_revision_id}":{"get":{"tags":["Queries"],"summary":"Fetch Query Revision","operationId":"fetch_query_revision","parameters":[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Queries"],"summary":"Edit Query Revision","operationId":"edit_query_revision","parameters":[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/{query_revision_id}/archive":{"post":{"tags":["Queries"],"summary":"Archive Query Revision","operationId":"archive_query_revision","parameters":[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/{query_revision_id}/unarchive":{"post":{"tags":["Queries"],"summary":"Unarchive Query Revision","operationId":"unarchive_query_revision","parameters":[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/query":{"post":{"tags":["Queries"],"summary":"Query Query Revisions","operationId":"query_query_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/commit":{"post":{"tags":["Queries"],"summary":"Commit Query Revision","operationId":"commit_query_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/log":{"post":{"tags":["Queries"],"summary":"Log Query Revisions","operationId":"log_query_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queries/":{"post":{"tags":["Queries"],"summary":"Create Simple Query","operationId":"create_simple_query","parameters":[{"name":"query_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queries/{query_id}":{"get":{"tags":["Queries"],"summary":"Fetch Simple Query","operationId":"fetch_simple_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Queries"],"summary":"Edit Simple Query","operationId":"edit_simple_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queries/{query_id}/archive":{"post":{"tags":["Queries"],"summary":"Archive Simple Query","operationId":"archive_simple_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queries/{query_id}/unarchive":{"post":{"tags":["Queries"],"summary":"Unarchive Simple Query","operationId":"unarchive_simple_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queries/query":{"post":{"tags":["Queries"],"summary":"Query Simple Queries","operationId":"query_simple_queries","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/folders/":{"post":{"tags":["Folders"],"summary":"Create Folder","description":"Create a folder.\n\nThe folder name must match `[\\w -]+` (letters, digits, underscore,\nspace, hyphen); other characters return `400`. The resulting path\n(the slug joined to the parent's path with a dot) must be unique\nwithin the project, otherwise the call returns `409`. Passing a\n`parent_id` that does not exist returns `404`. Paths are capped at\n10 levels of nesting and slugs at 64 characters.","operationId":"create_folder","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/folders/{folder_id}":{"get":{"tags":["Folders"],"summary":"Fetch Folder","description":"Fetch one folder by id.\n\nReturns a single `folder` envelope. If the folder does not exist in\nthe caller's project, `count` is `0` and `folder` is omitted.","operationId":"fetch_folder","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Folders"],"summary":"Edit Folder","description":"Rename or move a folder.\n\nUse this endpoint to change a folder's `slug`, `name`, or\n`parent_id`. The `id` in the request body must match the path\nparameter or the call returns `400`. Name and path-uniqueness rules\nfrom create apply: invalid names return `400`, a path collision\nreturns `409`, and a missing `parent_id` returns `404`.","operationId":"edit_folder","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Folders"],"summary":"Delete Folder","description":"Delete a folder and every descendant.\n\nRemoves the folder identified by `folder_id` together with every\nfolder beneath it, in a single transaction. Deletion is\nunconditional; there is no archive or unarchive step. Resources\nthat were assigned to any of the removed folders continue to\nexist and are no longer reachable through the deleted folder.","operationId":"delete_folder","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/folders/query":{"post":{"tags":["Folders"],"summary":"Query Folders","description":"Filter folders inside the caller's project.\n\nFollows the general response envelope described in the\n[Query Pattern](/reference/api-guide/query-pattern) guide, but\ndoes not accept `windowing` or `include_archived` — folders are\nhard-deleted and the response always returns the full filtered\nset. Filters include `id`/`ids`, `slug`/`slugs`, `kind`/`kinds`,\n`parent_id`/`parent_ids` (use `parent_id: null` for root folders),\n`path`/`paths`, and `prefix`/`prefixes` for subtree lookup.","operationId":"query_folders","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoldersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/catalog/types/":{"get":{"tags":["Applications"],"summary":"List Application Catalog Types","description":"List shared catalog types.\n\nCatalog types are reusable JSON-Schema building blocks referenced from\ntemplate schemas (for example `message`, `prompt-template`). Types are\nread-only and version with the product.\nSee the [Applications guide](/reference/api-guide/applications#catalog).","operationId":"list_application_catalog_types","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCatalogTypesResponse"}}}}}}},"/applications/catalog/templates/":{"get":{"tags":["Applications"],"summary":"List Application Catalog Templates","description":"List application templates available in the catalog.\n\nTemplates describe the handler (`uri`) and JSON schemas used to create\na new application. Pass `include_archived=true` to include retired\ntemplates (useful when editing applications created from an old\ntemplate). Templates are global and read-only.","operationId":"list_application_catalog_templates","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCatalogTemplatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/catalog/templates/{template_key}":{"get":{"tags":["Applications"],"summary":"Fetch Application Catalog Template","description":"Fetch one application template by key.\n\nUse this to inspect the exact `uri`, `data`, and JSON Schemas for a\ntemplate before creating an application from it. `template_key` comes\nfrom the `key` field of a template returned by the list endpoint\n(for example `completion`, `chat`, `hook`).","operationId":"fetch_application_catalog_template","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCatalogTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/catalog/templates/{template_key}/presets/":{"get":{"tags":["Applications"],"summary":"List Application Catalog Presets","description":"List presets scoped to a template.\n\nPresets are named parameter sets (for example a curated prompt +\nmodel combination) that scaffold the first revision when creating an\napplication from a template. Pass `include_archived=true` to include\nretired presets.","operationId":"list_application_catalog_presets","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCatalogPresetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/catalog/templates/{template_key}/presets/{preset_key}":{"get":{"tags":["Applications"],"summary":"Fetch Application Catalog Preset","description":"Fetch one preset by key within a template.\n\nReturns the preset's `data` so clients can use it as the payload for a\nfirst revision when creating an application from a template.","operationId":"fetch_application_catalog_preset","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"preset_key","in":"path","required":true,"schema":{"type":"string","title":"Preset Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCatalogPresetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/":{"post":{"tags":["Applications"],"summary":"Create Application","description":"Create an application artifact only.\n\nReturns an empty application without any variants or revisions.\nMost callers should use `POST /simple/applications/` instead — it\ncreates the artifact, a default variant, and a first committed\nrevision in one request.\nSee the [Applications guide](/reference/api-guide/applications).","operationId":"create_application","parameters":[{"name":"application_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/{application_id}":{"get":{"tags":["Applications"],"summary":"Fetch Application","description":"Fetch one application artifact by ID.\n\nReturns artifact-level fields only. To get the current variant,\nrevision, and `data` in a single call, use\n`GET /simple/applications/{application_id}`.","operationId":"fetch_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Applications"],"summary":"Edit Application","description":"Edit artifact-level fields on an application.\n\nEditable fields: `description`, `flags`, `tags`, `meta`. Editing `name`\nis currently disabled and returns `400`. Prompt or model-parameter\nchanges go through `POST /applications/revisions/commit`, not this\nendpoint.","operationId":"edit_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/{application_id}/archive":{"post":{"tags":["Applications"],"summary":"Archive Application","description":"Soft-delete an application.\n\nArchiving sets `deleted_at` on the application and hides it from\nqueries that don't set `include_archived: true`. Its variants and\nrevisions become unreachable from listing but their IDs remain\nresolvable so historical traces stay intact.\nSee [Versioning](/reference/api-guide/versioning#archive-and-unarchive).","operationId":"archive_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/{application_id}/unarchive":{"post":{"tags":["Applications"],"summary":"Unarchive Application","description":"Restore a previously archived application.\n\nClears `deleted_at` and makes the application visible to standard\nqueries again. Safe to call on an already-active application; it is a\nno-op in that case.","operationId":"unarchive_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/query":{"post":{"tags":["Applications"],"summary":"Query Applications","description":"Query application artifacts.\n\nReturns only artifact-level fields; the variant, revision, and `data`\npayload are not included. For one row per application with those\nmerged in, use `POST /simple/applications/query`.\nSee [Query Pattern](/reference/api-guide/query-pattern).","operationId":"query_applications","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/":{"post":{"tags":["Applications"],"summary":"Create Application Variant","description":"Create a new variant on an existing application.\n\nA variant is an independent branch of the application's history. The\nnew variant starts empty — call `POST /applications/revisions/commit`\nto add its first revision. Use `POST /applications/variants/fork` when\nyou want the new variant to inherit an existing revision history.","operationId":"create_application_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/{application_variant_id}":{"get":{"tags":["Applications"],"summary":"Fetch Application Variant","description":"Fetch one variant by ID.\n\nReturns variant-level fields. To get the variant's tip revision and\nits `data`, call `POST /applications/revisions/retrieve` with\n`application_variant_ref`.","operationId":"fetch_application_variant","parameters":[{"name":"application_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Applications"],"summary":"Edit Application Variant","description":"Edit a variant's header fields (`name`, `description`, `tags`, `meta`).\n\nConfiguration changes go through a new commit via\n`POST /applications/revisions/commit`. This endpoint only touches\nvariant-level metadata.","operationId":"edit_application_variant","parameters":[{"name":"application_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/{application_variant_id}/archive":{"post":{"tags":["Applications"],"summary":"Archive Application Variant","description":"Soft-delete a variant.\n\nThe variant and its revisions are hidden from queries unless\n`include_archived: true` is sent. Revision IDs remain resolvable so\nhistorical traces are preserved.","operationId":"archive_application_variant","parameters":[{"name":"application_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/{application_variant_id}/unarchive":{"post":{"tags":["Applications"],"summary":"Unarchive Application Variant","description":"Restore a previously archived variant.","operationId":"unarchive_application_variant","parameters":[{"name":"application_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/query":{"post":{"tags":["Applications"],"summary":"Query Application Variants","description":"Query variants across one or more applications.\n\nFilters are parsed from both query-string parameters and the request\nbody; body values take precedence. Use `application_refs` to scope to\nspecific applications, `application_variant_refs` to narrow to\nspecific variants.\nSee [Query Pattern](/reference/api-guide/query-pattern).","operationId":"query_application_variants","parameters":[{"name":"application_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"}},{"name":"application_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Application Ids"}},{"name":"application_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Slug"}},{"name":"application_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Application Slugs"}},{"name":"application_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"}},{"name":"application_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Application Variant Ids"}},{"name":"application_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Variant Slug"}},{"name":"application_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Application Variant Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/fork":{"post":{"tags":["Applications"],"summary":"Fork Application Variant","description":"Fork an existing variant into a new variant on the same application.\n\nUse this to experiment without touching the source variant's history.\nThe fork copies the source variant's revisions up to the specified\nrevision (or tip) into the new variant, then commits the supplied\n`revision` object on top. Both `variant` and `revision` sub-objects\nin the request must be present; the server returns `count: 0` when\neither is missing. Returns `400 Bad Request` if the fork target is\ninvalid (for example, the source variant or revision cannot be\nlocated in this application's lineage).","operationId":"fork_application_variant","parameters":[{"name":"application_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationForkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/retrieve":{"post":{"tags":["Applications"],"summary":"Retrieve Application Revision","description":"Retrieve one application revision by reference.\n\nAccepts application / variant / revision references for direct lookup,\nor an environment reference (with optional `key`) to resolve the\ncurrently-deployed revision in that environment. Returns the revision\nincluding its `data` payload (URL, parameters, schemas), which clients\nuse to invoke the application.\nSet `resolve: true` to inline embedded references inside `data`.","operationId":"retrieve_application_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/deploy":{"post":{"tags":["Applications"],"summary":"Deploy Application Revision","description":"Deploy an application revision to an environment.\n\nWrites a reference from the environment revision to the application\nrevision under `key` (default: `{application_slug}.revision`). Clients\nthat subsequently call `/applications/revisions/retrieve` with the\nsame `environment_ref` and `key` resolve to this revision.\nSee the [Applications guide](/reference/api-guide/applications#deployment).","operationId":"deploy_application_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionDeployRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/":{"post":{"tags":["Applications"],"summary":"Create Application Revision","description":"Create a revision row directly, without the commit workflow.\n\nAdvanced use only. For normal development loops prefer\n`POST /applications/revisions/commit`, which commits the new revision\nas the variant's tip and assigns a version number.","operationId":"create_application_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/{application_revision_id}":{"get":{"tags":["Applications"],"summary":"Fetch Application Revision","description":"Fetch one revision by its ID.\n\nReturns the revision including its `data` payload. For lookup by\nvariant slug or environment, use `POST /applications/revisions/retrieve`.","operationId":"fetch_application_revision","parameters":[{"name":"application_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Applications"],"summary":"Edit Application Revision","description":"Edit a revision's header fields only.\n\nRevisions are immutable snapshots; `data`, `author`, `date`, and\n`message` cannot be changed. This endpoint updates header fields such\nas `description` and `tags`. To change configuration, commit a new\nrevision with `POST /applications/revisions/commit`.","operationId":"edit_application_revision","parameters":[{"name":"application_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/{application_revision_id}/archive":{"post":{"tags":["Applications"],"summary":"Archive Application Revision","description":"Soft-delete a revision.\n\nArchived revisions are hidden from `/query` and `/log` responses\nunless `include_archived: true` is set. The ID remains resolvable for\ntraces and deployed environment references.","operationId":"archive_application_revision","parameters":[{"name":"application_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/{application_revision_id}/unarchive":{"post":{"tags":["Applications"],"summary":"Unarchive Application Revision","description":"Restore a previously archived revision.","operationId":"unarchive_application_revision","parameters":[{"name":"application_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/query":{"post":{"tags":["Applications"],"summary":"Query Application Revisions","description":"Query revisions across one or more applications or variants.\n\nUse `application_refs` / `application_variant_refs` to scope the\nquery, or filter on commit metadata (`author`, `date`, `message`) via\nthe `application_revision` object. For the ordered history of a\nsingle variant, `POST /applications/revisions/log` is more direct.\nSet `resolve: true` to inline embedded references in each revision's\n`data`.","operationId":"query_application_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/commit":{"post":{"tags":["Applications"],"summary":"Commit Application Revision","description":"Commit a new revision on a variant.\n\nThe new revision becomes the variant's tip and is assigned the next\n`version` number. Revisions are immutable once committed; to change\nconfiguration, commit a new revision.\nSee [Versioning](/reference/api-guide/versioning#committing-a-revision).","operationId":"commit_application_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/log":{"post":{"tags":["Applications"],"summary":"Log Application Revisions","description":"Return the ordered revision log for a variant.\n\nPass `application_variant_id` to list the full history of that\nvariant; optionally pass `application_revision_id` + `depth` to walk\nback a bounded number of commits from a specific revision. Entries\nare returned newest-first and include the full revision record.","operationId":"log_application_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/resolve":{"post":{"tags":["Applications"],"summary":"Resolve Application Revision","description":"Fetch a revision with embedded references inlined.\n\nWhen a revision's `data` carries references to other entities\n(snippets, linked revisions), this endpoint resolves them in place and\nreturns the fully-inlined configuration along with `resolution_info`\ndescribing what was substituted. Use it when clients need a\nself-contained configuration for invocation or export.","operationId":"resolve_application_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/applications/":{"post":{"tags":["Applications"],"summary":"Create Simple Application","description":"Create an application end-to-end.\n\nCreates the application artifact, a default variant, and a first\ncommitted revision whose `data` comes from the request. This is the\nrecommended entry point for \"spin up a new application from a\ntemplate\". For more control over variant and revision creation, use\nthe structured endpoints under `/applications/`.\nSee [Simple Endpoints](/reference/api-guide/simple-endpoints).","operationId":"create_simple_application","parameters":[{"name":"application_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/applications/query":{"post":{"tags":["Applications"],"summary":"Query Simple Applications","description":"Query applications with variant, revision, and `data` merged per row.\n\nThis is the shape most clients want for dashboards or invocation\npickers: each row carries `variant_id`, `revision_id`, and `data`\n(URL, parameters, schemas) alongside the artifact fields. For the\nstructured query that returns artifacts only, use\n`POST /applications/query`.","operationId":"query_simple_applications","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/applications/{application_id}":{"get":{"tags":["Applications"],"summary":"Fetch Simple Application","description":"Fetch one application with its current variant, revision, and `data` merged.\n\nThe returned `data` includes the invocation `url`, the `parameters`\nthe revision was committed with, and the JSON `schemas` for inputs,\noutputs, and parameters.","operationId":"fetch_simple_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Applications"],"summary":"Edit Simple Application","description":"Edit an application and commit a new revision if configuration changed.\n\nFields other than `id` in the request body are treated as changes and\nproduce a new committed revision. Supplying `data` changes the\nconfiguration; supplying only header fields (`flags`, `tags`, `meta`)\nstill produces a new revision with the updated header but the\nexisting `data`. Editing the application `name` is currently\ndisabled and returns `400`.","operationId":"edit_simple_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/applications/{application_id}/archive":{"post":{"tags":["Applications"],"summary":"Archive Simple Application","description":"Archive an application through the simple endpoint layer.\n\nEquivalent to `POST /applications/{application_id}/archive`; returns\nthe archived application in the simple shape (with its last known\nvariant, revision, and `data`).","operationId":"archive_simple_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/applications/{application_id}/unarchive":{"post":{"tags":["Applications"],"summary":"Unarchive Simple Application","description":"Unarchive an application through the simple endpoint layer.\n\nEquivalent to `POST /applications/{application_id}/unarchive`, with\nthe response shape of `/simple/applications/`.","operationId":"unarchive_simple_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/catalog/types/":{"get":{"tags":["Workflows"],"summary":"List Workflow Catalog Types","description":"List the shared JSON Schema fragments available to workflow schemas.\n\nWorkflow input/output schemas reference these via `x-ag-type-ref` (for\nexample, `message` or `prompt`). Use this endpoint to discover what\ntype keys exist before building a schema.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"list_workflow_catalog_types","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogTypesResponse"}}}}}}},"/workflows/catalog/types/{ag_type}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Catalog Type","description":"Return the JSON Schema for a single shared type key.\n\nReturns 404 when the `ag_type` is not part of the shipped catalog.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"fetch_workflow_catalog_type","parameters":[{"name":"ag_type","in":"path","required":true,"schema":{"type":"string","title":"Ag Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogTypeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/catalog/templates/":{"get":{"tags":["Workflows"],"summary":"List Workflow Catalog Templates","description":"List workflow blueprints shipped with the product.\n\nFilter by domain with `is_application`, `is_evaluator`, or\n`is_snippet`. Archived templates are hidden unless `include_archived`\nis true. Templates are global and read-only.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"list_workflow_catalog_templates","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"is_application","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"}},{"name":"is_evaluator","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"}},{"name":"is_snippet","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogTemplatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/catalog/templates/{template_key}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Catalog Template","description":"Return a single workflow template by its key.\n\nReturns `count=0` when the template is not found. Templates are global\nmetadata and are not scoped to a project.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"fetch_workflow_catalog_template","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/catalog/templates/{template_key}/presets/":{"get":{"tags":["Workflows"],"summary":"List Workflow Catalog Presets","description":"List presets defined against a template.\n\nPresets are named parameter sets that can be committed as the first\nrevision of a new variant. Returns an empty list when a template has\nno canned presets.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"list_workflow_catalog_presets","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogPresetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/catalog/templates/{template_key}/presets/{preset_key}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Catalog Preset","description":"Return a single preset for a template by key.\n\nReturns `count=0` when the preset is not defined.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"fetch_workflow_catalog_preset","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"preset_key","in":"path","required":true,"schema":{"type":"string","title":"Preset Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogPresetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/":{"post":{"tags":["Workflows"],"summary":"Create Workflow","description":"Create a workflow artifact.\n\nCreates the top-level container only; commit a revision on a variant\nbefore the workflow can be retrieved or invoked. Use when you need the\nlower-level primitive — pick `/applications/` for serving logic or\n`/evaluators/` for scoring logic.\n\nSee: [Workflows](/reference/api-guide/workflows),\n[Versioning](/reference/api-guide/versioning).","operationId":"create_workflow","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow","description":"Fetch a workflow artifact by ID.\n\nReturns the artifact only — variants and revisions are not included.\nUse `/workflows/variants/query` and `/workflows/revisions/query` for\nthe child entities.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"fetch_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Workflows"],"summary":"Edit Workflow","description":"Update artifact-level fields on a workflow.\n\nThe `id` in the body must match the path parameter. Only supplied\nfields are modified. Configuration (parameters, URL, schemas) lives on\nrevisions — commit a new revision to change those.\n\nSee: [Workflows](/reference/api-guide/workflows),\n[Versioning](/reference/api-guide/versioning).","operationId":"edit_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}/archive":{"post":{"tags":["Workflows"],"summary":"Archive Workflow","description":"Archive a workflow artifact (soft delete).\n\nSets `deleted_at` on the workflow and its variants. Archived\nworkflows are hidden from queries unless `include_archived=true`.\nRevision IDs remain resolvable so historical traces stay intact.\n\nSee: [Versioning](/reference/api-guide/versioning).","operationId":"archive_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}/unarchive":{"post":{"tags":["Workflows"],"summary":"Unarchive Workflow","description":"Restore a previously archived workflow.\n\nClears `deleted_at` on the workflow. Archived variants and revisions\nare restored with the workflow.\n\nSee: [Versioning](/reference/api-guide/versioning).","operationId":"unarchive_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/query":{"post":{"tags":["Workflows"],"summary":"Query Workflows","description":"Query workflow artifacts with filters and pagination.\n\nAccepts the same filters as query parameters or in the request body;\nbody fields win when both are supplied. Results are ordered by\ncreation time; pass `windowing.next` back for the following page.\n\nSee: [Query Pattern](/reference/api-guide/query-pattern).","operationId":"query_workflows","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}},{"name":"workflow_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Ids"}},{"name":"workflow_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Slug"}},{"name":"workflow_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/":{"post":{"tags":["Workflows"],"summary":"Create Workflow Variant","description":"Create a new variant under an existing workflow.\n\nVariants are branches of an artifact's history; each maintains its own\nrevision log. Variant slugs are unique within the project — reuse of a\nslug already in use returns a 409 conflict.\n\nSee: [Versioning](/reference/api-guide/versioning).","operationId":"create_workflow_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/{workflow_variant_id}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Variant","description":"Fetch a workflow variant by ID.\n\nReturns the variant metadata only — use\n`/workflows/revisions/retrieve` or `/workflows/revisions/log` for the\nvariant's revisions.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"fetch_workflow_variant","parameters":[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Workflows"],"summary":"Edit Workflow Variant","description":"Update metadata on a workflow variant.\n\nThe `id` in the body must match the path parameter. Revisions on the\nvariant are not affected — commit a new revision to change data.\n\nSee: [Versioning](/reference/api-guide/versioning).","operationId":"edit_workflow_variant","parameters":[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/{workflow_variant_id}/archive":{"post":{"tags":["Workflows"],"summary":"Archive Workflow Variant","description":"Archive a workflow variant.\n\nSoft-deletes the variant and its revisions. Archived variants are\nhidden from queries unless `include_archived=true`. See\n[Versioning](/reference/api-guide/versioning).","operationId":"archive_workflow_variant","parameters":[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/{workflow_variant_id}/unarchive":{"post":{"tags":["Workflows"],"summary":"Unarchive Workflow Variant","description":"Restore a previously archived workflow variant.\n\nClears `deleted_at` on the variant and its revisions. See\n[Versioning](/reference/api-guide/versioning).","operationId":"unarchive_workflow_variant","parameters":[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/query":{"post":{"tags":["Workflows"],"summary":"Query Workflow Variants","description":"Query workflow variants with filters and pagination.\n\nScope the query by `workflow_refs` (parent artifact) or\n`workflow_variant_refs` (specific variants). Accepts the same fields\nas query parameters or in the request body.\n\nSee: [Query Pattern](/reference/api-guide/query-pattern).","operationId":"query_workflow_variants","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}},{"name":"workflow_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Ids"}},{"name":"workflow_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Slug"}},{"name":"workflow_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Slugs"}},{"name":"workflow_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"}},{"name":"workflow_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Variant Ids"}},{"name":"workflow_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Variant Slug"}},{"name":"workflow_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Variant Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/fork":{"post":{"tags":["Workflows"],"summary":"Fork Workflow Variant","operationId":"fork_workflow_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowForkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/retrieve":{"post":{"tags":["Workflows"],"summary":"Retrieve Workflow Revision","operationId":"retrieve_workflow_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/deploy":{"post":{"tags":["Workflows"],"summary":"Deploy Workflow Revision","operationId":"deploy_workflow_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionDeployRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/":{"post":{"tags":["Workflows"],"summary":"Create Workflow Revision","operationId":"create_workflow_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/{workflow_revision_id}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Revision","operationId":"fetch_workflow_revision","parameters":[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Workflows"],"summary":"Edit Workflow Revision","operationId":"edit_workflow_revision","parameters":[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/{workflow_revision_id}/archive":{"post":{"tags":["Workflows"],"summary":"Archive Workflow Revision","operationId":"archive_workflow_revision","parameters":[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/{workflow_revision_id}/unarchive":{"post":{"tags":["Workflows"],"summary":"Unarchive Workflow Revision","operationId":"unarchive_workflow_revision","parameters":[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/query":{"post":{"tags":["Workflows"],"summary":"Query Workflow Revisions","operationId":"query_workflow_revisions","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}},{"name":"workflow_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Ids"}},{"name":"workflow_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Slug"}},{"name":"workflow_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Slugs"}},{"name":"workflow_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"}},{"name":"workflow_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Variant Ids"}},{"name":"workflow_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Variant Slug"}},{"name":"workflow_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Variant Slugs"}},{"name":"workflow_revision_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"}},{"name":"workflow_revision_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Revision Ids"}},{"name":"workflow_revision_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Revision Slug"}},{"name":"workflow_revision_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Revision Slugs"}},{"name":"workflow_revision_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Revision Version"}},{"name":"workflow_revision_versions","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Revision Versions"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/commit":{"post":{"tags":["Workflows"],"summary":"Commit Workflow Revision","operationId":"commit_workflow_revision","parameters":[{"name":"workflow_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionCommitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/log":{"post":{"tags":["Workflows"],"summary":"Log Workflow Revisions","operationId":"log_workflow_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/resolve":{"post":{"tags":["Workflows"],"summary":"Resolve Workflow Revision Endpoint","description":"Resolve embedded references in a workflow revision configuration.\n\nThis endpoint:\n1. Fetches the workflow revision\n2. Resolves all @ag.references tokens in the configuration\n3. Returns the revision with resolved configuration + metadata","operationId":"resolve_workflow_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/workflows/":{"post":{"tags":["Workflows"],"summary":"Create Simple Workflow","operationId":"create_simple_workflow","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/workflows/{workflow_id}":{"get":{"tags":["Workflows"],"summary":"Fetch Simple Workflow","operationId":"fetch_simple_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Workflows"],"summary":"Edit Simple Workflow","operationId":"edit_simple_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/workflows/{workflow_id}/archive":{"post":{"tags":["Workflows"],"summary":"Archive Simple Workflow","operationId":"archive_simple_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/workflows/{workflow_id}/unarchive":{"post":{"tags":["Workflows"],"summary":"Unarchive Simple Workflow","operationId":"unarchive_simple_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/workflows/query":{"post":{"tags":["Workflows"],"summary":"Query Simple Workflows","operationId":"query_simple_workflows","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/catalog/types/":{"get":{"tags":["Evaluators"],"summary":"List Evaluator Catalog Types","description":"List the JSON schema types the evaluator catalog understands.\n\nTypes are static metadata shipped with the product. Use this when\nrendering a catalog UI or validating that a template's schema is\nsupported. See the Evaluators guide for how the catalog relates\nto user-owned evaluator artifacts.","operationId":"list_evaluator_catalog_types","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCatalogTypesResponse"}}}}}}},"/evaluators/catalog/templates/":{"get":{"tags":["Evaluators"],"summary":"List Evaluator Catalog Templates","description":"List evaluator templates from the catalog.\n\nTemplates are blueprints that describe an evaluator's handler\nURI, JSON schemas, and default configuration. Pass\n`include_archived=true` to include deprecated templates. Use the\nreturned `key` with `/catalog/templates/{template_key}/presets/`\nto list its presets.","operationId":"list_evaluator_catalog_templates","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCatalogTemplatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/catalog/templates/{template_key}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator Catalog Template","description":"Fetch one evaluator template by key.\n\nReturns an empty envelope (`count: 0`) when no template matches\nthe key. Template keys come from\n`GET /catalog/templates/`.","operationId":"fetch_evaluator_catalog_template","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCatalogTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/catalog/templates/{template_key}/presets/":{"get":{"tags":["Evaluators"],"summary":"List Evaluator Catalog Presets","description":"List presets defined against one evaluator template.\n\nA preset is a named set of parameter values pre-filled against\nthe template. Use the returned `key` to fetch a specific preset\nvia `GET /catalog/templates/{template_key}/presets/{preset_key}`.","operationId":"list_evaluator_catalog_presets","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCatalogPresetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/catalog/templates/{template_key}/presets/{preset_key}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator Catalog Preset","description":"Fetch one evaluator preset by template and preset key.\n\nPresets are not separate entities; they are metadata. Use the\nreturned preset payload as the starting point when creating a\nnew evaluator from a template. See the Evaluators guide.","operationId":"fetch_evaluator_catalog_preset","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"preset_key","in":"path","required":true,"schema":{"type":"string","title":"Preset Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCatalogPresetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/":{"post":{"tags":["Evaluators"],"summary":"Create Evaluator","description":"Create an evaluator artifact, its first variant, and its initial revision.\n\nUse this endpoint when you already know you want to manage the\nartifact / variant / revision layers independently. For a\none-shot \"create and forget\" call that returns a flat record,\nsee `POST /simple/evaluators/`. See the Versioning guide for\ncommit semantics.","operationId":"create_evaluator","parameters":[{"name":"evaluator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/{evaluator_id}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator","description":"Fetch an evaluator artifact by id.\n\nReturns the artifact-level record (slug, name, flags, lifecycle)\nwithout variant or revision data. Use the variant and revision\nendpoints to retrieve those layers.","operationId":"fetch_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Evaluators"],"summary":"Edit Evaluator","description":"Edit an evaluator artifact's metadata.\n\nEdits are limited to metadata fields (description, tags, meta).\nRenaming is temporarily disabled and returns 400. To change\nevaluator behavior, commit a new revision on the variant — see\n`/evaluators/revisions/commit`.","operationId":"edit_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/{evaluator_id}/archive":{"post":{"tags":["Evaluators"],"summary":"Archive Evaluator","description":"Soft-delete an evaluator artifact.\n\nSets `deleted_at` on the evaluator and hides it from subsequent\n`/query` responses unless `include_archived=true`. Revision IDs\nremain resolvable so historical traces stay intact.","operationId":"archive_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/{evaluator_id}/unarchive":{"post":{"tags":["Evaluators"],"summary":"Unarchive Evaluator","description":"Restore a soft-deleted evaluator artifact.\n\nClears `deleted_at` on the evaluator so it re-appears in `/query`\nresponses.","operationId":"unarchive_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/query":{"post":{"tags":["Evaluators"],"summary":"Query Evaluators","description":"Query evaluator artifacts with filters and pagination.\n\nReturns artifact-level records only. The request body follows\nthe shared query pattern (filter + refs + windowing). Send `{}`\nto list all evaluators in the project. See the Query Pattern\nguide.","operationId":"query_evaluators","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/":{"post":{"tags":["Evaluators"],"summary":"Create Evaluator Variant","description":"Create a new variant on an existing evaluator.\n\nA variant is a named branch of the evaluator's history. New\nrevisions committed to this variant do not touch other variants.\nSee the Versioning guide.","operationId":"create_evaluator_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/{evaluator_variant_id}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator Variant","description":"Fetch an evaluator variant by id.\n\nReturns the variant record (slug, flags, lifecycle) without the\ncommitted revisions. Use `/evaluators/revisions/retrieve` to\nread the variant's current revision payload.","operationId":"fetch_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Evaluators"],"summary":"Edit Evaluator Variant","description":"Edit a variant's metadata.\n\nEdits only touch variant-level metadata. To change evaluator\nbehavior commit a new revision via\n`/evaluators/revisions/commit`.","operationId":"edit_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/{evaluator_variant_id}/archive":{"post":{"tags":["Evaluators"],"summary":"Archive Evaluator Variant","description":"Soft-delete an evaluator variant.\n\nSets `deleted_at` on the variant. Its revisions stay resolvable\nby id; they are hidden from `/query` unless the caller sets\n`include_archived=true`.","operationId":"archive_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/{evaluator_variant_id}/unarchive":{"post":{"tags":["Evaluators"],"summary":"Unarchive Evaluator Variant","description":"Restore a soft-deleted evaluator variant.","operationId":"unarchive_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/query":{"post":{"tags":["Evaluators"],"summary":"Query Evaluator Variants","description":"Query evaluator variants with filters, reference scoping, and pagination.\n\nAccepts parameters from both the query string and a JSON body;\nthe two are merged. Use `evaluator_refs` to scope to one or more\nevaluators, or `evaluator_variant_refs` for specific variants.","operationId":"query_evaluator_variants","parameters":[{"name":"evaluator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"}},{"name":"evaluator_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Evaluator Ids"}},{"name":"evaluator_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Slug"}},{"name":"evaluator_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Evaluator Slugs"}},{"name":"evaluator_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"}},{"name":"evaluator_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Evaluator Variant Ids"}},{"name":"evaluator_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Variant Slug"}},{"name":"evaluator_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Evaluator Variant Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/fork":{"post":{"tags":["Evaluators"],"summary":"Fork Evaluator Variant","description":"Fork an evaluator variant into a new variant.\n\nCreates a new branch whose initial revision is copied from the\nsource. Use this to experiment without touching the original.\nThe returned variant has a fresh id and slug but inherits\nlineage metadata from its source.","operationId":"fork_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorForkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/retrieve":{"post":{"tags":["Evaluators"],"summary":"Retrieve Evaluator Revision","description":"Retrieve one evaluator revision, either directly or via an environment key.\n\nProvide one of:\nan evaluator / variant / revision reference (returns that\nrevision, or the latest revision on the variant or evaluator),\nor an environment reference plus `key` (returns the revision\ncurrently pinned to that key). Supplying both forms returns 400.\nPass `resolve=true` to expand embedded references on the\nreturned payload.","operationId":"retrieve_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/deploy":{"post":{"tags":["Evaluators"],"summary":"Deploy Evaluator Revision","description":"Pin an evaluator revision into an environment revision under a key.\n\nRequires an evaluator ref (`evaluator_ref`,\n`evaluator_variant_ref`, or `evaluator_revision_ref`) and an\nenvironment ref. When `key` is omitted it defaults to\n`.revision`. The deployment is recorded as a\nnew commit on the environment revision. See the Evaluators\nguide for the deployment model.","operationId":"deploy_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionDeployRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/":{"post":{"tags":["Evaluators"],"summary":"Create Evaluator Revision","description":"Create a new revision on an evaluator variant.\n\nPrefer `/evaluators/revisions/commit` for the standard commit\nflow. This endpoint exists for internal create paths that need\nto insert a revision without the commit semantics.","operationId":"create_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/{evaluator_revision_id}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator Revision","description":"Fetch a specific evaluator revision by id.\n\nReturns the full revision including `data` (handler uri,\nschemas, and parameters). To pick the latest revision on a\nvariant without knowing its id, use\n`/evaluators/revisions/retrieve`.","operationId":"fetch_evaluator_revision","parameters":[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Evaluators"],"summary":"Edit Evaluator Revision","description":"Edit a revision's metadata.\n\nRevision `data` is immutable once committed. This endpoint is\nfor metadata fields only (description, tags, meta). To change\nevaluator behavior, commit a new revision instead.","operationId":"edit_evaluator_revision","parameters":[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/{evaluator_revision_id}/archive":{"post":{"tags":["Evaluators"],"summary":"Archive Evaluator Revision","description":"Soft-delete an evaluator revision.\n\nArchived revisions remain resolvable by id but are excluded from\nrevision logs and queries unless `include_archived=true`.","operationId":"archive_evaluator_revision","parameters":[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/{evaluator_revision_id}/unarchive":{"post":{"tags":["Evaluators"],"summary":"Unarchive Evaluator Revision","description":"Restore a soft-deleted evaluator revision.","operationId":"unarchive_evaluator_revision","parameters":[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/query":{"post":{"tags":["Evaluators"],"summary":"Query Evaluator Revisions","description":"Query evaluator revisions with filters, reference scoping, and pagination.\n\nReturns revision payloads. Use `evaluator_refs`,\n`evaluator_variant_refs`, or `evaluator_revision_refs` to scope\nthe query. Pass `resolve=true` to expand embedded references on\neach revision's `data`.","operationId":"query_evaluator_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/commit":{"post":{"tags":["Evaluators"],"summary":"Commit Evaluator Revision","description":"Commit a new revision on an evaluator variant.\n\nThe commit body carries the target `evaluator_variant_id`, an\noptional `message`, and the revision `data` (handler uri,\nschemas, parameters). A committed revision is immutable.","operationId":"commit_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/log":{"post":{"tags":["Evaluators"],"summary":"Log Evaluator Revisions","description":"List the revision log of an evaluator variant.\n\nReturns revisions in commit order. Scope the log by supplying\nan evaluator, variant, or revision reference. Use the retrieve\nendpoint to fetch a specific revision's full payload.","operationId":"log_evaluator_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/resolve":{"post":{"tags":["Evaluators"],"summary":"Resolve Evaluator Revision","description":"Resolve embedded references on an evaluator revision's `data`.\n\nWalks embedded references (for example, references to other\nrevisions or to secrets) up to `max_depth` and `max_embeds`.\nThe response includes a `resolution_info` block with counts,\ndepth reached, and errors according to `error_policy`.","operationId":"resolve_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/":{"post":{"tags":["Evaluators"],"summary":"Create Simple Evaluator","description":"Create an evaluator via the simple surface.\n\nCreates the artifact, its first variant, and its initial\nrevision in one call. Returns the flat evaluator record\n(latest revision merged into `data`). Use this when you do not\nneed to manage variants or revisions directly.","operationId":"create_simple_evaluator","parameters":[{"name":"evaluator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/templates":{"get":{"tags":["Evaluators"],"summary":"List Evaluator Templates","description":"List the legacy built-in evaluator templates.\n\nReturns static evaluator-type definitions shipped with the\nproduct. Prefer the `/evaluators/catalog/*` endpoints for new\nintegrations; this endpoint is kept for older clients. Pass\n`include_archived=true` to include deprecated templates.","operationId":"list_evaluator_templates","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorTemplatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/{evaluator_id}":{"get":{"tags":["Evaluators"],"summary":"Fetch Simple Evaluator","description":"Fetch one evaluator via the simple surface.\n\nReturns the flat evaluator record including its current variant\nand revision ids and the merged `data` payload.","operationId":"fetch_simple_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Evaluators"],"summary":"Edit Simple Evaluator","description":"Edit an evaluator via the simple surface.\n\nTouches metadata and (when `data` is supplied) commits a new\nrevision on the evaluator's variant. Renaming is temporarily\ndisabled and returns 400.","operationId":"edit_simple_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/{evaluator_id}/archive":{"post":{"tags":["Evaluators"],"summary":"Archive Simple Evaluator","description":"Soft-delete an evaluator via the simple surface.\n\nArchives the underlying artifact. Historical traces that\nreference specific revision ids remain resolvable.","operationId":"archive_simple_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/{evaluator_id}/unarchive":{"post":{"tags":["Evaluators"],"summary":"Unarchive Simple Evaluator","description":"Restore a soft-deleted evaluator via the simple surface.","operationId":"unarchive_simple_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/query":{"post":{"tags":["Evaluators"],"summary":"Query Simple Evaluators","description":"Query evaluators via the simple surface with filters and pagination.\n\nReturns flat evaluator records (one per artifact with its\nlatest variant and revision merged into `data`). Send `{}` to\nlist all evaluators in the project. See the Query Pattern\nguide.","operationId":"query_simple_evaluators","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/":{"post":{"tags":["Environments"],"summary":"Create Environment","operationId":"create_environment","parameters":[{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/{environment_id}":{"get":{"tags":["Environments"],"summary":"Fetch Environment","operationId":"fetch_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Environments"],"summary":"Edit Environment","operationId":"edit_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/{environment_id}/archive":{"post":{"tags":["Environments"],"summary":"Archive Environment","operationId":"archive_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/{environment_id}/unarchive":{"post":{"tags":["Environments"],"summary":"Unarchive Environment","operationId":"unarchive_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/query":{"post":{"tags":["Environments"],"summary":"Query Environments","operationId":"query_environments","parameters":[{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"}},{"name":"environment_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Ids"}},{"name":"environment_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Slug"}},{"name":"environment_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/variants/":{"post":{"tags":["Environments"],"summary":"Create Environment Variant","operationId":"create_environment_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/variants/{environment_variant_id}":{"get":{"tags":["Environments"],"summary":"Fetch Environment Variant","operationId":"fetch_environment_variant","parameters":[{"name":"environment_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Environments"],"summary":"Edit Environment Variant","operationId":"edit_environment_variant","parameters":[{"name":"environment_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/variants/{environment_variant_id}/archive":{"post":{"tags":["Environments"],"summary":"Archive Environment Variant","operationId":"archive_environment_variant","parameters":[{"name":"environment_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/variants/{environment_variant_id}/unarchive":{"post":{"tags":["Environments"],"summary":"Unarchive Environment Variant","operationId":"unarchive_environment_variant","parameters":[{"name":"environment_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/variants/query":{"post":{"tags":["Environments"],"summary":"Query Environment Variants","operationId":"query_environment_variants","parameters":[{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"}},{"name":"environment_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Ids"}},{"name":"environment_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Slug"}},{"name":"environment_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Slugs"}},{"name":"environment_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"}},{"name":"environment_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Variant Ids"}},{"name":"environment_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Variant Slug"}},{"name":"environment_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Variant Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/retrieve":{"post":{"tags":["Environments"],"summary":"Retrieve Environment Revision","operationId":"retrieve_environment_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/":{"post":{"tags":["Environments"],"summary":"Create Environment Revision","operationId":"create_environment_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/{environment_revision_id}":{"get":{"tags":["Environments"],"summary":"Fetch Environment Revision","operationId":"fetch_environment_revision","parameters":[{"name":"environment_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Environments"],"summary":"Edit Environment Revision","operationId":"edit_environment_revision","parameters":[{"name":"environment_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/{environment_revision_id}/archive":{"post":{"tags":["Environments"],"summary":"Archive Environment Revision","operationId":"archive_environment_revision","parameters":[{"name":"environment_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/{environment_revision_id}/unarchive":{"post":{"tags":["Environments"],"summary":"Unarchive Environment Revision","operationId":"unarchive_environment_revision","parameters":[{"name":"environment_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/query":{"post":{"tags":["Environments"],"summary":"Query Environment Revisions","operationId":"query_environment_revisions","parameters":[{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"}},{"name":"environment_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Ids"}},{"name":"environment_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Slug"}},{"name":"environment_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Slugs"}},{"name":"environment_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"}},{"name":"environment_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Variant Ids"}},{"name":"environment_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Variant Slug"}},{"name":"environment_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Variant Slugs"}},{"name":"environment_revision_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Revision Id"}},{"name":"environment_revision_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Revision Ids"}},{"name":"environment_revision_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Revision Slug"}},{"name":"environment_revision_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Revision Slugs"}},{"name":"environment_revision_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Revision Version"}},{"name":"environment_revision_versions","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Revision Versions"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/commit":{"post":{"tags":["Environments"],"summary":"Commit Environment Revision","operationId":"commit_environment_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/log":{"post":{"tags":["Environments"],"summary":"Log Environment Revisions","operationId":"log_environment_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/resolve":{"post":{"tags":["Environments"],"summary":"Resolve Environment Revision Endpoint","description":"Resolve embedded references in an environment revision configuration.\n\nThis endpoint:\n1. Fetches the environment revision\n2. Resolves all @ag.references tokens in the configuration\n3. Returns the revision with resolved configuration + metadata","operationId":"resolve_environment_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/":{"post":{"tags":["Environments"],"summary":"Create Simple Environment","operationId":"create_simple_environment","parameters":[{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/{environment_id}":{"get":{"tags":["Environments"],"summary":"Fetch Simple Environment","operationId":"fetch_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Environments"],"summary":"Edit Simple Environment","operationId":"edit_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/{environment_id}/archive":{"post":{"tags":["Environments"],"summary":"Archive Simple Environment","operationId":"archive_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/{environment_id}/unarchive":{"post":{"tags":["Environments"],"summary":"Unarchive Simple Environment","operationId":"unarchive_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/query":{"post":{"tags":["Environments"],"summary":"Query Simple Environments","operationId":"query_simple_environments","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/{environment_id}/guard":{"post":{"tags":["Environments"],"summary":"Guard Simple Environment","operationId":"guard_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/{environment_id}/unguard":{"post":{"tags":["Environments"],"summary":"Unguard Simple Environment","operationId":"unguard_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/variants/configs/fetch":{"post":{"tags":["Deprecated"],"summary":"Configs Fetch","operationId":"configs_fetch_variants_configs_fetch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_configs_fetch_variants_configs_fetch_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigResponseModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/tools/catalog/providers/":{"get":{"tags":["Tools"],"summary":"List Providers","operationId":"list_tool_providers","parameters":[{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogProvidersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/catalog/providers/{provider_key}":{"get":{"tags":["Tools"],"summary":"Get Provider","operationId":"fetch_tool_provider","parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string","title":"Provider Key"}},{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/catalog/providers/{provider_key}/integrations/":{"get":{"tags":["Tools"],"summary":"List Integrations","operationId":"list_tool_integrations","parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string","title":"Provider Key"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort By"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogIntegrationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/catalog/providers/{provider_key}/integrations/{integration_key}":{"get":{"tags":["Tools"],"summary":"Get Integration","operationId":"fetch_tool_integration","parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string","title":"Provider Key"}},{"name":"integration_key","in":"path","required":true,"schema":{"type":"string","title":"Integration Key"}},{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogIntegrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/catalog/providers/{provider_key}/integrations/{integration_key}/actions/":{"get":{"tags":["Tools"],"summary":"List Actions","operationId":"list_tool_actions","parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string","title":"Provider Key"}},{"name":"integration_key","in":"path","required":true,"schema":{"type":"string","title":"Integration Key"}},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query"}},{"name":"categories","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Categories"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogActionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/catalog/providers/{provider_key}/integrations/{integration_key}/actions/{action_key}":{"get":{"tags":["Tools"],"summary":"Get Action","operationId":"fetch_tool_action","parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string","title":"Provider Key"}},{"name":"integration_key","in":"path","required":true,"schema":{"type":"string","title":"Integration Key"}},{"name":"action_key","in":"path","required":true,"schema":{"type":"string","title":"Action Key"}},{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/query":{"post":{"tags":["Tools"],"summary":"Query Connections","description":"Query connections with optional filtering.","operationId":"query_tool_connections","parameters":[{"name":"provider_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Key"}},{"name":"integration_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/":{"post":{"tags":["Tools"],"summary":"Create Connection","description":"Create a new tool connection.","operationId":"create_tool_connection","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/callback":{"get":{"tags":["Tools"],"summary":"Callback Connection","description":"Handle OAuth callback from Composio.","operationId":"callback_tool_connection","parameters":[{"name":"connected_account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected Account Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"error_message","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/{connection_id}":{"get":{"tags":["Tools"],"summary":"Get Connection","description":"Get a connection by ID.","operationId":"fetch_tool_connection","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Tools"],"summary":"Delete Connection","description":"Delete a connection by ID.","operationId":"delete_tool_connection","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/{connection_id}/refresh":{"post":{"tags":["Tools"],"summary":"Refresh Connection","description":"Refresh a connection's credentials.","operationId":"refresh_tool_connection","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/{connection_id}/revoke":{"post":{"tags":["Tools"],"summary":"Revoke Connection","description":"Mark a connection invalid locally (does not revoke at the provider).","operationId":"revoke_tool_connection","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/call":{"post":{"tags":["Tools"],"summary":"Call Tool","description":"Call a tool action with a connection.","operationId":"call_tool","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCall"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/":{"post":{"tags":["Evaluations"],"summary":"Create Runs","operationId":"create_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Runs","operationId":"delete_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Runs","operationId":"edit_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/query":{"post":{"tags":["Evaluations"],"summary":"Query Runs","operationId":"query_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/close":{"post":{"tags":["Evaluations"],"summary":"Close Runs","operationId":"close_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/open":{"post":{"tags":["Evaluations"],"summary":"Open Runs","operationId":"open_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/{run_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Run","operationId":"fetch_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Run","operationId":"edit_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Run","operationId":"delete_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/{run_id}/close":{"post":{"tags":["Evaluations"],"summary":"Close Run","operationId":"close_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/{run_id}/close/{status}":{"post":{"tags":["Evaluations"],"summary":"Close Run","operationId":"close_run_with_status","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"status","in":"path","required":true,"schema":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/{run_id}/open":{"post":{"tags":["Evaluations"],"summary":"Open Run","operationId":"open_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/scenarios/":{"post":{"tags":["Evaluations"],"summary":"Create Scenarios","operationId":"create_scenarios","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Scenarios","operationId":"delete_scenarios","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Scenarios","operationId":"edit_scenarios","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/scenarios/query":{"post":{"tags":["Evaluations"],"summary":"Query Scenarios","operationId":"query_scenarios","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/scenarios/{scenario_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Scenario","operationId":"fetch_scenario","parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Scenario","operationId":"edit_scenario","parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Scenario","operationId":"delete_scenario","parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/results/":{"post":{"tags":["Evaluations"],"summary":"Create Results","operationId":"create_results","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Results","operationId":"delete_results","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Results","operationId":"edit_results","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/results/query":{"post":{"tags":["Evaluations"],"summary":"Query Results","operationId":"query_results","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/results/{result_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Result","operationId":"fetch_result","parameters":[{"name":"result_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Result Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Result","operationId":"edit_result","parameters":[{"name":"result_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Result Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Result","operationId":"delete_result","parameters":[{"name":"result_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Result Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/metrics/refresh":{"post":{"tags":["Evaluations"],"summary":"Refresh Metrics","operationId":"refresh_metrics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsRefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/metrics/":{"post":{"tags":["Evaluations"],"summary":"Create Metrics","operationId":"create_metrics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Metrics","operationId":"delete_metrics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Metrics","operationId":"edit_metrics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/metrics/query":{"post":{"tags":["Evaluations"],"summary":"Query Metrics","operationId":"query_metrics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/queues/":{"post":{"tags":["Evaluations"],"summary":"Create Queues","operationId":"create_queues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Queues","operationId":"delete_queues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Queues","operationId":"edit_queues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/queues/query":{"post":{"tags":["Evaluations"],"summary":"Query Queues","operationId":"query_queues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/queues/{queue_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Queue","operationId":"fetch_queue","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Queue","operationId":"edit_queue","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Queue","operationId":"delete_queue","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/queues/{queue_id}/scenarios/query":{"post":{"tags":["Evaluations"],"summary":"Query Queue Scenarios","operationId":"query_evaluation_queue_scenarios","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueScenariosQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/":{"post":{"tags":["Evaluations"],"summary":"Create Evaluation","operationId":"create_simple_evaluation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/{evaluation_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Evaluation","operationId":"fetch_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Evaluation","operationId":"edit_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Evaluation","operationId":"delete_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/query":{"post":{"tags":["Evaluations"],"summary":"Query Evaluations","operationId":"query_simple_evaluations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/{evaluation_id}/start":{"post":{"tags":["Evaluations"],"summary":"Start Evaluation","operationId":"start_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/{evaluation_id}/stop":{"post":{"tags":["Evaluations"],"summary":"Stop Evaluation","operationId":"stop_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/{evaluation_id}/close":{"post":{"tags":["Evaluations"],"summary":"Close Evaluation","operationId":"close_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/{evaluation_id}/open":{"post":{"tags":["Evaluations"],"summary":"Open Evaluation","operationId":"open_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/":{"post":{"tags":["Evaluations"],"summary":"Create Queue","operationId":"create_simple_queue","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/query":{"post":{"tags":["Evaluations"],"summary":"Query Queues","operationId":"query_simple_queues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/{queue_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Queue","operationId":"fetch_simple_queue","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/{queue_id}/scenarios/query":{"post":{"tags":["Evaluations"],"summary":"Query Queue Scenarios","operationId":"query_simple_queue_scenarios","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueScenariosQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/{queue_id}/traces/":{"post":{"tags":["Evaluations"],"summary":"Add Queue Traces","operationId":"add_simple_queue_traces","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueTracesCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/{queue_id}/testcases/":{"post":{"tags":["Evaluations"],"summary":"Add Queue Testcases","operationId":"add_simple_queue_testcases","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueTestcasesCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounts/":{"post":{"tags":["Admin"],"summary":"Create accounts","operationId":"create_accounts_admin_accounts__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete accounts","operationId":"delete_accounts_admin_accounts__delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsDelete"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/":{"post":{"tags":["Admin"],"summary":"Create simple accounts","operationId":"create_simple_accounts_admin_simple_accounts__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete simple accounts","operationId":"delete_simple_accounts_admin_simple_accounts__delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsDelete"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/users/":{"post":{"tags":["Admin"],"summary":"Create users","operationId":"create_user_admin_simple_accounts_users__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsUsersCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/users/{user_id}":{"delete":{"tags":["Admin"],"summary":"Delete user","operationId":"delete_user_admin_simple_accounts_users__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/users/identities/":{"post":{"tags":["Admin"],"summary":"Create user identities","operationId":"create_user_identity_admin_simple_accounts_users_identities__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsUsersIdentitiesCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/users/{user_id}/identities/{identity_id}":{"delete":{"tags":["Admin"],"summary":"Delete user identity","operationId":"delete_user_identity_admin_simple_accounts_users__user_id__identities__identity_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"identity_id","in":"path","required":true,"schema":{"type":"string","title":"Identity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/organizations/":{"post":{"tags":["Admin"],"summary":"Create organizations","operationId":"create_organization_admin_simple_accounts_organizations__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsOrganizationsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/organizations/{organization_id}":{"delete":{"tags":["Admin"],"summary":"Delete organization","operationId":"delete_organization_admin_simple_accounts_organizations__organization_id__delete","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/organizations/memberships/":{"post":{"tags":["Admin"],"summary":"Create organization memberships","operationId":"create_organization_membership_admin_simple_accounts_organizations_memberships__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsOrganizationsMembershipsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/organizations/{organization_id}/memberships/{membership_id}":{"delete":{"tags":["Admin"],"summary":"Delete organization membership","operationId":"delete_organization_membership_admin_simple_accounts_organizations__organization_id__memberships__membership_id__delete","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","title":"Membership Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/workspaces/":{"post":{"tags":["Admin"],"summary":"Create workspaces","operationId":"create_workspace_admin_simple_accounts_workspaces__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsWorkspacesCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/workspaces/{workspace_id}":{"delete":{"tags":["Admin"],"summary":"Delete workspace","operationId":"delete_workspace_admin_simple_accounts_workspaces__workspace_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/workspaces/memberships/":{"post":{"tags":["Admin"],"summary":"Create workspace memberships","operationId":"create_workspace_membership_admin_simple_accounts_workspaces_memberships__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsWorkspacesMembershipsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/workspaces/{workspace_id}/memberships/{membership_id}":{"delete":{"tags":["Admin"],"summary":"Delete workspace membership","operationId":"delete_workspace_membership_admin_simple_accounts_workspaces__workspace_id__memberships__membership_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","title":"Membership Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/projects/":{"post":{"tags":["Admin"],"summary":"Create projects","operationId":"create_project_admin_simple_accounts_projects__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsProjectsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/projects/{project_id}":{"delete":{"tags":["Admin"],"summary":"Delete project","operationId":"delete_project_admin_simple_accounts_projects__project_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/projects/memberships/":{"post":{"tags":["Admin"],"summary":"Create project memberships","operationId":"create_project_membership_admin_simple_accounts_projects_memberships__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsProjectsMembershipsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/projects/{project_id}/memberships/{membership_id}":{"delete":{"tags":["Admin"],"summary":"Delete project membership","operationId":"delete_project_membership_admin_simple_accounts_projects__project_id__memberships__membership_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","title":"Membership Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/api-keys/":{"post":{"tags":["Admin"],"summary":"Create API keys","operationId":"create_api_key_admin_simple_accounts_api_keys__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsApiKeysCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/api-keys/{api_key_id}":{"delete":{"tags":["Admin"],"summary":"Delete API key","operationId":"delete_api_key_admin_simple_accounts_api_keys__api_key_id__delete","parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","title":"Api Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/reset-password":{"post":{"tags":["Admin"],"summary":"Reset user password","operationId":"reset_password_admin_simple_accounts_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsUsersResetPassword"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/transfer-ownership":{"post":{"tags":["Admin"],"summary":"Transfer organization ownership","operationId":"transfer_ownership_admin_simple_accounts_transfer_ownership_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsOrganizationsTransferOwnership"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"200":{"description":"Partial transfer — some orgs could not be transferred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsOrganizationsTransferOwnershipResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"tags":["Status"],"summary":"Health Check","operationId":"health_check","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/permissions/verify":{"get":{"tags":["Access"],"summary":"Verify Permissions","operationId":"verify_permissions","parameters":[{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"scope_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Type"}},{"name":"scope_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scope Id"}},{"name":"resource_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Type"}},{"name":"resource_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects":{"get":{"tags":["Projects"],"summary":"Get Projects","operationId":"get_projects","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProjectsResponse"},"type":"array","title":"Response Get Projects"}}}}}},"post":{"tags":["Projects"],"summary":"Create Project","operationId":"create_project","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}":{"get":{"tags":["Projects"],"summary":"Get Project","operationId":"get_project","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Projects"],"summary":"Delete Project","operationId":"delete_project","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Projects"],"summary":"Update Project","operationId":"update_project","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile":{"get":{"tags":["Users"],"summary":"User Profile","operationId":"fetch_user_profile","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/profile/username":{"put":{"tags":["Users"],"summary":"Update User Username","operationId":"update_user_username","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/reset-password":{"post":{"tags":["Users"],"summary":"Reset User Password","operationId":"reset_user_password","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/keys":{"get":{"tags":["Keys"],"summary":"List Api Keys","description":"List all API keys associated with the authenticated user.\n\nArgs:\n request (Request): The incoming request object.\n\nReturns:\n List[ListAPIKeysResponse]: A list of API Keys associated with the user.","operationId":"list_api_keys","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ListAPIKeysResponse"},"type":"array","title":"Response List Api Keys"}}}}}},"post":{"tags":["Keys"],"summary":"Create Api Key","description":"Creates an API key for a user.\n\nArgs:\n request (Request): The request object containing the user ID in the request state.\n\nReturns:\n str: The created API key.","operationId":"create_api_key","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Create Api Key"}}}}}}},"/keys/{key_prefix}":{"delete":{"tags":["Keys"],"summary":"Delete Api Key","description":"Delete an API key with the given key prefix for the authenticated user.\n\nArgs:\n key_prefix (str): The prefix of the API key to be deleted.\n request (Request): The incoming request object.\n\nReturns:\n dict: A dictionary containing a success message upon successful deletion.\n\nRaises:\n HTTPException: If the API key is not found or does not belong to the user.","operationId":"delete_api_key","parameters":[{"name":"key_prefix","in":"path","required":true,"schema":{"type":"string","title":"Key Prefix"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Api Key"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces/{workspace_id}/invite":{"post":{"tags":["Organizations"],"summary":"Invite User To Organization","description":"Assigns a role to a user in an organization.\n\nArgs:\n organization_id (str): The ID of the organization.\n payload (InviteRequest): The payload containing the organization id, user email, and role to assign.\n workspace_id (str): The ID of the workspace.\n\nReturns:\n bool: True if the role was successfully assigned, False otherwise.\n\nRaises:\n HTTPException: If the user does not have permission to perform this action.\n HTTPException: If there is an error assigning the role to the user.","operationId":"invite_user_to_workspace","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InviteRequest"},"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces/{workspace_id}/invite/resend":{"post":{"tags":["Organizations"],"summary":"Resend User Invitation To Organization","description":"Resend an invitation to a user to an Organization.\n\nRaises:\n HTTPException: _description_; status_code: 500\n HTTPException: Invitation not found or has expired; status_code: 400\n HTTPException: You already belong to this organization; status_code: 400\n\nReturns:\n JSONResponse: Resent invitation to user; status_code: 200","operationId":"resend_invitation","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendInviteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces/{workspace_id}/invite/accept":{"post":{"tags":["Organizations"],"summary":"Accept Organization Invitation","description":"Accept an invitation to an organization.\n\nRaises:\n HTTPException: _description_; status_code: 500\n HTTPException: Invitation not found or has expired; status_code: 400\n HTTPException: You already belong to this organization; status_code: 400\n\nReturns:\n JSONResponse: Accepted invitation to workspace; status_code: 200","operationId":"accept_invitation","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"project_id","in":"query","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteToken"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces":{"get":{"tags":["Workspaces"],"summary":"Get Workspace","description":"Get workspace details.\n\nReturns details about the workspace associated with the user's session.\n\nReturns:\n Workspace: The details of the workspace.\n\nRaises:\n HTTPException: If the user does not have permission to perform this action.","operationId":"get_workspace","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Workspace"},"type":"array","title":"Response Get Workspace"}}}}}}},"/workspaces/roles":{"get":{"tags":["Workspaces"],"summary":"Get All Workspace Roles","description":"Get all workspace roles.\n\nReturns a list of all available workspace roles.\n\nReturns:\n List[WorkspaceRoleResponse]: A list of WorkspaceRole objects representing the available workspace roles.\n\nRaises:\n HTTPException: If an error occurs while retrieving the workspace roles.","operationId":"get_all_workspace_roles","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Response Get All Workspace Roles"}}}}}}},"/workspaces/{workspace_id}/users":{"delete":{"tags":["Workspaces"],"summary":"Remove User From Workspace","description":"Remove a user from a workspace.\n\nArgs:\n email (str): The email address of the user to be removed\n workspace_id (str): The ID of the workspace.","operationId":"remove_user_from_workspace","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AdminAccountCreateOptions":{"properties":{"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run","default":false},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key"},"create_identities":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Create Identities"},"create_api_keys":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Create Api Keys"},"return_api_keys":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Return Api Keys"},"seed_defaults":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Seed Defaults","default":true},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"AdminAccountCreateOptions"},"AdminAccountRead":{"properties":{"users":{"additionalProperties":{"$ref":"#/components/schemas/AdminUserRead"},"type":"object","title":"Users","default":{}},"user_identities":{"additionalProperties":{"$ref":"#/components/schemas/AdminUserIdentityRead"},"type":"object","title":"User Identities","default":{}},"organizations":{"additionalProperties":{"$ref":"#/components/schemas/AdminOrganizationRead"},"type":"object","title":"Organizations","default":{}},"workspaces":{"additionalProperties":{"$ref":"#/components/schemas/AdminWorkspaceRead"},"type":"object","title":"Workspaces","default":{}},"projects":{"additionalProperties":{"$ref":"#/components/schemas/AdminProjectRead"},"type":"object","title":"Projects","default":{}},"organization_memberships":{"additionalProperties":{"$ref":"#/components/schemas/AdminOrganizationMembershipRead"},"type":"object","title":"Organization Memberships","default":{}},"workspace_memberships":{"additionalProperties":{"$ref":"#/components/schemas/AdminWorkspaceMembershipRead"},"type":"object","title":"Workspace Memberships","default":{}},"project_memberships":{"additionalProperties":{"$ref":"#/components/schemas/AdminProjectMembershipRead"},"type":"object","title":"Project Memberships","default":{}},"subscriptions":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminSubscriptionRead"},"type":"object"},{"type":"null"}],"title":"Subscriptions"},"api_keys":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminApiKeyResponse"},"type":"object"},{"type":"null"}],"title":"Api Keys"}},"type":"object","title":"AdminAccountRead","description":"Per-account projection in the full graph response (plural entity maps)."},"AdminAccountsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"users":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminUserCreate"},"type":"object"},{"type":"null"}],"title":"Users"},"user_identities":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminUserIdentityCreate"},"type":"object"},{"type":"null"}],"title":"User Identities"},"organizations":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminOrganizationCreate"},"type":"object"},{"type":"null"}],"title":"Organizations"},"workspaces":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminWorkspaceCreate"},"type":"object"},{"type":"null"}],"title":"Workspaces"},"projects":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminProjectCreate"},"type":"object"},{"type":"null"}],"title":"Projects"},"organization_memberships":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminOrganizationMembershipCreate"},"type":"object"},{"type":"null"}],"title":"Organization Memberships"},"workspace_memberships":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminWorkspaceMembershipCreate"},"type":"object"},{"type":"null"}],"title":"Workspace Memberships"},"project_memberships":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminProjectMembershipCreate"},"type":"object"},{"type":"null"}],"title":"Project Memberships"},"api_keys":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminApiKeyCreate"},"type":"object"},{"type":"null"}],"title":"Api Keys"},"subscriptions":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminSubscriptionCreate"},"type":"object"},{"type":"null"}],"title":"Subscriptions"}},"type":"object","title":"AdminAccountsCreate"},"AdminAccountsDelete":{"properties":{"target":{"$ref":"#/components/schemas/AdminAccountsDeleteTarget"},"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run","default":true},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"confirm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirm"}},"type":"object","required":["target"],"title":"AdminAccountsDelete"},"AdminAccountsDeleteTarget":{"properties":{"user_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"User Ids"},"user_emails":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"User Emails"},"organization_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Organization Ids"},"workspace_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Workspace Ids"},"project_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Project Ids"}},"type":"object","title":"AdminAccountsDeleteTarget"},"AdminAccountsResponse":{"properties":{"accounts":{"items":{"$ref":"#/components/schemas/AdminAccountRead"},"type":"array","title":"Accounts","default":[]},"errors":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminStructuredError"},"type":"array"},{"type":"null"}],"title":"Errors"}},"type":"object","title":"AdminAccountsResponse"},"AdminApiKeyCreate":{"properties":{"project_ref":{"$ref":"#/components/schemas/EntityRef"},"user_ref":{"$ref":"#/components/schemas/EntityRef"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["project_ref","user_ref"],"title":"AdminApiKeyCreate"},"AdminApiKeyResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"prefix":{"type":"string","title":"Prefix"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"project_id":{"type":"string","title":"Project Id"},"user_id":{"type":"string","title":"User Id"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"revoked_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revoked At"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"},"returned_once":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Returned Once"}},"type":"object","required":["prefix","project_id","user_id"],"title":"AdminApiKeyResponse"},"AdminDeleteResponse":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run","default":false},"deleted":{"$ref":"#/components/schemas/AdminDeletedEntities","default":{}},"skipped":{"anyOf":[{"$ref":"#/components/schemas/AdminDeletedEntities"},{"type":"null"}]},"errors":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminStructuredError"},"type":"array"},{"type":"null"}],"title":"Errors"}},"type":"object","title":"AdminDeleteResponse"},"AdminDeletedEntities":{"properties":{"users":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Users"},"user_identities":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"User Identities"},"organizations":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Organizations"},"workspaces":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Workspaces"},"projects":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Projects"},"organization_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Organization Memberships"},"workspace_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Workspace Memberships"},"project_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Project Memberships"},"api_keys":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Api Keys"}},"type":"object","title":"AdminDeletedEntities"},"AdminDeletedEntity":{"properties":{"id":{"type":"string","title":"Id"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref"}},"type":"object","required":["id"],"title":"AdminDeletedEntity"},"AdminOrganizationCreate":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"owner_user_ref":{"anyOf":[{"$ref":"#/components/schemas/EntityRef"},{"type":"null"}]},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["name"],"title":"AdminOrganizationCreate"},"AdminOrganizationMembershipCreate":{"properties":{"organization_ref":{"$ref":"#/components/schemas/EntityRef"},"user_ref":{"$ref":"#/components/schemas/EntityRef"},"role":{"type":"string","title":"Role"}},"type":"object","required":["organization_ref","user_ref","role"],"title":"AdminOrganizationMembershipCreate"},"AdminOrganizationMembershipRead":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"user_id":{"type":"string","title":"User Id"},"role":{"type":"string","title":"Role"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","organization_id","user_id","role"],"title":"AdminOrganizationMembershipRead"},"AdminOrganizationRead":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"owner_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner User Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","name"],"title":"AdminOrganizationRead"},"AdminProjectCreate":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"organization_ref":{"$ref":"#/components/schemas/EntityRef"},"workspace_ref":{"$ref":"#/components/schemas/EntityRef"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["name","organization_ref","workspace_ref"],"title":"AdminProjectCreate"},"AdminProjectMembershipCreate":{"properties":{"project_ref":{"$ref":"#/components/schemas/EntityRef"},"user_ref":{"$ref":"#/components/schemas/EntityRef"},"role":{"type":"string","title":"Role"}},"type":"object","required":["project_ref","user_ref","role"],"title":"AdminProjectMembershipCreate"},"AdminProjectMembershipRead":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"user_id":{"type":"string","title":"User Id"},"role":{"type":"string","title":"Role"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","project_id","user_id","role"],"title":"AdminProjectMembershipRead"},"AdminProjectRead":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"organization_id":{"type":"string","title":"Organization Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","name","organization_id","workspace_id"],"title":"AdminProjectRead"},"AdminSimpleAccountCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"user":{"$ref":"#/components/schemas/AdminUserCreate"},"user_identities":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminUserIdentityCreate"},"type":"array"},{"type":"null"}],"title":"User Identities"},"organization":{"anyOf":[{"$ref":"#/components/schemas/AdminOrganizationCreate"},{"type":"null"}]},"workspace":{"anyOf":[{"$ref":"#/components/schemas/AdminWorkspaceCreate"},{"type":"null"}]},"project":{"anyOf":[{"$ref":"#/components/schemas/AdminProjectCreate"},{"type":"null"}]},"organization_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminOrganizationMembershipCreate"},"type":"array"},{"type":"null"}],"title":"Organization Memberships"},"workspace_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminWorkspaceMembershipCreate"},"type":"array"},{"type":"null"}],"title":"Workspace Memberships"},"project_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminProjectMembershipCreate"},"type":"array"},{"type":"null"}],"title":"Project Memberships"},"api_keys":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminApiKeyCreate"},"type":"array"},{"type":"null"}],"title":"Api Keys"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/AdminSubscriptionCreate"},{"type":"null"}]}},"type":"object","required":["user"],"title":"AdminSimpleAccountCreate","description":"One account entry in a batch simple-accounts create request."},"AdminSimpleAccountDeleteEntry":{"properties":{"user":{"$ref":"#/components/schemas/EntityRef"}},"type":"object","required":["user"],"title":"AdminSimpleAccountDeleteEntry","description":"One account entry in a batch simple-accounts delete request.\n\nIdentifies the account by its user (typically by id)."},"AdminSimpleAccountRead":{"properties":{"user":{"anyOf":[{"$ref":"#/components/schemas/AdminUserRead"},{"type":"null"}]},"user_identities":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminUserIdentityRead"},"type":"array"},{"type":"null"}],"title":"User Identities"},"organizations":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminOrganizationRead"},"type":"object"},{"type":"null"}],"title":"Organizations"},"workspaces":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminWorkspaceRead"},"type":"object"},{"type":"null"}],"title":"Workspaces"},"projects":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminProjectRead"},"type":"object"},{"type":"null"}],"title":"Projects"},"organization_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminOrganizationMembershipRead"},"type":"array"},{"type":"null"}],"title":"Organization Memberships"},"workspace_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminWorkspaceMembershipRead"},"type":"array"},{"type":"null"}],"title":"Workspace Memberships"},"project_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminProjectMembershipRead"},"type":"array"},{"type":"null"}],"title":"Project Memberships"},"subscriptions":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminSubscriptionRead"},"type":"object"},{"type":"null"}],"title":"Subscriptions"},"api_keys":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Api Keys"}},"type":"object","title":"AdminSimpleAccountRead","description":"Per-account entry in the simple-accounts response.\n\n``user`` is a flat object (there is always exactly one per account).\n``organizations``, ``workspaces``, ``projects`` are named dicts (keys match\nthe ref keys used internally, e.g. \"org\", \"wrk\", \"prj\").\n``api_keys`` maps ref names to raw key values (plain strings, not DTOs)."},"AdminSimpleAccountsApiKeysCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"api_key":{"$ref":"#/components/schemas/AdminApiKeyCreate"}},"type":"object","required":["api_key"],"title":"AdminSimpleAccountsApiKeysCreate"},"AdminSimpleAccountsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"accounts":{"additionalProperties":{"$ref":"#/components/schemas/AdminSimpleAccountCreate"},"type":"object","title":"Accounts"}},"type":"object","required":["accounts"],"title":"AdminSimpleAccountsCreate"},"AdminSimpleAccountsDelete":{"properties":{"accounts":{"additionalProperties":{"$ref":"#/components/schemas/AdminSimpleAccountDeleteEntry"},"type":"object","title":"Accounts"},"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run","default":false},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"confirm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirm"}},"type":"object","required":["accounts"],"title":"AdminSimpleAccountsDelete"},"AdminSimpleAccountsOrganizationsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"organization":{"$ref":"#/components/schemas/AdminOrganizationCreate"},"owner":{"anyOf":[{"$ref":"#/components/schemas/AdminUserCreate"},{"type":"null"}]}},"type":"object","required":["organization"],"title":"AdminSimpleAccountsOrganizationsCreate"},"AdminSimpleAccountsOrganizationsMembershipsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"membership":{"$ref":"#/components/schemas/AdminOrganizationMembershipCreate"}},"type":"object","required":["membership"],"title":"AdminSimpleAccountsOrganizationsMembershipsCreate"},"AdminSimpleAccountsOrganizationsTransferOwnership":{"properties":{"organizations":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/EntityRef"},"type":"object"},{"type":"null"}],"title":"Organizations"},"users":{"additionalProperties":{"$ref":"#/components/schemas/EntityRef"},"type":"object","title":"Users"},"include_workspaces":{"anyOf":[{"type":"string","const":"all"},{"items":{"type":"string"},"type":"array"}],"title":"Include Workspaces","default":"all"},"include_projects":{"anyOf":[{"type":"string","const":"all"},{"items":{"type":"string"},"type":"array"}],"title":"Include Projects","default":"all"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"recovery":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Recovery"}},"type":"object","required":["users"],"title":"AdminSimpleAccountsOrganizationsTransferOwnership"},"AdminSimpleAccountsOrganizationsTransferOwnershipResponse":{"properties":{"transferred":{"items":{"type":"string"},"type":"array","title":"Transferred","default":[]},"errors":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminStructuredError"},"type":"array"},{"type":"null"}],"title":"Errors"}},"type":"object","title":"AdminSimpleAccountsOrganizationsTransferOwnershipResponse"},"AdminSimpleAccountsProjectsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"project":{"$ref":"#/components/schemas/AdminProjectCreate"}},"type":"object","required":["project"],"title":"AdminSimpleAccountsProjectsCreate"},"AdminSimpleAccountsProjectsMembershipsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"membership":{"$ref":"#/components/schemas/AdminProjectMembershipCreate"}},"type":"object","required":["membership"],"title":"AdminSimpleAccountsProjectsMembershipsCreate"},"AdminSimpleAccountsResponse":{"properties":{"accounts":{"additionalProperties":{"$ref":"#/components/schemas/AdminSimpleAccountRead"},"type":"object","title":"Accounts","default":{}},"errors":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminStructuredError"},"type":"array"},{"type":"null"}],"title":"Errors"}},"type":"object","title":"AdminSimpleAccountsResponse"},"AdminSimpleAccountsUsersCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"user":{"$ref":"#/components/schemas/AdminUserCreate"}},"type":"object","required":["user"],"title":"AdminSimpleAccountsUsersCreate"},"AdminSimpleAccountsUsersIdentitiesCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"user_ref":{"$ref":"#/components/schemas/EntityRef"},"user_identity":{"$ref":"#/components/schemas/AdminUserIdentityCreate"}},"type":"object","required":["user_ref","user_identity"],"title":"AdminSimpleAccountsUsersIdentitiesCreate"},"AdminSimpleAccountsUsersResetPassword":{"properties":{"user_identities":{"items":{"$ref":"#/components/schemas/AdminUserIdentityCreate"},"type":"array","title":"User Identities"}},"type":"object","required":["user_identities"],"title":"AdminSimpleAccountsUsersResetPassword"},"AdminSimpleAccountsWorkspacesCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"workspace":{"$ref":"#/components/schemas/AdminWorkspaceCreate"}},"type":"object","required":["workspace"],"title":"AdminSimpleAccountsWorkspacesCreate"},"AdminSimpleAccountsWorkspacesMembershipsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"membership":{"$ref":"#/components/schemas/AdminWorkspaceMembershipCreate"}},"type":"object","required":["membership"],"title":"AdminSimpleAccountsWorkspacesMembershipsCreate"},"AdminStructuredError":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"}},"type":"object","required":["code","message"],"title":"AdminStructuredError"},"AdminSubscriptionCreate":{"properties":{"plan":{"type":"string","title":"Plan"}},"type":"object","required":["plan"],"title":"AdminSubscriptionCreate"},"AdminSubscriptionRead":{"properties":{"plan":{"type":"string","title":"Plan"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","required":["plan"],"title":"AdminSubscriptionRead"},"AdminUserCreate":{"properties":{"email":{"type":"string","title":"Email"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_admin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Admin"},"is_root":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Root"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["email"],"title":"AdminUserCreate"},"AdminUserIdentityCreate":{"properties":{"user_ref":{"anyOf":[{"$ref":"#/components/schemas/EntityRef"},{"type":"null"}]},"method":{"type":"string","title":"Method"},"subject":{"type":"string","title":"Subject"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verified"},"provider_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider User Id"},"claims":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Claims"}},"type":"object","required":["method","subject"],"title":"AdminUserIdentityCreate"},"AdminUserIdentityRead":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"user_id":{"type":"string","title":"User Id"},"method":{"type":"string","title":"Method"},"subject":{"type":"string","title":"Subject"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"status":{"type":"string","enum":["created","linked","pending_confirmation","skipped","failed"],"title":"Status","default":"created"},"verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verified"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["user_id","method","subject"],"title":"AdminUserIdentityRead"},"AdminUserRead":{"properties":{"id":{"type":"string","title":"Id"},"uid":{"type":"string","title":"Uid"},"email":{"type":"string","title":"Email"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_admin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Admin"},"is_root":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Root"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","uid","email"],"title":"AdminUserRead"},"AdminWorkspaceCreate":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"organization_ref":{"$ref":"#/components/schemas/EntityRef"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["name","organization_ref"],"title":"AdminWorkspaceCreate"},"AdminWorkspaceMembershipCreate":{"properties":{"workspace_ref":{"$ref":"#/components/schemas/EntityRef"},"user_ref":{"$ref":"#/components/schemas/EntityRef"},"role":{"type":"string","title":"Role"}},"type":"object","required":["workspace_ref","user_ref","role"],"title":"AdminWorkspaceMembershipCreate"},"AdminWorkspaceMembershipRead":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"user_id":{"type":"string","title":"User Id"},"role":{"type":"string","title":"Role"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","workspace_id","user_id","role"],"title":"AdminWorkspaceMembershipRead"},"AdminWorkspaceRead":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"organization_id":{"type":"string","title":"Organization Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","name","organization_id"],"title":"AdminWorkspaceRead"},"Analytics":{"properties":{"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count","default":0},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration","default":0.0},"costs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Costs","default":0.0},"tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tokens","default":0.0}},"type":"object","title":"Analytics"},"AnalyticsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of time buckets returned.","default":0},"buckets":{"items":{"$ref":"#/components/schemas/MetricsBucket"},"type":"array","title":"Buckets","description":"Time-bucketed aggregates. Each bucket's `metrics` dict is keyed by the dotted `path` of the corresponding `MetricSpec`.","default":[]},"query":{"$ref":"#/components/schemas/TracingQuery","description":"The resolved query used to compute the buckets."},"specs":{"items":{"$ref":"#/components/schemas/MetricSpec"},"type":"array","title":"Specs","description":"The resolved metric specs applied in each bucket.","default":[]}},"type":"object","title":"AnalyticsResponse","description":"Analytics response with user-specified metric specs."},"Annotation":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Annotation"},"AnnotationCreate":{"properties":{"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"AnnotationCreate"},"AnnotationCreateRequest":{"properties":{"annotation":{"$ref":"#/components/schemas/AnnotationCreate"}},"type":"object","required":["annotation"],"title":"AnnotationCreateRequest"},"AnnotationEdit":{"properties":{"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data"],"title":"AnnotationEdit"},"AnnotationEditRequest":{"properties":{"annotation":{"$ref":"#/components/schemas/AnnotationEdit"}},"type":"object","required":["annotation"],"title":"AnnotationEditRequest"},"AnnotationLinkResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"annotation_link":{"anyOf":[{"$ref":"#/components/schemas/OTelLink-Output"},{"type":"null"}]}},"type":"object","title":"AnnotationLinkResponse"},"AnnotationQuery":{"properties":{"origin":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceOrigin"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceKind"},{"type":"null"}]},"channel":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceChannel"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"AnnotationQuery"},"AnnotationQueryRequest":{"properties":{"annotation":{"anyOf":[{"$ref":"#/components/schemas/AnnotationQuery"},{"type":"null"}]},"annotation_links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Annotation Links"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"AnnotationQueryRequest"},"AnnotationResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"annotation":{"anyOf":[{"$ref":"#/components/schemas/Annotation"},{"type":"null"}]}},"type":"object","title":"AnnotationResponse"},"AnnotationsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"annotations":{"items":{"$ref":"#/components/schemas/Annotation"},"type":"array","title":"Annotations","default":[]}},"type":"object","title":"AnnotationsResponse"},"Application":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationArtifactFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Application"},"ApplicationArtifactFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"ApplicationArtifactFlags","description":"Application flags - is_application=True; other booleans use their normal defaults unless explicitly set."},"ApplicationArtifactQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"}},"type":"object","title":"ApplicationArtifactQueryFlags","description":"Application query flags - filter for is_application=True."},"ApplicationCatalogPreset":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"ApplicationCatalogPreset"},"ApplicationCatalogPresetResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when found, `0` otherwise.","default":0},"preset":{"anyOf":[{"$ref":"#/components/schemas/ApplicationCatalogPreset"},{"type":"null"}],"description":"Catalog preset definition."}},"type":"object","title":"ApplicationCatalogPresetResponse","description":"Single preset response envelope."},"ApplicationCatalogPresetsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of presets returned.","default":0},"presets":{"items":{"$ref":"#/components/schemas/ApplicationCatalogPreset"},"type":"array","title":"Presets","description":"Named parameter sets for the template. Use a preset's `data` as the first revision when creating an application from a template."}},"type":"object","title":"ApplicationCatalogPresetsResponse","description":"List of catalog presets scoped to one template."},"ApplicationCatalogTemplate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"ApplicationCatalogTemplate"},"ApplicationCatalogTemplateResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when found, `0` otherwise.","default":0},"template":{"anyOf":[{"$ref":"#/components/schemas/ApplicationCatalogTemplate"},{"type":"null"}],"description":"Catalog template definition."}},"type":"object","title":"ApplicationCatalogTemplateResponse","description":"Single template response envelope."},"ApplicationCatalogTemplatesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of templates returned.","default":0},"templates":{"items":{"$ref":"#/components/schemas/ApplicationCatalogTemplate"},"type":"array","title":"Templates","description":"Built-in and custom templates an application can be created from. Each template carries a `key`, a `uri`, and the JSON Schemas that applications of that type expose."}},"type":"object","title":"ApplicationCatalogTemplatesResponse","description":"List of catalog templates."},"ApplicationCatalogType":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"json_schema":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Json Schema"}},"type":"object","required":["key","json_schema"],"title":"ApplicationCatalogType"},"ApplicationCatalogTypesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of types returned.","default":0},"types":{"items":{"$ref":"#/components/schemas/ApplicationCatalogType"},"type":"array","title":"Types","description":"Shared JSON Schema building blocks referenced by templates (for example `message`, `prompt-template`)."}},"type":"object","title":"ApplicationCatalogTypesResponse","description":"List of catalog types."},"ApplicationCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"ApplicationCreate"},"ApplicationCreateRequest":{"properties":{"application":{"$ref":"#/components/schemas/ApplicationCreate","description":"Artifact-level fields for the new application: `slug`, `name`, `description`, `flags`, `tags`, `meta`. The `slug` must be unique within the project."}},"type":"object","required":["application"],"title":"ApplicationCreateRequest","description":"Request body for creating an application artifact.\n\nApplications are versioned resources; creating one produces an empty artifact.\nUse `POST /simple/applications/` if you want to create the artifact, a default\nvariant, and a first committed revision in a single call.\nSee the [Applications guide](/reference/api-guide/applications)."},"ApplicationEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ApplicationEdit"},"ApplicationEditRequest":{"properties":{"application":{"$ref":"#/components/schemas/ApplicationEdit","description":"Artifact fields to update. The `id` must match the `application_id` in the URL path."}},"type":"object","required":["application"],"title":"ApplicationEditRequest","description":"Request body for editing an application artifact.\n\nOnly artifact-level fields (flags, tags, meta) can be edited here. Editing\nthe `name` is currently disabled. To change the prompt or model parameters,\ncommit a new revision on a variant with `/applications/revisions/commit`."},"ApplicationFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"ApplicationFlags","description":"Legacy full application flag set."},"ApplicationFork":{"properties":{"application_revision":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionFork"},{"type":"null"}]},"revision":{"anyOf":[{"$ref":"#/components/schemas/RevisionFork"},{"type":"null"}]},"application_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Revision Id"},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"application_variant":{"anyOf":[{"$ref":"#/components/schemas/ApplicationVariantFork"},{"type":"null"}]},"variant":{"anyOf":[{"$ref":"#/components/schemas/VariantFork"},{"type":"null"}]},"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFork"},{"type":"null"}]},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFork"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"ApplicationFork"},"ApplicationForkRequest":{"properties":{"application":{"$ref":"#/components/schemas/ApplicationFork","description":"Fork payload. Must include the source `application_variant_id` (or `application_revision_id`) plus a `variant` object describing the new branch and a `revision` object for the new tip commit."}},"type":"object","required":["application"],"title":"ApplicationForkRequest","description":"Request body for forking a variant into a new variant on the same application.\n\nThe fork copies the revision history up to `application_variant_id` /\n`application_revision_id`, then commits the `revision` payload on top.\nBoth `variant` and `revision` objects must be provided."},"ApplicationQuery":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationArtifactQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"ApplicationQuery"},"ApplicationQueryRequest":{"properties":{"application":{"anyOf":[{"$ref":"#/components/schemas/ApplicationQuery"},{"type":"null"}],"description":"Attribute filter. Accepts `slug`, `slugs`, `flags`, `tags`, `meta`. All fields are AND-ed."},"application_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Application Refs","description":"Restrict the query to specific applications by `id` or `slug`. Combined with the `application` filter with AND semantics."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When `true`, include soft-deleted applications. Defaults to `false`."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time-range controls."}},"type":"object","title":"ApplicationQueryRequest","description":"Request body for `POST /applications/query`.\n\nReturns artifact rows only. For rows that include the currently resolved\nvariant, revision, and `data` payload merged in, use\n`POST /simple/applications/query`.\nSee [Query Pattern](/reference/api-guide/query-pattern)."},"ApplicationResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when the application was found, `0` otherwise.","default":0},"application":{"anyOf":[{"$ref":"#/components/schemas/Application"},{"type":"null"}],"description":"The application artifact, or `null` if not found."}},"type":"object","title":"ApplicationResponse","description":"Single-application response envelope."},"ApplicationRevision":{"properties":{"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"ApplicationRevision"},"ApplicationRevisionCommit":{"properties":{"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"ApplicationRevisionCommit"},"ApplicationRevisionCommitRequest":{"properties":{"application_revision_commit":{"$ref":"#/components/schemas/ApplicationRevisionCommit","description":"Commit payload. Must include `application_variant_id` and `data`. `message` is a human-readable commit message. `slug` is optional; if omitted, the server generates one."}},"type":"object","required":["application_revision_commit"],"title":"ApplicationRevisionCommitRequest","description":"Request body for committing a new revision on a variant.\n\nThe commit becomes the variant's new tip. Revisions are immutable once\ncommitted; to change behavior, commit another revision.\nSee [Versioning](/reference/api-guide/versioning#committing-a-revision)."},"ApplicationRevisionCreate":{"properties":{"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"ApplicationRevisionCreate"},"ApplicationRevisionCreateRequest":{"properties":{"application_revision":{"$ref":"#/components/schemas/ApplicationRevisionCreate","description":"Revision fields. Must reference the parent variant."}},"type":"object","required":["application_revision"],"title":"ApplicationRevisionCreateRequest","description":"Request body for creating a revision row without committing it.\n\nPrefer `POST /applications/revisions/commit` for normal use — commit creates\na revision and advances the variant's tip. The plain create endpoint exists\nfor advanced workflows that populate revision rows out of band."},"ApplicationRevisionData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"ApplicationRevisionData"},"ApplicationRevisionData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"ApplicationRevisionData"},"ApplicationRevisionDeployRequest":{"properties":{"application_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Application reference. If provided, the latest revision of the default variant is deployed."},"application_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Variant reference. Its latest revision is deployed."},"application_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Revision reference. The exact revision is deployed."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment (for example `{\"slug\": \"production\"}`)."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment variant."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment revision; advanced use only."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Deployment key inside the environment revision. Defaults to `{application_slug}.revision`."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Optional commit message attached to the environment revision."}},"type":"object","title":"ApplicationRevisionDeployRequest","description":"Request body for `POST /applications/revisions/deploy`.\n\nAttaches an application revision to an environment under a key. Subsequent\ncalls to `/applications/revisions/retrieve` with the matching\n`environment_ref` resolve to this revision.\nSee the [Applications guide](/reference/api-guide/applications#deployment)."},"ApplicationRevisionEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ApplicationRevisionEdit"},"ApplicationRevisionEditRequest":{"properties":{"application_revision":{"$ref":"#/components/schemas/ApplicationRevisionEdit","description":"Full revision body. Edit replaces the editable fields in a single PUT, so include every editable field even if its value is unchanged. `id` must match the `application_revision_id` in the URL path. `data`, `author`, `date`, and `message` are immutable."}},"type":"object","required":["application_revision"],"title":"ApplicationRevisionEditRequest","description":"Request body for editing a revision's header fields.\n\nRevisions are immutable snapshots of the application's configuration;\n`data`, `author`, `date`, and `message` cannot be edited. Use this only to\ncorrect metadata such as `description` or `tags`."},"ApplicationRevisionFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"ApplicationRevisionFlags"},"ApplicationRevisionFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"ApplicationRevisionFork"},"ApplicationRevisionQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"ApplicationRevisionQuery"},"ApplicationRevisionQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"},"is_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Managed"},"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Llm"},"is_hook":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hook"},"is_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Code"},"is_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Match"},"is_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Feedback"},"is_chat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Chat"},"has_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Url"},"has_script":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Script"},"has_handler":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Handler"}},"type":"object","title":"ApplicationRevisionQueryFlags"},"ApplicationRevisionQueryRequest":{"properties":{"application_revision":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionQuery"},{"type":"null"}],"description":"Attribute filter. Includes standard fields (`slug`, `slugs`, `flags`) plus revision-specific ones (`author`, `authors`, `date`, `dates`, `message`)."},"application_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Application Refs","description":"Scope to revisions belonging to these applications."},"application_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Application Variant Refs","description":"Scope to revisions belonging to these variants."},"application_revision_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Application Revision Refs","description":"Restrict to specific revisions by `id` or by `slug` + `version`."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When `true`, include archived revisions. Defaults to `false`."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time-range controls."},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve","description":"When `true`, resolve embedded references in each returned revision's `data` (for example, snippet references). Defaults to `false`."}},"type":"object","title":"ApplicationRevisionQueryRequest","description":"Request body for `POST /applications/revisions/query`.\n\nReturns committed revisions across one or more variants. For the ordered\nlog of a single variant, use `POST /applications/revisions/log`."},"ApplicationRevisionResolveRequest":{"properties":{"application_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Application reference."},"application_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Variant reference; resolves the latest revision on it."},"application_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Revision reference; resolves that exact revision."},"max_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Depth","description":"Maximum nesting depth for embedded references. Protects against runaway recursion. Defaults to `10`.","default":10},"max_embeds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Embeds","description":"Maximum total number of embedded references to follow. Defaults to `100`.","default":100},"error_policy":{"anyOf":[{"$ref":"#/components/schemas/ErrorPolicy"},{"type":"null"}],"description":"How to handle resolution errors. `exception` (default) aborts; `placeholder` substitutes a marker; `keep` leaves the original reference untouched.","default":"exception"}},"type":"object","title":"ApplicationRevisionResolveRequest","description":"Request body for `POST /applications/revisions/resolve`.\n\nFetches a revision and resolves any embedded references (snippets, linked\nrevisions) inside its `data`. Use when clients need the fully-inlined\nconfiguration instead of the raw stored form."},"ApplicationRevisionResolveResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a revision was resolved, `0` otherwise.","default":0},"application_revision":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevision"},{"type":"null"}],"description":"The revision with embedded references inlined into `data`."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Diagnostic info about which references were resolved."}},"type":"object","title":"ApplicationRevisionResolveResponse","description":"Response for `POST /applications/revisions/resolve`."},"ApplicationRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a revision was found, `0` otherwise.","default":0},"application_revision":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevision"},{"type":"null"}],"description":"The application revision, including its `data` payload (prompt, model parameters, schemas, URL)."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Present only when the request set `resolve: true`. Describes which embedded references were resolved and any errors that occurred."}},"type":"object","title":"ApplicationRevisionResponse","description":"Single-revision response envelope."},"ApplicationRevisionRetrieveRequest":{"properties":{"application_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Application reference. When only an application is supplied, the latest revision of its default variant is returned."},"application_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Variant reference. Returns the latest revision on that variant."},"application_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Revision reference. Returns that exact revision."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment reference. Returns the revision currently deployed to that environment under the given `key`."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment variant reference; used together with `environment_ref`."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment revision reference; used to pin to a specific environment commit instead of the current tip."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Deployment key inside the environment revision. When omitted and `application_ref` is supplied, the server derives it as `{application_slug}.revision`."},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve","description":"When `true`, resolve embedded references in the returned revision's `data` (for example, snippet references)."}},"type":"object","title":"ApplicationRevisionRetrieveRequest","description":"Request body for `POST /applications/revisions/retrieve`.\n\nResolves to a single revision by one of several reference types. Exactly one\nreference path is needed; the most specific wins when several are provided.\nSee the [Applications guide](/reference/api-guide/applications#invocation)."},"ApplicationRevisionsLog":{"properties":{"application_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Revision Id"},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"ApplicationRevisionsLog"},"ApplicationRevisionsLogRequest":{"properties":{"application":{"$ref":"#/components/schemas/ApplicationRevisionsLog","description":"Filter for the log. Typically set `application_variant_id` to list the revision history of a single variant; optionally set `application_revision_id` + `depth` to walk back a bounded number of commits from a specific revision."}},"type":"object","required":["application"],"title":"ApplicationRevisionsLogRequest","description":"Request body for `POST /applications/revisions/log`.\n\nReturns the ordered list of revisions committed to a variant, newest first.\nEach entry carries commit metadata and the full revision record."},"ApplicationRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of revisions in this page.","default":0},"application_revisions":{"items":{"$ref":"#/components/schemas/ApplicationRevision"},"type":"array","title":"Application Revisions","description":"Application revisions matching the query or log."}},"type":"object","title":"ApplicationRevisionsResponse","description":"Paginated list of application revisions."},"ApplicationVariant":{"properties":{"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationVariantFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ApplicationVariant"},"ApplicationVariantCreate":{"properties":{"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"ApplicationVariantCreate"},"ApplicationVariantCreateRequest":{"properties":{"application_variant":{"$ref":"#/components/schemas/ApplicationVariantCreate","description":"Variant fields. Must include `application_id` (the artifact the variant belongs to) and a `slug` unique within the project."}},"type":"object","required":["application_variant"],"title":"ApplicationVariantCreateRequest","description":"Request body for creating a variant on an existing application."},"ApplicationVariantEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ApplicationVariantEdit"},"ApplicationVariantEditRequest":{"properties":{"application_variant":{"$ref":"#/components/schemas/ApplicationVariantEdit","description":"Full variant body. Edit replaces the artifact-level fields in a single PUT, so include every editable field even if its value is unchanged. `id` must match the `application_variant_id` in the URL path; `slug` is immutable. Configuration changes (prompt, model parameters) go through `/applications/revisions/commit`, not this endpoint."}},"type":"object","required":["application_variant"],"title":"ApplicationVariantEditRequest","description":"Request body for editing a variant's artifact-level fields."},"ApplicationVariantFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"ApplicationVariantFlags"},"ApplicationVariantFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"ApplicationVariantFork"},"ApplicationVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a variant was found, `0` otherwise.","default":0},"application_variant":{"anyOf":[{"$ref":"#/components/schemas/ApplicationVariant"},{"type":"null"}],"description":"The application variant, or `null`."}},"type":"object","title":"ApplicationVariantResponse","description":"Single-variant response envelope."},"ApplicationVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of variants in this page.","default":0},"application_variants":{"items":{"$ref":"#/components/schemas/ApplicationVariant"},"type":"array","title":"Application Variants","description":"Application variants matching the query."}},"type":"object","title":"ApplicationVariantsResponse","description":"Paginated list of application variants."},"ApplicationsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of applications in this page.","default":0},"applications":{"items":{"$ref":"#/components/schemas/Application"},"type":"array","title":"Applications","description":"Application artifacts matching the query."}},"type":"object","title":"ApplicationsResponse","description":"Paginated list of application artifacts."},"Body_configs_fetch_variants_configs_fetch_post":{"properties":{"variant_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Input"},{"type":"null"}]},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Input"},{"type":"null"}]},"application_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Input"},{"type":"null"}]}},"type":"object","title":"Body_configs_fetch_variants_configs_fetch_post"},"Body_create_simple_testset_from_file":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"file_type":{"type":"string","enum":["csv","json"],"title":"File Type","default":"csv"},"testset_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Slug"},"testset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Name"},"testset_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Description"},"testset_tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Tags"},"testset_meta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Meta"}},"type":"object","required":["file"],"title":"Body_create_simple_testset_from_file"},"Body_create_testset_revision_from_file":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"file_type":{"type":"string","enum":["csv","json"],"title":"File Type","default":"csv"},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases"}},"type":"object","required":["file"],"title":"Body_create_testset_revision_from_file"},"Body_edit_simple_testset_from_file":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"file_type":{"type":"string","enum":["csv","json"],"title":"File Type","default":"csv"},"testset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Name"},"testset_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Description"},"testset_tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Tags"},"testset_meta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Meta"}},"type":"object","required":["file"],"title":"Body_edit_simple_testset_from_file"},"Bucket":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"interval":{"type":"integer","title":"Interval"},"total":{"$ref":"#/components/schemas/Analytics"},"errors":{"$ref":"#/components/schemas/Analytics"}},"type":"object","required":["timestamp","interval","total","errors"],"title":"Bucket"},"CollectStatusResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"status":{"type":"string","title":"Status","description":"Readiness string. `ready` means the router is mounted and accepts OTLP ingest."}},"type":"object","required":["status"],"title":"CollectStatusResponse","description":"OTLP endpoint readiness response."},"ComparisonOperator":{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},"Condition":{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"$ref":"#/components/schemas/ComparisonOperator"},{"$ref":"#/components/schemas/NumericOperator"},{"$ref":"#/components/schemas/StringOperator"},{"$ref":"#/components/schemas/ListOperator"},{"$ref":"#/components/schemas/DictOperator"},{"$ref":"#/components/schemas/ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"$ref":"#/components/schemas/TextOptions"},{"$ref":"#/components/schemas/ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"ConfigResponseModel":{"properties":{"params":{"additionalProperties":true,"type":"object","title":"Params"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"application_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Output"},{"type":"null"}]},"service_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Output"},{"type":"null"}]},"variant_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Output"},{"type":"null"}]},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Output"},{"type":"null"}]},"application_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"service_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"variant_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"environment_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","title":"ConfigResponseModel"},"CreateOrganizationPayload":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"CreateOrganizationPayload"},"CreateProjectRequest":{"properties":{"name":{"type":"string","title":"Name"},"make_default":{"type":"boolean","title":"Make Default","default":false}},"type":"object","required":["name"],"title":"CreateProjectRequest"},"CreateSecretDTO":{"properties":{"header":{"$ref":"#/components/schemas/Header"},"secret":{"$ref":"#/components/schemas/SecretDTO"}},"type":"object","required":["header","secret"],"title":"CreateSecretDTO"},"CreateWorkspace":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","title":"CreateWorkspace"},"CustomModelSettingsDTO":{"properties":{"slug":{"type":"string","title":"Slug"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","required":["slug"],"title":"CustomModelSettingsDTO"},"CustomProviderDTO":{"properties":{"kind":{"$ref":"#/components/schemas/CustomProviderKind"},"provider":{"$ref":"#/components/schemas/CustomProviderSettingsDTO"},"models":{"items":{"$ref":"#/components/schemas/CustomModelSettingsDTO"},"type":"array","title":"Models"},"provider_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Slug"},"model_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Model Keys"}},"type":"object","required":["kind","provider","models"],"title":"CustomProviderDTO"},"CustomProviderKind":{"type":"string","enum":["custom","azure","bedrock","sagemaker","vertex_ai","openai","cohere","anyscale","deepinfra","alephalpha","groq","minimax","mistral","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"CustomProviderKind"},"CustomProviderSettingsDTO":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","title":"CustomProviderSettingsDTO"},"DictOperator":{"type":"string","enum":["has","has_not"],"title":"DictOperator"},"DiscoverRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"DiscoverRequest"},"DiscoverResponse":{"properties":{"exists":{"type":"boolean","title":"Exists"},"methods":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#/components/schemas/SSOProviders"}]},"type":"object","title":"Methods"}},"type":"object","required":["exists","methods"],"title":"DiscoverResponse"},"EntityRef":{"properties":{"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","title":"EntityRef","description":"Polymorphic reference that can point to a request-local key, an\nexisting persisted ID, a stable slug, or an email address.\nExactly one field must be set."},"Environment":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Environment"},"EnvironmentCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EnvironmentCreate"},"EnvironmentCreateRequest":{"properties":{"environment":{"$ref":"#/components/schemas/EnvironmentCreate"}},"type":"object","required":["environment"],"title":"EnvironmentCreateRequest"},"EnvironmentEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EnvironmentEdit"},"EnvironmentEditRequest":{"properties":{"environment":{"$ref":"#/components/schemas/EnvironmentEdit"}},"type":"object","required":["environment"],"title":"EnvironmentEditRequest"},"EnvironmentFlags":{"properties":{"is_guarded":{"type":"boolean","title":"Is Guarded","default":false}},"type":"object","title":"EnvironmentFlags"},"EnvironmentQueryFlags":{"properties":{"is_guarded":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Guarded"}},"type":"object","title":"EnvironmentQueryFlags"},"EnvironmentResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment":{"anyOf":[{"$ref":"#/components/schemas/Environment"},{"type":"null"}]}},"type":"object","title":"EnvironmentResponse"},"EnvironmentRevision":{"properties":{"environment_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionData"},{"type":"null"}]}},"type":"object","title":"EnvironmentRevision"},"EnvironmentRevisionCommit":{"properties":{"environment_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"environment_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionData"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"delta":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionDelta"},{"type":"null"}]}},"type":"object","title":"EnvironmentRevisionCommit"},"EnvironmentRevisionCommitRequest":{"properties":{"environment_revision_commit":{"$ref":"#/components/schemas/EnvironmentRevisionCommit"}},"type":"object","required":["environment_revision_commit"],"title":"EnvironmentRevisionCommitRequest"},"EnvironmentRevisionCreate":{"properties":{"environment_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EnvironmentRevisionCreate"},"EnvironmentRevisionCreateRequest":{"properties":{"environment_revision":{"$ref":"#/components/schemas/EnvironmentRevisionCreate"}},"type":"object","required":["environment_revision"],"title":"EnvironmentRevisionCreateRequest"},"EnvironmentRevisionData":{"properties":{"references":{"anyOf":[{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/Reference"},"type":"object"},"type":"object"},{"type":"null"}],"title":"References"}},"type":"object","title":"EnvironmentRevisionData","description":"Per-app references for environment revision data.\n\nKeys are app-scoped identifiers (e.g., ``\"pre.revision\"``).\nValues are dicts of entity-type → Reference, providing full traceability::\n\n {\n \"pre.revision\": {\n \"application\": Reference(id=..., slug=..., version=...),\n \"application_variant\": Reference(id=..., slug=..., version=...),\n \"application_revision\": Reference(id=..., slug=..., version=...),\n },\n ...\n }"},"EnvironmentRevisionDelta":{"properties":{"set":{"anyOf":[{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/Reference"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Set"},"remove":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Remove"}},"type":"object","title":"EnvironmentRevisionDelta","description":"Delta operations on environment revision references.\n\n- ``set``: references to add or update (key → dict of entity → Reference).\n- ``remove``: reference keys to remove."},"EnvironmentRevisionEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EnvironmentRevisionEdit"},"EnvironmentRevisionEditRequest":{"properties":{"environment_revision":{"$ref":"#/components/schemas/EnvironmentRevisionEdit"}},"type":"object","required":["environment_revision"],"title":"EnvironmentRevisionEditRequest"},"EnvironmentRevisionResolveRequest":{"properties":{"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"max_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Depth","default":10},"max_embeds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Embeds","default":100},"error_policy":{"anyOf":[{"$ref":"#/components/schemas/ErrorPolicy"},{"type":"null"}],"default":"exception"}},"type":"object","title":"EnvironmentRevisionResolveRequest"},"EnvironmentRevisionResolveResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment_revision":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevision"},{"type":"null"}]},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}]}},"type":"object","title":"EnvironmentRevisionResolveResponse"},"EnvironmentRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment_revision":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevision"},{"type":"null"}]},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}]}},"type":"object","title":"EnvironmentRevisionResponse"},"EnvironmentRevisionRetrieveRequest":{"properties":{"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve"}},"type":"object","title":"EnvironmentRevisionRetrieveRequest"},"EnvironmentRevisionsLog":{"properties":{"environment_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"environment_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"EnvironmentRevisionsLog"},"EnvironmentRevisionsLogRequest":{"properties":{"environment":{"$ref":"#/components/schemas/EnvironmentRevisionsLog"}},"type":"object","required":["environment"],"title":"EnvironmentRevisionsLogRequest"},"EnvironmentRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment_revisions":{"items":{"$ref":"#/components/schemas/EnvironmentRevision"},"type":"array","title":"Environment Revisions","default":[]}},"type":"object","title":"EnvironmentRevisionsResponse"},"EnvironmentVariant":{"properties":{"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EnvironmentVariant"},"EnvironmentVariantCreate":{"properties":{"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EnvironmentVariantCreate"},"EnvironmentVariantCreateRequest":{"properties":{"environment_variant":{"$ref":"#/components/schemas/EnvironmentVariantCreate"}},"type":"object","required":["environment_variant"],"title":"EnvironmentVariantCreateRequest"},"EnvironmentVariantEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EnvironmentVariantEdit"},"EnvironmentVariantEditRequest":{"properties":{"environment_variant":{"$ref":"#/components/schemas/EnvironmentVariantEdit"}},"type":"object","required":["environment_variant"],"title":"EnvironmentVariantEditRequest"},"EnvironmentVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment_variant":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentVariant"},{"type":"null"}]}},"type":"object","title":"EnvironmentVariantResponse"},"EnvironmentVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment_variants":{"items":{"$ref":"#/components/schemas/EnvironmentVariant"},"type":"array","title":"Environment Variants","default":[]}},"type":"object","title":"EnvironmentVariantsResponse"},"EnvironmentsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environments":{"items":{"$ref":"#/components/schemas/Environment"},"type":"array","title":"Environments","default":[]}},"type":"object","title":"EnvironmentsResponse"},"ErrorPolicy":{"type":"string","enum":["exception","placeholder","keep"],"title":"ErrorPolicy"},"EvaluationMetrics":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationMetrics"},"EvaluationMetricsCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationMetricsCreate"},"EvaluationMetricsCreateRequest":{"properties":{"metrics":{"items":{"$ref":"#/components/schemas/EvaluationMetricsCreate"},"type":"array","title":"Metrics"}},"type":"object","required":["metrics"],"title":"EvaluationMetricsCreateRequest"},"EvaluationMetricsEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"EvaluationMetricsEdit"},"EvaluationMetricsEditRequest":{"properties":{"metrics":{"items":{"$ref":"#/components/schemas/EvaluationMetricsEdit"},"type":"array","title":"Metrics"}},"type":"object","required":["metrics"],"title":"EvaluationMetricsEditRequest"},"EvaluationMetricsIdsRequest":{"properties":{"metrics_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Metrics Ids"}},"type":"object","required":["metrics_ids"],"title":"EvaluationMetricsIdsRequest"},"EvaluationMetricsIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"metrics_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Metrics Ids","default":[]}},"type":"object","title":"EvaluationMetricsIdsResponse"},"EvaluationMetricsQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"intervals":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Intervals"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"boolean"},{"type":"null"}],"title":"Timestamps"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"boolean"},{"type":"null"}],"title":"Scenario Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationMetricsQuery"},"EvaluationMetricsQueryRequest":{"properties":{"metrics":{"anyOf":[{"$ref":"#/components/schemas/EvaluationMetricsQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationMetricsQueryRequest"},"EvaluationMetricsRefresh":{"properties":{"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Timestamps"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"}},"type":"object","title":"EvaluationMetricsRefresh"},"EvaluationMetricsRefreshRequest":{"properties":{"metrics":{"$ref":"#/components/schemas/EvaluationMetricsRefresh"}},"type":"object","required":["metrics"],"title":"EvaluationMetricsRefreshRequest"},"EvaluationMetricsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"metrics":{"items":{"$ref":"#/components/schemas/EvaluationMetrics"},"type":"array","title":"Metrics","default":[]}},"type":"object","title":"EvaluationMetricsResponse"},"EvaluationQueue":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueData"},{"type":"null"}]},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationQueue"},"EvaluationQueueCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueData"},{"type":"null"}]},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationQueueCreate"},"EvaluationQueueData":{"properties":{"user_ids":{"anyOf":[{"items":{"items":{"type":"string","format":"uuid"},"type":"array"},"type":"array"},{"type":"null"}],"title":"User Ids"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"step_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Step Keys"},"batch_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Size"},"batch_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Offset"}},"type":"object","title":"EvaluationQueueData"},"EvaluationQueueEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueData"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueEdit"},"EvaluationQueueEditRequest":{"properties":{"queue":{"$ref":"#/components/schemas/EvaluationQueueEdit"}},"type":"object","required":["queue"],"title":"EvaluationQueueEditRequest"},"EvaluationQueueFlags":{"properties":{"is_sequential":{"type":"boolean","title":"Is Sequential","default":false}},"type":"object","title":"EvaluationQueueFlags"},"EvaluationQueueIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queue_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Queue Id"}},"type":"object","title":"EvaluationQueueIdResponse"},"EvaluationQueueIdsRequest":{"properties":{"queue_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Queue Ids"}},"type":"object","required":["queue_ids"],"title":"EvaluationQueueIdsRequest"},"EvaluationQueueIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queue_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Queue Ids","default":[]}},"type":"object","title":"EvaluationQueueIdsResponse"},"EvaluationQueueQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"User Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationQueueQuery"},"EvaluationQueueQueryFlags":{"properties":{"is_sequential":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Sequential"}},"type":"object","title":"EvaluationQueueQueryFlags"},"EvaluationQueueQueryRequest":{"properties":{"queue":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueQueryRequest"},"EvaluationQueueResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queue":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueue"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueResponse"},"EvaluationQueueScenariosQuery":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"User Ids"}},"type":"object","title":"EvaluationQueueScenariosQuery"},"EvaluationQueueScenariosQueryRequest":{"properties":{"queue":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueScenariosQuery"},{"type":"null"}]},"scenario":{"anyOf":[{"$ref":"#/components/schemas/EvaluationScenarioQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueScenariosQueryRequest"},"EvaluationQueuesCreateRequest":{"properties":{"queues":{"items":{"$ref":"#/components/schemas/EvaluationQueueCreate"},"type":"array","title":"Queues"}},"type":"object","required":["queues"],"title":"EvaluationQueuesCreateRequest"},"EvaluationQueuesEditRequest":{"properties":{"queues":{"items":{"$ref":"#/components/schemas/EvaluationQueueEdit"},"type":"array","title":"Queues"}},"type":"object","required":["queues"],"title":"EvaluationQueuesEditRequest"},"EvaluationQueuesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queues":{"items":{"$ref":"#/components/schemas/EvaluationQueue"},"type":"array","title":"Queues","default":[]}},"type":"object","title":"EvaluationQueuesResponse"},"EvaluationResult":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx","default":0},"step_key":{"type":"string","title":"Step Key"},"scenario_id":{"type":"string","format":"uuid","title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["step_key","scenario_id","run_id"],"title":"EvaluationResult"},"EvaluationResultCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx","default":0},"step_key":{"type":"string","title":"Step Key"},"scenario_id":{"type":"string","format":"uuid","title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["step_key","scenario_id","run_id"],"title":"EvaluationResultCreate"},"EvaluationResultEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]}},"type":"object","title":"EvaluationResultEdit"},"EvaluationResultEditRequest":{"properties":{"result":{"$ref":"#/components/schemas/EvaluationResultEdit"}},"type":"object","required":["result"],"title":"EvaluationResultEditRequest"},"EvaluationResultIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"result_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Result Id"}},"type":"object","title":"EvaluationResultIdResponse"},"EvaluationResultIdsRequest":{"properties":{"result_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Result Ids"}},"type":"object","required":["result_ids"],"title":"EvaluationResultIdsRequest"},"EvaluationResultIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"result_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Result Ids","default":[]}},"type":"object","title":"EvaluationResultIdsResponse"},"EvaluationResultQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"intervals":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Intervals"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Timestamps"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx"},"repeat_idxs":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Repeat Idxs"},"step_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step Key"},"step_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Step Keys"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationResultQuery"},"EvaluationResultQueryRequest":{"properties":{"result":{"anyOf":[{"$ref":"#/components/schemas/EvaluationResultQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationResultQueryRequest"},"EvaluationResultResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"result":{"anyOf":[{"$ref":"#/components/schemas/EvaluationResult"},{"type":"null"}]}},"type":"object","title":"EvaluationResultResponse"},"EvaluationResultsCreateRequest":{"properties":{"results":{"items":{"$ref":"#/components/schemas/EvaluationResultCreate"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"EvaluationResultsCreateRequest"},"EvaluationResultsEditRequest":{"properties":{"results":{"items":{"$ref":"#/components/schemas/EvaluationResultEdit"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"EvaluationResultsEditRequest"},"EvaluationResultsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"results":{"items":{"$ref":"#/components/schemas/EvaluationResult"},"type":"array","title":"Results","default":[]}},"type":"object","title":"EvaluationResultsResponse"},"EvaluationRun":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRun"},"EvaluationRunCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRunCreate"},"EvaluationRunData":{"properties":{"steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationRunDataStep"},"type":"array"},{"type":"null"}],"title":"Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats","default":1},"mappings":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationRunDataMapping"},"type":"array"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"EvaluationRunData"},"EvaluationRunDataMapping":{"properties":{"column":{"$ref":"#/components/schemas/EvaluationRunDataMappingColumn"},"step":{"$ref":"#/components/schemas/EvaluationRunDataMappingStep"}},"type":"object","required":["column","step"],"title":"EvaluationRunDataMapping"},"EvaluationRunDataMappingColumn":{"properties":{"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"}},"type":"object","required":["kind","name"],"title":"EvaluationRunDataMappingColumn"},"EvaluationRunDataMappingStep":{"properties":{"key":{"type":"string","title":"Key"},"path":{"type":"string","title":"Path"}},"type":"object","required":["key","path"],"title":"EvaluationRunDataMappingStep"},"EvaluationRunDataStep":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","enum":["input","invocation","annotation"],"title":"Type"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"Origin"},"references":{"additionalProperties":{"$ref":"#/components/schemas/Reference"},"type":"object","title":"References"},"inputs":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationRunDataStepInput"},"type":"array"},{"type":"null"}],"title":"Inputs"}},"type":"object","required":["key","type","origin","references"],"title":"EvaluationRunDataStep"},"EvaluationRunDataStepInput":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"EvaluationRunDataStepInput"},"EvaluationRunEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRunEdit"},"EvaluationRunEditRequest":{"properties":{"run":{"$ref":"#/components/schemas/EvaluationRunEdit"}},"type":"object","required":["run"],"title":"EvaluationRunEditRequest"},"EvaluationRunFlags":{"properties":{"is_live":{"type":"boolean","title":"Is Live","default":false},"is_active":{"type":"boolean","title":"Is Active","default":false},"is_closed":{"type":"boolean","title":"Is Closed","default":false},"is_queue":{"type":"boolean","title":"Is Queue","default":false},"is_cached":{"type":"boolean","title":"Is Cached","default":false},"is_split":{"type":"boolean","title":"Is Split","default":false},"has_queries":{"type":"boolean","title":"Has Queries","default":false},"has_testsets":{"type":"boolean","title":"Has Testsets","default":false},"has_evaluators":{"type":"boolean","title":"Has Evaluators","default":false},"has_custom":{"type":"boolean","title":"Has Custom","default":false},"has_human":{"type":"boolean","title":"Has Human","default":false},"has_auto":{"type":"boolean","title":"Has Auto","default":false}},"type":"object","title":"EvaluationRunFlags"},"EvaluationRunIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"}},"type":"object","title":"EvaluationRunIdResponse"},"EvaluationRunIdsRequest":{"properties":{"run_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Run Ids"}},"type":"object","required":["run_ids"],"title":"EvaluationRunIdsRequest"},"EvaluationRunIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"run_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Run Ids","default":[]}},"type":"object","title":"EvaluationRunIdsResponse"},"EvaluationRunQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"references":{"anyOf":[{"items":{"additionalProperties":{"$ref":"#/components/schemas/Reference"},"type":"object"},"type":"array"},{"type":"null"}],"title":"References"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationRunQuery"},"EvaluationRunQueryFlags":{"properties":{"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_queue":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Queue"},"is_cached":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Cached"},"is_split":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Split"},"has_queries":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Queries"},"has_testsets":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testsets"},"has_evaluators":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Evaluators"},"has_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Custom"},"has_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Human"},"has_auto":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Auto"}},"type":"object","title":"EvaluationRunQueryFlags"},"EvaluationRunQueryRequest":{"properties":{"run":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationRunQueryRequest"},"EvaluationRunResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"run":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRun"},{"type":"null"}]}},"type":"object","title":"EvaluationRunResponse"},"EvaluationRunsCreateRequest":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/EvaluationRunCreate"},"type":"array","title":"Runs"}},"type":"object","required":["runs"],"title":"EvaluationRunsCreateRequest"},"EvaluationRunsEditRequest":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/EvaluationRunEdit"},"type":"array","title":"Runs"}},"type":"object","required":["runs"],"title":"EvaluationRunsEditRequest"},"EvaluationRunsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"runs":{"items":{"$ref":"#/components/schemas/EvaluationRun"},"type":"array","title":"Runs","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationRunsResponse"},"EvaluationScenario":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationScenario"},"EvaluationScenarioCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationScenarioCreate"},"EvaluationScenarioEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]}},"type":"object","title":"EvaluationScenarioEdit"},"EvaluationScenarioEditRequest":{"properties":{"scenario":{"$ref":"#/components/schemas/EvaluationScenarioEdit"}},"type":"object","required":["scenario"],"title":"EvaluationScenarioEditRequest"},"EvaluationScenarioIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"}},"type":"object","title":"EvaluationScenarioIdResponse"},"EvaluationScenarioIdsRequest":{"properties":{"scenario_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Scenario Ids"}},"type":"object","required":["scenario_ids"],"title":"EvaluationScenarioIdsRequest"},"EvaluationScenarioIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"scenario_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Scenario Ids","default":[]}},"type":"object","title":"EvaluationScenarioIdsResponse"},"EvaluationScenarioQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"intervals":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Intervals"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Timestamps"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationScenarioQuery"},"EvaluationScenarioQueryRequest":{"properties":{"scenario":{"anyOf":[{"$ref":"#/components/schemas/EvaluationScenarioQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationScenarioQueryRequest"},"EvaluationScenarioResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"scenario":{"anyOf":[{"$ref":"#/components/schemas/EvaluationScenario"},{"type":"null"}]}},"type":"object","title":"EvaluationScenarioResponse"},"EvaluationScenariosCreateRequest":{"properties":{"scenarios":{"items":{"$ref":"#/components/schemas/EvaluationScenarioCreate"},"type":"array","title":"Scenarios"}},"type":"object","required":["scenarios"],"title":"EvaluationScenariosCreateRequest"},"EvaluationScenariosEditRequest":{"properties":{"scenarios":{"items":{"$ref":"#/components/schemas/EvaluationScenarioEdit"},"type":"array","title":"Scenarios"}},"type":"object","required":["scenarios"],"title":"EvaluationScenariosEditRequest"},"EvaluationScenariosResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"scenarios":{"items":{"$ref":"#/components/schemas/EvaluationScenario"},"type":"array","title":"Scenarios","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationScenariosResponse"},"EvaluationStatus":{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},"Evaluator":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorArtifactFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Evaluator"},"EvaluatorArtifactFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"EvaluatorArtifactFlags"},"EvaluatorArtifactQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"}},"type":"object","title":"EvaluatorArtifactQueryFlags"},"EvaluatorCatalogPreset":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"EvaluatorCatalogPreset"},"EvaluatorCatalogPresetResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when a preset is returned, 0 otherwise.","default":0},"preset":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorCatalogPreset"},{"type":"null"}],"description":"The catalog preset, or null when none matched."}},"type":"object","title":"EvaluatorCatalogPresetResponse","description":"Envelope for a single catalog preset."},"EvaluatorCatalogPresetsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of presets in `presets`.","default":0},"presets":{"items":{"$ref":"#/components/schemas/EvaluatorCatalogPreset"},"type":"array","title":"Presets","description":"Named parameter presets defined against a template."}},"type":"object","title":"EvaluatorCatalogPresetsResponse","description":"Envelope for a list of catalog presets."},"EvaluatorCatalogTemplate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"EvaluatorCatalogTemplate"},"EvaluatorCatalogTemplateResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when a template is returned, 0 otherwise.","default":0},"template":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorCatalogTemplate"},{"type":"null"}],"description":"The catalog template, or null when none matched."}},"type":"object","title":"EvaluatorCatalogTemplateResponse","description":"Envelope for a single catalog template."},"EvaluatorCatalogTemplatesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of templates in `templates`.","default":0},"templates":{"items":{"$ref":"#/components/schemas/EvaluatorCatalogTemplate"},"type":"array","title":"Templates","description":"Evaluator catalog templates (blueprints for creating evaluators)."}},"type":"object","title":"EvaluatorCatalogTemplatesResponse","description":"Envelope for a list of catalog templates."},"EvaluatorCatalogType":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"json_schema":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Json Schema"}},"type":"object","required":["key","json_schema"],"title":"EvaluatorCatalogType"},"EvaluatorCatalogTypesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of types in `types`.","default":0},"types":{"items":{"$ref":"#/components/schemas/EvaluatorCatalogType"},"type":"array","title":"Types","description":"JSON schema types the evaluator catalog understands."}},"type":"object","title":"EvaluatorCatalogTypesResponse","description":"Envelope for a list of catalog types."},"EvaluatorCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorCreate"},"EvaluatorCreateRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/EvaluatorCreate","description":"Evaluator payload (slug, name, flags, data). Slug is required and scoped to the project."}},"type":"object","required":["evaluator"],"title":"EvaluatorCreateRequest","description":"Body for creating an evaluator artifact.\n\nCreating an evaluator also provisions its first variant and its initial\nrevision. The evaluator shares the artifact / variant / revision model\nused across versioned resources — see the Versioning guide."},"EvaluatorEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorEdit"},"EvaluatorEditRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/EvaluatorEdit","description":"Evaluator edit payload. Requires the evaluator `id`. Renaming is temporarily disabled."}},"type":"object","required":["evaluator"],"title":"EvaluatorEditRequest","description":"Body for editing the metadata of an existing evaluator artifact."},"EvaluatorFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"EvaluatorFlags","description":"Legacy full evaluator flag set."},"EvaluatorFork":{"properties":{"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionFork"},{"type":"null"}]},"revision":{"anyOf":[{"$ref":"#/components/schemas/RevisionFork"},{"type":"null"}]},"evaluator_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Revision Id"},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"evaluator_variant":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorVariantFork"},{"type":"null"}]},"variant":{"anyOf":[{"$ref":"#/components/schemas/VariantFork"},{"type":"null"}]},"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFork"},{"type":"null"}]},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFork"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"EvaluatorFork"},"EvaluatorForkRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/EvaluatorFork","description":"Fork payload. References the source variant or revision and the target evaluator."}},"type":"object","required":["evaluator"],"title":"EvaluatorForkRequest","description":"Body for forking an evaluator variant into a new variant.\n\nForking copies the variant's history into a new branch so experiments\ncan proceed without touching the original."},"EvaluatorQuery":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorArtifactQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"EvaluatorQuery"},"EvaluatorQueryRequest":{"properties":{"evaluator":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorQuery"},{"type":"null"}],"description":"Filter on evaluator attributes (flags, tags, meta)."},"evaluator_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Refs","description":"Restrict the query to these evaluators. Accepts `id` or `slug` per reference."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When true, include soft-deleted evaluators in the response."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination controls (limit, order, next, newest, oldest)."}},"type":"object","title":"EvaluatorQueryRequest","description":"Body for filtering evaluators. See the Query Pattern guide for field semantics."},"EvaluatorResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when an evaluator is returned, 0 otherwise.","default":0},"evaluator":{"anyOf":[{"$ref":"#/components/schemas/Evaluator"},{"type":"null"}],"description":"The evaluator artifact, or null when none matched."}},"type":"object","title":"EvaluatorResponse","description":"Envelope for a single evaluator response."},"EvaluatorRevision":{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevision"},"EvaluatorRevisionCommit":{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"EvaluatorRevisionCommit"},"EvaluatorRevisionCommitRequest":{"properties":{"evaluator_revision_commit":{"$ref":"#/components/schemas/EvaluatorRevisionCommit","description":"Commit payload carrying the `evaluator_variant_id`, optional commit `message`, and the revision `data`."}},"type":"object","required":["evaluator_revision_commit"],"title":"EvaluatorRevisionCommitRequest","description":"Body for committing a new revision on a variant."},"EvaluatorRevisionCreate":{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorRevisionCreate"},"EvaluatorRevisionCreateRequest":{"properties":{"evaluator_revision":{"$ref":"#/components/schemas/EvaluatorRevisionCreate","description":"Revision payload. Requires the parent `evaluator_variant_id` and a `data` object."}},"type":"object","required":["evaluator_revision"],"title":"EvaluatorRevisionCreateRequest","description":"Body for creating a new revision (commit) on an evaluator variant."},"EvaluatorRevisionData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"EvaluatorRevisionData"},"EvaluatorRevisionData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"EvaluatorRevisionData"},"EvaluatorRevisionDeployRequest":{"properties":{"evaluator_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Evaluator to deploy (latest revision)."},"evaluator_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Variant to deploy (latest revision on this variant)."},"evaluator_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific revision to deploy."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment variant."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment revision."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Named key under which the revision is pinned. Defaults to `.revision`."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Commit message stored on the environment revision that records the deployment."}},"type":"object","title":"EvaluatorRevisionDeployRequest","description":"Body for pinning an evaluator revision into an environment revision under a key."},"EvaluatorRevisionEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorRevisionEdit"},"EvaluatorRevisionEditRequest":{"properties":{"evaluator_revision":{"$ref":"#/components/schemas/EvaluatorRevisionEdit","description":"Revision edit payload. Requires the revision `id`."}},"type":"object","required":["evaluator_revision"],"title":"EvaluatorRevisionEditRequest","description":"Body for editing a revision's mutable fields (currently limited; payload data is immutable)."},"EvaluatorRevisionFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"EvaluatorRevisionFlags"},"EvaluatorRevisionFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"EvaluatorRevisionFork"},"EvaluatorRevisionQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"EvaluatorRevisionQuery"},"EvaluatorRevisionQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"},"is_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Managed"},"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Llm"},"is_hook":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hook"},"is_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Code"},"is_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Match"},"is_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Feedback"},"is_chat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Chat"},"has_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Url"},"has_script":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Script"},"has_handler":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Handler"}},"type":"object","title":"EvaluatorRevisionQueryFlags"},"EvaluatorRevisionQueryRequest":{"properties":{"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionQuery"},{"type":"null"}],"description":"Filter on revision attributes."},"evaluator_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Refs","description":"Restrict to revisions under these evaluators."},"evaluator_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Variant Refs","description":"Restrict to revisions under these variants."},"evaluator_revision_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Revision Refs","description":"Restrict to these specific revisions."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When true, include soft-deleted revisions."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination controls."},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve","description":"When true, resolve embedded references on each returned revision's `data`."}},"type":"object","title":"EvaluatorRevisionQueryRequest","description":"Body for filtering evaluator revisions. Supports scoping to evaluators, variants, or specific revisions."},"EvaluatorRevisionResolveRequest":{"properties":{"evaluator_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve the latest revision of this evaluator."},"evaluator_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve the latest revision on this variant."},"evaluator_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve this specific revision."},"max_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Depth","description":"Maximum recursion depth when following embedded references. Defaults to 10.","default":10},"max_embeds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Embeds","description":"Maximum number of embeds to resolve. Defaults to 100.","default":100},"error_policy":{"anyOf":[{"$ref":"#/components/schemas/ErrorPolicy"},{"type":"null"}],"description":"How to handle embed-resolution errors (`exception` or `fallback`).","default":"exception"}},"type":"object","title":"EvaluatorRevisionResolveRequest","description":"Body for resolving embedded references on an evaluator revision's `data`."},"EvaluatorRevisionResolveResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when a revision was resolved, 0 otherwise.","default":0},"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevision"},{"type":"null"}],"description":"The resolved revision."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Diagnostic information about the resolution pass (depth, embed count, errors)."}},"type":"object","title":"EvaluatorRevisionResolveResponse","description":"Envelope for a resolved evaluator revision."},"EvaluatorRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when a revision is returned, 0 otherwise.","default":0},"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevision"},{"type":"null"}],"description":"The evaluator revision, or null when none matched."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Embed-resolution metadata. Populated when `resolve=true` was requested."}},"type":"object","title":"EvaluatorRevisionResponse","description":"Envelope for a single evaluator revision."},"EvaluatorRevisionRetrieveRequest":{"properties":{"evaluator_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Retrieve the latest revision of this evaluator."},"evaluator_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Retrieve the latest revision on this variant."},"evaluator_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Retrieve this specific revision."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment to resolve through. Requires `key`."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment variant to resolve through. Requires `key`."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific environment revision to resolve through. Requires `key`."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Named deployment key inside the environment revision. Required with environment refs."},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve","description":"When true, resolve embedded references on the returned revision's `data`."}},"type":"object","title":"EvaluatorRevisionRetrieveRequest","description":"Body for retrieving one revision, either by direct reference or through an environment key.\n\nProvide one of: an evaluator / variant / revision reference, or an environment reference plus `key`."},"EvaluatorRevisionsLog":{"properties":{"evaluator_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Revision Id"},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"EvaluatorRevisionsLog"},"EvaluatorRevisionsLogRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/EvaluatorRevisionsLog","description":"Log request scoped to an evaluator / variant / revision by id, slug, or version."}},"type":"object","required":["evaluator"],"title":"EvaluatorRevisionsLogRequest","description":"Body for listing the revision log of an evaluator variant."},"EvaluatorRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of revisions in `evaluator_revisions`.","default":0},"evaluator_revisions":{"items":{"$ref":"#/components/schemas/EvaluatorRevision"},"type":"array","title":"Evaluator Revisions","description":"Matching evaluator revisions."}},"type":"object","title":"EvaluatorRevisionsResponse","description":"Envelope for a list of evaluator revisions."},"EvaluatorTemplate":{"properties":{"name":{"type":"string","title":"Name","description":"Human-readable template name."},"key":{"type":"string","title":"Key","description":"Stable template identifier, used to create evaluators from the template."},"direct_use":{"type":"boolean","title":"Direct Use","description":"Whether the template can be used without further configuration."},"settings_presets":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Settings Presets","description":"Preset parameter configurations shipped with the template."},"settings_template":{"additionalProperties":true,"type":"object","title":"Settings Template","description":"JSON Schema describing the template's configurable parameters."},"outputs_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Outputs Schema","description":"JSON Schema describing the template's evaluator output shape."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Template description."},"oss":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Oss","description":"True when the template is available in OSS builds.","default":false},"requires_llm_api_keys":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Requires Llm Api Keys","description":"True when the template calls an LLM provider and requires an API key.","default":false},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"Tags for grouping templates."},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived","description":"True when the template is deprecated. Hidden unless `include_archived=true`.","default":false}},"type":"object","required":["name","key","direct_use","settings_template"],"title":"EvaluatorTemplate","description":"Static evaluator template definition (built-in evaluator types).\n\nTemplates are shipped with the product and describe the available\nevaluator types. They are read-only and separate from user-owned\nevaluator artifacts."},"EvaluatorTemplatesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of templates in `templates`.","default":0},"templates":{"items":{"$ref":"#/components/schemas/EvaluatorTemplate"},"type":"array","title":"Templates","description":"Built-in evaluator templates."}},"type":"object","title":"EvaluatorTemplatesResponse","description":"Envelope for a list of evaluator templates."},"EvaluatorVariant":{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorVariantFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorVariant"},"EvaluatorVariantCreate":{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorVariantCreate"},"EvaluatorVariantCreateRequest":{"properties":{"evaluator_variant":{"$ref":"#/components/schemas/EvaluatorVariantCreate","description":"Variant payload. Requires the parent `evaluator_id`."}},"type":"object","required":["evaluator_variant"],"title":"EvaluatorVariantCreateRequest","description":"Body for creating a new variant on an existing evaluator."},"EvaluatorVariantEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorVariantEdit"},"EvaluatorVariantEditRequest":{"properties":{"evaluator_variant":{"$ref":"#/components/schemas/EvaluatorVariantEdit","description":"Variant edit payload. Requires the variant `id`."}},"type":"object","required":["evaluator_variant"],"title":"EvaluatorVariantEditRequest","description":"Body for editing a variant's metadata."},"EvaluatorVariantFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"EvaluatorVariantFlags"},"EvaluatorVariantFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorVariantFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorVariantFork"},"EvaluatorVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when a variant is returned, 0 otherwise.","default":0},"evaluator_variant":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorVariant"},{"type":"null"}],"description":"The evaluator variant, or null when none matched."}},"type":"object","title":"EvaluatorVariantResponse","description":"Envelope for a single evaluator variant."},"EvaluatorVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of variants in `evaluator_variants`.","default":0},"evaluator_variants":{"items":{"$ref":"#/components/schemas/EvaluatorVariant"},"type":"array","title":"Evaluator Variants","description":"Matching evaluator variants."}},"type":"object","title":"EvaluatorVariantsResponse","description":"Envelope for a list of evaluator variants."},"EvaluatorsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of evaluators in `evaluators`.","default":0},"evaluators":{"items":{"$ref":"#/components/schemas/Evaluator"},"type":"array","title":"Evaluators","description":"Matching evaluator artifacts."}},"type":"object","title":"EvaluatorsResponse","description":"Envelope for a list of evaluators."},"ExistenceOperator":{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},"Filtering-Input":{"properties":{"operator":{"$ref":"#/components/schemas/LogicalOperator","default":"and"},"conditions":{"items":{"anyOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/Filtering-Input"}]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},"Filtering-Output":{"properties":{"operator":{"$ref":"#/components/schemas/LogicalOperator","default":"and"},"conditions":{"items":{"anyOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/Filtering-Output"}]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},"Focus":{"type":"string","enum":["trace","span"],"title":"Focus"},"Folder":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"kind":{"anyOf":[{"$ref":"#/components/schemas/FolderKind"},{"type":"null"}],"description":"Resource family this folder organizes. Only `applications` is defined today, and it also covers workflows, evaluators, and testsets (they share the artifact table)."},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path","description":"Dot-separated materialized path built from the folder's slug and its ancestors' slugs. Read-only; derived by the server."},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"Id of the parent folder, or `null` for a root folder."}},"type":"object","title":"Folder"},"FolderCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"kind":{"anyOf":[{"$ref":"#/components/schemas/FolderKind"},{"type":"null"}],"description":"Resource family the folder organizes. Defaults to `applications` when omitted."},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"Id of the parent folder. Omit or set to `null` to create a root folder."}},"type":"object","title":"FolderCreate"},"FolderCreateRequest":{"properties":{"folder":{"$ref":"#/components/schemas/FolderCreate","description":"Folder to create. `slug` is required; `parent_id` nests the new folder under an existing one."}},"type":"object","required":["folder"],"title":"FolderCreateRequest"},"FolderEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"kind":{"anyOf":[{"$ref":"#/components/schemas/FolderKind"},{"type":"null"}],"description":"Resource family. Must match the current folder's kind; defaults to `applications`."},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"New parent folder id. Include the key with a `null` value to move the folder to the root; omit the key to keep the existing parent."}},"type":"object","title":"FolderEdit"},"FolderEditRequest":{"properties":{"folder":{"$ref":"#/components/schemas/FolderEdit","description":"Folder edit payload. `id` must match the path parameter. Only fields present in the payload are changed."}},"type":"object","required":["folder"],"title":"FolderEditRequest"},"FolderIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if a folder was deleted, `0` if no folder matched.","default":0},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id","description":"Id of the deleted folder. Omitted when nothing was deleted."}},"type":"object","title":"FolderIdResponse"},"FolderKind":{"type":"string","enum":["applications"],"title":"FolderKind"},"FolderQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id","description":"Match a single folder id."},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids","description":"Match any of the given folder ids."},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug","description":"Match a folder by slug, regardless of its position in the tree."},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs","description":"Match folders whose slug is in the given list."},"kind":{"anyOf":[{"$ref":"#/components/schemas/FolderKind"},{"type":"null"}],"description":"Match folders of a single resource family."},"kinds":{"anyOf":[{"type":"boolean"},{"items":{"$ref":"#/components/schemas/FolderKind"},"type":"array"},{"type":"null"}],"title":"Kinds","description":"Filter by presence of a kind. `false` returns folders with no kind, `true` returns folders where `kind` is set, and an array restricts to the given kinds."},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"Match folders whose parent is this id. Send `null` to return only root folders."},"parent_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Parent Ids","description":"Match folders whose parent is any of the given ids."},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path","description":"Exact match on the materialized `path` (e.g. `support.prod`)."},"paths":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Paths","description":"Exact match on any of the given paths."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Subtree lookup: returns the folder at this path and every descendant."},"prefixes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Prefixes","description":"Subtree lookup across multiple prefixes, OR-ed together."}},"type":"object","title":"FolderQuery"},"FolderQueryRequest":{"properties":{"folder":{"$ref":"#/components/schemas/FolderQuery","description":"Filter object. Any combination of `id`/`ids`, `slug`/`slugs`, `kind`/`kinds`, `parent_id`/`parent_ids`, `path`/`paths`, and `prefix`/`prefixes` narrows the result."}},"type":"object","required":["folder"],"title":"FolderQueryRequest"},"FolderResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of folders returned (`0` or `1`).","default":0},"folder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"The folder, when found. Omitted when `count` is `0`."}},"type":"object","title":"FolderResponse"},"FoldersResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of folders in `folders`.","default":0},"folders":{"items":{"$ref":"#/components/schemas/Folder"},"type":"array","title":"Folders","description":"Matching folders for the query. Ordering is not guaranteed."}},"type":"object","title":"FoldersResponse"},"Format":{"type":"string","enum":["agenta","opentelemetry"],"title":"Format"},"Formatting":{"properties":{"focus":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}]},"format":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}]}},"type":"object","title":"Formatting"},"FullJson-Input":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/FullJson-Input"},"type":"array"},{"type":"null"}]},"FullJson-Output":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"items":{"$ref":"#/components/schemas/FullJson-Output"},"type":"array"},{"type":"null"}]},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Header":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"Header"},"InviteRequest":{"properties":{"email":{"type":"string","title":"Email"},"roles":{"anyOf":[{"items":{"type":"string","enum":["owner","admin","developer","editor","annotator","viewer"]},"type":"array"},{"type":"null"}],"title":"Roles"}},"type":"object","required":["email"],"title":"InviteRequest"},"InviteToken":{"properties":{"token":{"type":"string","title":"Token"},"email":{"type":"string","title":"Email"}},"type":"object","required":["token","email"],"title":"InviteToken"},"Invocation":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Invocation"},"InvocationCreate":{"properties":{"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"InvocationCreate"},"InvocationCreateRequest":{"properties":{"invocation":{"$ref":"#/components/schemas/InvocationCreate"}},"type":"object","required":["invocation"],"title":"InvocationCreateRequest"},"InvocationEdit":{"properties":{"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data"],"title":"InvocationEdit"},"InvocationEditRequest":{"properties":{"invocation":{"$ref":"#/components/schemas/InvocationEdit"}},"type":"object","required":["invocation"],"title":"InvocationEditRequest"},"InvocationLinkResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"invocation_link":{"anyOf":[{"$ref":"#/components/schemas/OTelLink-Output"},{"type":"null"}]}},"type":"object","title":"InvocationLinkResponse"},"InvocationQuery":{"properties":{"origin":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceOrigin"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceKind"},{"type":"null"}]},"channel":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceChannel"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"InvocationQuery"},"InvocationQueryRequest":{"properties":{"invocation":{"anyOf":[{"$ref":"#/components/schemas/InvocationQuery"},{"type":"null"}]},"invocation_links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Invocation Links"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"InvocationQueryRequest"},"InvocationResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"invocation":{"anyOf":[{"$ref":"#/components/schemas/Invocation"},{"type":"null"}]}},"type":"object","title":"InvocationResponse"},"InvocationsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"invocations":{"items":{"$ref":"#/components/schemas/Invocation"},"type":"array","title":"Invocations","default":[]}},"type":"object","title":"InvocationsResponse"},"JsonSchemas-Input":{"properties":{"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"},"inputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Inputs"},"outputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Outputs"}},"type":"object","title":"JsonSchemas"},"JsonSchemas-Output":{"properties":{"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"inputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Inputs"},"outputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Outputs"}},"type":"object","title":"JsonSchemas"},"LabelJson-Input":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"}]},"LabelJson-Output":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"}]},"LegacyLifecycleDTO":{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},"ListAPIKeysResponse":{"properties":{"prefix":{"type":"string","title":"Prefix"},"created_at":{"type":"string","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"expiration_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiration Date"}},"type":"object","required":["prefix","created_at"],"title":"ListAPIKeysResponse"},"ListOperator":{"type":"string","enum":["in","not_in"],"title":"ListOperator"},"ListOptions":{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},"LogicalOperator":{"type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"MetricSpec":{"properties":{"type":{"$ref":"#/components/schemas/MetricType","default":"none"},"path":{"type":"string","title":"Path","default":"*"},"bins":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bins"},"vmin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vmin"},"vmax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vmax"},"edge":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Edge"}},"type":"object","title":"MetricSpec"},"MetricType":{"type":"string","enum":["numeric/continuous","numeric/discrete","binary","categorical/single","categorical/multiple","string","json","none","*"],"title":"MetricType"},"MetricsBucket":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"interval":{"type":"integer","title":"Interval"},"metrics":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Metrics"}},"type":"object","required":["timestamp","interval"],"title":"MetricsBucket"},"NumericOperator":{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},"OTelEvent-Input":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"OTelEvent-Output":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"OTelHash-Input":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"OTelHash-Output":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"OTelLink-Input":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelLink"},"OTelLink-Output":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelLink"},"OTelLinksResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of spans that were accepted and published to the ingest stream. Compare against the number of spans you sent to detect partial failures.","default":0},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"},{"type":"null"}],"title":"Links","description":"List of `(trace_id, span_id)` pairs for the accepted spans, in submission order."}},"type":"object","title":"OTelLinksResponse","description":"Response from span ingestion.\n\n`count` reflects how many spans were successfully parsed and published\nto the ingest stream. If you submitted N spans and see `count < N`,\nsome spans failed server-side validation and were not persisted (check\nserver logs for details). See [Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202) for\nthe full semantics of the `202 Accepted` response."},"OTelReference-Input":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"OTelReference-Output":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"OTelSpanKind":{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},"OTelStatusCode":{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},"OTelTracingRequest":{"properties":{"spans":{"anyOf":[{"items":{"$ref":"#/components/schemas/Span-Input"},"type":"array"},{"type":"null"}],"title":"Spans","description":"Flat list of spans. Use this when you already have a flat list and parent/child relationships are expressed via each span's `parent_id`."},"traces":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SpansTree-Input"},"type":"object"},{"type":"null"}],"title":"Traces","description":"Nested tree of spans keyed by `trace_id` → span name, with children under each node's `spans` field. This matches the shape returned by `POST /tracing/spans/query` with `focus=\"trace\"`."}},"type":"object","title":"OTelTracingRequest","description":"Ingest or query payload for OpenTelemetry-style spans.\n\nExactly one of `spans` or `traces` should be provided. Use `spans`\nfor a flat list (parent/child linked via `parent_id`); use `traces`\nfor a nested tree (keyed by `trace_id` then by span name, children\nhanging off each node's `spans` field). The two shapes are\ninterchangeable and the query endpoint returns the `traces` shape by\ndefault.\n\nSee [Tracing](/reference/api-guide/tracing) for the full attribute\nnamespace and the async ingest contract."},"OTelTracingResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Total number of matching traces or spans in the window.","default":0},"spans":{"anyOf":[{"items":{"$ref":"#/components/schemas/Span-Output"},"type":"array"},{"type":"null"}],"title":"Spans","description":"Flat list of spans, populated when the query was run with `focus=\"span\"`."},"traces":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SpansTree-Output"},"type":"object"},{"type":"null"}],"title":"Traces","description":"Nested tree of spans keyed by `trace_id` → span name, populated when the query was run with `focus=\"trace\"` (default)."}},"type":"object","title":"OTelTracingResponse","description":"Response from span/trace queries.\n\nExactly one of `spans` or `traces` is populated, controlled by the\n`focus` field in the request (`\"span\"` for flat lists, `\"trace\"` for\nnested trees). The shapes here match what the ingest endpoint accepts,\nso you can round-trip data between environments."},"OldAnalyticsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of time buckets returned.","default":0},"buckets":{"items":{"$ref":"#/components/schemas/Bucket"},"type":"array","title":"Buckets","description":"Time-bucketed aggregates with fixed fields (`total`, `errors`) holding `count`, `duration`, `costs`, and `tokens`.","default":[]}},"type":"object","title":"OldAnalyticsResponse","description":"Legacy analytics response with a fixed metric schema."},"OrganizationDetails":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"owner_id":{"type":"string","format":"uuid","title":"Owner Id"},"members":{"items":{"type":"string"},"type":"array","title":"Members"},"invitations":{"items":{},"type":"array","title":"Invitations"},"workspaces":{"items":{"type":"string"},"type":"array","title":"Workspaces"},"default_workspace":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Default Workspace"}},"type":"object","required":["id","owner_id"],"title":"OrganizationDetails"},"OrganizationDomainCreate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"domain":{"type":"string","title":"Domain"}},"type":"object","required":["domain"],"title":"OrganizationDomainCreate","description":"Request model for creating a domain."},"OrganizationDomainResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"additionalProperties":true,"type":"object","title":"Flags"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"}},"type":"object","required":["id","slug","name","description","flags","token","created_at","updated_at","organization_id"],"title":"OrganizationDomainResponse","description":"Response model for a domain."},"OrganizationDomainVerify":{"properties":{"domain_id":{"type":"string","title":"Domain Id"}},"type":"object","required":["domain_id"],"title":"OrganizationDomainVerify","description":"Request model for verifying a domain."},"OrganizationProviderCreate":{"properties":{"slug":{"type":"string","pattern":"^[a-z-]+$","title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"settings":{"additionalProperties":true,"type":"object","title":"Settings"}},"type":"object","required":["slug","settings"],"title":"OrganizationProviderCreate","description":"Request model for creating an SSO provider."},"OrganizationProviderResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"additionalProperties":true,"type":"object","title":"Flags"},"settings":{"additionalProperties":true,"type":"object","title":"Settings"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"}},"type":"object","required":["id","slug","name","description","flags","settings","created_at","updated_at","organization_id"],"title":"OrganizationProviderResponse","description":"Response model for an SSO provider."},"OrganizationProviderUpdate":{"properties":{"slug":{"anyOf":[{"type":"string","pattern":"^[a-z-]+$"},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"}},"type":"object","title":"OrganizationProviderUpdate","description":"Request model for updating an SSO provider."},"OrganizationUpdate":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","title":"OrganizationUpdate"},"Permission":{"type":"string","enum":["read_system","view_applications","edit_application","create_app_variant","delete_app_variant","modify_variant_configurations","delete_application_variant","run_service","view_webhooks","edit_webhooks","view_secret","edit_secret","view_spans","edit_spans","view_folders","edit_folders","view_api_keys","edit_api_keys","view_app_environment_deployment","edit_app_environment_deployment","create_app_environment_deployment","view_testset","edit_testset","create_testset","delete_testset","view_evaluation","run_evaluations","edit_evaluation","create_evaluation","delete_evaluation","deploy_application","view_workspace","edit_workspace","create_workspace","delete_workspace","modify_user_roles","add_new_user_to_workspace","edit_organization","delete_organization","add_new_user_to_organization","reset_password","view_billing","edit_billing","view_workflows","edit_workflows","run_workflows","view_evaluators","edit_evaluators","view_environments","edit_environments","deploy_environments","view_queries","edit_queries","view_testsets","edit_testsets","view_annotations","edit_annotations","view_invocations","edit_invocations","view_evaluation_runs","edit_evaluation_runs","view_evaluation_scenarios","edit_evaluation_scenarios","view_evaluation_results","edit_evaluation_results","view_evaluation_metrics","edit_evaluation_metrics","view_evaluation_queues","edit_evaluation_queues","view_tools","edit_tools","run_tools"],"title":"Permission"},"ProjectsResponse":{"properties":{"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"workspace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"},"workspace_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Name"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"project_name":{"type":"string","title":"Project Name"},"is_default_project":{"type":"boolean","title":"Is Default Project","default":false},"user_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Role"},"is_demo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Demo"}},"type":"object","required":["project_id","project_name"],"title":"ProjectsResponse"},"QueriesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queries":{"items":{"$ref":"#/components/schemas/Query"},"type":"array","title":"Queries","default":[]}},"type":"object","title":"QueriesResponse"},"Query":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Query"},"QueryCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"QueryCreate"},"QueryCreateRequest":{"properties":{"query":{"$ref":"#/components/schemas/QueryCreate"}},"type":"object","required":["query"],"title":"QueryCreateRequest"},"QueryEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"QueryEdit"},"QueryEditRequest":{"properties":{"query":{"$ref":"#/components/schemas/QueryEdit"}},"type":"object","required":["query"],"title":"QueryEditRequest"},"QueryFlags":{"properties":{},"type":"object","title":"QueryFlags"},"QueryQueryFlags":{"properties":{},"type":"object","title":"QueryQueryFlags"},"QueryResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query":{"anyOf":[{"$ref":"#/components/schemas/Query"},{"type":"null"}]}},"type":"object","title":"QueryResponse"},"QueryRevision":{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"QueryRevision"},"QueryRevisionCommit":{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"QueryRevisionCommit"},"QueryRevisionCommitRequest":{"properties":{"query_revision_commit":{"$ref":"#/components/schemas/QueryRevisionCommit"}},"type":"object","required":["query_revision_commit"],"title":"QueryRevisionCommitRequest"},"QueryRevisionCreate":{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"QueryRevisionCreate"},"QueryRevisionCreateRequest":{"properties":{"query_revision":{"$ref":"#/components/schemas/QueryRevisionCreate"}},"type":"object","required":["query_revision"],"title":"QueryRevisionCreateRequest"},"QueryRevisionData-Input":{"properties":{"formatting":{"anyOf":[{"$ref":"#/components/schemas/Formatting"},{"type":"null"}]},"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Input"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]},"trace_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trace Ids"},"traces":{"anyOf":[{"items":{"$ref":"#/components/schemas/Trace-Input"},"type":"array"},{"type":"null"}],"title":"Traces"}},"type":"object","title":"QueryRevisionData"},"QueryRevisionData-Output":{"properties":{"formatting":{"anyOf":[{"$ref":"#/components/schemas/Formatting"},{"type":"null"}]},"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Output"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]},"trace_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trace Ids"},"traces":{"anyOf":[{"items":{"$ref":"#/components/schemas/Trace-Output"},"type":"array"},{"type":"null"}],"title":"Traces"}},"type":"object","title":"QueryRevisionData"},"QueryRevisionEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"QueryRevisionEdit"},"QueryRevisionEditRequest":{"properties":{"query_revision":{"$ref":"#/components/schemas/QueryRevisionEdit"}},"type":"object","required":["query_revision"],"title":"QueryRevisionEditRequest"},"QueryRevisionQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"QueryRevisionQuery"},"QueryRevisionQueryRequest":{"properties":{"query_revision":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionQuery"},{"type":"null"}]},"query_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Refs"},"query_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Variant Refs"},"query_revision_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Revision Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"QueryRevisionQueryRequest"},"QueryRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query_revision":{"anyOf":[{"$ref":"#/components/schemas/QueryRevision"},{"type":"null"}]}},"type":"object","title":"QueryRevisionResponse"},"QueryRevisionRetrieveRequest":{"properties":{"query_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"query_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"query_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"include_trace_ids":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Trace Ids"},"include_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Traces"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"QueryRevisionRetrieveRequest"},"QueryRevisionsLog":{"properties":{"query_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"QueryRevisionsLog"},"QueryRevisionsLogRequest":{"properties":{"query_revisions":{"$ref":"#/components/schemas/QueryRevisionsLog"}},"type":"object","required":["query_revisions"],"title":"QueryRevisionsLogRequest"},"QueryRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query_revisions":{"items":{"$ref":"#/components/schemas/QueryRevision"},"type":"array","title":"Query Revisions","default":[]}},"type":"object","title":"QueryRevisionsResponse"},"QueryVariant":{"properties":{"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"QueryVariant"},"QueryVariantCreate":{"properties":{"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"QueryVariantCreate"},"QueryVariantCreateRequest":{"properties":{"query_variant":{"$ref":"#/components/schemas/QueryVariantCreate"}},"type":"object","required":["query_variant"],"title":"QueryVariantCreateRequest"},"QueryVariantEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"QueryVariantEdit"},"QueryVariantEditRequest":{"properties":{"query_variant":{"$ref":"#/components/schemas/QueryVariantEdit"}},"type":"object","required":["query_variant"],"title":"QueryVariantEditRequest"},"QueryVariantQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"QueryVariantQuery"},"QueryVariantQueryRequest":{"properties":{"query_variant":{"anyOf":[{"$ref":"#/components/schemas/QueryVariantQuery"},{"type":"null"}]},"query_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Refs"},"query_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Variant Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"QueryVariantQueryRequest"},"QueryVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query_variant":{"anyOf":[{"$ref":"#/components/schemas/QueryVariant"},{"type":"null"}]}},"type":"object","title":"QueryVariantResponse"},"QueryVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query_variants":{"items":{"$ref":"#/components/schemas/QueryVariant"},"type":"array","title":"Query Variants","default":[]}},"type":"object","title":"QueryVariantsResponse"},"Reference":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"ReferenceRequestModel-Input":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},"ReferenceRequestModel-Output":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},"ResendInviteRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"ResendInviteRequest"},"ResolutionInfo":{"properties":{"references_used":{"items":{"additionalProperties":{"$ref":"#/components/schemas/Reference"},"type":"object"},"type":"array","title":"References Used"},"depth_reached":{"type":"integer","title":"Depth Reached"},"embeds_resolved":{"type":"integer","title":"Embeds Resolved"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","default":[]}},"type":"object","required":["references_used","depth_reached","embeds_resolved"],"title":"ResolutionInfo"},"RevisionFork":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"RevisionFork"},"SSOProviderDTO":{"properties":{"provider":{"$ref":"#/components/schemas/SSOProviderSettingsDTO"}},"type":"object","required":["provider"],"title":"SSOProviderDTO"},"SSOProviderInfo":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug"},"third_party_id":{"type":"string","title":"Third Party Id"}},"type":"object","required":["id","slug","third_party_id"],"title":"SSOProviderInfo"},"SSOProviderSettingsDTO":{"properties":{"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"issuer_url":{"type":"string","title":"Issuer Url"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"extra":{"additionalProperties":true,"type":"object","title":"Extra"}},"type":"object","required":["client_id","client_secret","issuer_url","scopes"],"title":"SSOProviderSettingsDTO"},"SSOProviders":{"properties":{"providers":{"items":{"$ref":"#/components/schemas/SSOProviderInfo"},"type":"array","title":"Providers"}},"type":"object","required":["providers"],"title":"SSOProviders"},"SecretDTO":{"properties":{"kind":{"$ref":"#/components/schemas/SecretKind"},"data":{"anyOf":[{"$ref":"#/components/schemas/StandardProviderDTO"},{"$ref":"#/components/schemas/CustomProviderDTO"},{"$ref":"#/components/schemas/SSOProviderDTO"},{"$ref":"#/components/schemas/WebhookProviderDTO"}],"title":"Data"}},"type":"object","required":["kind","data"],"title":"SecretDTO"},"SecretKind":{"type":"string","enum":["provider_key","custom_provider","sso_provider","webhook_provider"],"title":"SecretKind"},"SecretResponseDTO":{"properties":{"kind":{"$ref":"#/components/schemas/SecretKind"},"data":{"anyOf":[{"$ref":"#/components/schemas/StandardProviderDTO"},{"$ref":"#/components/schemas/CustomProviderDTO"},{"$ref":"#/components/schemas/SSOProviderDTO"},{"$ref":"#/components/schemas/WebhookProviderDTO"}],"title":"Data"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"header":{"$ref":"#/components/schemas/Header"},"lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","required":["kind","data","header"],"title":"SecretResponseDTO"},"SessionIdentitiesUpdate":{"properties":{"session_identities":{"items":{"type":"string"},"type":"array","title":"Session Identities"}},"type":"object","required":["session_identities"],"title":"SessionIdentitiesUpdate"},"SessionIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of session IDs in this page.","default":0},"session_ids":{"items":{"type":"string"},"type":"array","title":"Session Ids","description":"Distinct values of `ag.session.id` in this page.","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor for the next page. Pass verbatim as `windowing.next`."}},"type":"object","title":"SessionIdsResponse"},"SessionsQueryRequest":{"properties":{"realtime":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Realtime","description":"When `true`, paginate by `last_active` (reflects ongoing activity but can shift between pages). When `false` or unset, paginate by the stable `first_active` cursor."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time range. Pass the returned `windowing.next` on subsequent calls to continue iteration."}},"type":"object","title":"SessionsQueryRequest","description":"Request body for `POST /tracing/sessions/query`."},"SimpleApplication":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationData-Output"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"SimpleApplication"},"SimpleApplicationCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleApplicationCreate"},"SimpleApplicationCreateRequest":{"properties":{"application":{"$ref":"#/components/schemas/SimpleApplicationCreate","description":"Application fields plus `data` for the first revision. `data.uri` selects the template (for example `agenta:builtin:completion:v0`); `data.parameters` carries the prompt and model config."}},"type":"object","required":["application"],"title":"SimpleApplicationCreateRequest","description":"Request body for `POST /simple/applications/`.\n\nCreates the application artifact, a default variant, and a first committed\nrevision whose `data` comes from the request. Use this for the common case\nof \"spin up a new application from a template\".\nSee [Simple Endpoints](/reference/api-guide/simple-endpoints)."},"SimpleApplicationData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleApplicationData"},"SimpleApplicationData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleApplicationData"},"SimpleApplicationEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleApplicationEdit"},"SimpleApplicationEditRequest":{"properties":{"application":{"$ref":"#/components/schemas/SimpleApplicationEdit","description":"Fields to change. `id` must match the path. Supplying `data` commits a new revision with that configuration; supplying `flags`/`tags`/`meta` commits a revision with the updated header but the existing `data`."}},"type":"object","required":["application"],"title":"SimpleApplicationEditRequest","description":"Request body for `PUT /simple/applications/{application_id}`.\n\nCommits a new revision on the application's variant whenever fields other\nthan `id` are present. If only `id` is sent, the current state is returned\nwithout committing."},"SimpleApplicationFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"SimpleApplicationFlags"},"SimpleApplicationQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"SimpleApplicationQuery"},"SimpleApplicationQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"},"is_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Managed"},"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Llm"},"is_hook":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hook"},"is_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Code"},"is_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Match"},"is_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Feedback"},"is_chat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Chat"},"has_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Url"},"has_script":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Script"},"has_handler":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Handler"}},"type":"object","title":"SimpleApplicationQueryFlags"},"SimpleApplicationQueryRequest":{"properties":{"application":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationQuery"},{"type":"null"}],"description":"Attribute filter. Supports `slug`, `slugs`, `flags`, and `meta`. `flags` filter both artifact flags (`is_application`, etc.) and revision flags (`is_chat`, `has_url`, etc.)."},"application_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Application Refs","description":"Restrict to specific applications by `id` or `slug`."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When `true`, include archived applications. Defaults to `false`.","default":false},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time-range controls."}},"type":"object","title":"SimpleApplicationQueryRequest","description":"Request body for `POST /simple/applications/query`.\n\nReturns one row per application with the currently resolved variant,\nrevision, and `data` merged in — the shape most clients want when listing\napplications for a dashboard or invocation picker."},"SimpleApplicationResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when the application was found, `0` otherwise.","default":0},"application":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplication"},{"type":"null"}],"description":"The application with `variant_id`, `revision_id`, and the revision's `data` merged. `data.url` is the invocation URL."}},"type":"object","title":"SimpleApplicationResponse","description":"Simple-application single-row response envelope."},"SimpleApplicationsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of applications in this page.","default":0},"applications":{"items":{"$ref":"#/components/schemas/SimpleApplication"},"type":"array","title":"Applications","description":"Applications with their current variant, revision, and `data` merged in."}},"type":"object","title":"SimpleApplicationsResponse","description":"Paginated list of simple-application rows."},"SimpleEnvironment":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionData"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"SimpleEnvironment"},"SimpleEnvironmentCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleEnvironmentCreate"},"SimpleEnvironmentCreateRequest":{"properties":{"environment":{"$ref":"#/components/schemas/SimpleEnvironmentCreate"}},"type":"object","required":["environment"],"title":"SimpleEnvironmentCreateRequest"},"SimpleEnvironmentEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleEnvironmentEdit"},"SimpleEnvironmentEditRequest":{"properties":{"environment":{"$ref":"#/components/schemas/SimpleEnvironmentEdit"}},"type":"object","required":["environment"],"title":"SimpleEnvironmentEditRequest"},"SimpleEnvironmentQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"SimpleEnvironmentQuery"},"SimpleEnvironmentQueryRequest":{"properties":{"environment":{"anyOf":[{"$ref":"#/components/schemas/SimpleEnvironmentQuery"},{"type":"null"}]},"environment_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Environment Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","default":false},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleEnvironmentQueryRequest"},"SimpleEnvironmentResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment":{"anyOf":[{"$ref":"#/components/schemas/SimpleEnvironment"},{"type":"null"}]}},"type":"object","title":"SimpleEnvironmentResponse"},"SimpleEnvironmentsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environments":{"items":{"$ref":"#/components/schemas/SimpleEnvironment"},"type":"array","title":"Environments","default":[]}},"type":"object","title":"SimpleEnvironmentsResponse"},"SimpleEvaluation":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluation"},"SimpleEvaluationCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationCreate"},"SimpleEvaluationCreateRequest":{"properties":{"evaluation":{"$ref":"#/components/schemas/SimpleEvaluationCreate"}},"type":"object","required":["evaluation"],"title":"SimpleEvaluationCreateRequest"},"SimpleEvaluationData":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"query_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Query Steps"},"testset_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Testset Steps"},"application_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Application Steps"},"evaluator_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Evaluator Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats"}},"type":"object","title":"SimpleEvaluationData"},"SimpleEvaluationEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationEdit"},"SimpleEvaluationEditRequest":{"properties":{"evaluation":{"$ref":"#/components/schemas/SimpleEvaluationEdit"}},"type":"object","required":["evaluation"],"title":"SimpleEvaluationEditRequest"},"SimpleEvaluationIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"evaluation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluation Id"}},"type":"object","title":"SimpleEvaluationIdResponse"},"SimpleEvaluationQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"SimpleEvaluationQuery"},"SimpleEvaluationQueryRequest":{"properties":{"evaluation":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluationQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationQueryRequest"},"SimpleEvaluationResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"evaluation":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluation"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationResponse"},"SimpleEvaluationsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"evaluations":{"items":{"$ref":"#/components/schemas/SimpleEvaluation"},"type":"array","title":"Evaluations","default":[]}},"type":"object","title":"SimpleEvaluationsResponse"},"SimpleEvaluator":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorData-Output"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"SimpleEvaluator"},"SimpleEvaluatorCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluatorCreate"},"SimpleEvaluatorCreateRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/SimpleEvaluatorCreate","description":"Simple evaluator payload (slug, name, flags, and `data` with `uri` + `parameters`)."}},"type":"object","required":["evaluator"],"title":"SimpleEvaluatorCreateRequest","description":"Body for creating an evaluator via the simple surface.\n\nCollapses artifact, variant, and first revision into one call. The\nresponse returns the same flat shape that `/simple/evaluators/query`\nexposes."},"SimpleEvaluatorData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleEvaluatorData"},"SimpleEvaluatorData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleEvaluatorData"},"SimpleEvaluatorEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluatorEdit"},"SimpleEvaluatorEditRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/SimpleEvaluatorEdit","description":"Simple evaluator edit payload. Requires the evaluator `id`. Renaming is temporarily disabled."}},"type":"object","required":["evaluator"],"title":"SimpleEvaluatorEditRequest","description":"Body for editing an evaluator via the simple surface."},"SimpleEvaluatorFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"SimpleEvaluatorFlags"},"SimpleEvaluatorQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"SimpleEvaluatorQuery"},"SimpleEvaluatorQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"},"is_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Managed"},"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Llm"},"is_hook":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hook"},"is_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Code"},"is_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Match"},"is_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Feedback"},"is_chat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Chat"},"has_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Url"},"has_script":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Script"},"has_handler":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Handler"}},"type":"object","title":"SimpleEvaluatorQueryFlags"},"SimpleEvaluatorQueryRequest":{"properties":{"evaluator":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorQuery"},{"type":"null"}],"description":"Filter on evaluator attributes (slug, slugs, flags, meta)."},"evaluator_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Refs","description":"Restrict to these evaluators."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When true, include soft-deleted evaluators.","default":false},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination controls."}},"type":"object","title":"SimpleEvaluatorQueryRequest","description":"Body for filtering evaluators via the simple surface."},"SimpleEvaluatorResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when an evaluator is returned, 0 otherwise.","default":0},"evaluator":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluator"},{"type":"null"}],"description":"The flat evaluator record with latest variant and revision merged into `data`."}},"type":"object","title":"SimpleEvaluatorResponse","description":"Envelope for a single simple evaluator."},"SimpleEvaluatorsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of evaluators in `evaluators`.","default":0},"evaluators":{"items":{"$ref":"#/components/schemas/SimpleEvaluator"},"type":"array","title":"Evaluators","description":"Matching flat evaluator records."}},"type":"object","title":"SimpleEvaluatorsResponse","description":"Envelope for a list of simple evaluators."},"SimpleQueriesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queries":{"items":{"$ref":"#/components/schemas/SimpleQuery"},"type":"array","title":"Queries","default":[]}},"type":"object","title":"SimpleQueriesResponse"},"SimpleQuery":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Output"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"SimpleQuery"},"SimpleQueryCreate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleQueryCreate"},"SimpleQueryCreateRequest":{"properties":{"query":{"$ref":"#/components/schemas/SimpleQueryCreate"}},"type":"object","required":["query"],"title":"SimpleQueryCreateRequest"},"SimpleQueryEdit":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleQueryEdit"},"SimpleQueryEditRequest":{"properties":{"query":{"$ref":"#/components/schemas/SimpleQueryEdit"}},"type":"object","required":["query"],"title":"SimpleQueryEditRequest"},"SimpleQueryQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"}},"type":"object","title":"SimpleQueryQuery"},"SimpleQueryQueryRequest":{"properties":{"query":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueryQuery"},{"type":"null"}]},"query_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","default":false},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueryQueryRequest"},"SimpleQueryResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query":{"anyOf":[{"$ref":"#/components/schemas/SimpleQuery"},{"type":"null"}]}},"type":"object","title":"SimpleQueryResponse"},"SimpleQueue":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueData"},{"type":"null"}]},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"SimpleQueue"},"SimpleQueueCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueData"},{"type":"null"}]}},"type":"object","title":"SimpleQueueCreate"},"SimpleQueueCreateRequest":{"properties":{"queue":{"$ref":"#/components/schemas/SimpleQueueCreate"}},"type":"object","required":["queue"],"title":"SimpleQueueCreateRequest"},"SimpleQueueData":{"properties":{"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueKind"},{"type":"null"}]},"queries":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Queries"},"testsets":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testsets"},"evaluators":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Evaluators"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats"},"assignments":{"anyOf":[{"items":{"items":{"type":"string","format":"uuid"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Assignments"},"settings":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueSettings"},{"type":"null"}]}},"type":"object","title":"SimpleQueueData"},"SimpleQueueIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queue_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Queue Id"}},"type":"object","title":"SimpleQueueIdResponse"},"SimpleQueueKind":{"type":"string","enum":["traces","testcases"],"title":"SimpleQueueKind"},"SimpleQueueQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueKind"},{"type":"null"}]},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"User Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"queue_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Queue Ids"}},"type":"object","title":"SimpleQueueQuery"},"SimpleQueueQueryRequest":{"properties":{"queue":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueueQueryRequest"},"SimpleQueueResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queue":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueue"},{"type":"null"}]}},"type":"object","title":"SimpleQueueResponse"},"SimpleQueueScenariosQuery":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"User Ids"}},"type":"object","title":"SimpleQueueScenariosQuery"},"SimpleQueueScenariosQueryRequest":{"properties":{"queue":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueScenariosQuery"},{"type":"null"}]},"scenario":{"anyOf":[{"$ref":"#/components/schemas/EvaluationScenarioQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueueScenariosQueryRequest"},"SimpleQueueScenariosResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"scenarios":{"items":{"$ref":"#/components/schemas/EvaluationScenario"},"type":"array","title":"Scenarios","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueueScenariosResponse"},"SimpleQueueSettings":{"properties":{"batch_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Size"},"batch_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Offset"}},"type":"object","title":"SimpleQueueSettings"},"SimpleQueueTestcasesCreateRequest":{"properties":{"testcase_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Testcase Ids"}},"type":"object","required":["testcase_ids"],"title":"SimpleQueueTestcasesCreateRequest"},"SimpleQueueTracesCreateRequest":{"properties":{"trace_ids":{"items":{"type":"string"},"type":"array","title":"Trace Ids"}},"type":"object","required":["trace_ids"],"title":"SimpleQueueTracesCreateRequest"},"SimpleQueuesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queues":{"items":{"$ref":"#/components/schemas/SimpleQueue"},"type":"array","title":"Queues","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueuesResponse"},"SimpleTestset":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Output"},{"type":"null"}]},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"}},"type":"object","title":"SimpleTestset"},"SimpleTestsetCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetCreate"},"SimpleTestsetCreateRequest":{"properties":{"testset":{"$ref":"#/components/schemas/SimpleTestsetCreate","description":"Simple testset to create. `data.testcases` is committed as the first revision on a single variant in one call."}},"type":"object","required":["testset"],"title":"SimpleTestsetCreateRequest"},"SimpleTestsetEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetEdit"},"SimpleTestsetEditRequest":{"properties":{"testset":{"$ref":"#/components/schemas/SimpleTestsetEdit","description":"Simple testset fields to update. If `data.testcases` is provided, a new revision is committed with those testcases."}},"type":"object","required":["testset"],"title":"SimpleTestsetEditRequest"},"SimpleTestsetQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"SimpleTestsetQuery"},"SimpleTestsetQueryRequest":{"properties":{"testset":{"anyOf":[{"$ref":"#/components/schemas/SimpleTestsetQuery"},{"type":"null"}],"description":"Attribute filter on the testset (flags, tags, meta)."},"testset_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs","description":"Restrict the query to specific testsets."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"Include soft-deleted testsets."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination. See the Query Pattern guide."}},"type":"object","title":"SimpleTestsetQueryRequest"},"SimpleTestsetResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 if a testset was returned, 0 otherwise.","default":0},"testset":{"anyOf":[{"$ref":"#/components/schemas/SimpleTestset"},{"type":"null"}],"description":"The testset with its latest revision testcases merged into `data.testcases`, and the revision ID on `revision_id`."}},"type":"object","title":"SimpleTestsetResponse"},"SimpleTestsetsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of simple testsets returned.","default":0},"testsets":{"items":{"$ref":"#/components/schemas/SimpleTestset"},"type":"array","title":"Testsets","description":"Simple testsets, each with its latest revision testcases merged in."}},"type":"object","title":"SimpleTestsetsResponse"},"SimpleTrace":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"SimpleTrace"},"SimpleTraceChannel":{"type":"string","enum":["otlp","web","sdk","api"],"title":"SimpleTraceChannel"},"SimpleTraceCreate":{"properties":{"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"SimpleTraceCreate"},"SimpleTraceCreateRequest":{"properties":{"trace":{"$ref":"#/components/schemas/SimpleTraceCreate","description":"The trace to create. Must include `data` (the payload being recorded) and typically `origin`, `kind`, and `channel` to describe where it came from. Optional `references` link the trace to Agenta entities (app, variant, revision, evaluator, testset, etc.)."}},"type":"object","required":["trace"],"title":"SimpleTraceCreateRequest","description":"Request body for creating a single-span \"simple\" trace."},"SimpleTraceEdit":{"properties":{"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data"],"title":"SimpleTraceEdit"},"SimpleTraceEditRequest":{"properties":{"trace":{"$ref":"#/components/schemas/SimpleTraceEdit","description":"The fields to update. `data` is required. `tags`, `meta`, `references`, and `links` overwrite their current values when present."}},"type":"object","required":["trace"],"title":"SimpleTraceEditRequest","description":"Request body for editing an existing \"simple\" trace."},"SimpleTraceKind":{"type":"string","enum":["adhoc","eval","play"],"title":"SimpleTraceKind"},"SimpleTraceLinkResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if a trace was removed, `0` otherwise.","default":0},"link":{"anyOf":[{"$ref":"#/components/schemas/OTelLink-Output"},{"type":"null"}],"description":"The `(trace_id, span_id)` pair that was removed."}},"type":"object","title":"SimpleTraceLinkResponse","description":"Response from `DELETE /simple/traces/{trace_id}`."},"SimpleTraceOrigin":{"type":"string","enum":["custom","human","auto"],"title":"SimpleTraceOrigin"},"SimpleTraceQuery":{"properties":{"origin":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceOrigin"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceKind"},{"type":"null"}]},"channel":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceChannel"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"SimpleTraceQuery"},"SimpleTraceQueryRequest":{"properties":{"trace":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceQuery"},{"type":"null"}],"description":"Filter fields on the trace itself — `origin`, `kind`, `channel`, `tags`, `meta`, `references`, and inbound `links`. Filtering by `trace.links.invocation` is the common pattern for finding annotations on a given span."},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links","description":"Batch GET by the trace's own `(trace_id, span_id)`. Each entry matches the trace whose own identity equals the pair. Distinct from `trace.links`, which filters on inbound links."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time range."}},"type":"object","title":"SimpleTraceQueryRequest","description":"Request body for `POST /simple/traces/query`."},"SimpleTraceReferences":{"properties":{"query":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"query_variant":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"query_revision":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"testset":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"testset_variant":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"testset_revision":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"application":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"application_variant":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"application_revision":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"evaluator":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"evaluator_variant":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"testcase":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]}},"type":"object","title":"SimpleTraceReferences"},"SimpleTraceResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if the trace was returned, `0` otherwise.","default":0},"trace":{"anyOf":[{"$ref":"#/components/schemas/SimpleTrace"},{"type":"null"}],"description":"The created or fetched trace, including server-assigned `trace_id` and `span_id`."}},"type":"object","title":"SimpleTraceResponse","description":"Response from a single-trace create/fetch/edit."},"SimpleTracesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of matching traces in this page.","default":0},"traces":{"items":{"$ref":"#/components/schemas/SimpleTrace"},"type":"array","title":"Traces","description":"The matching traces in the high-level `SimpleTrace` shape.","default":[]}},"type":"object","title":"SimpleTracesResponse","description":"Response from `POST /simple/traces/query`."},"SimpleWorkflow":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowData-Output"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"SimpleWorkflow"},"SimpleWorkflowCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleWorkflowCreate"},"SimpleWorkflowCreateRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/SimpleWorkflowCreate","description":"Simple-workflow create payload. Creates the artifact, a default variant, and an initial revision in one call."}},"type":"object","required":["workflow"],"title":"SimpleWorkflowCreateRequest"},"SimpleWorkflowData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleWorkflowData"},"SimpleWorkflowData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleWorkflowData"},"SimpleWorkflowEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleWorkflowEdit"},"SimpleWorkflowEditRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/SimpleWorkflowEdit","description":"Simple-workflow edit payload. Updates artifact-level fields and commits a new revision when `data` changes."}},"type":"object","required":["workflow"],"title":"SimpleWorkflowEditRequest"},"SimpleWorkflowFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"SimpleWorkflowFlags"},"SimpleWorkflowQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"SimpleWorkflowQuery"},"SimpleWorkflowQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"},"is_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Managed"},"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Llm"},"is_hook":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hook"},"is_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Code"},"is_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Match"},"is_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Feedback"},"is_chat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Chat"},"has_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Url"},"has_script":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Script"},"has_handler":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Handler"}},"type":"object","title":"SimpleWorkflowQueryFlags"},"SimpleWorkflowQueryRequest":{"properties":{"workflow":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowQuery"},{"type":"null"}],"description":"Attribute filter on simple workflows (slug, slugs, flags, tags, meta)."},"workflow_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Workflow Refs","description":"Restrict results to workflows matching these references."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When true, include archived workflows."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination controls."}},"type":"object","title":"SimpleWorkflowQueryRequest"},"SimpleWorkflowResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a simple workflow is returned, `0` when none matched.","default":0},"workflow":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflow"},{"type":"null"}],"description":"Workflow artifact with its resolved variant and revision merged."}},"type":"object","title":"SimpleWorkflowResponse"},"SimpleWorkflowsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of workflows in the response.","default":0},"workflows":{"items":{"$ref":"#/components/schemas/SimpleWorkflow"},"type":"array","title":"Workflows","description":"Workflow artifacts each merged with their resolved variant and revision."}},"type":"object","title":"SimpleWorkflowsResponse"},"Span-Input":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"$ref":"#/components/schemas/TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"$ref":"#/components/schemas/SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"$ref":"#/components/schemas/OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"$ref":"#/components/schemas/OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelReference-Input"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelHash-Input"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEvent-Input"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"Span"},"Span-Output":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"$ref":"#/components/schemas/TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"$ref":"#/components/schemas/SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"$ref":"#/components/schemas/OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"$ref":"#/components/schemas/OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelReference-Output"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelHash-Output"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEvent-Output"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"Span"},"SpanResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if a span was returned, `0` otherwise.","default":0},"span":{"anyOf":[{"$ref":"#/components/schemas/Span-Output"},{"type":"null"}],"description":"The matching span, or `null` if not found."}},"type":"object","title":"SpanResponse"},"SpanType":{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},"SpansNode-Input":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Input"},{"items":{"$ref":"#/components/schemas/SpansNode-Input"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"$ref":"#/components/schemas/TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"$ref":"#/components/schemas/SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"$ref":"#/components/schemas/OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"$ref":"#/components/schemas/OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelReference-Input"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelHash-Input"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEvent-Input"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"SpansNode"},"SpansNode-Output":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Output"},{"items":{"$ref":"#/components/schemas/SpansNode-Output"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"$ref":"#/components/schemas/TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"$ref":"#/components/schemas/SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"$ref":"#/components/schemas/OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"$ref":"#/components/schemas/OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelReference-Output"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelHash-Output"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEvent-Output"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"SpansNode"},"SpansQueryRequest":{"properties":{"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Input"},{"type":"null"}],"description":"Span-level conditions."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time range."},"query_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve filtering/windowing from a saved query."},"query_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve from the latest revision of a specific query variant."},"query_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve from a specific query revision. Returns `409` when the revision's stored `formatting.focus` is `trace`."}},"type":"object","title":"SpansQueryRequest","description":"Request body for `POST /spans/query`."},"SpansResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Total number of matching spans in the window.","default":0},"spans":{"anyOf":[{"items":{"$ref":"#/components/schemas/Span-Output"},"type":"array"},{"type":"null"}],"title":"Spans","description":"Flat list of matching spans."}},"type":"object","title":"SpansResponse"},"SpansTree-Input":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Input"},{"items":{"$ref":"#/components/schemas/SpansNode-Input"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"}},"type":"object","title":"SpansTree"},"SpansTree-Output":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Output"},{"items":{"$ref":"#/components/schemas/SpansNode-Output"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"}},"type":"object","title":"SpansTree"},"StandardProviderDTO":{"properties":{"kind":{"$ref":"#/components/schemas/StandardProviderKind"},"provider":{"$ref":"#/components/schemas/StandardProviderSettingsDTO"}},"type":"object","required":["kind","provider"],"title":"StandardProviderDTO"},"StandardProviderKind":{"type":"string","enum":["openai","cohere","anyscale","deepinfra","alephalpha","groq","minimax","mistral","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"StandardProviderKind"},"StandardProviderSettingsDTO":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"StandardProviderSettingsDTO"},"Status":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","title":"Status"},"StringOperator":{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},"Testcase-Input":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"Testcase-Output":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"TestcaseResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 if a testcase was returned, 0 otherwise.","default":0},"testcase":{"anyOf":[{"$ref":"#/components/schemas/Testcase-Output"},{"type":"null"}],"description":"The testcase blob. `data` carries the user-defined columns; `testcase_dedup_id` (inside `data`) is the caller-supplied dedup key when present."}},"type":"object","title":"TestcaseResponse"},"TestcasesQueryRequest":{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids","description":"Explicit list of testcase IDs to fetch. Combine with `testset_id` or testset references to scope the lookup."},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id","description":"Return all testcases stored in this testset. The testset owns its testcases as a content-addressed bag; a revision references a subset of these."},"testset_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Testset reference used to resolve the latest revision on the default variant. The revision's ordered testcase IDs are used for the lookup and pagination."},"testset_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Testset variant reference used to resolve the latest revision on that variant."},"testset_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific testset revision reference. The revision's ordered testcase IDs drive the lookup and cursor pagination."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination. When a revision reference is used, the cursor walks the revision's deterministic testcase ID list."}},"type":"object","title":"TestcasesQueryRequest"},"TestcasesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of testcases returned on this page.","default":0},"testcases":{"items":{"$ref":"#/components/schemas/Testcase-Output"},"type":"array","title":"Testcases","description":"Testcase blobs matching the query, in revision-order when scoped by a revision reference."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor for the next page, if more results exist."}},"type":"object","title":"TestcasesResponse"},"Testset":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Testset"},"TestsetCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"TestsetCreate"},"TestsetCreateRequest":{"properties":{"testset":{"$ref":"#/components/schemas/TestsetCreate","description":"Testset artifact to create. The call only creates the artifact row; testcases are added by committing a revision (see /testsets/revisions/commit) or by using the /simple/testsets/ surface."}},"type":"object","required":["testset"],"title":"TestsetCreateRequest"},"TestsetEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetEdit"},"TestsetEditRequest":{"properties":{"testset":{"$ref":"#/components/schemas/TestsetEdit","description":"Testset artifact fields to update. The `id` in the body must match the `testset_id` in the path."}},"type":"object","required":["testset"],"title":"TestsetEditRequest"},"TestsetFlags":{"properties":{},"type":"object","title":"TestsetFlags","description":"Placeholder for testset-level flags.\n\nThis model is intentionally empty but kept as a dedicated type so that:\n- existing references to `flags: Optional[TestsetFlags]` remain valid, and\n- structured flags can be added here in the future without breaking the\n surrounding DTOs."},"TestsetQuery":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"TestsetQuery"},"TestsetQueryRequest":{"properties":{"testset":{"anyOf":[{"$ref":"#/components/schemas/TestsetQuery"},{"type":"null"}],"description":"Attribute filter (name, description, slug, flags, tags, meta, folder)."},"testset_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs","description":"Restrict the query to specific testsets by reference (id or slug)."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"Include soft-deleted testsets."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination. See the Query Pattern guide."}},"type":"object","title":"TestsetQueryRequest"},"TestsetResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 if a testset was returned, 0 otherwise.","default":0},"testset":{"anyOf":[{"$ref":"#/components/schemas/Testset"},{"type":"null"}],"description":"The testset artifact. Does not include testcases."}},"type":"object","title":"TestsetResponse"},"TestsetRevision":{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"TestsetRevision"},"TestsetRevisionCommit":{"properties":{"testset_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"delta":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionDelta"},{"type":"null"}]}},"type":"object","title":"TestsetRevisionCommit"},"TestsetRevisionCommitRequest":{"properties":{"testset_revision_commit":{"$ref":"#/components/schemas/TestsetRevisionCommit","description":"New revision to commit. Pass either `data` (full replacement of the testcase list) or `delta` (add/remove/replace operations against the base revision) — not both."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects in the response."}},"type":"object","required":["testset_revision_commit"],"title":"TestsetRevisionCommitRequest"},"TestsetRevisionCreate":{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"TestsetRevisionCreate"},"TestsetRevisionCreateRequest":{"properties":{"testset_revision":{"$ref":"#/components/schemas/TestsetRevisionCreate","description":"Revision to create on an existing variant. Typically used to seed an empty revision; use /testsets/revisions/commit to set testcases."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects in the response. Defaults to true when the response would carry revision data."}},"type":"object","required":["testset_revision"],"title":"TestsetRevisionCreateRequest"},"TestsetRevisionData-Input":{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"$ref":"#/components/schemas/Testcase-Input"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},"TestsetRevisionData-Output":{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"$ref":"#/components/schemas/Testcase-Output"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},"TestsetRevisionDelta":{"properties":{"rows":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionDeltaRows"},{"type":"null"}]},"columns":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionDeltaColumns"},{"type":"null"}]}},"type":"object","title":"TestsetRevisionDelta","description":"Operations to apply to a testset revision."},"TestsetRevisionDeltaColumns":{"properties":{"add":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Add"},"remove":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Remove"},"replace":{"anyOf":[{"items":{"prefixItems":[{"type":"string"},{"type":"string"}],"type":"array","maxItems":2,"minItems":2},"type":"array"},{"type":"null"}],"title":"Replace"}},"type":"object","title":"TestsetRevisionDeltaColumns","description":"Column-level operations applied to ALL testcases in the revision."},"TestsetRevisionDeltaRows":{"properties":{"add":{"anyOf":[{"items":{"$ref":"#/components/schemas/Testcase-Input"},"type":"array"},{"type":"null"}],"title":"Add"},"remove":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Remove"},"replace":{"anyOf":[{"items":{"$ref":"#/components/schemas/Testcase-Input"},"type":"array"},{"type":"null"}],"title":"Replace"}},"type":"object","title":"TestsetRevisionDeltaRows","description":"Row-level operations applied to testcases in the revision."},"TestsetRevisionEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetRevisionEdit"},"TestsetRevisionEditRequest":{"properties":{"testset_revision":{"$ref":"#/components/schemas/TestsetRevisionEdit","description":"Revision fields to update. The `id` in the body must match the `testset_revision_id` in the path. Only metadata fields are editable; content is committed as a new revision."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects in the response."}},"type":"object","required":["testset_revision"],"title":"TestsetRevisionEditRequest"},"TestsetRevisionQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"TestsetRevisionQuery"},"TestsetRevisionQueryRequest":{"properties":{"testset_revision":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionQuery"},{"type":"null"}],"description":"Attribute filter on the revision (name, description, slug, author, date, message)."},"testset_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs","description":"Scope revisions to these testsets."},"testset_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Variant Refs","description":"Scope revisions to these variants."},"testset_revision_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Revision Refs","description":"Restrict to specific revisions by reference (id, slug, or version)."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"Include soft-deleted revisions."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects for each returned revision. Defaults to true."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination. See the Query Pattern guide."}},"type":"object","title":"TestsetRevisionQueryRequest"},"TestsetRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 if a revision was returned, 0 otherwise.","default":0},"testset_revision":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevision"},{"type":"null"}],"description":"The testset revision. `data.testcase_ids` is the ordered list of testcase IDs; `data.testcases` is populated when `include_testcases` is true."}},"type":"object","title":"TestsetRevisionResponse"},"TestsetRevisionRetrieveRequest":{"properties":{"testset_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Testset reference. If only the testset is provided, the latest revision on its default variant is returned."},"testset_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Variant reference. Returns the latest revision on that variant."},"testset_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Revision reference. Returns that specific revision."},"include_testcase_ids":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcase Ids","description":"Include the ordered list of testcase IDs. Defaults to true (opt-out)."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects. Defaults to true (opt-out). Note: this opt-out default is the opposite of `/queries/revisions/retrieve`, where trace materialization is opt-in."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Windowing applied to the testcases list when materialized."}},"type":"object","title":"TestsetRevisionRetrieveRequest"},"TestsetRevisionsLog":{"properties":{"testset_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"TestsetRevisionsLog"},"TestsetRevisionsLogRequest":{"properties":{"testset_revision":{"$ref":"#/components/schemas/TestsetRevisionsLog","description":"Scope for the log: one of `testset_id`, `testset_variant_id`, or `testset_revision_id`. Optional `depth` limits how far back to walk."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects for each returned revision."}},"type":"object","required":["testset_revision"],"title":"TestsetRevisionsLogRequest"},"TestsetRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of revisions returned.","default":0},"testset_revisions":{"items":{"$ref":"#/components/schemas/TestsetRevision"},"type":"array","title":"Testset Revisions","description":"Testset revisions matching the query, in the requested order."}},"type":"object","title":"TestsetRevisionsResponse"},"TestsetVariant":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetVariant"},"TestsetVariantCreate":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"TestsetVariantCreate"},"TestsetVariantCreateRequest":{"properties":{"testset_variant":{"$ref":"#/components/schemas/TestsetVariantCreate","description":"Variant to create on an existing testset. Pass `testset_id` to identify the parent artifact."}},"type":"object","required":["testset_variant"],"title":"TestsetVariantCreateRequest"},"TestsetVariantEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetVariantEdit"},"TestsetVariantEditRequest":{"properties":{"testset_variant":{"$ref":"#/components/schemas/TestsetVariantEdit","description":"Variant fields to update. The `id` in the body must match the `testset_variant_id` in the path."}},"type":"object","required":["testset_variant"],"title":"TestsetVariantEditRequest"},"TestsetVariantQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"TestsetVariantQuery"},"TestsetVariantQueryRequest":{"properties":{"testset_variant":{"anyOf":[{"$ref":"#/components/schemas/TestsetVariantQuery"},{"type":"null"}],"description":"Attribute filter on the variant (name, description, slug, flags, tags, meta)."},"testset_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs","description":"Scope to variants whose parent testset matches one of these references."},"testset_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Variant Refs","description":"Restrict the query to specific variants by reference (id or slug)."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"Include soft-deleted variants."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination. See the Query Pattern guide."}},"type":"object","title":"TestsetVariantQueryRequest"},"TestsetVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 if a variant was returned, 0 otherwise.","default":0},"testset_variant":{"anyOf":[{"$ref":"#/components/schemas/TestsetVariant"},{"type":"null"}],"description":"The testset variant (branch)."}},"type":"object","title":"TestsetVariantResponse"},"TestsetVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of variants returned.","default":0},"testset_variants":{"items":{"$ref":"#/components/schemas/TestsetVariant"},"type":"array","title":"Testset Variants","description":"Testset variants matching the query."}},"type":"object","title":"TestsetVariantsResponse"},"TestsetsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of testsets returned on this page.","default":0},"testsets":{"items":{"$ref":"#/components/schemas/Testset"},"type":"array","title":"Testsets","description":"Testset artifacts matching the query, without testcases."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor for the next page, if more results exist."}},"type":"object","title":"TestsetsResponse"},"TextOptions":{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},"ToolAuthScheme":{"type":"string","enum":["oauth","api_key"],"title":"ToolAuthScheme"},"ToolCall":{"properties":{"data":{"$ref":"#/components/schemas/ToolCallData"}},"type":"object","required":["data"],"title":"ToolCall","description":"Request envelope — wraps the raw OpenAI tool call."},"ToolCallData":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type","default":"function"},"function":{"$ref":"#/components/schemas/ToolCallFunction"}},"type":"object","required":["id","function"],"title":"ToolCallData","description":"OpenAI tool_calls array item — passed verbatim from the LLM."},"ToolCallFunction":{"properties":{"name":{"type":"string","title":"Name"},"arguments":{"title":"Arguments"}},"type":"object","required":["name","arguments"],"title":"ToolCallFunction","description":"Mirrors OpenAI function call: {name, arguments}."},"ToolCallResponse":{"properties":{"call":{"$ref":"#/components/schemas/ToolResult"}},"type":"object","required":["call"],"title":"ToolCallResponse"},"ToolCatalogAction":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo"}},"type":"object","required":["key","name"],"title":"ToolCatalogAction"},"ToolCatalogActionDetails":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"}},"type":"object","required":["key","name"],"title":"ToolCatalogActionDetails"},"ToolCatalogActionResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"action":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogAction"},{"$ref":"#/components/schemas/ToolCatalogActionDetails"},{"type":"null"}],"title":"Action"}},"type":"object","title":"ToolCatalogActionResponse"},"ToolCatalogActionsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"total":{"type":"integer","title":"Total","default":0},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"},"actions":{"items":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogAction"},{"$ref":"#/components/schemas/ToolCatalogActionDetails"}]},"type":"array","title":"Actions","default":[]}},"type":"object","title":"ToolCatalogActionsResponse"},"ToolCatalogIntegration":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"actions_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Actions Count"},"auth_schemes":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolAuthScheme"},"type":"array"},{"type":"null"}],"title":"Auth Schemes"}},"type":"object","required":["key","name"],"title":"ToolCatalogIntegration"},"ToolCatalogIntegrationDetails":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"actions_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Actions Count"},"auth_schemes":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolAuthScheme"},"type":"array"},{"type":"null"}],"title":"Auth Schemes"},"actions":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolCatalogAction"},"type":"array"},{"type":"null"}],"title":"Actions"}},"type":"object","required":["key","name"],"title":"ToolCatalogIntegrationDetails"},"ToolCatalogIntegrationResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"integration":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogIntegration"},{"$ref":"#/components/schemas/ToolCatalogIntegrationDetails"},{"type":"null"}],"title":"Integration"}},"type":"object","title":"ToolCatalogIntegrationResponse"},"ToolCatalogIntegrationsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"total":{"type":"integer","title":"Total","default":0},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"},"integrations":{"items":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogIntegration"},{"$ref":"#/components/schemas/ToolCatalogIntegrationDetails"}]},"type":"array","title":"Integrations","default":[]}},"type":"object","title":"ToolCatalogIntegrationsResponse"},"ToolCatalogProvider":{"properties":{"key":{"$ref":"#/components/schemas/ToolProviderKind"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"integrations_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Integrations Count"}},"type":"object","required":["key","name"],"title":"ToolCatalogProvider"},"ToolCatalogProviderDetails":{"properties":{"key":{"$ref":"#/components/schemas/ToolProviderKind"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"integrations_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Integrations Count"},"integrations":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolCatalogIntegration"},"type":"array"},{"type":"null"}],"title":"Integrations"}},"type":"object","required":["key","name"],"title":"ToolCatalogProviderDetails"},"ToolCatalogProviderResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"provider":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogProvider"},{"$ref":"#/components/schemas/ToolCatalogProviderDetails"},{"type":"null"}],"title":"Provider"}},"type":"object","title":"ToolCatalogProviderResponse"},"ToolCatalogProvidersResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"providers":{"items":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogProvider"},{"$ref":"#/components/schemas/ToolCatalogProviderDetails"}]},"type":"array","title":"Providers","default":[]}},"type":"object","title":"ToolCatalogProvidersResponse"},"ToolConnection":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"provider_key":{"$ref":"#/components/schemas/ToolProviderKind"},"integration_key":{"type":"string","title":"Integration Key"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"},"status":{"anyOf":[{"$ref":"#/components/schemas/ToolConnectionStatus"},{"type":"null"}]}},"type":"object","required":["provider_key","integration_key"],"title":"ToolConnection"},"ToolConnectionCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"provider_key":{"$ref":"#/components/schemas/ToolProviderKind"},"integration_key":{"type":"string","title":"Integration Key"},"data":{"anyOf":[{"$ref":"#/components/schemas/ToolConnectionCreateData"},{"type":"null"}]}},"type":"object","required":["provider_key","integration_key"],"title":"ToolConnectionCreate"},"ToolConnectionCreateData":{"properties":{"callback_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Callback Url"},"auth_scheme":{"anyOf":[{"$ref":"#/components/schemas/ToolAuthScheme"},{"type":"null"}]}},"type":"object","title":"ToolConnectionCreateData"},"ToolConnectionCreateRequest":{"properties":{"connection":{"$ref":"#/components/schemas/ToolConnectionCreate"}},"type":"object","required":["connection"],"title":"ToolConnectionCreateRequest"},"ToolConnectionResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"connection":{"anyOf":[{"$ref":"#/components/schemas/ToolConnection"},{"type":"null"}]}},"type":"object","title":"ToolConnectionResponse"},"ToolConnectionStatus":{"properties":{"redirect_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Url"}},"type":"object","title":"ToolConnectionStatus"},"ToolConnectionsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"connections":{"items":{"$ref":"#/components/schemas/ToolConnection"},"type":"array","title":"Connections","default":[]}},"type":"object","title":"ToolConnectionsResponse"},"ToolProviderKind":{"type":"string","enum":["composio","agenta"],"title":"ToolProviderKind"},"ToolResult":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"anyOf":[{"$ref":"#/components/schemas/Status"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/ToolResultData"},{"type":"null"}]}},"type":"object","title":"ToolResult","description":"Response envelope with Agenta identity, status, and the OpenAI tool message."},"ToolResultData":{"properties":{"role":{"type":"string","title":"Role","default":"tool"},"tool_call_id":{"type":"string","title":"Tool Call Id"},"content":{"type":"string","title":"Content"}},"type":"object","required":["tool_call_id","content"],"title":"ToolResultData","description":"OpenAI tool message — passed verbatim back to the LLM."},"Trace-Input":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Input"},{"items":{"$ref":"#/components/schemas/SpansNode-Input"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Trace"},"Trace-Output":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Output"},{"items":{"$ref":"#/components/schemas/SpansNode-Output"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Trace"},"TraceIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if a `trace_id` was returned, `0` otherwise.","default":0},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id","description":"32-char hex UUID identifying the trace that was created or edited."}},"type":"object","title":"TraceIdResponse"},"TraceIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of distinct trace IDs in this response.","default":0},"trace_ids":{"items":{"type":"string"},"type":"array","title":"Trace Ids","description":"32-char hex UUIDs of the traces that were ingested. Compare against the number you submitted to detect partial failures.","default":[]}},"type":"object","title":"TraceIdsResponse"},"TraceRequest":{"properties":{"trace":{"anyOf":[{"$ref":"#/components/schemas/Trace-Input"},{"type":"null"}],"description":"A single trace record (trace_id plus nested spans). The `trace_id` must match the path parameter on edit endpoints."}},"type":"object","title":"TraceRequest","description":"Ingest or edit payload for a single canonical `Trace`."},"TraceResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if a trace was returned, `0` otherwise.","default":0},"trace":{"anyOf":[{"$ref":"#/components/schemas/Trace-Output"},{"type":"null"}],"description":"The trace in the canonical `Trace` shape (`trace_id` + nested `spans` tree)."}},"type":"object","title":"TraceResponse"},"TraceType":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},"TracesQueryRequest":{"properties":{"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Input"},{"type":"null"}],"description":"Span-level conditions. A trace matches when any of its spans matches."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time range (see [Query Pattern](/reference/api-guide/query-pattern#windowing))."},"query_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve filtering/windowing from a saved query by `id`/`slug`. Only one of the three `query_*_ref` fields is needed."},"query_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve from the latest revision of a specific query variant."},"query_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve from a specific query revision. Returns `409` when the revision's stored `formatting.focus` is `span`."}},"type":"object","title":"TracesQueryRequest","description":"Request body for `POST /traces/query`."},"TracesRequest":{"properties":{"traces":{"anyOf":[{"items":{"$ref":"#/components/schemas/Trace-Input"},"type":"array"},{"type":"null"}],"title":"Traces","description":"List of trace records. Each record is a `trace_id` plus the nested `spans` tree. Equivalent to the map-shaped payload accepted by `POST /tracing/spans/ingest`."}},"type":"object","title":"TracesRequest","description":"Ingest payload in the canonical `Traces` list shape.\n\nUsed by `POST /traces/ingest`. Each entry is one trace with its\n`trace_id` and a nested `spans` tree."},"TracesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Total number of matching traces in the window.","default":0},"traces":{"anyOf":[{"items":{"$ref":"#/components/schemas/Trace-Output"},"type":"array"},{"type":"null"}],"title":"Traces","description":"List of traces in the canonical `Traces` shape. For the map-shaped payload keyed by `trace_id`, call `POST /tracing/spans/query` with `focus=\"trace\"`."}},"type":"object","title":"TracesResponse"},"TracingQuery":{"properties":{"formatting":{"anyOf":[{"$ref":"#/components/schemas/Formatting"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Output"},{"type":"null"}]}},"type":"object","title":"TracingQuery"},"UpdateProjectRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"make_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Make Default"}},"type":"object","title":"UpdateProjectRequest"},"UpdateSecretDTO":{"properties":{"header":{"anyOf":[{"$ref":"#/components/schemas/Header"},{"type":"null"}]},"secret":{"anyOf":[{"$ref":"#/components/schemas/SecretDTO"},{"type":"null"}]}},"type":"object","title":"UpdateSecretDTO"},"UpdateWorkspace":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","title":"UpdateWorkspace"},"UserIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of user IDs in this page.","default":0},"user_ids":{"items":{"type":"string"},"type":"array","title":"User Ids","description":"Distinct values of `ag.user.id` in this page.","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor for the next page. Pass verbatim as `windowing.next`."}},"type":"object","title":"UserIdsResponse"},"UserRole":{"properties":{"email":{"type":"string","title":"Email"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"organization_id":{"type":"string","title":"Organization Id"}},"type":"object","required":["email","organization_id"],"title":"UserRole"},"UserUpdate":{"properties":{"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","title":"UserUpdate"},"UsersQueryRequest":{"properties":{"realtime":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Realtime","description":"When `true`, paginate by `last_active`. When `false` or unset, paginate by the stable `first_active` cursor."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time range."}},"type":"object","title":"UsersQueryRequest","description":"Request body for `POST /tracing/users/query`."},"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"},"VariantFork":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"VariantFork"},"WebhookDeliveriesResponse":{"properties":{"count":{"type":"integer","title":"Count"},"deliveries":{"items":{"$ref":"#/components/schemas/WebhookDelivery"},"type":"array","title":"Deliveries","default":[]}},"type":"object","required":["count"],"title":"WebhookDeliveriesResponse"},"WebhookDelivery":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"$ref":"#/components/schemas/Status"},"data":{"anyOf":[{"$ref":"#/components/schemas/WebhookDeliveryData"},{"type":"null"}]},"subscription_id":{"type":"string","format":"uuid","title":"Subscription Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"}},"type":"object","required":["status","subscription_id","event_id"],"title":"WebhookDelivery"},"WebhookDeliveryCreate":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"$ref":"#/components/schemas/Status"},"data":{"anyOf":[{"$ref":"#/components/schemas/WebhookDeliveryData"},{"type":"null"}]},"subscription_id":{"type":"string","format":"uuid","title":"Subscription Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"}},"type":"object","required":["status","subscription_id","event_id"],"title":"WebhookDeliveryCreate"},"WebhookDeliveryCreateRequest":{"properties":{"delivery":{"$ref":"#/components/schemas/WebhookDeliveryCreate"}},"type":"object","required":["delivery"],"title":"WebhookDeliveryCreateRequest"},"WebhookDeliveryData":{"properties":{"event_type":{"anyOf":[{"$ref":"#/components/schemas/WebhookEventType"},{"type":"null"}]},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"},"response":{"anyOf":[{"$ref":"#/components/schemas/WebhookDeliveryResponseInfo"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["url"],"title":"WebhookDeliveryData"},"WebhookDeliveryQuery":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/Status"},{"type":"null"}]},"subscription_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subscription Id"},"event_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Event Id"}},"type":"object","title":"WebhookDeliveryQuery"},"WebhookDeliveryQueryRequest":{"properties":{"delivery":{"anyOf":[{"$ref":"#/components/schemas/WebhookDeliveryQuery"},{"type":"null"}]},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"WebhookDeliveryQueryRequest"},"WebhookDeliveryResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"delivery":{"anyOf":[{"$ref":"#/components/schemas/WebhookDelivery"},{"type":"null"}]}},"type":"object","title":"WebhookDeliveryResponse"},"WebhookDeliveryResponseInfo":{"properties":{"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"type":"object","title":"WebhookDeliveryResponseInfo"},"WebhookEventType":{"type":"string","enum":["environments.revisions.committed","webhooks.subscriptions.tested"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},"WebhookProviderDTO":{"properties":{"provider":{"$ref":"#/components/schemas/WebhookProviderSettingsDTO"}},"type":"object","required":["provider"],"title":"WebhookProviderDTO"},"WebhookProviderSettingsDTO":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"WebhookProviderSettingsDTO"},"WebhookSubscription":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"$ref":"#/components/schemas/WebhookSubscriptionData"},"secret_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Secret Id"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscription"},"WebhookSubscriptionCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"data":{"$ref":"#/components/schemas/WebhookSubscriptionData"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscriptionCreate"},"WebhookSubscriptionCreateRequest":{"properties":{"subscription":{"$ref":"#/components/schemas/WebhookSubscriptionCreate"}},"type":"object","required":["subscription"],"title":"WebhookSubscriptionCreateRequest"},"WebhookSubscriptionData":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Fields"},"auth_mode":{"anyOf":[{"type":"string","enum":["signature","authorization"]},{"type":"null"}],"title":"Auth Mode"},"event_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/WebhookEventType"},"type":"array"},{"type":"null"}],"title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookSubscriptionData"},"WebhookSubscriptionEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"$ref":"#/components/schemas/WebhookSubscriptionData"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscriptionEdit"},"WebhookSubscriptionEditRequest":{"properties":{"subscription":{"$ref":"#/components/schemas/WebhookSubscriptionEdit"}},"type":"object","required":["subscription"],"title":"WebhookSubscriptionEditRequest"},"WebhookSubscriptionQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"WebhookSubscriptionQuery"},"WebhookSubscriptionQueryRequest":{"properties":{"subscription":{"anyOf":[{"$ref":"#/components/schemas/WebhookSubscriptionQuery"},{"type":"null"}]},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"WebhookSubscriptionQueryRequest"},"WebhookSubscriptionResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"subscription":{"anyOf":[{"$ref":"#/components/schemas/WebhookSubscription"},{"type":"null"}]}},"type":"object","title":"WebhookSubscriptionResponse"},"WebhookSubscriptionTestRequest":{"properties":{"subscription_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subscription Id"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/WebhookSubscriptionEdit"},{"$ref":"#/components/schemas/WebhookSubscriptionCreate"},{"type":"null"}],"title":"Subscription"}},"type":"object","title":"WebhookSubscriptionTestRequest"},"WebhookSubscriptionsResponse":{"properties":{"count":{"type":"integer","title":"Count"},"subscriptions":{"items":{"$ref":"#/components/schemas/WebhookSubscription"},"type":"array","title":"Subscriptions","default":[]}},"type":"object","required":["count"],"title":"WebhookSubscriptionsResponse"},"Windowing":{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},"Workflow":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowArtifactFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Workflow"},"WorkflowArtifactFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"WorkflowArtifactFlags"},"WorkflowCatalogFlags":{"properties":{"is_archived":{"type":"boolean","title":"Is Archived","default":false},"is_recommended":{"type":"boolean","title":"Is Recommended","default":false},"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"WorkflowCatalogFlags"},"WorkflowCatalogPreset":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"WorkflowCatalogPreset"},"WorkflowCatalogPresetResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when the preset is returned, `0` when not found.","default":0},"preset":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogPreset"},{"type":"null"}],"description":"Named parameter set defined against a template."}},"type":"object","title":"WorkflowCatalogPresetResponse"},"WorkflowCatalogPresetsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of presets returned.","default":0},"presets":{"items":{"$ref":"#/components/schemas/WorkflowCatalogPreset"},"type":"array","title":"Presets","description":"Named parameter sets defined against a template."}},"type":"object","title":"WorkflowCatalogPresetsResponse"},"WorkflowCatalogTemplate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"WorkflowCatalogTemplate"},"WorkflowCatalogTemplateResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when the template is returned, `0` when not found.","default":0},"template":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogTemplate"},{"type":"null"}],"description":"Workflow blueprint (key, name, description, flags, default data)."}},"type":"object","title":"WorkflowCatalogTemplateResponse"},"WorkflowCatalogTemplatesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of templates returned.","default":0},"templates":{"items":{"$ref":"#/components/schemas/WorkflowCatalogTemplate"},"type":"array","title":"Templates","description":"Workflow blueprints shipped with the product."}},"type":"object","title":"WorkflowCatalogTemplatesResponse"},"WorkflowCatalogType":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"json_schema":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Json Schema"}},"type":"object","required":["key","json_schema"],"title":"WorkflowCatalogType"},"WorkflowCatalogTypeResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a type definition is returned, `0` when not found.","default":0},"type":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogType"},{"type":"null"}],"description":"JSON Schema fragment referenced by workflow input/output schemas via `x-ag-type-ref`."}},"type":"object","title":"WorkflowCatalogTypeResponse"},"WorkflowCatalogTypesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of type definitions available.","default":0},"types":{"items":{"$ref":"#/components/schemas/WorkflowCatalogType"},"type":"array","title":"Types","description":"Shared JSON Schema fragments shipped with the product."}},"type":"object","title":"WorkflowCatalogTypesResponse"},"WorkflowCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowCreate"},"WorkflowCreateRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowCreate","description":"Workflow artifact to create. Must include a project-unique `slug`; `name`, `description`, `flags`, `tags`, and `meta` are optional."}},"type":"object","required":["workflow"],"title":"WorkflowCreateRequest"},"WorkflowEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowEdit"},"WorkflowEditRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowEdit","description":"Workflow fields to update. `id` is required and must match the path parameter; only supplied fields are modified."}},"type":"object","required":["workflow"],"title":"WorkflowEditRequest"},"WorkflowFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"WorkflowFlags","description":"Legacy full workflow flag set."},"WorkflowFork":{"properties":{"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFork"},{"type":"null"}]},"revision":{"anyOf":[{"$ref":"#/components/schemas/RevisionFork"},{"type":"null"}]},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFork"},{"type":"null"}]},"variant":{"anyOf":[{"$ref":"#/components/schemas/VariantFork"},{"type":"null"}]},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"WorkflowFork"},"WorkflowForkRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowFork","description":"Fork payload. Identify the source by `workflow_id` and `workflow_variant_id` (or equivalent slugs), supply a new `workflow_variant.slug` for the forked branch."}},"type":"object","required":["workflow"],"title":"WorkflowForkRequest"},"WorkflowResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a workflow is returned, `0` when none matched.","default":0},"workflow":{"anyOf":[{"$ref":"#/components/schemas/Workflow"},{"type":"null"}],"description":"The workflow artifact."}},"type":"object","title":"WorkflowResponse"},"WorkflowRevision-Input":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"WorkflowRevision"},"WorkflowRevision-Output":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"WorkflowRevision"},"WorkflowRevisionCommit":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"WorkflowRevisionCommit"},"WorkflowRevisionCommitRequest":{"properties":{"workflow_revision":{"$ref":"#/components/schemas/WorkflowRevisionCommit","description":"Revision to append to a variant's history. Requires `workflow_variant_id` and optional `message`; `data` carries the new configuration."}},"type":"object","required":["workflow_revision"],"title":"WorkflowRevisionCommitRequest"},"WorkflowRevisionCreate":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowRevisionCreate"},"WorkflowRevisionCreateRequest":{"properties":{"workflow_revision":{"$ref":"#/components/schemas/WorkflowRevisionCreate","description":"Revision to create on an existing variant. The revision is immutable once persisted; to change the payload, commit a new revision."}},"type":"object","required":["workflow_revision"],"title":"WorkflowRevisionCreateRequest"},"WorkflowRevisionData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"WorkflowRevisionData"},"WorkflowRevisionData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"WorkflowRevisionData"},"WorkflowRevisionDeployRequest":{"properties":{"workflow_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Workflow artifact to deploy. One of the workflow refs is required."},"workflow_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Workflow variant to deploy. Resolves to the latest revision of this variant."},"workflow_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific workflow revision to deploy."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment artifact. One of the environment refs is required."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment variant."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment revision."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Reference key to set on the environment revision. Defaults to `.revision` when omitted."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Commit message recorded on the resulting environment revision."}},"type":"object","title":"WorkflowRevisionDeployRequest"},"WorkflowRevisionEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowRevisionEdit"},"WorkflowRevisionEditRequest":{"properties":{"workflow_revision":{"$ref":"#/components/schemas/WorkflowRevisionEdit","description":"Revision fields to update (lifecycle metadata only). Data and configuration are immutable — commit a new revision to change them."}},"type":"object","required":["workflow_revision"],"title":"WorkflowRevisionEditRequest"},"WorkflowRevisionFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"WorkflowRevisionFlags"},"WorkflowRevisionFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"WorkflowRevisionFork"},"WorkflowRevisionResolveRequest":{"properties":{"workflow_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Workflow artifact; resolves against its latest revision."},"workflow_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Workflow variant; resolves against its latest revision."},"workflow_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific workflow revision to resolve."},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevision-Input"},{"type":"null"}],"description":"Resolve the references embedded in this revision payload directly, without fetching it first."},"max_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Depth","description":"Maximum recursive depth for nested `@ag.references`.","default":10},"max_embeds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Embeds","description":"Maximum number of embeds to resolve in one call.","default":100},"error_policy":{"anyOf":[{"$ref":"#/components/schemas/ErrorPolicy"},{"type":"null"}],"description":"How to handle unresolved references: `EXCEPTION` or `IGNORE`.","default":"exception"}},"type":"object","title":"WorkflowRevisionResolveRequest"},"WorkflowRevisionResolveResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a revision is returned, `0` when none matched.","default":0},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevision-Output"},{"type":"null"}],"description":"The workflow revision with `@ag.references` replaced by their resolved payloads."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Metadata describing which references were resolved, depth reached, and errors."}},"type":"object","title":"WorkflowRevisionResolveResponse"},"WorkflowRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a revision is returned, `0` when none matched.","default":0},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevision-Output"},{"type":"null"}],"description":"The workflow revision."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Reference-resolution metadata; populated when `resolve=true` on retrieve."}},"type":"object","title":"WorkflowRevisionResponse"},"WorkflowRevisionRetrieveRequest":{"properties":{"workflow_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Return the latest revision across all variants of this workflow."},"workflow_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Return the latest revision of this variant."},"workflow_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Return this exact revision (by `id`, or by `slug` + `version`)."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment artifact backing the deployment to resolve from."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment variant backing the deployment to resolve from."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific environment revision to resolve from."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Key into the environment revision's reference map. Required when retrieving via environment refs."},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve","description":"When true, resolve `@ag.references` tokens embedded in the revision configuration before returning it."}},"type":"object","title":"WorkflowRevisionRetrieveRequest"},"WorkflowRevisionsLog":{"properties":{"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"WorkflowRevisionsLog"},"WorkflowRevisionsLogRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowRevisionsLog","description":"Log query. Supply `workflow_id`, `workflow_variant_id`, or `workflow_revision_id` to scope the log, and an optional `depth`."}},"type":"object","required":["workflow"],"title":"WorkflowRevisionsLogRequest"},"WorkflowRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of revisions in this page.","default":0},"workflow_revisions":{"items":{"$ref":"#/components/schemas/WorkflowRevision-Output"},"type":"array","title":"Workflow Revisions","description":"Workflow revisions matching the query, ordered by commit time."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Pagination cursor."}},"type":"object","title":"WorkflowRevisionsResponse"},"WorkflowVariant":{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowVariant"},"WorkflowVariantCreate":{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowVariantCreate"},"WorkflowVariantCreateRequest":{"properties":{"workflow_variant":{"$ref":"#/components/schemas/WorkflowVariantCreate","description":"Variant to create under an existing workflow. Requires `workflow_id` (the artifact) and a project-unique `slug`."}},"type":"object","required":["workflow_variant"],"title":"WorkflowVariantCreateRequest"},"WorkflowVariantEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowVariantEdit"},"WorkflowVariantEditRequest":{"properties":{"workflow_variant":{"$ref":"#/components/schemas/WorkflowVariantEdit","description":"Variant fields to update. `id` is required and must match the path parameter."}},"type":"object","required":["workflow_variant"],"title":"WorkflowVariantEditRequest"},"WorkflowVariantFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"WorkflowVariantFlags"},"WorkflowVariantFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowVariantFork"},"WorkflowVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a variant is returned, `0` when none matched.","default":0},"workflow_variant":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariant"},{"type":"null"}],"description":"The workflow variant."}},"type":"object","title":"WorkflowVariantResponse"},"WorkflowVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of variants in this page.","default":0},"workflow_variants":{"items":{"$ref":"#/components/schemas/WorkflowVariant"},"type":"array","title":"Workflow Variants","description":"Workflow variants matching the query."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Pagination cursor."}},"type":"object","title":"WorkflowVariantsResponse"},"WorkflowsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of workflows in this page.","default":0},"workflows":{"items":{"$ref":"#/components/schemas/Workflow"},"type":"array","title":"Workflows","description":"Workflow artifacts matching the query."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Pagination cursor; pass `windowing.next` back to fetch the following page."}},"type":"object","title":"WorkflowsResponse"},"Workspace":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","required":["name","type"],"title":"Workspace"},"WorkspaceMemberResponse":{"properties":{"user":{"additionalProperties":true,"type":"object","title":"User"},"roles":{"items":{"$ref":"#/components/schemas/WorkspacePermission"},"type":"array","title":"Roles"}},"type":"object","required":["user","roles"],"title":"WorkspaceMemberResponse"},"WorkspacePermission":{"properties":{"role_name":{"type":"string","title":"Role Name"},"role_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Description"},"permissions":{"anyOf":[{"items":{"$ref":"#/components/schemas/Permission"},"type":"array"},{"type":"null"}],"title":"Permissions"}},"type":"object","required":["role_name"],"title":"WorkspacePermission"},"WorkspaceResponse":{"properties":{"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"organization":{"type":"string","title":"Organization"},"members":{"anyOf":[{"items":{"$ref":"#/components/schemas/WorkspaceMemberResponse"},"type":"array"},{"type":"null"}],"title":"Members"}},"type":"object","required":["id","type","organization"],"title":"WorkspaceResponse"},"ee__src__models__api__organization_models__Organization":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"owner_id":{"type":"string","format":"uuid","title":"Owner Id"},"members":{"items":{"type":"string"},"type":"array","title":"Members"},"invitations":{"items":{},"type":"array","title":"Invitations"},"workspaces":{"items":{"type":"string"},"type":"array","title":"Workspaces"}},"type":"object","required":["id","owner_id"],"title":"Organization"},"oss__src__models__api__organization_models__Organization":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"owner_id":{"type":"string","format":"uuid","title":"Owner Id"},"members":{"items":{"type":"string"},"type":"array","title":"Members"},"invitations":{"items":{},"type":"array","title":"Invitations"},"workspaces":{"items":{"type":"string"},"type":"array","title":"Workspaces"}},"type":"object","required":["id","owner_id"],"title":"Organization"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","name":"Authorization","in":"header"}}},"tags":[{"name":"Status","description":"API server liveness and readiness status."},{"name":"Organizations","description":"Manage organizations, workspaces, SSO domains, and identity providers."},{"name":"Workspaces","description":"Manage workspaces within an organization and their members."},{"name":"Projects","description":"Manage projects within a workspace."},{"name":"Users","description":"User profile and account management — view profile, update username, reset password."},{"name":"Keys","description":"Create and revoke API keys used to authenticate programmatic requests."},{"name":"Workflows","description":"Workflow definitions — the runnable pipelines that back an application."},{"name":"Applications","description":"LLM applications — create, update, list, and delete apps."},{"name":"Evaluators","description":"Evaluator definitions — the metrics and judges used in evaluation runs."},{"name":"Testsets","description":"Test datasets — collections of input/output pairs used in evaluations."},{"name":"Testcases","description":"Individual test cases within a testset."},{"name":"Queries","description":"Saved query definitions used to filter and retrieve trace data."},{"name":"Traces","description":"Ingest and query traces, spans, and metrics from running applications."},{"name":"Invocations","description":"Run an application against a payload and capture the resulting trace."},{"name":"Annotations","description":"Attach evaluator-style feedback to existing traces and spans."},{"name":"Evaluations","description":"Evaluation runs — execute evaluators against variants and testsets."},{"name":"Environments","description":"Deployment environments (e.g. production, staging) and their active variants."},{"name":"Secrets","description":"Manage provider credentials and secret values stored in the vault."},{"name":"Tools","description":"External tool connections and OAuth integrations available to applications."},{"name":"Folders","description":"Organize applications and other resources into folder hierarchies."},{"name":"Webhooks","description":"Register and manage webhooks that fire on platform events."},{"name":"OpenTelemetry","description":"OTLP-compatible endpoints for ingesting traces directly from OpenTelemetry-instrumented services."},{"name":"Access","description":"Authentication discovery, organization access checks, and SSO callback endpoints."},{"name":"Billing","description":"Subscription, plan, and usage endpoints for workspace billing."},{"name":"Admin","description":"Internal administration endpoints — restricted to platform operators."},{"name":"Legacy","description":"Stable legacy endpoints retained for existing integrations — not deprecated, but new integrations should prefer the canonical surface."},{"name":"Deprecated","description":"Deprecated endpoints kept for backwards compatibility — avoid in new integrations."}],"security":[{"APIKeyHeader":[]}],"servers":[{"url":"/api"},{"url":"http://localhost/api"}]} \ No newline at end of file +{"openapi":"3.1.0","info":{"title":"Agenta API","description":"Agenta API","contact":{"name":"Agenta","url":"https://agenta.ai/","email":"team@agenta.ai"},"version":"0.1.0"},"paths":{"/billing/stripe/events/":{"post":{"tags":["Billing"],"summary":"Handle Events","operationId":"handle_events","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/stripe/portals/":{"post":{"tags":["Billing"],"summary":"Create Portal User Route","operationId":"create_portal","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/stripe/checkouts/":{"post":{"tags":["Billing"],"summary":"Create Checkout User Route","operationId":"create_checkout","parameters":[{"name":"plan","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Plan"}},{"name":"success_url","in":"query","required":true,"schema":{"type":"string","title":"Success Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/plans":{"get":{"tags":["Billing"],"summary":"Fetch Plan User Route","operationId":"fetch_plans","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/plans/switch":{"post":{"tags":["Billing"],"summary":"Switch Plans User Route","operationId":"switch_plans","parameters":[{"name":"plan","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Plan"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/subscription":{"get":{"tags":["Billing"],"summary":"Fetch Subscription User Route","operationId":"fetch_subscription","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/subscription/cancel":{"post":{"tags":["Billing"],"summary":"Cancel Subscription User Route","operationId":"cancel_plan","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/usage":{"get":{"tags":["Billing"],"summary":"Fetch Usage User Route","operationId":"fetch_usage","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/organizations/domains/":{"get":{"tags":["Organizations"],"summary":"List Domains","description":"List all domains for the organization.","operationId":"list_organization_domains","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrganizationDomainResponse"},"type":"array","title":"Response List Organization Domains"}}}}}},"post":{"tags":["Organizations"],"summary":"Create Domain","description":"Create a new domain for verification.\n\nThis endpoint initiates the domain verification process by:\n1. Creating a domain record\n2. Generating a unique verification token\n3. Returning DNS configuration instructions\n\nThe user must add a DNS TXT record to verify ownership.","operationId":"create_organization_domain","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/domains/verify":{"post":{"tags":["Organizations"],"summary":"Verify Domain","description":"Verify domain ownership via DNS TXT record.\n\nThis endpoint checks for the presence of the verification TXT record\nand marks the domain as verified if found.","operationId":"verify_organization_domain","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainVerify"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/domains/{domain_id}/refresh":{"post":{"tags":["Organizations"],"summary":"Refresh Domain Token","description":"Refresh the verification token for an unverified domain.\n\nGenerates a new token and resets the 48-hour expiry window.\nThis is useful when the original token has expired.","operationId":"refresh_organization_domain_token","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/domains/{domain_id}/reset":{"post":{"tags":["Organizations"],"summary":"Reset Domain","description":"Reset a verified domain to unverified state for re-verification.\n\nGenerates a new token and marks the domain as unverified.\nThis allows re-verification of already verified domains.","operationId":"reset_organization_domain","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDomainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/domains/{domain_id}":{"delete":{"tags":["Organizations"],"summary":"Delete Domain","description":"Delete a domain.","operationId":"delete_organization_domain","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/providers/":{"get":{"tags":["Organizations"],"summary":"List Providers","description":"List all SSO providers for the organization.","operationId":"list_organization_providers","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrganizationProviderResponse"},"type":"array","title":"Response List Organization Providers"}}}}}},"post":{"tags":["Organizations"],"summary":"Create Provider","description":"Create a new SSO provider configuration.\n\nSupported provider types:\n- oidc: OpenID Connect\n- saml: SAML 2.0 (coming soon)","operationId":"create_organization_provider","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationProviderCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/providers/{provider_id}":{"patch":{"tags":["Organizations"],"summary":"Update Provider","description":"Update an SSO provider configuration.","operationId":"update_organization_provider","parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","title":"Provider Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationProviderUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Organizations"],"summary":"Delete Provider","description":"Delete an SSO provider configuration.","operationId":"delete_organization_provider","parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","title":"Provider Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/providers/{provider_id}/test":{"post":{"tags":["Organizations"],"summary":"Test Provider","description":"Test SSO provider connection.\n\nThis endpoint tests the OIDC provider configuration by fetching the\ndiscovery document and validating required endpoints exist.\nIf successful, marks the provider as valid (is_valid=true).\nIf failed, marks as invalid and deactivates (is_valid=false, is_active=false).","operationId":"test_organization_provider","parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","title":"Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}":{"get":{"tags":["Organizations"],"summary":"Fetch Organization Details","description":"Return the details of the organization.","operationId":"fetch_organization_details","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDetails"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Organizations"],"summary":"Update Organization","operationId":"patch_organization","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ee__src__models__api__organization_models__Organization"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Organizations"],"summary":"Update Organization","operationId":"update_organization","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ee__src__models__api__organization_models__Organization"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Organizations"],"summary":"Delete Organization","description":"Delete an organization (owner only).","operationId":"delete_organization","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces":{"post":{"tags":["Organizations"],"summary":"Create Workspace","operationId":"create_workspace","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspace"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces/{workspace_id}":{"put":{"tags":["Organizations"],"summary":"Update Workspace","operationId":"update_workspace","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkspace"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/transfer/{new_owner_id}":{"post":{"tags":["Organizations"],"summary":"Transfer Organization Ownership","description":"Transfer organization ownership to another member.","operationId":"transfer_organization_ownership","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"new_owner_id","in":"path","required":true,"schema":{"type":"string","title":"New Owner Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations":{"get":{"tags":["Organizations"],"summary":"List Organizations","description":"Returns a list of organizations associated with the user's session.\n\nReturns:\n list[Organization]: A list of organizations associated with the user's session.\n\nRaises:\n HTTPException: If there is an error retrieving the organizations from the database.","operationId":"list_organizations","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/oss__src__models__api__organization_models__Organization"},"type":"array","title":"Response List Organizations"}}}}}},"post":{"tags":["Organizations"],"summary":"Create Organization","description":"Create a new organization.","operationId":"create_organization","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/permissions":{"get":{"tags":["Workspaces"],"summary":"Get All Workspace Permissions","description":"Get all workspace permissions.\n\nReturns a list of all available workspace permissions.\n\nReturns:\n List[Permission]: A list of Permission objects representing the available workspace permissions.\n\nRaises:\n HTTPException: If there is an error retrieving the workspace permissions.","operationId":"get_all_workspace_permissions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Permission"},"type":"array","title":"Response Get All Workspace Permissions"}}}}}}},"/workspaces/{workspace_id}/roles":{"post":{"tags":["Workspaces"],"summary":"Assign Role To User","description":"Assigns a role to a user in a workspace.\n\nArgs:\n payload (UserRole): The payload containing the organization id, user email, and role to assign.\n workspace_id (str): The ID of the workspace.\n request (Request): The FastAPI request object.\n\nReturns:\n bool: True if the role was successfully assigned, False otherwise.\n\nRaises:\n HTTPException: If the user does not have permission to perform this action.\n HTTPException: If there is an error assigning the role to the user.","operationId":"assign_role_to_user","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRole"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Workspaces"],"summary":"Unassign Role From User","description":"Delete a role assignment from a user in a workspace.\n\nArgs:\n workspace_id (str): The ID of the workspace.\n email (str): The email of the user to remove the role from.\n organization_id (str): The ID of the organization.\n role (str): The role to remove from the user.\n request (Request): The FastAPI request object.\n\nReturns:\n bool: True if the role assignment was successfully deleted.\n\nRaises:\n HTTPException: If there is an error in the request or the user does not have permission to perform the action.\n HTTPException: If there is an error in updating the user's roles.","operationId":"unassign_role_from_user","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}},{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"role","in":"query","required":true,"schema":{"type":"string","title":"Role"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/secrets/":{"get":{"tags":["Secrets"],"summary":"List Secrets","operationId":"list_secrets","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SecretResponseDTO"},"type":"array","title":"Response List Secrets"}}}}}},"post":{"tags":["Secrets"],"summary":"Create Secret","operationId":"create_secret","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSecretDTO"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretResponseDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/secrets/{secret_id}":{"get":{"tags":["Secrets"],"summary":"Read Secret","operationId":"read_secret","parameters":[{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretResponseDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Secrets"],"summary":"Update Secret","operationId":"update_secret","parameters":[{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSecretDTO"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretResponseDTO"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Secrets"],"summary":"Delete Secret","operationId":"delete_secret","parameters":[{"name":"secret_id","in":"path","required":true,"schema":{"type":"string","title":"Secret Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/subscriptions/":{"post":{"tags":["Webhooks"],"summary":"Create Subscription","operationId":"create_webhook_subscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/subscriptions/test":{"post":{"tags":["Webhooks"],"summary":"Test Subscription","operationId":"test_webhook_subscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionTestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/subscriptions/{subscription_id}":{"get":{"tags":["Webhooks"],"summary":"Fetch Subscription","operationId":"fetch_webhook_subscription","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subscription Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Webhooks"],"summary":"Edit Subscription","operationId":"edit_webhook_subscription","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subscription Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete Subscription","operationId":"delete_webhook_subscription","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subscription Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/subscriptions/query":{"post":{"tags":["Webhooks"],"summary":"Query Subscriptions","operationId":"query_webhook_subscriptions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/deliveries":{"post":{"tags":["Webhooks"],"summary":"Create Delivery","operationId":"create_webhook_delivery","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/deliveries/{delivery_id}":{"get":{"tags":["Webhooks"],"summary":"Fetch Delivery","operationId":"fetch_webhook_delivery","parameters":[{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Delivery Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/deliveries/query":{"post":{"tags":["Webhooks"],"summary":"Query Deliveries","operationId":"query_webhook_deliveries","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/otlp/v1/traces":{"get":{"tags":["OpenTelemetry"],"summary":"Status check for OTLP","description":"Return the OTLP endpoint liveness status.\n\nLightweight readiness probe. Returns `{\"status\": \"ready\"}` when\nthe router is mounted. Intended for health checks from OTel\ncollectors before they start exporting traces.","operationId":"otlp_status","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectStatusResponse"}}}}}},"post":{"tags":["OpenTelemetry"],"summary":"Ingest traces via OTLP","description":"Ingest traces via the OTLP/HTTP protobuf protocol.\n\nThis endpoint accepts a serialized\n`ExportTraceServiceRequest` protobuf. Point any OTLP/HTTP\ncollector or SDK at `POST /otlp/v1/traces` and spans will flow\ninto the same ingest stream as the Agenta-native endpoints.\n\nUse this when you already have OTel instrumentation emitting\nOTLP. For new integrations that don't need raw OTLP, prefer\n`POST /tracing/spans/ingest` — it takes JSON, accepts Agenta's\nnested shape directly, and surfaces parse failures immediately.\n\n## Content-Type and size limit\n\nBinary protobuf only (`Content-Type: application/x-protobuf`).\nJSON OTLP is not accepted. Requests larger than the configured\nbatch limit (default 4 MB, see `OTLP_MAX_BATCH_BYTES`) return\n`413 Request Entity Too Large`.\n\n## Response\n\nSuccessful ingest returns `200 OK` with a serialized\n`ExportTraceServiceResponse` protobuf. Parse failures on the\nrequest body return `400`; malformed spans return `500`; quota\nexhaustion returns `403`. Like the native ingest paths, spans\nare queued on a Redis stream and persisted asynchronously — see\n[Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202).","operationId":"otlp_ingest","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectStatusResponse"}}}}}}},"/auth/discover":{"post":{"tags":["Access"],"summary":"Discover","description":"Discover authentication methods available for a given email.\n\nThis endpoint does NOT reveal:\n- Organization names\n- User existence (optionally - currently does for UX)\n- Detailed policy information\n\nReturns minimal information needed for authentication flow.","operationId":"discover_access","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoverRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoverResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/access":{"get":{"tags":["Access"],"summary":"Check Organization Access","description":"Check if the current session satisfies the organization's auth policy.\n\nReturns 200 when access is allowed, 403 with AUTH_UPGRADE_REQUIRED when not.","operationId":"check_organization_access","parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/session/identities":{"patch":{"tags":["Access"],"summary":"Update Session Identities","operationId":"update_session_identities","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionIdentitiesUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/sso/callback/{organization_slug}/{provider_slug}":{"get":{"tags":["Access"],"summary":"Sso Callback Redirect","description":"Custom SSO callback endpoint that redirects to SuperTokens.\n\nThis endpoint:\n1. Accepts clean URL path: /auth/sso/callback/{organization_slug}/{provider_slug}\n2. Validates the organization and provider exist\n3. Builds SuperTokens thirdPartyId: sso:{organization_slug}:{provider_slug}\n4. Redirects to SuperTokens callback: /auth/callback/{thirdPartyId}\n\nSuperTokens then handles:\n1. Exchange code for tokens (using our dynamic provider config)\n2. Get user info\n3. Call our sign_in_up override (creates user_identity, adds user_identities to session)\n4. Redirect to frontend with session cookie","operationId":"sso_callback_redirect","parameters":[{"name":"organization_slug","in":"path","required":true,"schema":{"type":"string","title":"Organization Slug"}},{"name":"provider_slug","in":"path","required":true,"schema":{"type":"string","title":"Provider Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tracing/spans/ingest":{"post":{"tags":["Deprecated"],"summary":"Ingest Spans","description":"Ingest spans into the tracing backend.\n\nUse this endpoint to write full OpenTelemetry-style spans — including\nmulti-span hierarchies (parent → child → grandchild), attributes,\nreferences, events and links. For simple single-span annotations or\nevaluator outputs, prefer `POST /preview/tracing/traces/`\n(`create_simple_trace`) — it's a higher-level helper on top of this\nendpoint.\n\n## Request body\n\nProvide exactly one of:\n\n- `spans`: a flat list of spans. Parent/child relationships are\n expressed via `parent_id` on each span.\n- `traces`: a nested tree keyed by `trace_id` then by span name,\n where each node may contain a `spans` dict of its children. The\n query endpoint (`POST /tracing/spans/query`) returns this shape.\n\nEach span requires `trace_id`, `span_id`, `start_time`, `end_time`.\n`trace_id` must be a 32-char hex UUID, `span_id` a 16-char hex.\nAttributes follow the Agenta convention under the `ag` namespace\n(`ag.type`, `ag.data`, `ag.metrics`, `ag.references`) and may be\nsubmitted either as a flat dotted map (OTel wire format) or as a\nnested object — both are accepted.\n\n## Response\n\nReturns `202 Accepted` with the links (`trace_id` + `span_id`) for\nthe spans that were parsed into the ingest stream. See\n[Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202)\nfor what `count < N submitted` means.\n\n## Example\n\n```json\n{\n \"spans\": [\n {\n \"trace_id\": \"f5a2efb40895881e938e2ebc070beca8\",\n \"span_id\": \"15f3df0731995245\",\n \"span_name\": \"completion_v0\",\n \"span_type\": \"workflow\",\n \"span_kind\": \"SPAN_KIND_SERVER\",\n \"start_time\": \"2026-04-16T18:18:18.491929Z\",\n \"end_time\": \"2026-04-16T18:18:20.415372Z\",\n \"attributes\": {\n \"ag.type.trace\": \"invocation\",\n \"ag.type.span\": \"workflow\",\n \"ag.data.inputs.country\": \"France\",\n \"ag.data.outputs\": \"Paris\"\n }\n }\n ]\n}\n```","operationId":"ingest_spans","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/tracing/spans/query":{"post":{"tags":["Deprecated"],"summary":"Query Spans","description":"Query spans and traces in the tracing backend.\n\nUse `focus` in the request body to control the response shape:\n\n- `\"trace\"` (default): returns a nested `traces` tree keyed by\n `trace_id` then by span name. Children hang off their parent's\n `spans` field. Best for rendering a trace waterfall.\n- `\"span\"`: returns a flat `spans` list. Best for paginating or\n filtering across all spans regardless of hierarchy.\n\nUse `oldest` / `newest` (unix seconds) to window the query and\n`limit` to cap the number of traces/spans returned.\n\nThe response preserves the Agenta `ag.*` attribute namespace and\nincludes computed metrics (`ag.metrics.duration`, `ag.metrics.tokens`,\n`ag.metrics.costs`) on each span. The `traces` tree returned here is\nthe same shape that `POST /tracing/spans/ingest` accepts as its\n`traces` field.","operationId":"query_spans_rpc","deprecated":true,"parameters":[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tracing/analytics/query":{"post":{"tags":["Deprecated"],"summary":"Fetch Analytics","description":"Aggregate span metrics into time buckets.\n\nRuns filtering and windowing identical to `POST /tracing/spans/query`,\nthen bucketizes the matched spans by time and computes one or more\nmetric summaries per bucket. Use this to build charts of latency,\ncost, token usage, or custom numeric and categorical attributes.\n\n## Request body\n\n- `filtering` — same shape as the query endpoint, scoped to the spans\n that contribute to the analytics.\n- `windowing` — `oldest`/`newest` for the time range and `interval`\n for bucket width (in seconds).\n- `specs` — a list of `MetricSpec` entries describing which\n attributes to summarize and how. Each spec declares a `type`\n (`numeric/continuous`, `numeric/discrete`, `binary`,\n `categorical/single`, `categorical/multiple`, `string`, `json`,\n or `*` for auto) and a dotted `path` into the span (for example\n `attributes.ag.metrics.costs.cumulative.total`).\n\n## Response\n\nBuckets are returned in chronological order. Each bucket carries a\n`metrics` dict keyed by spec path. See [Tracing — the ag.*\nnamespace](/reference/api-guide/tracing#the-ag-attribute-namespace)\nfor the cumulative/incremental metric layout on each span.","operationId":"query_analytics","deprecated":true,"parameters":[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}},{"name":"specs","in":"query","required":false,"schema":{"title":"Specs"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tracing/traces/":{"post":{"tags":["Deprecated"],"summary":"Create Trace","description":"Create a trace from one or more spans.\n\nThis is the single-trace counterpart to `POST /tracing/spans/ingest`.\nAccepts the same `OTelTracingRequest` body (either `spans` flat list\nor `traces` nested tree) but requires all spans to share a single\n`trace_id`.\n\nReturns `202 Accepted` with the links for the spans that entered\nthe ingest stream. See [Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202).\n\nMost callers should prefer `POST /tracing/spans/ingest` (no\nsingle-trace restriction) or `POST /simple/traces/` (helper for a\none-span payload).","operationId":"create_trace_tracing","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/tracing/traces/{trace_id}":{"get":{"tags":["Deprecated"],"summary":"Fetch Trace","description":"Fetch a single trace by `trace_id`.\n\nReturns the trace as a `traces` map keyed by `trace_id` → span\nname. The response is empty when the trace is not in the current\nproject. `trace_id` must be a 32-char hex UUID; any other format\nreturns `400`.\n\nFor flat-list retrieval across many traces, use\n`POST /tracing/spans/query` with `focus=\"span\"`.","operationId":"fetch_trace_tracing","deprecated":true,"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Deprecated"],"summary":"Edit Trace","description":"Replace the spans of an existing trace.\n\nThe path `trace_id` must match the `trace_id` in the payload.\nMismatches return `400`. The payload must contain exactly one\ntrace; submitting spans from more than one trace returns `400`.\n\nEdit is implemented as a re-ingest: the new spans are written\nthrough the same stream as `POST /tracing/spans/ingest`, and the\n`202 Accepted` response reports how many spans entered the stream.\nThe worker reconciles the trace asynchronously.","operationId":"edit_trace_tracing","deprecated":true,"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelTracingRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Deprecated"],"summary":"Delete Trace","description":"Delete a trace and all its spans.\n\nRemoves every span that shares this `trace_id` within the project.\nReturns `202 Accepted` with the links for the spans that were\nmarked for deletion. `trace_id` must be a 32-char hex UUID.\n\nDeletion is not reversible. For soft-removal semantics on a\nsingle-trace simple annotation, prefer\n`DELETE /simple/traces/{trace_id}`.","operationId":"delete_trace_tracing","deprecated":true,"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTelLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tracing/sessions/query":{"post":{"tags":["Deprecated"],"summary":"List Sessions","description":"List distinct session IDs from span attributes.\n\nReturns the distinct values of `ag.session.id` across spans in the\ncurrent project, in a windowed, cursor-paginated form. Use this to\ndrive a session-picker UI before drilling into the spans of each\nsession.\n\nThe `realtime` flag controls the cursor field:\n\n- `false` or unset — paginate by a stable `first_active` cursor\n (safe to iterate under heavy write load).\n- `true` — paginate by `last_active`, reflecting ongoing activity\n but less stable between pages.\n\nThe response includes a `windowing` cursor; pass it as `windowing.next`\non the next call to continue.","operationId":"query_sessions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionsQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/tracing/users/query":{"post":{"tags":["Deprecated"],"summary":"List Users","description":"List distinct user IDs from span attributes.\n\nReturns the distinct values of `ag.user.id` across spans in the\ncurrent project. Same pagination and `realtime` semantics as\n`POST /tracing/sessions/query`; pass the returned `windowing.next`\ncursor on subsequent calls.","operationId":"query_users","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsersQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/tracing/spans/analytics":{"post":{"tags":["Legacy"],"summary":"Fetch Legacy Analytics","description":"Aggregate span metrics using the fixed legacy schema.\n\nReturns time-bucketed aggregates with a fixed set of fields\n(`count`, `duration`, `costs`, `tokens`) split into `total` and\n`errors`. The shape predates `specs`-driven analytics and is kept\nfor the existing observability dashboards that consume it.\n\nNew integrations should prefer `POST /tracing/analytics/query`,\nwhich accepts `specs` and can summarize arbitrary span attributes,\nnot just the four fixed metrics.","operationId":"fetch_legacy_analytics","parameters":[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OldAnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/traces/":{"get":{"tags":["Traces"],"summary":"Fetch Traces","description":"Fetch multiple traces by known IDs.\n\nPoint lookup endpoint. Accepts either repeated query params\n(`?trace_id=a&trace_id=b`) or a comma-separated single param\n(`?trace_ids=a,b`). Results are deduplicated. Returns `400` when\nno IDs are supplied. Use `POST /traces/query` for filter-based\nretrieval.","operationId":"fetch_traces","parameters":[{"name":"trace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Trace Id"}},{"name":"trace_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TracesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Traces"],"summary":"Create Trace","description":"Create a single trace from the canonical `Trace` shape.\n\nAccepts one trace (`trace_id` plus a nested `spans` tree) and\nreturns the resulting `trace_id`. The payload is internally\nnormalized into the same ingest pipeline as\n`POST /tracing/spans/ingest`.\n\nReturns `202 Accepted`. The async write contract applies — see\n[Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202).\n\nUse this when you want to operate on whole traces in the\nlist-shaped `Trace` payload. For flat-list ingestion or multiple\ntraces in one call, use `POST /traces/ingest` (plural).","operationId":"create_trace","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/traces/query":{"post":{"tags":["Traces"],"summary":"Query Traces","description":"Query traces as a list of canonical `Trace` records.\n\nThin wrapper over the shared span-query backend that forces\n`focus = \"trace\"` and returns the list-shaped `Traces` payload\n(one entry per trace, each with its nested `spans` tree). Use this\nto build a table of runs, where each row is a trace.\n\n## Request body\n\n- `filtering` — span-level conditions, same dialect as\n `POST /spans/query`. A trace matches when any of its spans\n matches.\n- `windowing` — cursor pagination and time range.\n- `query_ref`, `query_variant_ref`, `query_revision_ref` — resolve\n filters and windowing from a saved query revision. If the\n revision's stored `formatting.focus` is `span`, this endpoint\n returns `409` — call `POST /spans/query` instead.\n\n## Response\n\nReturns `{count, traces: [...]}`. For the per-trace map shape\nkeyed by `trace_id`, call `POST /tracing/spans/query` with\n`focus=\"trace\"`.","operationId":"query_traces","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TracesQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TracesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/traces/{trace_id}":{"get":{"tags":["Traces"],"summary":"Fetch Trace","description":"Fetch a single trace by `trace_id` in the canonical `Trace` shape.\n\nReturns `{count: 1, trace}` when found and `{count: 0}` otherwise.\n`trace_id` must be a 32-char hex UUID; any other format returns\n`400`. The reserved path segments `query` and `ingest` return\n`405` to disambiguate from the sibling query/ingest endpoints.","operationId":"fetch_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Traces"],"summary":"Edit Trace","description":"Replace a trace's spans using the canonical `Trace` shape.\n\nPath `trace_id` must match the `trace_id` inside the payload's\n`trace.trace_id`. Mismatches return `400`. The payload must\ndescribe exactly one trace.\n\nEdit re-ingests the spans through the same stream as\n`POST /tracing/spans/ingest`. Returns `202 Accepted` once the\nspans are queued. The worker reconciles the trace asynchronously.","operationId":"edit_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Traces"],"summary":"Delete Trace","operationId":"delete_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/traces/ingest":{"post":{"tags":["Deprecated"],"summary":"Ingest Traces","description":"Ingest a batch of traces in the canonical `Traces` list shape.\n\nAccepts a list of trace records (each `trace_id` plus nested\n`spans`). Internally normalized into the same pipeline as\n`POST /tracing/spans/ingest`. Use this when you already hold\ndata in the `Traces` list shape — for example, replaying traces\nfrom another environment.\n\nReturns `202 Accepted` with the list of accepted `trace_ids`. See\n[Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202)\nfor what `count` means here.","operationId":"ingest_traces","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TracesRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/spans/":{"get":{"tags":["Traces"],"summary":"Fetch Spans","description":"Fetch spans by known IDs.\n\nPoint lookup endpoint. At least one of `trace_id` or `span_id`\nmust be present. Both accept either repeated query params\n(`?trace_id=a&trace_id=b`) or a comma-separated single param\n(`?trace_ids=a,b`); results are deduplicated.\n\nReturns `400` when neither IDs nor trace IDs are supplied.\nFor filter-based retrieval, use `POST /spans/query`.","operationId":"fetch_spans","parameters":[{"name":"trace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Trace Id"}},{"name":"trace_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Ids"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Span Id"}},{"name":"span_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpansResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spans/query":{"post":{"tags":["Traces"],"summary":"Query Spans","description":"Query spans as a flat list.\n\nThin wrapper over the shared span-query backend that forces\n`focus = \"span\"`. Use this when you want a paged list of spans\nregardless of trace hierarchy — for example, to surface all LLM\ncalls across traces or to stream spans into an external system.\n\n## Request body\n\n- `filtering` — span-level conditions (fields on `Span` and\n `attributes` paths).\n- `windowing` — cursor pagination and time range (see\n [Query Pattern](/reference/api-guide/query-pattern#windowing)).\n- `query_ref`, `query_variant_ref`, `query_revision_ref` — resolve\n filtering and windowing from a saved query revision. If the\n revision's stored `formatting.focus` is `trace`, this endpoint\n returns `409` — call `POST /traces/query` for that revision.\n\n## Response\n\nReturns `{count, spans}`. For the nested per-trace shape, call\n`POST /traces/query` or `POST /tracing/spans/query` with\n`focus=\"trace\"` instead.","operationId":"query_spans","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpansQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpansResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spans/analytics/query":{"post":{"tags":["Traces"],"summary":"Query Analytics","operationId":"query_spans_analytics","parameters":[{"name":"focus","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}],"title":"Focus"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}],"title":"Format"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Oldest"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Newest"}},{"name":"interval","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"}},{"name":"rate","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},{"name":"filter","in":"query","required":false,"schema":{"title":"Filter"}},{"name":"specs","in":"query","required":false,"schema":{"title":"Specs"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spans/sessions/query":{"post":{"tags":["Traces"],"summary":"Query Sessions","operationId":"query_spans_sessions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionsQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spans/users/query":{"post":{"tags":["Traces"],"summary":"Query Users","operationId":"query_spans_users","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsersQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/spans/{trace_id}/{span_id}":{"get":{"tags":["Traces"],"summary":"Fetch Span","description":"Fetch a single span by `trace_id` + `span_id`.\n\nReturns `{count: 1, span}` when found and `{count: 0}` otherwise.\nBoth IDs are required path parameters. Use this to drill in on one\nspan from a trace waterfall without pulling the full tree.","operationId":"fetch_span","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"path","required":true,"schema":{"type":"string","title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/traces/":{"post":{"tags":["Traces"],"summary":"Create Trace","description":"Create a single-span \"simple\" trace.\n\nThis endpoint is a higher-level helper for the common case of\nrecording one self-contained event — an evaluator output, a human\nannotation, a feedback entry, a manually-logged inference. It\ncreates one span under a fresh `trace_id` and returns the resulting\nhandle.\n\n## When to use this vs. `/tracing/spans/ingest`\n\n- **Use this endpoint** when you have a single payload to record\n with no internal hierarchy: evaluation results, human feedback,\n manual annotations, or a standalone completion. It takes care of\n `trace_id`/`span_id` generation, attribute namespacing, and link\n wiring for you.\n- **Use `POST /tracing/spans/ingest`** when you need multi-span\n traces (e.g. an agent run with nested tool calls and LLM spans),\n precise control over IDs, timings, or parent/child relationships,\n or when forwarding traces from another OTel-compatible source.\n\n## Request body\n\nSend a `trace` object with:\n\n- `origin` — who produced the trace (`human`, `auto`, `custom`).\n- `kind` — intent (`adhoc`, `eval`, `play`).\n- `channel` — transport that produced it (`sdk`, `api`, `web`, `otlp`).\n- `data` — required dict carrying the actual payload (inputs,\n outputs, or evaluator results).\n- `tags`, `meta` — optional free-form dicts for filtering and\n metadata.\n- `references` — optional links to Agenta entities (application,\n variant, revision, evaluator, testset, etc.).\n- `links` — optional OTel-style links to other traces/spans.\n\nUse `PATCH /preview/tracing/traces/{trace_id}` to update fields\nlater, `GET` to fetch, and `DELETE` to remove. See\n[Tracing — References and links](/reference/api-guide/tracing#references-and-entity-linking)\nfor when to use `references` vs. `links`.","operationId":"create_simple_trace","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceCreateRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/traces/{trace_id}":{"get":{"tags":["Traces"],"summary":"Fetch Trace","description":"Fetch a single \"simple\" trace by `trace_id`.\n\nReturns the high-level `SimpleTrace` view (origin, kind, channel,\ndata, references, links) rather than the raw OTel span shape. Use\nthis for evaluation results, feedback entries, and annotations\ncreated via `POST /simple/traces/`. For the span-level view of the\nsame trace, call `GET /tracing/traces/{trace_id}`.","operationId":"fetch_simple_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Traces"],"summary":"Edit Trace","description":"Update an existing \"simple\" trace.\n\nSupplied fields overwrite the existing trace. Fields not present\nin the request body are left unchanged. `data` is required (the\npayload being recorded); `tags`, `meta`, `references`, and\n`links` are optional.\n\nThis endpoint is intended for annotations and feedback entries,\nwhere the `data.outputs` is the part that typically gets revised.\nFor span-level edits, use `PUT /tracing/traces/{trace_id}`.","operationId":"edit_simple_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Traces"],"summary":"Delete Trace","description":"Delete a \"simple\" trace.\n\nRemoves the single-span trace created via\n`POST /simple/traces/`. Returns the `(trace_id, span_id)` pair\nthat was removed, for logging or downstream cleanup. Use\n`DELETE /tracing/traces/{trace_id}` when operating on a\nmulti-span trace.","operationId":"delete_simple_trace","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/traces/query":{"post":{"tags":["Traces"],"summary":"Query Traces","description":"Query \"simple\" traces.\n\nFilter annotations and feedback by `origin`, `kind`, `channel`,\n`tags`, `meta`, `references`, and `links`. The shape of the\nrequest body is described in the\n[Simple Endpoints](/reference/api-guide/simple-endpoints#query-traces)\nguide, including the distinction between filtering via\n`trace.links` (inbound links on the trace) and the top-level\n`links` (batch GET by the trace's own IDs).\n\nUse this endpoint when building feedback or annotation UIs.\nFor span-level queries across all trace types, use\n`POST /tracing/spans/query`.","operationId":"query_simple_traces","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTraceQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTracesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invocations/":{"post":{"tags":["Invocations"],"summary":"Create Invocation","operationId":"create_invocation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invocations/{trace_id}":{"get":{"tags":["Invocations"],"summary":"Fetch Invocation","operationId":"fetch_invocation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Invocations"],"summary":"Edit Invocation","operationId":"edit_invocation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Invocations"],"summary":"Delete Invocation","operationId":"delete_invocation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invocations/query":{"post":{"tags":["Invocations"],"summary":"Query Invocations","operationId":"query_invocations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/annotations/":{"post":{"tags":["Annotations"],"summary":"Create Annotation","operationId":"create_annotation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/annotations/{trace_id}":{"get":{"tags":["Annotations"],"summary":"Fetch Annotation","operationId":"fetch_annotation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Annotations"],"summary":"Edit Annotation","operationId":"edit_annotation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Annotations"],"summary":"Delete Annotation","operationId":"delete_annotation","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"span_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/annotations/query":{"post":{"tags":["Annotations"],"summary":"Query Annotations","operationId":"query_annotations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testcases/":{"get":{"tags":["Testcases"],"summary":"Fetch Testcases","operationId":"fetch_testcases","parameters":[{"name":"testcase_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Testcase Id"}},{"name":"testcase_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testcase Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestcasesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testcases/{testcase_id}":{"get":{"tags":["Testcases"],"summary":"Fetch Testcase","operationId":"fetch_testcase","parameters":[{"name":"testcase_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testcase Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestcaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testcases/query":{"post":{"tags":["Testcases"],"summary":"Query Testcases","operationId":"query_testcases","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestcasesQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestcasesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/":{"post":{"tags":["Testsets"],"summary":"Create Testset","description":"Create an empty testset artifact.\n\nOnly creates the artifact row (name, slug, metadata). No variant or\nrevision is created; add testcases by committing a revision with\n`/testsets/revisions/commit`, or use `/simple/testsets/` to create\na testset with seed rows in a single call.","operationId":"create_testset","parameters":[{"name":"testset_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/{testset_id}":{"get":{"tags":["Testsets"],"summary":"Fetch Testset","description":"Fetch a testset artifact by ID.\n\nReturns the artifact row only; testcases are stored on revisions and\nmust be fetched via `/testsets/revisions/retrieve` or\n`/testcases/query`.","operationId":"fetch_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Testsets"],"summary":"Edit Testset","description":"Update metadata on a testset artifact.\n\nOnly artifact-level fields (name, description, slug, flags, tags,\nmeta, folder) are editable here. Testcase changes are committed as\nnew revisions via `/testsets/revisions/commit`.","operationId":"edit_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/{testset_id}/archive":{"post":{"tags":["Testsets"],"summary":"Archive Testset","description":"Soft-delete a testset artifact.\n\nSets `deleted_at` on the testset. Archived testsets are excluded\nfrom `/testsets/query` unless `include_archived` is true. Use\n`/testsets/{testset_id}/unarchive` to restore.","operationId":"archive_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/{testset_id}/unarchive":{"post":{"tags":["Testsets"],"summary":"Unarchive Testset","description":"Restore a previously archived testset artifact.\n\nClears `deleted_at` on the testset so it shows up in queries again.","operationId":"unarchive_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/query":{"post":{"tags":["Testsets"],"summary":"Query Testsets","description":"List and filter testset artifacts.\n\nFollows the shared query pattern: attribute filters on the testset\nbody, optional `testset_refs` to restrict by id/slug, cursor-based\npagination via `windowing`. Only artifact rows are returned — no\ntestcases. See the Query Pattern guide for the full body shape.","operationId":"query_testsets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/variants/":{"post":{"tags":["Testsets"],"summary":"Create Testset Variant","description":"Create a variant (history branch) on a testset.\n\nMost testsets only need one variant. Create additional variants to\nmaintain parallel revision histories (for example, a staging branch\nseparate from the main one).","operationId":"create_testset_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/variants/{testset_variant_id}":{"get":{"tags":["Testsets"],"summary":"Fetch Testset Variant","description":"Fetch a variant by ID.\n\nReturns the variant row (branch metadata). Use\n`/testsets/revisions/retrieve` to get the latest revision on this\nvariant.","operationId":"fetch_testset_variant","parameters":[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Testsets"],"summary":"Edit Testset Variant","description":"Update metadata on a testset variant.\n\nVariants hold only branch-level metadata (name, description, slug,\nflags, tags, meta). Testcase content belongs to revisions.","operationId":"edit_testset_variant","parameters":[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/variants/{testset_variant_id}/archive":{"post":{"tags":["Testsets"],"summary":"Archive Testset Variant","description":"Soft-delete a testset variant.\n\nArchiving a variant excludes it from `/testsets/variants/query`\nunless `include_archived` is true. Its revisions stay in place and\ncan still be retrieved by ID.","operationId":"archive_testset_variant","parameters":[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/variants/{testset_variant_id}/unarchive":{"post":{"tags":["Testsets"],"summary":"Unarchive Testset Variant","description":"Restore a previously archived testset variant.","operationId":"unarchive_testset_variant","parameters":[{"name":"testset_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/variants/query":{"post":{"tags":["Testsets"],"summary":"Query Testset Variants","description":"List and filter testset variants.\n\nUse `testset_refs` to scope to one or more parent testsets. Use\n`testset_variant_refs` to restrict by specific variant id/slug.","operationId":"query_testset_variants","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/":{"post":{"tags":["Testsets"],"summary":"Create Testset Revision","description":"Create a new revision on an existing variant.\n\nCreates a revision row without committing content. Most callers\ninstead use `/testsets/revisions/commit`, which writes the\ntestcases and the revision together.","operationId":"create_testset_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/{testset_revision_id}":{"get":{"tags":["Testsets"],"summary":"Fetch Testset Revision","operationId":"fetch_testset_revision","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}},{"name":"include_testcases","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Include full testcase objects. Default (null/true): include testcases. False: return only testcase IDs.","title":"Include Testcases"},"description":"Include full testcase objects. Default (null/true): include testcases. False: return only testcase IDs."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Testsets"],"summary":"Edit Testset Revision","operationId":"edit_testset_revision","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/{testset_revision_id}/archive":{"post":{"tags":["Testsets"],"summary":"Archive Testset Revision","operationId":"archive_testset_revision","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/{testset_revision_id}/unarchive":{"post":{"tags":["Testsets"],"summary":"Unarchive Testset Revision","operationId":"unarchive_testset_revision","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/{testset_revision_id}/download":{"post":{"tags":["Testsets"],"summary":"Fetch Testset Revision To File","operationId":"fetch_testset_revision_to_file","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}},{"name":"file_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["csv","json"],"type":"string"},{"type":"null"}],"description":"File type to download. Supported: 'csv' or 'json'. Default: 'csv'.","default":"csv","title":"File Type"},"description":"File type to download. Supported: 'csv' or 'json'. Default: 'csv'."},{"name":"file_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional custom filename for the download.","title":"File Name"},"description":"Optional custom filename for the download."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/{testset_revision_id}/upload":{"post":{"tags":["Testsets"],"summary":"Create Testset Revision From File","operationId":"create_testset_revision_from_file","parameters":[{"name":"testset_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Revision Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_testset_revision_from_file"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/query":{"post":{"tags":["Testsets"],"summary":"Query Testset Revisions","operationId":"query_testset_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/commit":{"post":{"tags":["Testsets"],"summary":"Commit Testset Revision","operationId":"commit_testset_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/retrieve":{"post":{"tags":["Testsets"],"summary":"Retrieve Testset Revision","operationId":"retrieve_testset_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/testsets/revisions/log":{"post":{"tags":["Testsets"],"summary":"Log Testset Revisions","operationId":"log_testset_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/":{"post":{"tags":["Testsets"],"summary":"Create Simple Testset","operationId":"create_simple_testset","parameters":[{"name":"testset_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/{testset_id}":{"get":{"tags":["Testsets"],"summary":"Fetch Simple Testset","operationId":"fetch_simple_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Testsets"],"summary":"Edit Simple Testset","operationId":"edit_simple_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/{testset_id}/archive":{"post":{"tags":["Testsets"],"summary":"Archive Simple Testset","operationId":"archive_simple_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/{testset_id}/unarchive":{"post":{"tags":["Testsets"],"summary":"Unarchive Simple Testset","operationId":"unarchive_simple_testset","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/{testset_id}/upload":{"post":{"tags":["Testsets"],"summary":"Edit Simple Testset From File","operationId":"edit_simple_testset_from_file","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_edit_simple_testset_from_file"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/{testset_id}/download":{"post":{"tags":["Testsets"],"summary":"Fetch Simple Testset To File","operationId":"fetch_simple_testset_to_file","parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testset Id"}},{"name":"file_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["csv","json"],"type":"string"},{"type":"null"}],"title":"File Type"}},{"name":"file_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/query":{"post":{"tags":["Testsets"],"summary":"Query Simple Testsets","operationId":"query_simple_testsets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/testsets/upload":{"post":{"tags":["Testsets"],"summary":"Create Simple Testset From File","operationId":"create_simple_testset_from_file","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_simple_testset_from_file"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleTestsetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/":{"post":{"tags":["Queries"],"summary":"Create Query","operationId":"create_query","parameters":[{"name":"query_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/{query_id}":{"get":{"tags":["Queries"],"summary":"Fetch Query","operationId":"fetch_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Queries"],"summary":"Edit Query","operationId":"edit_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/{query_id}/archive":{"post":{"tags":["Queries"],"summary":"Archive Query","operationId":"archive_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/{query_id}/unarchive":{"post":{"tags":["Queries"],"summary":"Unarchive Query","operationId":"unarchive_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/query":{"post":{"tags":["Queries"],"summary":"Query Queries","operationId":"query_queries","parameters":[{"name":"query_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"}},{"name":"query_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Query Ids"}},{"name":"query_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query Slug"}},{"name":"query_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Query Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/variants/":{"post":{"tags":["Queries"],"summary":"Create Query Variant","operationId":"create_query_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/variants/{query_variant_id}":{"get":{"tags":["Queries"],"summary":"Fetch Query Variant","operationId":"fetch_query_variant","parameters":[{"name":"query_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Queries"],"summary":"Edit Query Variant","operationId":"edit_query_variant","parameters":[{"name":"query_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/variants/{query_variant_id}/archive":{"post":{"tags":["Queries"],"summary":"Archive Query Variant","operationId":"archive_query_variant","parameters":[{"name":"query_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/variants/{query_variant_id}/unarchive":{"post":{"tags":["Queries"],"summary":"Unarchive Query Variant","operationId":"unarchive_query_variant","parameters":[{"name":"query_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/variants/query":{"post":{"tags":["Queries"],"summary":"Query Query Variants","operationId":"query_query_variants","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/retrieve":{"post":{"tags":["Queries"],"summary":"Retrieve Query Revision","operationId":"retrieve_query_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/":{"post":{"tags":["Queries"],"summary":"Create Query Revision","operationId":"create_query_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/{query_revision_id}":{"get":{"tags":["Queries"],"summary":"Fetch Query Revision","operationId":"fetch_query_revision","parameters":[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Queries"],"summary":"Edit Query Revision","operationId":"edit_query_revision","parameters":[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/{query_revision_id}/archive":{"post":{"tags":["Queries"],"summary":"Archive Query Revision","operationId":"archive_query_revision","parameters":[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/{query_revision_id}/unarchive":{"post":{"tags":["Queries"],"summary":"Unarchive Query Revision","operationId":"unarchive_query_revision","parameters":[{"name":"query_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/query":{"post":{"tags":["Queries"],"summary":"Query Query Revisions","operationId":"query_query_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/commit":{"post":{"tags":["Queries"],"summary":"Commit Query Revision","operationId":"commit_query_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/queries/revisions/log":{"post":{"tags":["Queries"],"summary":"Log Query Revisions","operationId":"log_query_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queries/":{"post":{"tags":["Queries"],"summary":"Create Simple Query","operationId":"create_simple_query","parameters":[{"name":"query_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queries/{query_id}":{"get":{"tags":["Queries"],"summary":"Fetch Simple Query","operationId":"fetch_simple_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Queries"],"summary":"Edit Simple Query","operationId":"edit_simple_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queries/{query_id}/archive":{"post":{"tags":["Queries"],"summary":"Archive Simple Query","operationId":"archive_simple_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queries/{query_id}/unarchive":{"post":{"tags":["Queries"],"summary":"Unarchive Simple Query","operationId":"unarchive_simple_query","parameters":[{"name":"query_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Query Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queries/query":{"post":{"tags":["Queries"],"summary":"Query Simple Queries","operationId":"query_simple_queries","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueryQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/folders/":{"post":{"tags":["Folders"],"summary":"Create Folder","description":"Create a folder.\n\nThe folder name must match `[\\w -]+` (letters, digits, underscore,\nspace, hyphen); other characters return `400`. The resulting path\n(the slug joined to the parent's path with a dot) must be unique\nwithin the project, otherwise the call returns `409`. Passing a\n`parent_id` that does not exist returns `404`. Paths are capped at\n10 levels of nesting and slugs at 64 characters.","operationId":"create_folder","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/folders/{folder_id}":{"get":{"tags":["Folders"],"summary":"Fetch Folder","description":"Fetch one folder by id.\n\nReturns a single `folder` envelope. If the folder does not exist in\nthe caller's project, `count` is `0` and `folder` is omitted.","operationId":"fetch_folder","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Folders"],"summary":"Edit Folder","description":"Rename or move a folder.\n\nUse this endpoint to change a folder's `slug`, `name`, or\n`parent_id`. The `id` in the request body must match the path\nparameter or the call returns `400`. Name and path-uniqueness rules\nfrom create apply: invalid names return `400`, a path collision\nreturns `409`, and a missing `parent_id` returns `404`.","operationId":"edit_folder","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Folders"],"summary":"Delete Folder","description":"Delete a folder and every descendant.\n\nRemoves the folder identified by `folder_id` together with every\nfolder beneath it, in a single transaction. Deletion is\nunconditional; there is no archive or unarchive step. Resources\nthat were assigned to any of the removed folders continue to\nexist and are no longer reachable through the deleted folder.","operationId":"delete_folder","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/folders/query":{"post":{"tags":["Folders"],"summary":"Query Folders","description":"Filter folders inside the caller's project.\n\nFollows the general response envelope described in the\n[Query Pattern](/reference/api-guide/query-pattern) guide, but\ndoes not accept `windowing` or `include_archived` — folders are\nhard-deleted and the response always returns the full filtered\nset. Filters include `id`/`ids`, `slug`/`slugs`, `kind`/`kinds`,\n`parent_id`/`parent_ids` (use `parent_id: null` for root folders),\n`path`/`paths`, and `prefix`/`prefixes` for subtree lookup.","operationId":"query_folders","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoldersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/catalog/types/":{"get":{"tags":["Applications"],"summary":"List Application Catalog Types","description":"List shared catalog types.\n\nCatalog types are reusable JSON-Schema building blocks referenced from\ntemplate schemas (for example `message`, `prompt-template`). Types are\nread-only and version with the product.\nSee the [Applications guide](/reference/api-guide/applications#catalog).","operationId":"list_application_catalog_types","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCatalogTypesResponse"}}}}}}},"/applications/catalog/templates/":{"get":{"tags":["Applications"],"summary":"List Application Catalog Templates","description":"List application templates available in the catalog.\n\nTemplates describe the handler (`uri`) and JSON schemas used to create\na new application. Pass `include_archived=true` to include retired\ntemplates (useful when editing applications created from an old\ntemplate). Templates are global and read-only.","operationId":"list_application_catalog_templates","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCatalogTemplatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/catalog/templates/{template_key}":{"get":{"tags":["Applications"],"summary":"Fetch Application Catalog Template","description":"Fetch one application template by key.\n\nUse this to inspect the exact `uri`, `data`, and JSON Schemas for a\ntemplate before creating an application from it. `template_key` comes\nfrom the `key` field of a template returned by the list endpoint\n(for example `completion`, `chat`, `hook`).","operationId":"fetch_application_catalog_template","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCatalogTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/catalog/templates/{template_key}/presets/":{"get":{"tags":["Applications"],"summary":"List Application Catalog Presets","description":"List presets scoped to a template.\n\nPresets are named parameter sets (for example a curated prompt +\nmodel combination) that scaffold the first revision when creating an\napplication from a template. Pass `include_archived=true` to include\nretired presets.","operationId":"list_application_catalog_presets","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCatalogPresetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/catalog/templates/{template_key}/presets/{preset_key}":{"get":{"tags":["Applications"],"summary":"Fetch Application Catalog Preset","description":"Fetch one preset by key within a template.\n\nReturns the preset's `data` so clients can use it as the payload for a\nfirst revision when creating an application from a template.","operationId":"fetch_application_catalog_preset","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"preset_key","in":"path","required":true,"schema":{"type":"string","title":"Preset Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCatalogPresetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/":{"post":{"tags":["Applications"],"summary":"Create Application","description":"Create an application artifact only.\n\nReturns an empty application without any variants or revisions.\nMost callers should use `POST /simple/applications/` instead — it\ncreates the artifact, a default variant, and a first committed\nrevision in one request.\nSee the [Applications guide](/reference/api-guide/applications).","operationId":"create_application","parameters":[{"name":"application_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/{application_id}":{"get":{"tags":["Applications"],"summary":"Fetch Application","description":"Fetch one application artifact by ID.\n\nReturns artifact-level fields only. To get the current variant,\nrevision, and `data` in a single call, use\n`GET /simple/applications/{application_id}`.","operationId":"fetch_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Applications"],"summary":"Edit Application","description":"Edit artifact-level fields on an application.\n\nEditable fields: `description`, `flags`, `tags`, `meta`. Editing `name`\nis currently disabled and returns `400`. Prompt or model-parameter\nchanges go through `POST /applications/revisions/commit`, not this\nendpoint.","operationId":"edit_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/{application_id}/archive":{"post":{"tags":["Applications"],"summary":"Archive Application","description":"Soft-delete an application.\n\nArchiving sets `deleted_at` on the application and hides it from\nqueries that don't set `include_archived: true`. Its variants and\nrevisions become unreachable from listing but their IDs remain\nresolvable so historical traces stay intact.\nSee [Versioning](/reference/api-guide/versioning#archive-and-unarchive).","operationId":"archive_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/{application_id}/unarchive":{"post":{"tags":["Applications"],"summary":"Unarchive Application","description":"Restore a previously archived application.\n\nClears `deleted_at` and makes the application visible to standard\nqueries again. Safe to call on an already-active application; it is a\nno-op in that case.","operationId":"unarchive_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/query":{"post":{"tags":["Applications"],"summary":"Query Applications","description":"Query application artifacts.\n\nReturns only artifact-level fields; the variant, revision, and `data`\npayload are not included. For one row per application with those\nmerged in, use `POST /simple/applications/query`.\nSee [Query Pattern](/reference/api-guide/query-pattern).","operationId":"query_applications","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/":{"post":{"tags":["Applications"],"summary":"Create Application Variant","description":"Create a new variant on an existing application.\n\nA variant is an independent branch of the application's history. The\nnew variant starts empty — call `POST /applications/revisions/commit`\nto add its first revision. Use `POST /applications/variants/fork` when\nyou want the new variant to inherit an existing revision history.","operationId":"create_application_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/{application_variant_id}":{"get":{"tags":["Applications"],"summary":"Fetch Application Variant","description":"Fetch one variant by ID.\n\nReturns variant-level fields. To get the variant's tip revision and\nits `data`, call `POST /applications/revisions/retrieve` with\n`application_variant_ref`.","operationId":"fetch_application_variant","parameters":[{"name":"application_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Applications"],"summary":"Edit Application Variant","description":"Edit a variant's header fields (`name`, `description`, `tags`, `meta`).\n\nConfiguration changes go through a new commit via\n`POST /applications/revisions/commit`. This endpoint only touches\nvariant-level metadata.","operationId":"edit_application_variant","parameters":[{"name":"application_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/{application_variant_id}/archive":{"post":{"tags":["Applications"],"summary":"Archive Application Variant","description":"Soft-delete a variant.\n\nThe variant and its revisions are hidden from queries unless\n`include_archived: true` is sent. Revision IDs remain resolvable so\nhistorical traces are preserved.","operationId":"archive_application_variant","parameters":[{"name":"application_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/{application_variant_id}/unarchive":{"post":{"tags":["Applications"],"summary":"Unarchive Application Variant","description":"Restore a previously archived variant.","operationId":"unarchive_application_variant","parameters":[{"name":"application_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/query":{"post":{"tags":["Applications"],"summary":"Query Application Variants","description":"Query variants across one or more applications.\n\nFilters are parsed from both query-string parameters and the request\nbody; body values take precedence. Use `application_refs` to scope to\nspecific applications, `application_variant_refs` to narrow to\nspecific variants.\nSee [Query Pattern](/reference/api-guide/query-pattern).","operationId":"query_application_variants","parameters":[{"name":"application_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"}},{"name":"application_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Application Ids"}},{"name":"application_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Slug"}},{"name":"application_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Application Slugs"}},{"name":"application_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"}},{"name":"application_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Application Variant Ids"}},{"name":"application_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Variant Slug"}},{"name":"application_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Application Variant Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/variants/fork":{"post":{"tags":["Applications"],"summary":"Fork Application Variant","description":"Fork an existing variant into a new variant on the same application.\n\nUse this to experiment without touching the source variant's history.\nThe fork copies the source variant's revisions up to the specified\nrevision (or tip) into the new variant, then commits the supplied\n`revision` object on top. Both `variant` and `revision` sub-objects\nin the request must be present; the server returns `count: 0` when\neither is missing. Returns `400 Bad Request` if the fork target is\ninvalid (for example, the source variant or revision cannot be\nlocated in this application's lineage).","operationId":"fork_application_variant","parameters":[{"name":"application_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationForkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/retrieve":{"post":{"tags":["Applications"],"summary":"Retrieve Application Revision","description":"Retrieve one application revision by reference.\n\nAccepts application / variant / revision references for direct lookup,\nor an environment reference (with optional `key`) to resolve the\ncurrently-deployed revision in that environment. Returns the revision\nincluding its `data` payload (URL, parameters, schemas), which clients\nuse to invoke the application.\nSet `resolve: true` to inline embedded references inside `data`.","operationId":"retrieve_application_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/deploy":{"post":{"tags":["Applications"],"summary":"Deploy Application Revision","description":"Deploy an application revision to an environment.\n\nWrites a reference from the environment revision to the application\nrevision under `key` (default: `{application_slug}.revision`). Clients\nthat subsequently call `/applications/revisions/retrieve` with the\nsame `environment_ref` and `key` resolve to this revision.\nSee the [Applications guide](/reference/api-guide/applications#deployment).","operationId":"deploy_application_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionDeployRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/":{"post":{"tags":["Applications"],"summary":"Create Application Revision","description":"Create a revision row directly, without the commit workflow.\n\nAdvanced use only. For normal development loops prefer\n`POST /applications/revisions/commit`, which commits the new revision\nas the variant's tip and assigns a version number.","operationId":"create_application_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/{application_revision_id}":{"get":{"tags":["Applications"],"summary":"Fetch Application Revision","description":"Fetch one revision by its ID.\n\nReturns the revision including its `data` payload. For lookup by\nvariant slug or environment, use `POST /applications/revisions/retrieve`.","operationId":"fetch_application_revision","parameters":[{"name":"application_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Applications"],"summary":"Edit Application Revision","description":"Edit a revision's header fields only.\n\nRevisions are immutable snapshots; `data`, `author`, `date`, and\n`message` cannot be changed. This endpoint updates header fields such\nas `description` and `tags`. To change configuration, commit a new\nrevision with `POST /applications/revisions/commit`.","operationId":"edit_application_revision","parameters":[{"name":"application_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/{application_revision_id}/archive":{"post":{"tags":["Applications"],"summary":"Archive Application Revision","description":"Soft-delete a revision.\n\nArchived revisions are hidden from `/query` and `/log` responses\nunless `include_archived: true` is set. The ID remains resolvable for\ntraces and deployed environment references.","operationId":"archive_application_revision","parameters":[{"name":"application_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/{application_revision_id}/unarchive":{"post":{"tags":["Applications"],"summary":"Unarchive Application Revision","description":"Restore a previously archived revision.","operationId":"unarchive_application_revision","parameters":[{"name":"application_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/query":{"post":{"tags":["Applications"],"summary":"Query Application Revisions","description":"Query revisions across one or more applications or variants.\n\nUse `application_refs` / `application_variant_refs` to scope the\nquery, or filter on commit metadata (`author`, `date`, `message`) via\nthe `application_revision` object. For the ordered history of a\nsingle variant, `POST /applications/revisions/log` is more direct.\nSet `resolve: true` to inline embedded references in each revision's\n`data`.","operationId":"query_application_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/commit":{"post":{"tags":["Applications"],"summary":"Commit Application Revision","description":"Commit a new revision on a variant.\n\nThe new revision becomes the variant's tip and is assigned the next\n`version` number. Revisions are immutable once committed; to change\nconfiguration, commit a new revision.\nSee [Versioning](/reference/api-guide/versioning#committing-a-revision).","operationId":"commit_application_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/log":{"post":{"tags":["Applications"],"summary":"Log Application Revisions","description":"Return the ordered revision log for a variant.\n\nPass `application_variant_id` to list the full history of that\nvariant; optionally pass `application_revision_id` + `depth` to walk\nback a bounded number of commits from a specific revision. Entries\nare returned newest-first and include the full revision record.","operationId":"log_application_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/applications/revisions/resolve":{"post":{"tags":["Applications"],"summary":"Resolve Application Revision","description":"Fetch a revision with embedded references inlined.\n\nWhen a revision's `data` carries references to other entities\n(snippets, linked revisions), this endpoint resolves them in place and\nreturns the fully-inlined configuration along with `resolution_info`\ndescribing what was substituted. Use it when clients need a\nself-contained configuration for invocation or export.","operationId":"resolve_application_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRevisionResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/applications/":{"post":{"tags":["Applications"],"summary":"Create Simple Application","description":"Create an application end-to-end.\n\nCreates the application artifact, a default variant, and a first\ncommitted revision whose `data` comes from the request. This is the\nrecommended entry point for \"spin up a new application from a\ntemplate\". For more control over variant and revision creation, use\nthe structured endpoints under `/applications/`.\nSee [Simple Endpoints](/reference/api-guide/simple-endpoints).","operationId":"create_simple_application","parameters":[{"name":"application_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/applications/query":{"post":{"tags":["Applications"],"summary":"Query Simple Applications","description":"Query applications with variant, revision, and `data` merged per row.\n\nThis is the shape most clients want for dashboards or invocation\npickers: each row carries `variant_id`, `revision_id`, and `data`\n(URL, parameters, schemas) alongside the artifact fields. For the\nstructured query that returns artifacts only, use\n`POST /applications/query`.","operationId":"query_simple_applications","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/applications/{application_id}":{"get":{"tags":["Applications"],"summary":"Fetch Simple Application","description":"Fetch one application with its current variant, revision, and `data` merged.\n\nThe returned `data` includes the invocation `url`, the `parameters`\nthe revision was committed with, and the JSON `schemas` for inputs,\noutputs, and parameters.","operationId":"fetch_simple_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Applications"],"summary":"Edit Simple Application","description":"Edit an application and commit a new revision if configuration changed.\n\nFields other than `id` in the request body are treated as changes and\nproduce a new committed revision. Supplying `data` changes the\nconfiguration; supplying only header fields (`flags`, `tags`, `meta`)\nstill produces a new revision with the updated header but the\nexisting `data`. Editing the application `name` is currently\ndisabled and returns `400`.","operationId":"edit_simple_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/applications/{application_id}/archive":{"post":{"tags":["Applications"],"summary":"Archive Simple Application","description":"Archive an application through the simple endpoint layer.\n\nEquivalent to `POST /applications/{application_id}/archive`; returns\nthe archived application in the simple shape (with its last known\nvariant, revision, and `data`).","operationId":"archive_simple_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/applications/{application_id}/unarchive":{"post":{"tags":["Applications"],"summary":"Unarchive Simple Application","description":"Unarchive an application through the simple endpoint layer.\n\nEquivalent to `POST /applications/{application_id}/unarchive`, with\nthe response shape of `/simple/applications/`.","operationId":"unarchive_simple_application","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Application Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleApplicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/catalog/types/":{"get":{"tags":["Workflows"],"summary":"List Workflow Catalog Types","description":"List the shared JSON Schema fragments available to workflow schemas.\n\nWorkflow input/output schemas reference these via `x-ag-type-ref` (for\nexample, `message` or `prompt`). Use this endpoint to discover what\ntype keys exist before building a schema.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"list_workflow_catalog_types","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogTypesResponse"}}}}}}},"/workflows/catalog/types/{ag_type}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Catalog Type","description":"Return the JSON Schema for a single shared type key.\n\nReturns 404 when the `ag_type` is not part of the shipped catalog.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"fetch_workflow_catalog_type","parameters":[{"name":"ag_type","in":"path","required":true,"schema":{"type":"string","title":"Ag Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogTypeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/catalog/templates/":{"get":{"tags":["Workflows"],"summary":"List Workflow Catalog Templates","description":"List workflow blueprints shipped with the product.\n\nFilter by domain with `is_application`, `is_evaluator`, or\n`is_snippet`. Archived templates are hidden unless `include_archived`\nis true. Templates are global and read-only.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"list_workflow_catalog_templates","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"is_application","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"}},{"name":"is_evaluator","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"}},{"name":"is_snippet","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogTemplatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/catalog/templates/{template_key}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Catalog Template","description":"Return a single workflow template by its key.\n\nReturns `count=0` when the template is not found. Templates are global\nmetadata and are not scoped to a project.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"fetch_workflow_catalog_template","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/catalog/templates/{template_key}/presets/":{"get":{"tags":["Workflows"],"summary":"List Workflow Catalog Presets","description":"List presets defined against a template.\n\nPresets are named parameter sets that can be committed as the first\nrevision of a new variant. Returns an empty list when a template has\nno canned presets.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"list_workflow_catalog_presets","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogPresetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/catalog/templates/{template_key}/presets/{preset_key}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Catalog Preset","description":"Return a single preset for a template by key.\n\nReturns `count=0` when the preset is not defined.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"fetch_workflow_catalog_preset","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"preset_key","in":"path","required":true,"schema":{"type":"string","title":"Preset Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCatalogPresetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/":{"post":{"tags":["Workflows"],"summary":"Create Workflow","description":"Create a workflow artifact.\n\nCreates the top-level container only; commit a revision on a variant\nbefore the workflow can be retrieved or invoked. Use when you need the\nlower-level primitive — pick `/applications/` for serving logic or\n`/evaluators/` for scoring logic.\n\nSee: [Workflows](/reference/api-guide/workflows),\n[Versioning](/reference/api-guide/versioning).","operationId":"create_workflow","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow","description":"Fetch a workflow artifact by ID.\n\nReturns the artifact only — variants and revisions are not included.\nUse `/workflows/variants/query` and `/workflows/revisions/query` for\nthe child entities.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"fetch_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Workflows"],"summary":"Edit Workflow","description":"Update artifact-level fields on a workflow.\n\nThe `id` in the body must match the path parameter. Only supplied\nfields are modified. Configuration (parameters, URL, schemas) lives on\nrevisions — commit a new revision to change those.\n\nSee: [Workflows](/reference/api-guide/workflows),\n[Versioning](/reference/api-guide/versioning).","operationId":"edit_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}/archive":{"post":{"tags":["Workflows"],"summary":"Archive Workflow","description":"Archive a workflow artifact (soft delete).\n\nSets `deleted_at` on the workflow and its variants. Archived\nworkflows are hidden from queries unless `include_archived=true`.\nRevision IDs remain resolvable so historical traces stay intact.\n\nSee: [Versioning](/reference/api-guide/versioning).","operationId":"archive_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}/unarchive":{"post":{"tags":["Workflows"],"summary":"Unarchive Workflow","description":"Restore a previously archived workflow.\n\nClears `deleted_at` on the workflow. Archived variants and revisions\nare restored with the workflow.\n\nSee: [Versioning](/reference/api-guide/versioning).","operationId":"unarchive_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/query":{"post":{"tags":["Workflows"],"summary":"Query Workflows","description":"Query workflow artifacts with filters and pagination.\n\nAccepts the same filters as query parameters or in the request body;\nbody fields win when both are supplied. Results are ordered by\ncreation time; pass `windowing.next` back for the following page.\n\nSee: [Query Pattern](/reference/api-guide/query-pattern).","operationId":"query_workflows","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}},{"name":"workflow_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Ids"}},{"name":"workflow_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Slug"}},{"name":"workflow_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/":{"post":{"tags":["Workflows"],"summary":"Create Workflow Variant","description":"Create a new variant under an existing workflow.\n\nVariants are branches of an artifact's history; each maintains its own\nrevision log. Variant slugs are unique within the project — reuse of a\nslug already in use returns a 409 conflict.\n\nSee: [Versioning](/reference/api-guide/versioning).","operationId":"create_workflow_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/{workflow_variant_id}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Variant","description":"Fetch a workflow variant by ID.\n\nReturns the variant metadata only — use\n`/workflows/revisions/retrieve` or `/workflows/revisions/log` for the\nvariant's revisions.\n\nSee: [Workflows](/reference/api-guide/workflows).","operationId":"fetch_workflow_variant","parameters":[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Workflows"],"summary":"Edit Workflow Variant","description":"Update metadata on a workflow variant.\n\nThe `id` in the body must match the path parameter. Revisions on the\nvariant are not affected — commit a new revision to change data.\n\nSee: [Versioning](/reference/api-guide/versioning).","operationId":"edit_workflow_variant","parameters":[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/{workflow_variant_id}/archive":{"post":{"tags":["Workflows"],"summary":"Archive Workflow Variant","description":"Archive a workflow variant.\n\nSoft-deletes the variant and its revisions. Archived variants are\nhidden from queries unless `include_archived=true`. See\n[Versioning](/reference/api-guide/versioning).","operationId":"archive_workflow_variant","parameters":[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/{workflow_variant_id}/unarchive":{"post":{"tags":["Workflows"],"summary":"Unarchive Workflow Variant","description":"Restore a previously archived workflow variant.\n\nClears `deleted_at` on the variant and its revisions. See\n[Versioning](/reference/api-guide/versioning).","operationId":"unarchive_workflow_variant","parameters":[{"name":"workflow_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/query":{"post":{"tags":["Workflows"],"summary":"Query Workflow Variants","description":"Query workflow variants with filters and pagination.\n\nScope the query by `workflow_refs` (parent artifact) or\n`workflow_variant_refs` (specific variants). Accepts the same fields\nas query parameters or in the request body.\n\nSee: [Query Pattern](/reference/api-guide/query-pattern).","operationId":"query_workflow_variants","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}},{"name":"workflow_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Ids"}},{"name":"workflow_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Slug"}},{"name":"workflow_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Slugs"}},{"name":"workflow_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"}},{"name":"workflow_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Variant Ids"}},{"name":"workflow_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Variant Slug"}},{"name":"workflow_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Variant Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/variants/fork":{"post":{"tags":["Workflows"],"summary":"Fork Workflow Variant","operationId":"fork_workflow_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowForkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/retrieve":{"post":{"tags":["Workflows"],"summary":"Retrieve Workflow Revision","operationId":"retrieve_workflow_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/deploy":{"post":{"tags":["Workflows"],"summary":"Deploy Workflow Revision","operationId":"deploy_workflow_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionDeployRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/":{"post":{"tags":["Workflows"],"summary":"Create Workflow Revision","operationId":"create_workflow_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/{workflow_revision_id}":{"get":{"tags":["Workflows"],"summary":"Fetch Workflow Revision","operationId":"fetch_workflow_revision","parameters":[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Workflows"],"summary":"Edit Workflow Revision","operationId":"edit_workflow_revision","parameters":[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/{workflow_revision_id}/archive":{"post":{"tags":["Workflows"],"summary":"Archive Workflow Revision","operationId":"archive_workflow_revision","parameters":[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/{workflow_revision_id}/unarchive":{"post":{"tags":["Workflows"],"summary":"Unarchive Workflow Revision","operationId":"unarchive_workflow_revision","parameters":[{"name":"workflow_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/query":{"post":{"tags":["Workflows"],"summary":"Query Workflow Revisions","operationId":"query_workflow_revisions","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}},{"name":"workflow_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Ids"}},{"name":"workflow_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Slug"}},{"name":"workflow_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Slugs"}},{"name":"workflow_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"}},{"name":"workflow_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Variant Ids"}},{"name":"workflow_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Variant Slug"}},{"name":"workflow_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Variant Slugs"}},{"name":"workflow_revision_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"}},{"name":"workflow_revision_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Workflow Revision Ids"}},{"name":"workflow_revision_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Revision Slug"}},{"name":"workflow_revision_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Revision Slugs"}},{"name":"workflow_revision_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Revision Version"}},{"name":"workflow_revision_versions","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Workflow Revision Versions"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/commit":{"post":{"tags":["Workflows"],"summary":"Commit Workflow Revision","operationId":"commit_workflow_revision","parameters":[{"name":"workflow_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionCommitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/log":{"post":{"tags":["Workflows"],"summary":"Log Workflow Revisions","operationId":"log_workflow_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/revisions/resolve":{"post":{"tags":["Workflows"],"summary":"Resolve Workflow Revision Endpoint","description":"Resolve embedded references in a workflow revision configuration.\n\nThis endpoint:\n1. Fetches the workflow revision\n2. Resolves all @ag.references tokens in the configuration\n3. Returns the revision with resolved configuration + metadata","operationId":"resolve_workflow_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRevisionResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/workflows/":{"post":{"tags":["Workflows"],"summary":"Create Simple Workflow","operationId":"create_simple_workflow","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/workflows/{workflow_id}":{"get":{"tags":["Workflows"],"summary":"Fetch Simple Workflow","operationId":"fetch_simple_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Workflows"],"summary":"Edit Simple Workflow","operationId":"edit_simple_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/workflows/{workflow_id}/archive":{"post":{"tags":["Workflows"],"summary":"Archive Simple Workflow","operationId":"archive_simple_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/workflows/{workflow_id}/unarchive":{"post":{"tags":["Workflows"],"summary":"Unarchive Simple Workflow","operationId":"unarchive_simple_workflow","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/workflows/query":{"post":{"tags":["Workflows"],"summary":"Query Simple Workflows","operationId":"query_simple_workflows","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleWorkflowsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/catalog/types/":{"get":{"tags":["Evaluators"],"summary":"List Evaluator Catalog Types","description":"List the JSON schema types the evaluator catalog understands.\n\nTypes are static metadata shipped with the product. Use this when\nrendering a catalog UI or validating that a template's schema is\nsupported. See the Evaluators guide for how the catalog relates\nto user-owned evaluator artifacts.","operationId":"list_evaluator_catalog_types","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCatalogTypesResponse"}}}}}}},"/evaluators/catalog/templates/":{"get":{"tags":["Evaluators"],"summary":"List Evaluator Catalog Templates","description":"List evaluator templates from the catalog.\n\nTemplates are blueprints that describe an evaluator's handler\nURI, JSON schemas, and default configuration. Pass\n`include_archived=true` to include deprecated templates. Use the\nreturned `key` with `/catalog/templates/{template_key}/presets/`\nto list its presets.","operationId":"list_evaluator_catalog_templates","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCatalogTemplatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/catalog/templates/{template_key}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator Catalog Template","description":"Fetch one evaluator template by key.\n\nReturns an empty envelope (`count: 0`) when no template matches\nthe key. Template keys come from\n`GET /catalog/templates/`.","operationId":"fetch_evaluator_catalog_template","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCatalogTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/catalog/templates/{template_key}/presets/":{"get":{"tags":["Evaluators"],"summary":"List Evaluator Catalog Presets","description":"List presets defined against one evaluator template.\n\nA preset is a named set of parameter values pre-filled against\nthe template. Use the returned `key` to fetch a specific preset\nvia `GET /catalog/templates/{template_key}/presets/{preset_key}`.","operationId":"list_evaluator_catalog_presets","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCatalogPresetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/catalog/templates/{template_key}/presets/{preset_key}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator Catalog Preset","description":"Fetch one evaluator preset by template and preset key.\n\nPresets are not separate entities; they are metadata. Use the\nreturned preset payload as the starting point when creating a\nnew evaluator from a template. See the Evaluators guide.","operationId":"fetch_evaluator_catalog_preset","parameters":[{"name":"template_key","in":"path","required":true,"schema":{"type":"string","title":"Template Key"}},{"name":"preset_key","in":"path","required":true,"schema":{"type":"string","title":"Preset Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCatalogPresetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/":{"post":{"tags":["Evaluators"],"summary":"Create Evaluator","description":"Create an evaluator artifact, its first variant, and its initial revision.\n\nUse this endpoint when you already know you want to manage the\nartifact / variant / revision layers independently. For a\none-shot \"create and forget\" call that returns a flat record,\nsee `POST /simple/evaluators/`. See the Versioning guide for\ncommit semantics.","operationId":"create_evaluator","parameters":[{"name":"evaluator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/{evaluator_id}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator","description":"Fetch an evaluator artifact by id.\n\nReturns the artifact-level record (slug, name, flags, lifecycle)\nwithout variant or revision data. Use the variant and revision\nendpoints to retrieve those layers.","operationId":"fetch_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Evaluators"],"summary":"Edit Evaluator","description":"Edit an evaluator artifact's metadata.\n\nEdits are limited to metadata fields (description, tags, meta).\nRenaming is temporarily disabled and returns 400. To change\nevaluator behavior, commit a new revision on the variant — see\n`/evaluators/revisions/commit`.","operationId":"edit_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/{evaluator_id}/archive":{"post":{"tags":["Evaluators"],"summary":"Archive Evaluator","description":"Soft-delete an evaluator artifact.\n\nSets `deleted_at` on the evaluator and hides it from subsequent\n`/query` responses unless `include_archived=true`. Revision IDs\nremain resolvable so historical traces stay intact.","operationId":"archive_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/{evaluator_id}/unarchive":{"post":{"tags":["Evaluators"],"summary":"Unarchive Evaluator","description":"Restore a soft-deleted evaluator artifact.\n\nClears `deleted_at` on the evaluator so it re-appears in `/query`\nresponses.","operationId":"unarchive_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/query":{"post":{"tags":["Evaluators"],"summary":"Query Evaluators","description":"Query evaluator artifacts with filters and pagination.\n\nReturns artifact-level records only. The request body follows\nthe shared query pattern (filter + refs + windowing). Send `{}`\nto list all evaluators in the project. See the Query Pattern\nguide.","operationId":"query_evaluators","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/":{"post":{"tags":["Evaluators"],"summary":"Create Evaluator Variant","description":"Create a new variant on an existing evaluator.\n\nA variant is a named branch of the evaluator's history. New\nrevisions committed to this variant do not touch other variants.\nSee the Versioning guide.","operationId":"create_evaluator_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/{evaluator_variant_id}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator Variant","description":"Fetch an evaluator variant by id.\n\nReturns the variant record (slug, flags, lifecycle) without the\ncommitted revisions. Use `/evaluators/revisions/retrieve` to\nread the variant's current revision payload.","operationId":"fetch_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Evaluators"],"summary":"Edit Evaluator Variant","description":"Edit a variant's metadata.\n\nEdits only touch variant-level metadata. To change evaluator\nbehavior commit a new revision via\n`/evaluators/revisions/commit`.","operationId":"edit_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/{evaluator_variant_id}/archive":{"post":{"tags":["Evaluators"],"summary":"Archive Evaluator Variant","description":"Soft-delete an evaluator variant.\n\nSets `deleted_at` on the variant. Its revisions stay resolvable\nby id; they are hidden from `/query` unless the caller sets\n`include_archived=true`.","operationId":"archive_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/{evaluator_variant_id}/unarchive":{"post":{"tags":["Evaluators"],"summary":"Unarchive Evaluator Variant","description":"Restore a soft-deleted evaluator variant.","operationId":"unarchive_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/query":{"post":{"tags":["Evaluators"],"summary":"Query Evaluator Variants","description":"Query evaluator variants with filters, reference scoping, and pagination.\n\nAccepts parameters from both the query string and a JSON body;\nthe two are merged. Use `evaluator_refs` to scope to one or more\nevaluators, or `evaluator_variant_refs` for specific variants.","operationId":"query_evaluator_variants","parameters":[{"name":"evaluator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"}},{"name":"evaluator_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Evaluator Ids"}},{"name":"evaluator_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Slug"}},{"name":"evaluator_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Evaluator Slugs"}},{"name":"evaluator_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"}},{"name":"evaluator_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Evaluator Variant Ids"}},{"name":"evaluator_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evaluator Variant Slug"}},{"name":"evaluator_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Evaluator Variant Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flags"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/variants/fork":{"post":{"tags":["Evaluators"],"summary":"Fork Evaluator Variant","description":"Fork an evaluator variant into a new variant.\n\nCreates a new branch whose initial revision is copied from the\nsource. Use this to experiment without touching the original.\nThe returned variant has a fresh id and slug but inherits\nlineage metadata from its source.","operationId":"fork_evaluator_variant","parameters":[{"name":"evaluator_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorForkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/retrieve":{"post":{"tags":["Evaluators"],"summary":"Retrieve Evaluator Revision","description":"Retrieve one evaluator revision, either directly or via an environment key.\n\nProvide one of:\nan evaluator / variant / revision reference (returns that\nrevision, or the latest revision on the variant or evaluator),\nor an environment reference plus `key` (returns the revision\ncurrently pinned to that key). Supplying both forms returns 400.\nPass `resolve=true` to expand embedded references on the\nreturned payload.","operationId":"retrieve_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/deploy":{"post":{"tags":["Evaluators"],"summary":"Deploy Evaluator Revision","description":"Pin an evaluator revision into an environment revision under a key.\n\nRequires an evaluator ref (`evaluator_ref`,\n`evaluator_variant_ref`, or `evaluator_revision_ref`) and an\nenvironment ref. When `key` is omitted it defaults to\n`.revision`. The deployment is recorded as a\nnew commit on the environment revision. See the Evaluators\nguide for the deployment model.","operationId":"deploy_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionDeployRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/":{"post":{"tags":["Evaluators"],"summary":"Create Evaluator Revision","description":"Create a new revision on an evaluator variant.\n\nPrefer `/evaluators/revisions/commit` for the standard commit\nflow. This endpoint exists for internal create paths that need\nto insert a revision without the commit semantics.","operationId":"create_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/{evaluator_revision_id}":{"get":{"tags":["Evaluators"],"summary":"Fetch Evaluator Revision","description":"Fetch a specific evaluator revision by id.\n\nReturns the full revision including `data` (handler uri,\nschemas, and parameters). To pick the latest revision on a\nvariant without knowing its id, use\n`/evaluators/revisions/retrieve`.","operationId":"fetch_evaluator_revision","parameters":[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Evaluators"],"summary":"Edit Evaluator Revision","description":"Edit a revision's metadata.\n\nRevision `data` is immutable once committed. This endpoint is\nfor metadata fields only (description, tags, meta). To change\nevaluator behavior, commit a new revision instead.","operationId":"edit_evaluator_revision","parameters":[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/{evaluator_revision_id}/archive":{"post":{"tags":["Evaluators"],"summary":"Archive Evaluator Revision","description":"Soft-delete an evaluator revision.\n\nArchived revisions remain resolvable by id but are excluded from\nrevision logs and queries unless `include_archived=true`.","operationId":"archive_evaluator_revision","parameters":[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/{evaluator_revision_id}/unarchive":{"post":{"tags":["Evaluators"],"summary":"Unarchive Evaluator Revision","description":"Restore a soft-deleted evaluator revision.","operationId":"unarchive_evaluator_revision","parameters":[{"name":"evaluator_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/query":{"post":{"tags":["Evaluators"],"summary":"Query Evaluator Revisions","description":"Query evaluator revisions with filters, reference scoping, and pagination.\n\nReturns revision payloads. Use `evaluator_refs`,\n`evaluator_variant_refs`, or `evaluator_revision_refs` to scope\nthe query. Pass `resolve=true` to expand embedded references on\neach revision's `data`.","operationId":"query_evaluator_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/commit":{"post":{"tags":["Evaluators"],"summary":"Commit Evaluator Revision","description":"Commit a new revision on an evaluator variant.\n\nThe commit body carries the target `evaluator_variant_id`, an\noptional `message`, and the revision `data` (handler uri,\nschemas, parameters). A committed revision is immutable.","operationId":"commit_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/log":{"post":{"tags":["Evaluators"],"summary":"Log Evaluator Revisions","description":"List the revision log of an evaluator variant.\n\nReturns revisions in commit order. Scope the log by supplying\nan evaluator, variant, or revision reference. Use the retrieve\nendpoint to fetch a specific revision's full payload.","operationId":"log_evaluator_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluators/revisions/resolve":{"post":{"tags":["Evaluators"],"summary":"Resolve Evaluator Revision","description":"Resolve embedded references on an evaluator revision's `data`.\n\nWalks embedded references (for example, references to other\nrevisions or to secrets) up to `max_depth` and `max_embeds`.\nThe response includes a `resolution_info` block with counts,\ndepth reached, and errors according to `error_policy`.","operationId":"resolve_evaluator_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorRevisionResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/":{"post":{"tags":["Evaluators"],"summary":"Create Simple Evaluator","description":"Create an evaluator via the simple surface.\n\nCreates the artifact, its first variant, and its initial\nrevision in one call. Returns the flat evaluator record\n(latest revision merged into `data`). Use this when you do not\nneed to manage variants or revisions directly.","operationId":"create_simple_evaluator","parameters":[{"name":"evaluator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/templates":{"get":{"tags":["Evaluators"],"summary":"List Evaluator Templates","description":"List the legacy built-in evaluator templates.\n\nReturns static evaluator-type definitions shipped with the\nproduct. Prefer the `/evaluators/catalog/*` endpoints for new\nintegrations; this endpoint is kept for older clients. Pass\n`include_archived=true` to include deprecated templates.","operationId":"list_evaluator_templates","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorTemplatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/{evaluator_id}":{"get":{"tags":["Evaluators"],"summary":"Fetch Simple Evaluator","description":"Fetch one evaluator via the simple surface.\n\nReturns the flat evaluator record including its current variant\nand revision ids and the merged `data` payload.","operationId":"fetch_simple_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Evaluators"],"summary":"Edit Simple Evaluator","description":"Edit an evaluator via the simple surface.\n\nTouches metadata and (when `data` is supplied) commits a new\nrevision on the evaluator's variant. Renaming is temporarily\ndisabled and returns 400.","operationId":"edit_simple_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/{evaluator_id}/archive":{"post":{"tags":["Evaluators"],"summary":"Archive Simple Evaluator","description":"Soft-delete an evaluator via the simple surface.\n\nArchives the underlying artifact. Historical traces that\nreference specific revision ids remain resolvable.","operationId":"archive_simple_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/{evaluator_id}/unarchive":{"post":{"tags":["Evaluators"],"summary":"Unarchive Simple Evaluator","description":"Restore a soft-deleted evaluator via the simple surface.","operationId":"unarchive_simple_evaluator","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluators/query":{"post":{"tags":["Evaluators"],"summary":"Query Simple Evaluators","description":"Query evaluators via the simple surface with filters and pagination.\n\nReturns flat evaluator records (one per artifact with its\nlatest variant and revision merged into `data`). Send `{}` to\nlist all evaluators in the project. See the Query Pattern\nguide.","operationId":"query_simple_evaluators","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluatorsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/":{"post":{"tags":["Environments"],"summary":"Create Environment","operationId":"create_environment","parameters":[{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/{environment_id}":{"get":{"tags":["Environments"],"summary":"Fetch Environment","operationId":"fetch_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Environments"],"summary":"Edit Environment","operationId":"edit_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/{environment_id}/archive":{"post":{"tags":["Environments"],"summary":"Archive Environment","operationId":"archive_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/{environment_id}/unarchive":{"post":{"tags":["Environments"],"summary":"Unarchive Environment","operationId":"unarchive_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/query":{"post":{"tags":["Environments"],"summary":"Query Environments","operationId":"query_environments","parameters":[{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"}},{"name":"environment_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Ids"}},{"name":"environment_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Slug"}},{"name":"environment_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/variants/":{"post":{"tags":["Environments"],"summary":"Create Environment Variant","operationId":"create_environment_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/variants/{environment_variant_id}":{"get":{"tags":["Environments"],"summary":"Fetch Environment Variant","operationId":"fetch_environment_variant","parameters":[{"name":"environment_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Environments"],"summary":"Edit Environment Variant","operationId":"edit_environment_variant","parameters":[{"name":"environment_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/variants/{environment_variant_id}/archive":{"post":{"tags":["Environments"],"summary":"Archive Environment Variant","operationId":"archive_environment_variant","parameters":[{"name":"environment_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/variants/{environment_variant_id}/unarchive":{"post":{"tags":["Environments"],"summary":"Unarchive Environment Variant","operationId":"unarchive_environment_variant","parameters":[{"name":"environment_variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/variants/query":{"post":{"tags":["Environments"],"summary":"Query Environment Variants","operationId":"query_environment_variants","parameters":[{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"}},{"name":"environment_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Ids"}},{"name":"environment_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Slug"}},{"name":"environment_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Slugs"}},{"name":"environment_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"}},{"name":"environment_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Variant Ids"}},{"name":"environment_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Variant Slug"}},{"name":"environment_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Variant Slugs"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentVariantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/retrieve":{"post":{"tags":["Environments"],"summary":"Retrieve Environment Revision","operationId":"retrieve_environment_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionRetrieveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/":{"post":{"tags":["Environments"],"summary":"Create Environment Revision","operationId":"create_environment_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/{environment_revision_id}":{"get":{"tags":["Environments"],"summary":"Fetch Environment Revision","operationId":"fetch_environment_revision","parameters":[{"name":"environment_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Environments"],"summary":"Edit Environment Revision","operationId":"edit_environment_revision","parameters":[{"name":"environment_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/{environment_revision_id}/archive":{"post":{"tags":["Environments"],"summary":"Archive Environment Revision","operationId":"archive_environment_revision","parameters":[{"name":"environment_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/{environment_revision_id}/unarchive":{"post":{"tags":["Environments"],"summary":"Unarchive Environment Revision","operationId":"unarchive_environment_revision","parameters":[{"name":"environment_revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/query":{"post":{"tags":["Environments"],"summary":"Query Environment Revisions","operationId":"query_environment_revisions","parameters":[{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"}},{"name":"environment_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Ids"}},{"name":"environment_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Slug"}},{"name":"environment_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Slugs"}},{"name":"environment_variant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"}},{"name":"environment_variant_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Variant Ids"}},{"name":"environment_variant_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Variant Slug"}},{"name":"environment_variant_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Variant Slugs"}},{"name":"environment_revision_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Revision Id"}},{"name":"environment_revision_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Environment Revision Ids"}},{"name":"environment_revision_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Revision Slug"}},{"name":"environment_revision_slugs","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Revision Slugs"}},{"name":"environment_revision_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Revision Version"}},{"name":"environment_revision_versions","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Revision Versions"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"}},{"name":"meta","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"}},{"name":"include_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"}},{"name":"newest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"}},{"name":"oldest","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"enum":["ascending","descending"],"type":"string"},{"type":"null"}],"title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/commit":{"post":{"tags":["Environments"],"summary":"Commit Environment Revision","operationId":"commit_environment_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/log":{"post":{"tags":["Environments"],"summary":"Log Environment Revisions","operationId":"log_environment_revisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionsLogRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/environments/revisions/resolve":{"post":{"tags":["Environments"],"summary":"Resolve Environment Revision Endpoint","description":"Resolve embedded references in an environment revision configuration.\n\nThis endpoint:\n1. Fetches the environment revision\n2. Resolves all @ag.references tokens in the configuration\n3. Returns the revision with resolved configuration + metadata","operationId":"resolve_environment_revision","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvironmentRevisionResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/":{"post":{"tags":["Environments"],"summary":"Create Simple Environment","operationId":"create_simple_environment","parameters":[{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/{environment_id}":{"get":{"tags":["Environments"],"summary":"Fetch Simple Environment","operationId":"fetch_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Environments"],"summary":"Edit Simple Environment","operationId":"edit_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/{environment_id}/archive":{"post":{"tags":["Environments"],"summary":"Archive Simple Environment","operationId":"archive_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/{environment_id}/unarchive":{"post":{"tags":["Environments"],"summary":"Unarchive Simple Environment","operationId":"unarchive_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/query":{"post":{"tags":["Environments"],"summary":"Query Simple Environments","operationId":"query_simple_environments","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/{environment_id}/guard":{"post":{"tags":["Environments"],"summary":"Guard Simple Environment","operationId":"guard_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/environments/{environment_id}/unguard":{"post":{"tags":["Environments"],"summary":"Unguard Simple Environment","operationId":"unguard_simple_environment","parameters":[{"name":"environment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Environment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEnvironmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/variants/configs/fetch":{"post":{"tags":["Deprecated"],"summary":"Configs Fetch","operationId":"configs_fetch_variants_configs_fetch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_configs_fetch_variants_configs_fetch_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigResponseModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/tools/catalog/providers/":{"get":{"tags":["Tools"],"summary":"List Providers","operationId":"list_tool_providers","parameters":[{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogProvidersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/catalog/providers/{provider_key}":{"get":{"tags":["Tools"],"summary":"Get Provider","operationId":"fetch_tool_provider","parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string","title":"Provider Key"}},{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/catalog/providers/{provider_key}/integrations/":{"get":{"tags":["Tools"],"summary":"List Integrations","operationId":"list_tool_integrations","parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string","title":"Provider Key"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort By"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogIntegrationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/catalog/providers/{provider_key}/integrations/{integration_key}":{"get":{"tags":["Tools"],"summary":"Get Integration","operationId":"fetch_tool_integration","parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string","title":"Provider Key"}},{"name":"integration_key","in":"path","required":true,"schema":{"type":"string","title":"Integration Key"}},{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogIntegrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/catalog/providers/{provider_key}/integrations/{integration_key}/actions/":{"get":{"tags":["Tools"],"summary":"List Actions","operationId":"list_tool_actions","parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string","title":"Provider Key"}},{"name":"integration_key","in":"path","required":true,"schema":{"type":"string","title":"Integration Key"}},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query"}},{"name":"categories","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Categories"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogActionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/catalog/providers/{provider_key}/integrations/{integration_key}/actions/{action_key}":{"get":{"tags":["Tools"],"summary":"Get Action","operationId":"fetch_tool_action","parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string","title":"Provider Key"}},{"name":"integration_key","in":"path","required":true,"schema":{"type":"string","title":"Integration Key"}},{"name":"action_key","in":"path","required":true,"schema":{"type":"string","title":"Action Key"}},{"name":"full_details","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Full Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCatalogActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/query":{"post":{"tags":["Tools"],"summary":"Query Connections","description":"Query connections with optional filtering.","operationId":"query_tool_connections","parameters":[{"name":"provider_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Key"}},{"name":"integration_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integration Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/":{"post":{"tags":["Tools"],"summary":"Create Connection","description":"Create a new tool connection.","operationId":"create_tool_connection","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/callback":{"get":{"tags":["Tools"],"summary":"Callback Connection","description":"Handle OAuth callback from Composio.","operationId":"callback_tool_connection","parameters":[{"name":"connected_account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected Account Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"error_message","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/{connection_id}":{"get":{"tags":["Tools"],"summary":"Get Connection","description":"Get a connection by ID.","operationId":"fetch_tool_connection","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Tools"],"summary":"Delete Connection","description":"Delete a connection by ID.","operationId":"delete_tool_connection","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/{connection_id}/refresh":{"post":{"tags":["Tools"],"summary":"Refresh Connection","description":"Refresh a connection's credentials.","operationId":"refresh_tool_connection","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/connections/{connection_id}/revoke":{"post":{"tags":["Tools"],"summary":"Revoke Connection","description":"Mark a connection invalid locally (does not revoke at the provider).","operationId":"revoke_tool_connection","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/call":{"post":{"tags":["Tools"],"summary":"Call Tool","description":"Call a tool action with a connection.","operationId":"call_tool","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCall"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/":{"post":{"tags":["Evaluations"],"summary":"Create Runs","operationId":"create_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Runs","operationId":"delete_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Runs","operationId":"edit_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/query":{"post":{"tags":["Evaluations"],"summary":"Query Runs","operationId":"query_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/close":{"post":{"tags":["Evaluations"],"summary":"Close Runs","operationId":"close_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/open":{"post":{"tags":["Evaluations"],"summary":"Open Runs","operationId":"open_runs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/{run_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Run","operationId":"fetch_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Run","operationId":"edit_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Run","operationId":"delete_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/{run_id}/close":{"post":{"tags":["Evaluations"],"summary":"Close Run","operationId":"close_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/{run_id}/close/{status}":{"post":{"tags":["Evaluations"],"summary":"Close Run","operationId":"close_run_with_status","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"status","in":"path","required":true,"schema":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/runs/{run_id}/open":{"post":{"tags":["Evaluations"],"summary":"Open Run","operationId":"open_run","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/scenarios/":{"post":{"tags":["Evaluations"],"summary":"Create Scenarios","operationId":"create_scenarios","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Scenarios","operationId":"delete_scenarios","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Scenarios","operationId":"edit_scenarios","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/scenarios/query":{"post":{"tags":["Evaluations"],"summary":"Query Scenarios","operationId":"query_scenarios","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/scenarios/{scenario_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Scenario","operationId":"fetch_scenario","parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Scenario","operationId":"edit_scenario","parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Scenario","operationId":"delete_scenario","parameters":[{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenarioIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/results/":{"post":{"tags":["Evaluations"],"summary":"Create Results","operationId":"create_results","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Results","operationId":"delete_results","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Results","operationId":"edit_results","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/results/query":{"post":{"tags":["Evaluations"],"summary":"Query Results","operationId":"query_results","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/results/{result_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Result","operationId":"fetch_result","parameters":[{"name":"result_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Result Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Result","operationId":"edit_result","parameters":[{"name":"result_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Result Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Result","operationId":"delete_result","parameters":[{"name":"result_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Result Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationResultIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/metrics/refresh":{"post":{"tags":["Evaluations"],"summary":"Refresh Metrics","operationId":"refresh_metrics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsRefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/metrics/":{"post":{"tags":["Evaluations"],"summary":"Create Metrics","operationId":"create_metrics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Metrics","operationId":"delete_metrics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Metrics","operationId":"edit_metrics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/metrics/query":{"post":{"tags":["Evaluations"],"summary":"Query Metrics","operationId":"query_metrics","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/queues/":{"post":{"tags":["Evaluations"],"summary":"Create Queues","operationId":"create_queues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Queues","operationId":"delete_queues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueIdsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueIdsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Queues","operationId":"edit_queues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/queues/query":{"post":{"tags":["Evaluations"],"summary":"Query Queues","operationId":"query_queues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/queues/{queue_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Queue","operationId":"fetch_queue","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Queue","operationId":"edit_queue","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Queue","operationId":"delete_queue","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evaluations/queues/{queue_id}/scenarios/query":{"post":{"tags":["Evaluations"],"summary":"Query Queue Scenarios","operationId":"query_evaluation_queue_scenarios","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationQueueScenariosQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/":{"post":{"tags":["Evaluations"],"summary":"Create Evaluation","operationId":"create_simple_evaluation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/{evaluation_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Evaluation","operationId":"fetch_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluations"],"summary":"Edit Evaluation","operationId":"edit_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Evaluations"],"summary":"Delete Evaluation","operationId":"delete_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/query":{"post":{"tags":["Evaluations"],"summary":"Query Evaluations","operationId":"query_simple_evaluations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/{evaluation_id}/start":{"post":{"tags":["Evaluations"],"summary":"Start Evaluation","operationId":"start_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/{evaluation_id}/stop":{"post":{"tags":["Evaluations"],"summary":"Stop Evaluation","operationId":"stop_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/{evaluation_id}/close":{"post":{"tags":["Evaluations"],"summary":"Close Evaluation","operationId":"close_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/evaluations/{evaluation_id}/open":{"post":{"tags":["Evaluations"],"summary":"Open Evaluation","operationId":"open_simple_evaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleEvaluationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/":{"post":{"tags":["Evaluations"],"summary":"Create Queue","operationId":"create_simple_queue","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/query":{"post":{"tags":["Evaluations"],"summary":"Query Queues","operationId":"query_simple_queues","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueuesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/{queue_id}":{"get":{"tags":["Evaluations"],"summary":"Fetch Queue","operationId":"fetch_simple_queue","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/{queue_id}/scenarios/query":{"post":{"tags":["Evaluations"],"summary":"Query Queue Scenarios","operationId":"query_simple_queue_scenarios","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueScenariosQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueScenariosResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/{queue_id}/traces/":{"post":{"tags":["Evaluations"],"summary":"Add Queue Traces","operationId":"add_simple_queue_traces","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueTracesCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/simple/queues/{queue_id}/testcases/":{"post":{"tags":["Evaluations"],"summary":"Add Queue Testcases","operationId":"add_simple_queue_testcases","parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Queue Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueTestcasesCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleQueueIdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounts/":{"post":{"tags":["Admin"],"summary":"Create accounts","operationId":"create_accounts_admin_accounts__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete accounts","operationId":"delete_accounts_admin_accounts__delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsDelete"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/":{"post":{"tags":["Admin"],"summary":"Create simple accounts","operationId":"create_simple_accounts_admin_simple_accounts__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete simple accounts","operationId":"delete_simple_accounts_admin_simple_accounts__delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsDelete"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/users/":{"post":{"tags":["Admin"],"summary":"Create users","operationId":"create_user_admin_simple_accounts_users__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsUsersCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/users/{user_id}":{"delete":{"tags":["Admin"],"summary":"Delete user","operationId":"delete_user_admin_simple_accounts_users__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/users/identities/":{"post":{"tags":["Admin"],"summary":"Create user identities","operationId":"create_user_identity_admin_simple_accounts_users_identities__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsUsersIdentitiesCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/users/{user_id}/identities/{identity_id}":{"delete":{"tags":["Admin"],"summary":"Delete user identity","operationId":"delete_user_identity_admin_simple_accounts_users__user_id__identities__identity_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"identity_id","in":"path","required":true,"schema":{"type":"string","title":"Identity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/organizations/":{"post":{"tags":["Admin"],"summary":"Create organizations","operationId":"create_organization_admin_simple_accounts_organizations__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsOrganizationsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/organizations/{organization_id}":{"delete":{"tags":["Admin"],"summary":"Delete organization","operationId":"delete_organization_admin_simple_accounts_organizations__organization_id__delete","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/organizations/memberships/":{"post":{"tags":["Admin"],"summary":"Create organization memberships","operationId":"create_organization_membership_admin_simple_accounts_organizations_memberships__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsOrganizationsMembershipsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/organizations/{organization_id}/memberships/{membership_id}":{"delete":{"tags":["Admin"],"summary":"Delete organization membership","operationId":"delete_organization_membership_admin_simple_accounts_organizations__organization_id__memberships__membership_id__delete","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","title":"Membership Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/workspaces/":{"post":{"tags":["Admin"],"summary":"Create workspaces","operationId":"create_workspace_admin_simple_accounts_workspaces__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsWorkspacesCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/workspaces/{workspace_id}":{"delete":{"tags":["Admin"],"summary":"Delete workspace","operationId":"delete_workspace_admin_simple_accounts_workspaces__workspace_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/workspaces/memberships/":{"post":{"tags":["Admin"],"summary":"Create workspace memberships","operationId":"create_workspace_membership_admin_simple_accounts_workspaces_memberships__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsWorkspacesMembershipsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/workspaces/{workspace_id}/memberships/{membership_id}":{"delete":{"tags":["Admin"],"summary":"Delete workspace membership","operationId":"delete_workspace_membership_admin_simple_accounts_workspaces__workspace_id__memberships__membership_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","title":"Membership Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/projects/":{"post":{"tags":["Admin"],"summary":"Create projects","operationId":"create_project_admin_simple_accounts_projects__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsProjectsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/projects/{project_id}":{"delete":{"tags":["Admin"],"summary":"Delete project","operationId":"delete_project_admin_simple_accounts_projects__project_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/projects/memberships/":{"post":{"tags":["Admin"],"summary":"Create project memberships","operationId":"create_project_membership_admin_simple_accounts_projects_memberships__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsProjectsMembershipsCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/projects/{project_id}/memberships/{membership_id}":{"delete":{"tags":["Admin"],"summary":"Delete project membership","operationId":"delete_project_membership_admin_simple_accounts_projects__project_id__memberships__membership_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","title":"Membership Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/api-keys/":{"post":{"tags":["Admin"],"summary":"Create API keys","operationId":"create_api_key_admin_simple_accounts_api_keys__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsApiKeysCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/api-keys/{api_key_id}":{"delete":{"tags":["Admin"],"summary":"Delete API key","operationId":"delete_api_key_admin_simple_accounts_api_keys__api_key_id__delete","parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","title":"Api Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/reset-password":{"post":{"tags":["Admin"],"summary":"Reset user password","operationId":"reset_password_admin_simple_accounts_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsUsersResetPassword"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/simple/accounts/transfer-ownership":{"post":{"tags":["Admin"],"summary":"Transfer organization ownership","operationId":"transfer_ownership_admin_simple_accounts_transfer_ownership_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsOrganizationsTransferOwnership"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"200":{"description":"Partial transfer — some orgs could not be transferred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSimpleAccountsOrganizationsTransferOwnershipResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"tags":["Status"],"summary":"Health Check","operationId":"health_check","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/permissions/verify":{"get":{"tags":["Access"],"summary":"Verify Permissions","operationId":"verify_permissions","parameters":[{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"scope_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Type"}},{"name":"scope_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scope Id"}},{"name":"resource_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Type"}},{"name":"resource_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects":{"get":{"tags":["Projects"],"summary":"Get Projects","operationId":"get_projects","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProjectsResponse"},"type":"array","title":"Response Get Projects"}}}}}},"post":{"tags":["Projects"],"summary":"Create Project","operationId":"create_project","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}":{"get":{"tags":["Projects"],"summary":"Get Project","operationId":"get_project","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Projects"],"summary":"Delete Project","operationId":"delete_project","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Projects"],"summary":"Update Project","operationId":"update_project","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile":{"get":{"tags":["Users"],"summary":"User Profile","operationId":"fetch_user_profile","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/profile/username":{"put":{"tags":["Users"],"summary":"Update User Username","operationId":"update_user_username","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/reset-password":{"post":{"tags":["Users"],"summary":"Reset User Password","operationId":"reset_user_password","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/keys":{"get":{"tags":["Keys"],"summary":"List Api Keys","description":"List all API keys associated with the authenticated user.\n\nArgs:\n request (Request): The incoming request object.\n\nReturns:\n List[ListAPIKeysResponse]: A list of API Keys associated with the user.","operationId":"list_api_keys","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ListAPIKeysResponse"},"type":"array","title":"Response List Api Keys"}}}}}},"post":{"tags":["Keys"],"summary":"Create Api Key","description":"Creates an API key for a user.\n\nArgs:\n request (Request): The request object containing the user ID in the request state.\n\nReturns:\n str: The created API key.","operationId":"create_api_key","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Create Api Key"}}}}}}},"/keys/{key_prefix}":{"delete":{"tags":["Keys"],"summary":"Delete Api Key","description":"Delete an API key with the given key prefix for the authenticated user.\n\nArgs:\n key_prefix (str): The prefix of the API key to be deleted.\n request (Request): The incoming request object.\n\nReturns:\n dict: A dictionary containing a success message upon successful deletion.\n\nRaises:\n HTTPException: If the API key is not found or does not belong to the user.","operationId":"delete_api_key","parameters":[{"name":"key_prefix","in":"path","required":true,"schema":{"type":"string","title":"Key Prefix"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Api Key"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces/{workspace_id}/invite":{"post":{"tags":["Organizations"],"summary":"Invite User To Organization","description":"Assigns a role to a user in an organization.\n\nArgs:\n organization_id (str): The ID of the organization.\n payload (InviteRequest): The payload containing the organization id, user email, and role to assign.\n workspace_id (str): The ID of the workspace.\n\nReturns:\n bool: True if the role was successfully assigned, False otherwise.\n\nRaises:\n HTTPException: If the user does not have permission to perform this action.\n HTTPException: If there is an error assigning the role to the user.","operationId":"invite_user_to_workspace","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InviteRequest"},"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces/{workspace_id}/invite/resend":{"post":{"tags":["Organizations"],"summary":"Resend User Invitation To Organization","description":"Resend an invitation to a user to an Organization.\n\nRaises:\n HTTPException: _description_; status_code: 500\n HTTPException: Invitation not found or has expired; status_code: 400\n HTTPException: You already belong to this organization; status_code: 400\n\nReturns:\n JSONResponse: Resent invitation to user; status_code: 200","operationId":"resend_invitation","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendInviteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/organizations/{organization_id}/workspaces/{workspace_id}/invite/accept":{"post":{"tags":["Organizations"],"summary":"Accept Organization Invitation","description":"Accept an invitation to an organization.\n\nRaises:\n HTTPException: _description_; status_code: 500\n HTTPException: Invitation not found or has expired; status_code: 400\n HTTPException: You already belong to this organization; status_code: 400\n\nReturns:\n JSONResponse: Accepted invitation to workspace; status_code: 200","operationId":"accept_invitation","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"string","title":"Organization Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"project_id","in":"query","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteToken"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces":{"get":{"tags":["Workspaces"],"summary":"Get Workspace","description":"Get workspace details.\n\nReturns details about the workspace associated with the user's session.\n\nReturns:\n Workspace: The details of the workspace.\n\nRaises:\n HTTPException: If the user does not have permission to perform this action.","operationId":"get_workspace","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Workspace"},"type":"array","title":"Response Get Workspace"}}}}}}},"/workspaces/roles":{"get":{"tags":["Workspaces"],"summary":"Get All Workspace Roles","description":"Get all workspace roles.\n\nReturns a list of all available workspace roles.\n\nReturns:\n List[WorkspaceRoleResponse]: A list of WorkspaceRole objects representing the available workspace roles.\n\nRaises:\n HTTPException: If an error occurs while retrieving the workspace roles.","operationId":"get_all_workspace_roles","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Response Get All Workspace Roles"}}}}}}},"/workspaces/{workspace_id}/users":{"delete":{"tags":["Workspaces"],"summary":"Remove User From Workspace","description":"Remove a user from a workspace.\n\nArgs:\n email (str): The email address of the user to be removed\n workspace_id (str): The ID of the workspace.","operationId":"remove_user_from_workspace","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AdminAccountCreateOptions":{"properties":{"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run","default":false},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key"},"create_identities":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Create Identities"},"create_api_keys":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Create Api Keys"},"return_api_keys":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Return Api Keys"},"seed_defaults":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Seed Defaults","default":true},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"AdminAccountCreateOptions"},"AdminAccountRead":{"properties":{"users":{"additionalProperties":{"$ref":"#/components/schemas/AdminUserRead"},"type":"object","title":"Users","default":{}},"user_identities":{"additionalProperties":{"$ref":"#/components/schemas/AdminUserIdentityRead"},"type":"object","title":"User Identities","default":{}},"organizations":{"additionalProperties":{"$ref":"#/components/schemas/AdminOrganizationRead"},"type":"object","title":"Organizations","default":{}},"workspaces":{"additionalProperties":{"$ref":"#/components/schemas/AdminWorkspaceRead"},"type":"object","title":"Workspaces","default":{}},"projects":{"additionalProperties":{"$ref":"#/components/schemas/AdminProjectRead"},"type":"object","title":"Projects","default":{}},"organization_memberships":{"additionalProperties":{"$ref":"#/components/schemas/AdminOrganizationMembershipRead"},"type":"object","title":"Organization Memberships","default":{}},"workspace_memberships":{"additionalProperties":{"$ref":"#/components/schemas/AdminWorkspaceMembershipRead"},"type":"object","title":"Workspace Memberships","default":{}},"project_memberships":{"additionalProperties":{"$ref":"#/components/schemas/AdminProjectMembershipRead"},"type":"object","title":"Project Memberships","default":{}},"subscriptions":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminSubscriptionRead"},"type":"object"},{"type":"null"}],"title":"Subscriptions"},"api_keys":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminApiKeyResponse"},"type":"object"},{"type":"null"}],"title":"Api Keys"}},"type":"object","title":"AdminAccountRead","description":"Per-account projection in the full graph response (plural entity maps)."},"AdminAccountsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"users":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminUserCreate"},"type":"object"},{"type":"null"}],"title":"Users"},"user_identities":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminUserIdentityCreate"},"type":"object"},{"type":"null"}],"title":"User Identities"},"organizations":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminOrganizationCreate"},"type":"object"},{"type":"null"}],"title":"Organizations"},"workspaces":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminWorkspaceCreate"},"type":"object"},{"type":"null"}],"title":"Workspaces"},"projects":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminProjectCreate"},"type":"object"},{"type":"null"}],"title":"Projects"},"organization_memberships":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminOrganizationMembershipCreate"},"type":"object"},{"type":"null"}],"title":"Organization Memberships"},"workspace_memberships":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminWorkspaceMembershipCreate"},"type":"object"},{"type":"null"}],"title":"Workspace Memberships"},"project_memberships":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminProjectMembershipCreate"},"type":"object"},{"type":"null"}],"title":"Project Memberships"},"api_keys":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminApiKeyCreate"},"type":"object"},{"type":"null"}],"title":"Api Keys"},"subscriptions":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminSubscriptionCreate"},"type":"object"},{"type":"null"}],"title":"Subscriptions"}},"type":"object","title":"AdminAccountsCreate"},"AdminAccountsDelete":{"properties":{"target":{"$ref":"#/components/schemas/AdminAccountsDeleteTarget"},"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run","default":true},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"confirm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirm"}},"type":"object","required":["target"],"title":"AdminAccountsDelete"},"AdminAccountsDeleteTarget":{"properties":{"user_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"User Ids"},"user_emails":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"User Emails"},"organization_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Organization Ids"},"workspace_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Workspace Ids"},"project_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Project Ids"}},"type":"object","title":"AdminAccountsDeleteTarget"},"AdminAccountsResponse":{"properties":{"accounts":{"items":{"$ref":"#/components/schemas/AdminAccountRead"},"type":"array","title":"Accounts","default":[]},"errors":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminStructuredError"},"type":"array"},{"type":"null"}],"title":"Errors"}},"type":"object","title":"AdminAccountsResponse"},"AdminApiKeyCreate":{"properties":{"project_ref":{"$ref":"#/components/schemas/EntityRef"},"user_ref":{"$ref":"#/components/schemas/EntityRef"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["project_ref","user_ref"],"title":"AdminApiKeyCreate"},"AdminApiKeyResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"prefix":{"type":"string","title":"Prefix"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"project_id":{"type":"string","title":"Project Id"},"user_id":{"type":"string","title":"User Id"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"revoked_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revoked At"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"},"returned_once":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Returned Once"}},"type":"object","required":["prefix","project_id","user_id"],"title":"AdminApiKeyResponse"},"AdminDeleteResponse":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run","default":false},"deleted":{"$ref":"#/components/schemas/AdminDeletedEntities","default":{}},"skipped":{"anyOf":[{"$ref":"#/components/schemas/AdminDeletedEntities"},{"type":"null"}]},"errors":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminStructuredError"},"type":"array"},{"type":"null"}],"title":"Errors"}},"type":"object","title":"AdminDeleteResponse"},"AdminDeletedEntities":{"properties":{"users":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Users"},"user_identities":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"User Identities"},"organizations":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Organizations"},"workspaces":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Workspaces"},"projects":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Projects"},"organization_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Organization Memberships"},"workspace_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Workspace Memberships"},"project_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Project Memberships"},"api_keys":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminDeletedEntity"},"type":"array"},{"type":"null"}],"title":"Api Keys"}},"type":"object","title":"AdminDeletedEntities"},"AdminDeletedEntity":{"properties":{"id":{"type":"string","title":"Id"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref"}},"type":"object","required":["id"],"title":"AdminDeletedEntity"},"AdminOrganizationCreate":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"owner_user_ref":{"anyOf":[{"$ref":"#/components/schemas/EntityRef"},{"type":"null"}]},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["name"],"title":"AdminOrganizationCreate"},"AdminOrganizationMembershipCreate":{"properties":{"organization_ref":{"$ref":"#/components/schemas/EntityRef"},"user_ref":{"$ref":"#/components/schemas/EntityRef"},"role":{"type":"string","title":"Role"}},"type":"object","required":["organization_ref","user_ref","role"],"title":"AdminOrganizationMembershipCreate"},"AdminOrganizationMembershipRead":{"properties":{"id":{"type":"string","title":"Id"},"organization_id":{"type":"string","title":"Organization Id"},"user_id":{"type":"string","title":"User Id"},"role":{"type":"string","title":"Role"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","organization_id","user_id","role"],"title":"AdminOrganizationMembershipRead"},"AdminOrganizationRead":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"owner_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner User Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","name"],"title":"AdminOrganizationRead"},"AdminProjectCreate":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"organization_ref":{"$ref":"#/components/schemas/EntityRef"},"workspace_ref":{"$ref":"#/components/schemas/EntityRef"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["name","organization_ref","workspace_ref"],"title":"AdminProjectCreate"},"AdminProjectMembershipCreate":{"properties":{"project_ref":{"$ref":"#/components/schemas/EntityRef"},"user_ref":{"$ref":"#/components/schemas/EntityRef"},"role":{"type":"string","title":"Role"}},"type":"object","required":["project_ref","user_ref","role"],"title":"AdminProjectMembershipCreate"},"AdminProjectMembershipRead":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"user_id":{"type":"string","title":"User Id"},"role":{"type":"string","title":"Role"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","project_id","user_id","role"],"title":"AdminProjectMembershipRead"},"AdminProjectRead":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"organization_id":{"type":"string","title":"Organization Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","name","organization_id","workspace_id"],"title":"AdminProjectRead"},"AdminSimpleAccountCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"user":{"$ref":"#/components/schemas/AdminUserCreate"},"user_identities":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminUserIdentityCreate"},"type":"array"},{"type":"null"}],"title":"User Identities"},"organization":{"anyOf":[{"$ref":"#/components/schemas/AdminOrganizationCreate"},{"type":"null"}]},"workspace":{"anyOf":[{"$ref":"#/components/schemas/AdminWorkspaceCreate"},{"type":"null"}]},"project":{"anyOf":[{"$ref":"#/components/schemas/AdminProjectCreate"},{"type":"null"}]},"organization_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminOrganizationMembershipCreate"},"type":"array"},{"type":"null"}],"title":"Organization Memberships"},"workspace_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminWorkspaceMembershipCreate"},"type":"array"},{"type":"null"}],"title":"Workspace Memberships"},"project_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminProjectMembershipCreate"},"type":"array"},{"type":"null"}],"title":"Project Memberships"},"api_keys":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminApiKeyCreate"},"type":"array"},{"type":"null"}],"title":"Api Keys"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/AdminSubscriptionCreate"},{"type":"null"}]}},"type":"object","required":["user"],"title":"AdminSimpleAccountCreate","description":"One account entry in a batch simple-accounts create request."},"AdminSimpleAccountDeleteEntry":{"properties":{"user":{"$ref":"#/components/schemas/EntityRef"}},"type":"object","required":["user"],"title":"AdminSimpleAccountDeleteEntry","description":"One account entry in a batch simple-accounts delete request.\n\nIdentifies the account by its user (typically by id)."},"AdminSimpleAccountRead":{"properties":{"user":{"anyOf":[{"$ref":"#/components/schemas/AdminUserRead"},{"type":"null"}]},"user_identities":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminUserIdentityRead"},"type":"array"},{"type":"null"}],"title":"User Identities"},"organizations":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminOrganizationRead"},"type":"object"},{"type":"null"}],"title":"Organizations"},"workspaces":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminWorkspaceRead"},"type":"object"},{"type":"null"}],"title":"Workspaces"},"projects":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminProjectRead"},"type":"object"},{"type":"null"}],"title":"Projects"},"organization_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminOrganizationMembershipRead"},"type":"array"},{"type":"null"}],"title":"Organization Memberships"},"workspace_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminWorkspaceMembershipRead"},"type":"array"},{"type":"null"}],"title":"Workspace Memberships"},"project_memberships":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminProjectMembershipRead"},"type":"array"},{"type":"null"}],"title":"Project Memberships"},"subscriptions":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/AdminSubscriptionRead"},"type":"object"},{"type":"null"}],"title":"Subscriptions"},"api_keys":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Api Keys"}},"type":"object","title":"AdminSimpleAccountRead","description":"Per-account entry in the simple-accounts response.\n\n``user`` is a flat object (there is always exactly one per account).\n``organizations``, ``workspaces``, ``projects`` are named dicts (keys match\nthe ref keys used internally, e.g. \"org\", \"wrk\", \"prj\").\n``api_keys`` maps ref names to raw key values (plain strings, not DTOs)."},"AdminSimpleAccountsApiKeysCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"api_key":{"$ref":"#/components/schemas/AdminApiKeyCreate"}},"type":"object","required":["api_key"],"title":"AdminSimpleAccountsApiKeysCreate"},"AdminSimpleAccountsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"accounts":{"additionalProperties":{"$ref":"#/components/schemas/AdminSimpleAccountCreate"},"type":"object","title":"Accounts"}},"type":"object","required":["accounts"],"title":"AdminSimpleAccountsCreate"},"AdminSimpleAccountsDelete":{"properties":{"accounts":{"additionalProperties":{"$ref":"#/components/schemas/AdminSimpleAccountDeleteEntry"},"type":"object","title":"Accounts"},"dry_run":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dry Run","default":false},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"confirm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirm"}},"type":"object","required":["accounts"],"title":"AdminSimpleAccountsDelete"},"AdminSimpleAccountsOrganizationsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"organization":{"$ref":"#/components/schemas/AdminOrganizationCreate"},"owner":{"anyOf":[{"$ref":"#/components/schemas/AdminUserCreate"},{"type":"null"}]}},"type":"object","required":["organization"],"title":"AdminSimpleAccountsOrganizationsCreate"},"AdminSimpleAccountsOrganizationsMembershipsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"membership":{"$ref":"#/components/schemas/AdminOrganizationMembershipCreate"}},"type":"object","required":["membership"],"title":"AdminSimpleAccountsOrganizationsMembershipsCreate"},"AdminSimpleAccountsOrganizationsTransferOwnership":{"properties":{"organizations":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/EntityRef"},"type":"object"},{"type":"null"}],"title":"Organizations"},"users":{"additionalProperties":{"$ref":"#/components/schemas/EntityRef"},"type":"object","title":"Users"},"include_workspaces":{"anyOf":[{"type":"string","const":"all"},{"items":{"type":"string"},"type":"array"}],"title":"Include Workspaces","default":"all"},"include_projects":{"anyOf":[{"type":"string","const":"all"},{"items":{"type":"string"},"type":"array"}],"title":"Include Projects","default":"all"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"recovery":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Recovery"}},"type":"object","required":["users"],"title":"AdminSimpleAccountsOrganizationsTransferOwnership"},"AdminSimpleAccountsOrganizationsTransferOwnershipResponse":{"properties":{"transferred":{"items":{"type":"string"},"type":"array","title":"Transferred","default":[]},"errors":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminStructuredError"},"type":"array"},{"type":"null"}],"title":"Errors"}},"type":"object","title":"AdminSimpleAccountsOrganizationsTransferOwnershipResponse"},"AdminSimpleAccountsProjectsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"project":{"$ref":"#/components/schemas/AdminProjectCreate"}},"type":"object","required":["project"],"title":"AdminSimpleAccountsProjectsCreate"},"AdminSimpleAccountsProjectsMembershipsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"membership":{"$ref":"#/components/schemas/AdminProjectMembershipCreate"}},"type":"object","required":["membership"],"title":"AdminSimpleAccountsProjectsMembershipsCreate"},"AdminSimpleAccountsResponse":{"properties":{"accounts":{"additionalProperties":{"$ref":"#/components/schemas/AdminSimpleAccountRead"},"type":"object","title":"Accounts","default":{}},"errors":{"anyOf":[{"items":{"$ref":"#/components/schemas/AdminStructuredError"},"type":"array"},{"type":"null"}],"title":"Errors"}},"type":"object","title":"AdminSimpleAccountsResponse"},"AdminSimpleAccountsUsersCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"user":{"$ref":"#/components/schemas/AdminUserCreate"}},"type":"object","required":["user"],"title":"AdminSimpleAccountsUsersCreate"},"AdminSimpleAccountsUsersIdentitiesCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"user_ref":{"$ref":"#/components/schemas/EntityRef"},"user_identity":{"$ref":"#/components/schemas/AdminUserIdentityCreate"}},"type":"object","required":["user_ref","user_identity"],"title":"AdminSimpleAccountsUsersIdentitiesCreate"},"AdminSimpleAccountsUsersResetPassword":{"properties":{"user_identities":{"items":{"$ref":"#/components/schemas/AdminUserIdentityCreate"},"type":"array","title":"User Identities"}},"type":"object","required":["user_identities"],"title":"AdminSimpleAccountsUsersResetPassword"},"AdminSimpleAccountsWorkspacesCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"workspace":{"$ref":"#/components/schemas/AdminWorkspaceCreate"}},"type":"object","required":["workspace"],"title":"AdminSimpleAccountsWorkspacesCreate"},"AdminSimpleAccountsWorkspacesMembershipsCreate":{"properties":{"options":{"anyOf":[{"$ref":"#/components/schemas/AdminAccountCreateOptions"},{"type":"null"}]},"membership":{"$ref":"#/components/schemas/AdminWorkspaceMembershipCreate"}},"type":"object","required":["membership"],"title":"AdminSimpleAccountsWorkspacesMembershipsCreate"},"AdminStructuredError":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"}},"type":"object","required":["code","message"],"title":"AdminStructuredError"},"AdminSubscriptionCreate":{"properties":{"plan":{"type":"string","title":"Plan"}},"type":"object","required":["plan"],"title":"AdminSubscriptionCreate"},"AdminSubscriptionRead":{"properties":{"plan":{"type":"string","title":"Plan"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","required":["plan"],"title":"AdminSubscriptionRead"},"AdminUserCreate":{"properties":{"email":{"type":"string","title":"Email"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_admin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Admin"},"is_root":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Root"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["email"],"title":"AdminUserCreate"},"AdminUserIdentityCreate":{"properties":{"user_ref":{"anyOf":[{"$ref":"#/components/schemas/EntityRef"},{"type":"null"}]},"method":{"type":"string","title":"Method"},"subject":{"type":"string","title":"Subject"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verified"},"provider_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider User Id"},"claims":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Claims"}},"type":"object","required":["method","subject"],"title":"AdminUserIdentityCreate"},"AdminUserIdentityRead":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"user_id":{"type":"string","title":"User Id"},"method":{"type":"string","title":"Method"},"subject":{"type":"string","title":"Subject"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"status":{"type":"string","enum":["created","linked","pending_confirmation","skipped","failed"],"title":"Status","default":"created"},"verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verified"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["user_id","method","subject"],"title":"AdminUserIdentityRead"},"AdminUserRead":{"properties":{"id":{"type":"string","title":"Id"},"uid":{"type":"string","title":"Uid"},"email":{"type":"string","title":"Email"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_admin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Admin"},"is_root":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Root"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","uid","email"],"title":"AdminUserRead"},"AdminWorkspaceCreate":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"organization_ref":{"$ref":"#/components/schemas/EntityRef"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["name","organization_ref"],"title":"AdminWorkspaceCreate"},"AdminWorkspaceMembershipCreate":{"properties":{"workspace_ref":{"$ref":"#/components/schemas/EntityRef"},"user_ref":{"$ref":"#/components/schemas/EntityRef"},"role":{"type":"string","title":"Role"}},"type":"object","required":["workspace_ref","user_ref","role"],"title":"AdminWorkspaceMembershipCreate"},"AdminWorkspaceMembershipRead":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"user_id":{"type":"string","title":"User Id"},"role":{"type":"string","title":"Role"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","workspace_id","user_id","role"],"title":"AdminWorkspaceMembershipRead"},"AdminWorkspaceRead":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"organization_id":{"type":"string","title":"Organization Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","name","organization_id"],"title":"AdminWorkspaceRead"},"Analytics":{"properties":{"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count","default":0},"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration","default":0.0},"costs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Costs","default":0.0},"tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tokens","default":0.0}},"type":"object","title":"Analytics"},"AnalyticsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of time buckets returned.","default":0},"buckets":{"items":{"$ref":"#/components/schemas/MetricsBucket"},"type":"array","title":"Buckets","description":"Time-bucketed aggregates. Each bucket's `metrics` dict is keyed by the dotted `path` of the corresponding `MetricSpec`.","default":[]},"query":{"$ref":"#/components/schemas/TracingQuery","description":"The resolved query used to compute the buckets."},"specs":{"items":{"$ref":"#/components/schemas/MetricSpec"},"type":"array","title":"Specs","description":"The resolved metric specs applied in each bucket.","default":[]}},"type":"object","title":"AnalyticsResponse","description":"Analytics response with user-specified metric specs."},"Annotation":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Annotation"},"AnnotationCreate":{"properties":{"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"AnnotationCreate"},"AnnotationCreateRequest":{"properties":{"annotation":{"$ref":"#/components/schemas/AnnotationCreate"}},"type":"object","required":["annotation"],"title":"AnnotationCreateRequest"},"AnnotationEdit":{"properties":{"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data"],"title":"AnnotationEdit"},"AnnotationEditRequest":{"properties":{"annotation":{"$ref":"#/components/schemas/AnnotationEdit"}},"type":"object","required":["annotation"],"title":"AnnotationEditRequest"},"AnnotationLinkResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"annotation_link":{"anyOf":[{"$ref":"#/components/schemas/OTelLink-Output"},{"type":"null"}]}},"type":"object","title":"AnnotationLinkResponse"},"AnnotationQuery":{"properties":{"origin":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceOrigin"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceKind"},{"type":"null"}]},"channel":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceChannel"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"AnnotationQuery"},"AnnotationQueryRequest":{"properties":{"annotation":{"anyOf":[{"$ref":"#/components/schemas/AnnotationQuery"},{"type":"null"}]},"annotation_links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Annotation Links"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"AnnotationQueryRequest"},"AnnotationResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"annotation":{"anyOf":[{"$ref":"#/components/schemas/Annotation"},{"type":"null"}]}},"type":"object","title":"AnnotationResponse"},"AnnotationsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"annotations":{"items":{"$ref":"#/components/schemas/Annotation"},"type":"array","title":"Annotations","default":[]}},"type":"object","title":"AnnotationsResponse"},"Application":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationArtifactFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Application"},"ApplicationArtifactFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"ApplicationArtifactFlags","description":"Application flags - is_application=True; other booleans use their normal defaults unless explicitly set."},"ApplicationArtifactQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"}},"type":"object","title":"ApplicationArtifactQueryFlags","description":"Application query flags - filter for is_application=True."},"ApplicationCatalogPreset":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"ApplicationCatalogPreset"},"ApplicationCatalogPresetResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when found, `0` otherwise.","default":0},"preset":{"anyOf":[{"$ref":"#/components/schemas/ApplicationCatalogPreset"},{"type":"null"}],"description":"Catalog preset definition."}},"type":"object","title":"ApplicationCatalogPresetResponse","description":"Single preset response envelope."},"ApplicationCatalogPresetsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of presets returned.","default":0},"presets":{"items":{"$ref":"#/components/schemas/ApplicationCatalogPreset"},"type":"array","title":"Presets","description":"Named parameter sets for the template. Use a preset's `data` as the first revision when creating an application from a template."}},"type":"object","title":"ApplicationCatalogPresetsResponse","description":"List of catalog presets scoped to one template."},"ApplicationCatalogTemplate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"ApplicationCatalogTemplate"},"ApplicationCatalogTemplateResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when found, `0` otherwise.","default":0},"template":{"anyOf":[{"$ref":"#/components/schemas/ApplicationCatalogTemplate"},{"type":"null"}],"description":"Catalog template definition."}},"type":"object","title":"ApplicationCatalogTemplateResponse","description":"Single template response envelope."},"ApplicationCatalogTemplatesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of templates returned.","default":0},"templates":{"items":{"$ref":"#/components/schemas/ApplicationCatalogTemplate"},"type":"array","title":"Templates","description":"Built-in and custom templates an application can be created from. Each template carries a `key`, a `uri`, and the JSON Schemas that applications of that type expose."}},"type":"object","title":"ApplicationCatalogTemplatesResponse","description":"List of catalog templates."},"ApplicationCatalogType":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"json_schema":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Json Schema"}},"type":"object","required":["key","json_schema"],"title":"ApplicationCatalogType"},"ApplicationCatalogTypesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of types returned.","default":0},"types":{"items":{"$ref":"#/components/schemas/ApplicationCatalogType"},"type":"array","title":"Types","description":"Shared JSON Schema building blocks referenced by templates (for example `message`, `prompt-template`)."}},"type":"object","title":"ApplicationCatalogTypesResponse","description":"List of catalog types."},"ApplicationCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"ApplicationCreate"},"ApplicationCreateRequest":{"properties":{"application":{"$ref":"#/components/schemas/ApplicationCreate","description":"Artifact-level fields for the new application: `slug`, `name`, `description`, `flags`, `tags`, `meta`. The `slug` must be unique within the project."}},"type":"object","required":["application"],"title":"ApplicationCreateRequest","description":"Request body for creating an application artifact.\n\nApplications are versioned resources; creating one produces an empty artifact.\nUse `POST /simple/applications/` if you want to create the artifact, a default\nvariant, and a first committed revision in a single call.\nSee the [Applications guide](/reference/api-guide/applications)."},"ApplicationEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ApplicationEdit"},"ApplicationEditRequest":{"properties":{"application":{"$ref":"#/components/schemas/ApplicationEdit","description":"Artifact fields to update. The `id` must match the `application_id` in the URL path."}},"type":"object","required":["application"],"title":"ApplicationEditRequest","description":"Request body for editing an application artifact.\n\nOnly artifact-level fields (flags, tags, meta) can be edited here. Editing\nthe `name` is currently disabled. To change the prompt or model parameters,\ncommit a new revision on a variant with `/applications/revisions/commit`."},"ApplicationFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"ApplicationFlags","description":"Legacy full application flag set."},"ApplicationFork":{"properties":{"application_revision":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionFork"},{"type":"null"}]},"revision":{"anyOf":[{"$ref":"#/components/schemas/RevisionFork"},{"type":"null"}]},"application_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Revision Id"},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"application_variant":{"anyOf":[{"$ref":"#/components/schemas/ApplicationVariantFork"},{"type":"null"}]},"variant":{"anyOf":[{"$ref":"#/components/schemas/VariantFork"},{"type":"null"}]},"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFork"},{"type":"null"}]},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFork"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"ApplicationFork"},"ApplicationForkRequest":{"properties":{"application":{"$ref":"#/components/schemas/ApplicationFork","description":"Fork payload. Must include the source `application_variant_id` (or `application_revision_id`) plus a `variant` object describing the new branch and a `revision` object for the new tip commit."}},"type":"object","required":["application"],"title":"ApplicationForkRequest","description":"Request body for forking a variant into a new variant on the same application.\n\nThe fork copies the revision history up to `application_variant_id` /\n`application_revision_id`, then commits the `revision` payload on top.\nBoth `variant` and `revision` objects must be provided."},"ApplicationQuery":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationArtifactQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"ApplicationQuery"},"ApplicationQueryRequest":{"properties":{"application":{"anyOf":[{"$ref":"#/components/schemas/ApplicationQuery"},{"type":"null"}],"description":"Attribute filter. Accepts `slug`, `slugs`, `flags`, `tags`, `meta`. All fields are AND-ed."},"application_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Application Refs","description":"Restrict the query to specific applications by `id` or `slug`. Combined with the `application` filter with AND semantics."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When `true`, include soft-deleted applications. Defaults to `false`."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time-range controls."}},"type":"object","title":"ApplicationQueryRequest","description":"Request body for `POST /applications/query`.\n\nReturns artifact rows only. For rows that include the currently resolved\nvariant, revision, and `data` payload merged in, use\n`POST /simple/applications/query`.\nSee [Query Pattern](/reference/api-guide/query-pattern)."},"ApplicationResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when the application was found, `0` otherwise.","default":0},"application":{"anyOf":[{"$ref":"#/components/schemas/Application"},{"type":"null"}],"description":"The application artifact, or `null` if not found."}},"type":"object","title":"ApplicationResponse","description":"Single-application response envelope."},"ApplicationRevision":{"properties":{"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"ApplicationRevision"},"ApplicationRevisionCommit":{"properties":{"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"ApplicationRevisionCommit"},"ApplicationRevisionCommitRequest":{"properties":{"application_revision_commit":{"$ref":"#/components/schemas/ApplicationRevisionCommit","description":"Commit payload. Must include `application_variant_id` and `data`. `message` is a human-readable commit message. `slug` is optional; if omitted, the server generates one."}},"type":"object","required":["application_revision_commit"],"title":"ApplicationRevisionCommitRequest","description":"Request body for committing a new revision on a variant.\n\nThe commit becomes the variant's new tip. Revisions are immutable once\ncommitted; to change behavior, commit another revision.\nSee [Versioning](/reference/api-guide/versioning#committing-a-revision)."},"ApplicationRevisionCreate":{"properties":{"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"ApplicationRevisionCreate"},"ApplicationRevisionCreateRequest":{"properties":{"application_revision":{"$ref":"#/components/schemas/ApplicationRevisionCreate","description":"Revision fields. Must reference the parent variant."}},"type":"object","required":["application_revision"],"title":"ApplicationRevisionCreateRequest","description":"Request body for creating a revision row without committing it.\n\nPrefer `POST /applications/revisions/commit` for normal use — commit creates\na revision and advances the variant's tip. The plain create endpoint exists\nfor advanced workflows that populate revision rows out of band."},"ApplicationRevisionData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"ApplicationRevisionData"},"ApplicationRevisionData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"ApplicationRevisionData"},"ApplicationRevisionDeployRequest":{"properties":{"application_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Application reference. If provided, the latest revision of the default variant is deployed."},"application_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Variant reference. Its latest revision is deployed."},"application_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Revision reference. The exact revision is deployed."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment (for example `{\"slug\": \"production\"}`)."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment variant."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment revision; advanced use only."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Deployment key inside the environment revision. Defaults to `{application_slug}.revision`."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Optional commit message attached to the environment revision."}},"type":"object","title":"ApplicationRevisionDeployRequest","description":"Request body for `POST /applications/revisions/deploy`.\n\nAttaches an application revision to an environment under a key. Subsequent\ncalls to `/applications/revisions/retrieve` with the matching\n`environment_ref` resolve to this revision.\nSee the [Applications guide](/reference/api-guide/applications#deployment)."},"ApplicationRevisionEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ApplicationRevisionEdit"},"ApplicationRevisionEditRequest":{"properties":{"application_revision":{"$ref":"#/components/schemas/ApplicationRevisionEdit","description":"Full revision body. Edit replaces the editable fields in a single PUT, so include every editable field even if its value is unchanged. `id` must match the `application_revision_id` in the URL path. `data`, `author`, `date`, and `message` are immutable."}},"type":"object","required":["application_revision"],"title":"ApplicationRevisionEditRequest","description":"Request body for editing a revision's header fields.\n\nRevisions are immutable snapshots of the application's configuration;\n`data`, `author`, `date`, and `message` cannot be edited. Use this only to\ncorrect metadata such as `description` or `tags`."},"ApplicationRevisionFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"ApplicationRevisionFlags"},"ApplicationRevisionFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"ApplicationRevisionFork"},"ApplicationRevisionQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"ApplicationRevisionQuery"},"ApplicationRevisionQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"},"is_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Managed"},"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Llm"},"is_hook":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hook"},"is_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Code"},"is_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Match"},"is_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Feedback"},"is_chat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Chat"},"has_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Url"},"has_script":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Script"},"has_handler":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Handler"}},"type":"object","title":"ApplicationRevisionQueryFlags"},"ApplicationRevisionQueryRequest":{"properties":{"application_revision":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevisionQuery"},{"type":"null"}],"description":"Attribute filter. Includes standard fields (`slug`, `slugs`, `flags`) plus revision-specific ones (`author`, `authors`, `date`, `dates`, `message`)."},"application_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Application Refs","description":"Scope to revisions belonging to these applications."},"application_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Application Variant Refs","description":"Scope to revisions belonging to these variants."},"application_revision_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Application Revision Refs","description":"Restrict to specific revisions by `id` or by `slug` + `version`."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When `true`, include archived revisions. Defaults to `false`."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time-range controls."},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve","description":"When `true`, resolve embedded references in each returned revision's `data` (for example, snippet references). Defaults to `false`."}},"type":"object","title":"ApplicationRevisionQueryRequest","description":"Request body for `POST /applications/revisions/query`.\n\nReturns committed revisions across one or more variants. For the ordered\nlog of a single variant, use `POST /applications/revisions/log`."},"ApplicationRevisionResolveRequest":{"properties":{"application_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Application reference."},"application_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Variant reference; resolves the latest revision on it."},"application_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Revision reference; resolves that exact revision."},"max_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Depth","description":"Maximum nesting depth for embedded references. Protects against runaway recursion. Defaults to `10`.","default":10},"max_embeds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Embeds","description":"Maximum total number of embedded references to follow. Defaults to `100`.","default":100},"error_policy":{"anyOf":[{"$ref":"#/components/schemas/ErrorPolicy"},{"type":"null"}],"description":"How to handle resolution errors. `exception` (default) aborts; `placeholder` substitutes a marker; `keep` leaves the original reference untouched.","default":"exception"}},"type":"object","title":"ApplicationRevisionResolveRequest","description":"Request body for `POST /applications/revisions/resolve`.\n\nFetches a revision and resolves any embedded references (snippets, linked\nrevisions) inside its `data`. Use when clients need the fully-inlined\nconfiguration instead of the raw stored form."},"ApplicationRevisionResolveResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a revision was resolved, `0` otherwise.","default":0},"application_revision":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevision"},{"type":"null"}],"description":"The revision with embedded references inlined into `data`."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Diagnostic info about which references were resolved."}},"type":"object","title":"ApplicationRevisionResolveResponse","description":"Response for `POST /applications/revisions/resolve`."},"ApplicationRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a revision was found, `0` otherwise.","default":0},"application_revision":{"anyOf":[{"$ref":"#/components/schemas/ApplicationRevision"},{"type":"null"}],"description":"The application revision, including its `data` payload (prompt, model parameters, schemas, URL)."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Present only when the request set `resolve: true`. Describes which embedded references were resolved and any errors that occurred."}},"type":"object","title":"ApplicationRevisionResponse","description":"Single-revision response envelope."},"ApplicationRevisionRetrieveRequest":{"properties":{"application_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Application reference. When only an application is supplied, the latest revision of its default variant is returned."},"application_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Variant reference. Returns the latest revision on that variant."},"application_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Revision reference. Returns that exact revision."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment reference. Returns the revision currently deployed to that environment under the given `key`."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment variant reference; used together with `environment_ref`."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment revision reference; used to pin to a specific environment commit instead of the current tip."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Deployment key inside the environment revision. When omitted and `application_ref` is supplied, the server derives it as `{application_slug}.revision`."},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve","description":"When `true`, resolve embedded references in the returned revision's `data` (for example, snippet references)."}},"type":"object","title":"ApplicationRevisionRetrieveRequest","description":"Request body for `POST /applications/revisions/retrieve`.\n\nResolves to a single revision by one of several reference types. Exactly one\nreference path is needed; the most specific wins when several are provided.\nSee the [Applications guide](/reference/api-guide/applications#invocation)."},"ApplicationRevisionsLog":{"properties":{"application_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Revision Id"},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"application_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"ApplicationRevisionsLog"},"ApplicationRevisionsLogRequest":{"properties":{"application":{"$ref":"#/components/schemas/ApplicationRevisionsLog","description":"Filter for the log. Typically set `application_variant_id` to list the revision history of a single variant; optionally set `application_revision_id` + `depth` to walk back a bounded number of commits from a specific revision."}},"type":"object","required":["application"],"title":"ApplicationRevisionsLogRequest","description":"Request body for `POST /applications/revisions/log`.\n\nReturns the ordered list of revisions committed to a variant, newest first.\nEach entry carries commit metadata and the full revision record."},"ApplicationRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of revisions in this page.","default":0},"application_revisions":{"items":{"$ref":"#/components/schemas/ApplicationRevision"},"type":"array","title":"Application Revisions","description":"Application revisions matching the query or log."}},"type":"object","title":"ApplicationRevisionsResponse","description":"Paginated list of application revisions."},"ApplicationVariant":{"properties":{"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationVariantFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ApplicationVariant"},"ApplicationVariantCreate":{"properties":{"application_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Application Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"ApplicationVariantCreate"},"ApplicationVariantCreateRequest":{"properties":{"application_variant":{"$ref":"#/components/schemas/ApplicationVariantCreate","description":"Variant fields. Must include `application_id` (the artifact the variant belongs to) and a `slug` unique within the project."}},"type":"object","required":["application_variant"],"title":"ApplicationVariantCreateRequest","description":"Request body for creating a variant on an existing application."},"ApplicationVariantEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ApplicationVariantEdit"},"ApplicationVariantEditRequest":{"properties":{"application_variant":{"$ref":"#/components/schemas/ApplicationVariantEdit","description":"Full variant body. Edit replaces the artifact-level fields in a single PUT, so include every editable field even if its value is unchanged. `id` must match the `application_variant_id` in the URL path; `slug` is immutable. Configuration changes (prompt, model parameters) go through `/applications/revisions/commit`, not this endpoint."}},"type":"object","required":["application_variant"],"title":"ApplicationVariantEditRequest","description":"Request body for editing a variant's artifact-level fields."},"ApplicationVariantFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"ApplicationVariantFlags"},"ApplicationVariantFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/ApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"ApplicationVariantFork"},"ApplicationVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a variant was found, `0` otherwise.","default":0},"application_variant":{"anyOf":[{"$ref":"#/components/schemas/ApplicationVariant"},{"type":"null"}],"description":"The application variant, or `null`."}},"type":"object","title":"ApplicationVariantResponse","description":"Single-variant response envelope."},"ApplicationVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of variants in this page.","default":0},"application_variants":{"items":{"$ref":"#/components/schemas/ApplicationVariant"},"type":"array","title":"Application Variants","description":"Application variants matching the query."}},"type":"object","title":"ApplicationVariantsResponse","description":"Paginated list of application variants."},"ApplicationsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of applications in this page.","default":0},"applications":{"items":{"$ref":"#/components/schemas/Application"},"type":"array","title":"Applications","description":"Application artifacts matching the query."}},"type":"object","title":"ApplicationsResponse","description":"Paginated list of application artifacts."},"Body_configs_fetch_variants_configs_fetch_post":{"properties":{"variant_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Input"},{"type":"null"}]},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Input"},{"type":"null"}]},"application_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Input"},{"type":"null"}]}},"type":"object","title":"Body_configs_fetch_variants_configs_fetch_post"},"Body_create_simple_testset_from_file":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"file_type":{"type":"string","enum":["csv","json"],"title":"File Type","default":"csv"},"testset_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Slug"},"testset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Name"},"testset_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Description"},"testset_tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Tags"},"testset_meta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Meta"}},"type":"object","required":["file"],"title":"Body_create_simple_testset_from_file"},"Body_create_testset_revision_from_file":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"file_type":{"type":"string","enum":["csv","json"],"title":"File Type","default":"csv"},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases"}},"type":"object","required":["file"],"title":"Body_create_testset_revision_from_file"},"Body_edit_simple_testset_from_file":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"file_type":{"type":"string","enum":["csv","json"],"title":"File Type","default":"csv"},"testset_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Name"},"testset_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Description"},"testset_tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Tags"},"testset_meta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testset Meta"}},"type":"object","required":["file"],"title":"Body_edit_simple_testset_from_file"},"Bucket":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"interval":{"type":"integer","title":"Interval"},"total":{"$ref":"#/components/schemas/Analytics"},"errors":{"$ref":"#/components/schemas/Analytics"}},"type":"object","required":["timestamp","interval","total","errors"],"title":"Bucket"},"CollectStatusResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"status":{"type":"string","title":"Status","description":"Readiness string. `ready` means the router is mounted and accepts OTLP ingest."}},"type":"object","required":["status"],"title":"CollectStatusResponse","description":"OTLP endpoint readiness response."},"ComparisonOperator":{"type":"string","enum":["is","is_not"],"title":"ComparisonOperator"},"Condition":{"properties":{"field":{"type":"string","title":"Field"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"operator":{"anyOf":[{"$ref":"#/components/schemas/ComparisonOperator"},{"$ref":"#/components/schemas/NumericOperator"},{"$ref":"#/components/schemas/StringOperator"},{"$ref":"#/components/schemas/ListOperator"},{"$ref":"#/components/schemas/DictOperator"},{"$ref":"#/components/schemas/ExistenceOperator"},{"type":"null"}],"title":"Operator","default":"is"},"options":{"anyOf":[{"$ref":"#/components/schemas/TextOptions"},{"$ref":"#/components/schemas/ListOptions"},{"type":"null"}],"title":"Options"}},"type":"object","required":["field"],"title":"Condition"},"ConfigResponseModel":{"properties":{"params":{"additionalProperties":true,"type":"object","title":"Params"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"application_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Output"},{"type":"null"}]},"service_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Output"},{"type":"null"}]},"variant_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Output"},{"type":"null"}]},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/ReferenceRequestModel-Output"},{"type":"null"}]},"application_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"service_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"variant_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]},"environment_lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","title":"ConfigResponseModel"},"CreateOrganizationPayload":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"CreateOrganizationPayload"},"CreateProjectRequest":{"properties":{"name":{"type":"string","title":"Name"},"make_default":{"type":"boolean","title":"Make Default","default":false}},"type":"object","required":["name"],"title":"CreateProjectRequest"},"CreateSecretDTO":{"properties":{"header":{"$ref":"#/components/schemas/Header"},"secret":{"$ref":"#/components/schemas/SecretDTO"}},"type":"object","required":["header","secret"],"title":"CreateSecretDTO"},"CreateWorkspace":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","title":"CreateWorkspace"},"CustomModelSettingsDTO":{"properties":{"slug":{"type":"string","title":"Slug"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","required":["slug"],"title":"CustomModelSettingsDTO"},"CustomProviderDTO":{"properties":{"kind":{"$ref":"#/components/schemas/CustomProviderKind"},"provider":{"$ref":"#/components/schemas/CustomProviderSettingsDTO"},"models":{"items":{"$ref":"#/components/schemas/CustomModelSettingsDTO"},"type":"array","title":"Models"},"provider_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Slug"},"model_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Model Keys"}},"type":"object","required":["kind","provider","models"],"title":"CustomProviderDTO"},"CustomProviderKind":{"type":"string","enum":["custom","azure","bedrock","sagemaker","vertex_ai","openai","cohere","anyscale","deepinfra","alephalpha","groq","minimax","mistral","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"CustomProviderKind"},"CustomProviderSettingsDTO":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras"}},"type":"object","title":"CustomProviderSettingsDTO"},"DictOperator":{"type":"string","enum":["has","has_not"],"title":"DictOperator"},"DiscoverRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"DiscoverRequest"},"DiscoverResponse":{"properties":{"exists":{"type":"boolean","title":"Exists"},"methods":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#/components/schemas/SSOProviders"}]},"type":"object","title":"Methods"}},"type":"object","required":["exists","methods"],"title":"DiscoverResponse"},"EntityRef":{"properties":{"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","title":"EntityRef","description":"Polymorphic reference that can point to a request-local key, an\nexisting persisted ID, a stable slug, or an email address.\nExactly one field must be set."},"Environment":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Environment"},"EnvironmentCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EnvironmentCreate"},"EnvironmentCreateRequest":{"properties":{"environment":{"$ref":"#/components/schemas/EnvironmentCreate"}},"type":"object","required":["environment"],"title":"EnvironmentCreateRequest"},"EnvironmentEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EnvironmentEdit"},"EnvironmentEditRequest":{"properties":{"environment":{"$ref":"#/components/schemas/EnvironmentEdit"}},"type":"object","required":["environment"],"title":"EnvironmentEditRequest"},"EnvironmentFlags":{"properties":{"is_guarded":{"type":"boolean","title":"Is Guarded","default":false}},"type":"object","title":"EnvironmentFlags"},"EnvironmentQueryFlags":{"properties":{"is_guarded":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Guarded"}},"type":"object","title":"EnvironmentQueryFlags"},"EnvironmentResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment":{"anyOf":[{"$ref":"#/components/schemas/Environment"},{"type":"null"}]}},"type":"object","title":"EnvironmentResponse"},"EnvironmentRevision":{"properties":{"environment_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionData"},{"type":"null"}]}},"type":"object","title":"EnvironmentRevision"},"EnvironmentRevisionCommit":{"properties":{"environment_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"environment_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionData"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"delta":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionDelta"},{"type":"null"}]}},"type":"object","title":"EnvironmentRevisionCommit"},"EnvironmentRevisionCommitRequest":{"properties":{"environment_revision_commit":{"$ref":"#/components/schemas/EnvironmentRevisionCommit"}},"type":"object","required":["environment_revision_commit"],"title":"EnvironmentRevisionCommitRequest"},"EnvironmentRevisionCreate":{"properties":{"environment_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EnvironmentRevisionCreate"},"EnvironmentRevisionCreateRequest":{"properties":{"environment_revision":{"$ref":"#/components/schemas/EnvironmentRevisionCreate"}},"type":"object","required":["environment_revision"],"title":"EnvironmentRevisionCreateRequest"},"EnvironmentRevisionData":{"properties":{"references":{"anyOf":[{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/Reference"},"type":"object"},"type":"object"},{"type":"null"}],"title":"References"}},"type":"object","title":"EnvironmentRevisionData","description":"Per-app references for environment revision data.\n\nKeys are app-scoped identifiers (e.g., ``\"pre.revision\"``).\nValues are dicts of entity-type → Reference, providing full traceability::\n\n {\n \"pre.revision\": {\n \"application\": Reference(id=..., slug=..., version=...),\n \"application_variant\": Reference(id=..., slug=..., version=...),\n \"application_revision\": Reference(id=..., slug=..., version=...),\n },\n ...\n }"},"EnvironmentRevisionDelta":{"properties":{"set":{"anyOf":[{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/Reference"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Set"},"remove":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Remove"}},"type":"object","title":"EnvironmentRevisionDelta","description":"Delta operations on environment revision references.\n\n- ``set``: references to add or update (key → dict of entity → Reference).\n- ``remove``: reference keys to remove."},"EnvironmentRevisionEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EnvironmentRevisionEdit"},"EnvironmentRevisionEditRequest":{"properties":{"environment_revision":{"$ref":"#/components/schemas/EnvironmentRevisionEdit"}},"type":"object","required":["environment_revision"],"title":"EnvironmentRevisionEditRequest"},"EnvironmentRevisionResolveRequest":{"properties":{"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"max_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Depth","default":10},"max_embeds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Embeds","default":100},"error_policy":{"anyOf":[{"$ref":"#/components/schemas/ErrorPolicy"},{"type":"null"}],"default":"exception"}},"type":"object","title":"EnvironmentRevisionResolveRequest"},"EnvironmentRevisionResolveResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment_revision":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevision"},{"type":"null"}]},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}]}},"type":"object","title":"EnvironmentRevisionResolveResponse"},"EnvironmentRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment_revision":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevision"},{"type":"null"}]},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}]}},"type":"object","title":"EnvironmentRevisionResponse"},"EnvironmentRevisionRetrieveRequest":{"properties":{"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve"}},"type":"object","title":"EnvironmentRevisionRetrieveRequest"},"EnvironmentRevisionsLog":{"properties":{"environment_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"environment_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"EnvironmentRevisionsLog"},"EnvironmentRevisionsLogRequest":{"properties":{"environment":{"$ref":"#/components/schemas/EnvironmentRevisionsLog"}},"type":"object","required":["environment"],"title":"EnvironmentRevisionsLogRequest"},"EnvironmentRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment_revisions":{"items":{"$ref":"#/components/schemas/EnvironmentRevision"},"type":"array","title":"Environment Revisions","default":[]}},"type":"object","title":"EnvironmentRevisionsResponse"},"EnvironmentVariant":{"properties":{"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EnvironmentVariant"},"EnvironmentVariantCreate":{"properties":{"environment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Environment Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EnvironmentVariantCreate"},"EnvironmentVariantCreateRequest":{"properties":{"environment_variant":{"$ref":"#/components/schemas/EnvironmentVariantCreate"}},"type":"object","required":["environment_variant"],"title":"EnvironmentVariantCreateRequest"},"EnvironmentVariantEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EnvironmentVariantEdit"},"EnvironmentVariantEditRequest":{"properties":{"environment_variant":{"$ref":"#/components/schemas/EnvironmentVariantEdit"}},"type":"object","required":["environment_variant"],"title":"EnvironmentVariantEditRequest"},"EnvironmentVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment_variant":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentVariant"},{"type":"null"}]}},"type":"object","title":"EnvironmentVariantResponse"},"EnvironmentVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment_variants":{"items":{"$ref":"#/components/schemas/EnvironmentVariant"},"type":"array","title":"Environment Variants","default":[]}},"type":"object","title":"EnvironmentVariantsResponse"},"EnvironmentsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environments":{"items":{"$ref":"#/components/schemas/Environment"},"type":"array","title":"Environments","default":[]}},"type":"object","title":"EnvironmentsResponse"},"ErrorPolicy":{"type":"string","enum":["exception","placeholder","keep"],"title":"ErrorPolicy"},"EvaluationMetrics":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationMetrics"},"EvaluationMetricsCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationMetricsCreate"},"EvaluationMetricsCreateRequest":{"properties":{"metrics":{"items":{"$ref":"#/components/schemas/EvaluationMetricsCreate"},"type":"array","title":"Metrics"}},"type":"object","required":["metrics"],"title":"EvaluationMetricsCreateRequest"},"EvaluationMetricsEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"EvaluationMetricsEdit"},"EvaluationMetricsEditRequest":{"properties":{"metrics":{"items":{"$ref":"#/components/schemas/EvaluationMetricsEdit"},"type":"array","title":"Metrics"}},"type":"object","required":["metrics"],"title":"EvaluationMetricsEditRequest"},"EvaluationMetricsIdsRequest":{"properties":{"metrics_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Metrics Ids"}},"type":"object","required":["metrics_ids"],"title":"EvaluationMetricsIdsRequest"},"EvaluationMetricsIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"metrics_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Metrics Ids","default":[]}},"type":"object","title":"EvaluationMetricsIdsResponse"},"EvaluationMetricsQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"intervals":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Intervals"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"boolean"},{"type":"null"}],"title":"Timestamps"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"boolean"},{"type":"null"}],"title":"Scenario Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationMetricsQuery"},"EvaluationMetricsQueryRequest":{"properties":{"metrics":{"anyOf":[{"$ref":"#/components/schemas/EvaluationMetricsQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationMetricsQueryRequest"},"EvaluationMetricsRefresh":{"properties":{"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Timestamps"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"}},"type":"object","title":"EvaluationMetricsRefresh"},"EvaluationMetricsRefreshRequest":{"properties":{"metrics":{"$ref":"#/components/schemas/EvaluationMetricsRefresh"}},"type":"object","required":["metrics"],"title":"EvaluationMetricsRefreshRequest"},"EvaluationMetricsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"metrics":{"items":{"$ref":"#/components/schemas/EvaluationMetrics"},"type":"array","title":"Metrics","default":[]}},"type":"object","title":"EvaluationMetricsResponse"},"EvaluationQueue":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueData"},{"type":"null"}]},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationQueue"},"EvaluationQueueCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueData"},{"type":"null"}]},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationQueueCreate"},"EvaluationQueueData":{"properties":{"user_ids":{"anyOf":[{"items":{"items":{"type":"string","format":"uuid"},"type":"array"},"type":"array"},{"type":"null"}],"title":"User Ids"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"step_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Step Keys"},"batch_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Size"},"batch_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Offset"}},"type":"object","title":"EvaluationQueueData"},"EvaluationQueueEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueData"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueEdit"},"EvaluationQueueEditRequest":{"properties":{"queue":{"$ref":"#/components/schemas/EvaluationQueueEdit"}},"type":"object","required":["queue"],"title":"EvaluationQueueEditRequest"},"EvaluationQueueFlags":{"properties":{"is_sequential":{"type":"boolean","title":"Is Sequential","default":false}},"type":"object","title":"EvaluationQueueFlags"},"EvaluationQueueIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queue_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Queue Id"}},"type":"object","title":"EvaluationQueueIdResponse"},"EvaluationQueueIdsRequest":{"properties":{"queue_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Queue Ids"}},"type":"object","required":["queue_ids"],"title":"EvaluationQueueIdsRequest"},"EvaluationQueueIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queue_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Queue Ids","default":[]}},"type":"object","title":"EvaluationQueueIdsResponse"},"EvaluationQueueQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"User Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationQueueQuery"},"EvaluationQueueQueryFlags":{"properties":{"is_sequential":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Sequential"}},"type":"object","title":"EvaluationQueueQueryFlags"},"EvaluationQueueQueryRequest":{"properties":{"queue":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueQueryRequest"},"EvaluationQueueResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queue":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueue"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueResponse"},"EvaluationQueueScenariosQuery":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"User Ids"}},"type":"object","title":"EvaluationQueueScenariosQuery"},"EvaluationQueueScenariosQueryRequest":{"properties":{"queue":{"anyOf":[{"$ref":"#/components/schemas/EvaluationQueueScenariosQuery"},{"type":"null"}]},"scenario":{"anyOf":[{"$ref":"#/components/schemas/EvaluationScenarioQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationQueueScenariosQueryRequest"},"EvaluationQueuesCreateRequest":{"properties":{"queues":{"items":{"$ref":"#/components/schemas/EvaluationQueueCreate"},"type":"array","title":"Queues"}},"type":"object","required":["queues"],"title":"EvaluationQueuesCreateRequest"},"EvaluationQueuesEditRequest":{"properties":{"queues":{"items":{"$ref":"#/components/schemas/EvaluationQueueEdit"},"type":"array","title":"Queues"}},"type":"object","required":["queues"],"title":"EvaluationQueuesEditRequest"},"EvaluationQueuesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queues":{"items":{"$ref":"#/components/schemas/EvaluationQueue"},"type":"array","title":"Queues","default":[]}},"type":"object","title":"EvaluationQueuesResponse"},"EvaluationResult":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx","default":0},"step_key":{"type":"string","title":"Step Key"},"scenario_id":{"type":"string","format":"uuid","title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["step_key","scenario_id","run_id"],"title":"EvaluationResult"},"EvaluationResultCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx","default":0},"step_key":{"type":"string","title":"Step Key"},"scenario_id":{"type":"string","format":"uuid","title":"Scenario Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["step_key","scenario_id","run_id"],"title":"EvaluationResultCreate"},"EvaluationResultEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"hash_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hash Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"testcase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testcase Id"},"error":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Error"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]}},"type":"object","title":"EvaluationResultEdit"},"EvaluationResultEditRequest":{"properties":{"result":{"$ref":"#/components/schemas/EvaluationResultEdit"}},"type":"object","required":["result"],"title":"EvaluationResultEditRequest"},"EvaluationResultIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"result_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Result Id"}},"type":"object","title":"EvaluationResultIdResponse"},"EvaluationResultIdsRequest":{"properties":{"result_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Result Ids"}},"type":"object","required":["result_ids"],"title":"EvaluationResultIdsRequest"},"EvaluationResultIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"result_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Result Ids","default":[]}},"type":"object","title":"EvaluationResultIdsResponse"},"EvaluationResultQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"intervals":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Intervals"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Timestamps"},"repeat_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeat Idx"},"repeat_idxs":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Repeat Idxs"},"step_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step Key"},"step_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Step Keys"},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"},"scenario_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Scenario Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationResultQuery"},"EvaluationResultQueryRequest":{"properties":{"result":{"anyOf":[{"$ref":"#/components/schemas/EvaluationResultQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationResultQueryRequest"},"EvaluationResultResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"result":{"anyOf":[{"$ref":"#/components/schemas/EvaluationResult"},{"type":"null"}]}},"type":"object","title":"EvaluationResultResponse"},"EvaluationResultsCreateRequest":{"properties":{"results":{"items":{"$ref":"#/components/schemas/EvaluationResultCreate"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"EvaluationResultsCreateRequest"},"EvaluationResultsEditRequest":{"properties":{"results":{"items":{"$ref":"#/components/schemas/EvaluationResultEdit"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"EvaluationResultsEditRequest"},"EvaluationResultsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"results":{"items":{"$ref":"#/components/schemas/EvaluationResult"},"type":"array","title":"Results","default":[]}},"type":"object","title":"EvaluationResultsResponse"},"EvaluationRun":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRun"},"EvaluationRunCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRunCreate"},"EvaluationRunData":{"properties":{"steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationRunDataStep"},"type":"array"},{"type":"null"}],"title":"Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats","default":1},"mappings":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationRunDataMapping"},"type":"array"},{"type":"null"}],"title":"Mappings"}},"type":"object","title":"EvaluationRunData"},"EvaluationRunDataMapping":{"properties":{"column":{"$ref":"#/components/schemas/EvaluationRunDataMappingColumn"},"step":{"$ref":"#/components/schemas/EvaluationRunDataMappingStep"}},"type":"object","required":["column","step"],"title":"EvaluationRunDataMapping"},"EvaluationRunDataMappingColumn":{"properties":{"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"}},"type":"object","required":["kind","name"],"title":"EvaluationRunDataMappingColumn"},"EvaluationRunDataMappingStep":{"properties":{"key":{"type":"string","title":"Key"},"path":{"type":"string","title":"Path"}},"type":"object","required":["key","path"],"title":"EvaluationRunDataMappingStep"},"EvaluationRunDataStep":{"properties":{"key":{"type":"string","title":"Key"},"type":{"type":"string","enum":["input","invocation","annotation"],"title":"Type"},"origin":{"type":"string","enum":["custom","human","auto"],"title":"Origin"},"references":{"additionalProperties":{"$ref":"#/components/schemas/Reference"},"type":"object","title":"References"},"inputs":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationRunDataStepInput"},"type":"array"},{"type":"null"}],"title":"Inputs"}},"type":"object","required":["key","type","origin","references"],"title":"EvaluationRunDataStep"},"EvaluationRunDataStepInput":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"EvaluationRunDataStepInput"},"EvaluationRunEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunData"},{"type":"null"}]}},"type":"object","title":"EvaluationRunEdit"},"EvaluationRunEditRequest":{"properties":{"run":{"$ref":"#/components/schemas/EvaluationRunEdit"}},"type":"object","required":["run"],"title":"EvaluationRunEditRequest"},"EvaluationRunFlags":{"properties":{"is_live":{"type":"boolean","title":"Is Live","default":false},"is_active":{"type":"boolean","title":"Is Active","default":false},"is_closed":{"type":"boolean","title":"Is Closed","default":false},"is_queue":{"type":"boolean","title":"Is Queue","default":false},"is_cached":{"type":"boolean","title":"Is Cached","default":false},"is_split":{"type":"boolean","title":"Is Split","default":false},"has_queries":{"type":"boolean","title":"Has Queries","default":false},"has_testsets":{"type":"boolean","title":"Has Testsets","default":false},"has_evaluators":{"type":"boolean","title":"Has Evaluators","default":false},"has_custom":{"type":"boolean","title":"Has Custom","default":false},"has_human":{"type":"boolean","title":"Has Human","default":false},"has_auto":{"type":"boolean","title":"Has Auto","default":false}},"type":"object","title":"EvaluationRunFlags"},"EvaluationRunIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"}},"type":"object","title":"EvaluationRunIdResponse"},"EvaluationRunIdsRequest":{"properties":{"run_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Run Ids"}},"type":"object","required":["run_ids"],"title":"EvaluationRunIdsRequest"},"EvaluationRunIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"run_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Run Ids","default":[]}},"type":"object","title":"EvaluationRunIdsResponse"},"EvaluationRunQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"references":{"anyOf":[{"items":{"additionalProperties":{"$ref":"#/components/schemas/Reference"},"type":"object"},"type":"array"},{"type":"null"}],"title":"References"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationRunQuery"},"EvaluationRunQueryFlags":{"properties":{"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"},"is_queue":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Queue"},"is_cached":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Cached"},"is_split":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Split"},"has_queries":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Queries"},"has_testsets":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Testsets"},"has_evaluators":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Evaluators"},"has_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Custom"},"has_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Human"},"has_auto":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Auto"}},"type":"object","title":"EvaluationRunQueryFlags"},"EvaluationRunQueryRequest":{"properties":{"run":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationRunQueryRequest"},"EvaluationRunResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"run":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRun"},{"type":"null"}]}},"type":"object","title":"EvaluationRunResponse"},"EvaluationRunsCreateRequest":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/EvaluationRunCreate"},"type":"array","title":"Runs"}},"type":"object","required":["runs"],"title":"EvaluationRunsCreateRequest"},"EvaluationRunsEditRequest":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/EvaluationRunEdit"},"type":"array","title":"Runs"}},"type":"object","required":["runs"],"title":"EvaluationRunsEditRequest"},"EvaluationRunsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"runs":{"items":{"$ref":"#/components/schemas/EvaluationRun"},"type":"array","title":"Runs","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationRunsResponse"},"EvaluationScenario":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationScenario"},"EvaluationScenarioCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"EvaluationScenarioCreate"},"EvaluationScenarioEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]}},"type":"object","title":"EvaluationScenarioEdit"},"EvaluationScenarioEditRequest":{"properties":{"scenario":{"$ref":"#/components/schemas/EvaluationScenarioEdit"}},"type":"object","required":["scenario"],"title":"EvaluationScenarioEditRequest"},"EvaluationScenarioIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"scenario_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Id"}},"type":"object","title":"EvaluationScenarioIdResponse"},"EvaluationScenarioIdsRequest":{"properties":{"scenario_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Scenario Ids"}},"type":"object","required":["scenario_ids"],"title":"EvaluationScenarioIdsRequest"},"EvaluationScenarioIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"scenario_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Scenario Ids","default":[]}},"type":"object","title":"EvaluationScenarioIdsResponse"},"EvaluationScenarioQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"statuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationStatus"},"type":"array"},{"type":"null"}],"title":"Statuses"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"intervals":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Intervals"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Timestamp"},"timestamps":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Timestamps"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"EvaluationScenarioQuery"},"EvaluationScenarioQueryRequest":{"properties":{"scenario":{"anyOf":[{"$ref":"#/components/schemas/EvaluationScenarioQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationScenarioQueryRequest"},"EvaluationScenarioResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"scenario":{"anyOf":[{"$ref":"#/components/schemas/EvaluationScenario"},{"type":"null"}]}},"type":"object","title":"EvaluationScenarioResponse"},"EvaluationScenariosCreateRequest":{"properties":{"scenarios":{"items":{"$ref":"#/components/schemas/EvaluationScenarioCreate"},"type":"array","title":"Scenarios"}},"type":"object","required":["scenarios"],"title":"EvaluationScenariosCreateRequest"},"EvaluationScenariosEditRequest":{"properties":{"scenarios":{"items":{"$ref":"#/components/schemas/EvaluationScenarioEdit"},"type":"array","title":"Scenarios"}},"type":"object","required":["scenarios"],"title":"EvaluationScenariosEditRequest"},"EvaluationScenariosResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"scenarios":{"items":{"$ref":"#/components/schemas/EvaluationScenario"},"type":"array","title":"Scenarios","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"EvaluationScenariosResponse"},"EvaluationStatus":{"type":"string","enum":["pending","queued","running","success","failure","errors","cancelled"],"title":"EvaluationStatus"},"Evaluator":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorArtifactFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Evaluator"},"EvaluatorArtifactFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"EvaluatorArtifactFlags"},"EvaluatorArtifactQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"}},"type":"object","title":"EvaluatorArtifactQueryFlags"},"EvaluatorCatalogPreset":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"EvaluatorCatalogPreset"},"EvaluatorCatalogPresetResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when a preset is returned, 0 otherwise.","default":0},"preset":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorCatalogPreset"},{"type":"null"}],"description":"The catalog preset, or null when none matched."}},"type":"object","title":"EvaluatorCatalogPresetResponse","description":"Envelope for a single catalog preset."},"EvaluatorCatalogPresetsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of presets in `presets`.","default":0},"presets":{"items":{"$ref":"#/components/schemas/EvaluatorCatalogPreset"},"type":"array","title":"Presets","description":"Named parameter presets defined against a template."}},"type":"object","title":"EvaluatorCatalogPresetsResponse","description":"Envelope for a list of catalog presets."},"EvaluatorCatalogTemplate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"EvaluatorCatalogTemplate"},"EvaluatorCatalogTemplateResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when a template is returned, 0 otherwise.","default":0},"template":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorCatalogTemplate"},{"type":"null"}],"description":"The catalog template, or null when none matched."}},"type":"object","title":"EvaluatorCatalogTemplateResponse","description":"Envelope for a single catalog template."},"EvaluatorCatalogTemplatesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of templates in `templates`.","default":0},"templates":{"items":{"$ref":"#/components/schemas/EvaluatorCatalogTemplate"},"type":"array","title":"Templates","description":"Evaluator catalog templates (blueprints for creating evaluators)."}},"type":"object","title":"EvaluatorCatalogTemplatesResponse","description":"Envelope for a list of catalog templates."},"EvaluatorCatalogType":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"json_schema":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Json Schema"}},"type":"object","required":["key","json_schema"],"title":"EvaluatorCatalogType"},"EvaluatorCatalogTypesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of types in `types`.","default":0},"types":{"items":{"$ref":"#/components/schemas/EvaluatorCatalogType"},"type":"array","title":"Types","description":"JSON schema types the evaluator catalog understands."}},"type":"object","title":"EvaluatorCatalogTypesResponse","description":"Envelope for a list of catalog types."},"EvaluatorCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorCreate"},"EvaluatorCreateRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/EvaluatorCreate","description":"Evaluator payload (slug, name, flags, data). Slug is required and scoped to the project."}},"type":"object","required":["evaluator"],"title":"EvaluatorCreateRequest","description":"Body for creating an evaluator artifact.\n\nCreating an evaluator also provisions its first variant and its initial\nrevision. The evaluator shares the artifact / variant / revision model\nused across versioned resources — see the Versioning guide."},"EvaluatorEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorEdit"},"EvaluatorEditRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/EvaluatorEdit","description":"Evaluator edit payload. Requires the evaluator `id`. Renaming is temporarily disabled."}},"type":"object","required":["evaluator"],"title":"EvaluatorEditRequest","description":"Body for editing the metadata of an existing evaluator artifact."},"EvaluatorFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"EvaluatorFlags","description":"Legacy full evaluator flag set."},"EvaluatorFork":{"properties":{"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionFork"},{"type":"null"}]},"revision":{"anyOf":[{"$ref":"#/components/schemas/RevisionFork"},{"type":"null"}]},"evaluator_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Revision Id"},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"evaluator_variant":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorVariantFork"},{"type":"null"}]},"variant":{"anyOf":[{"$ref":"#/components/schemas/VariantFork"},{"type":"null"}]},"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFork"},{"type":"null"}]},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFork"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"EvaluatorFork"},"EvaluatorForkRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/EvaluatorFork","description":"Fork payload. References the source variant or revision and the target evaluator."}},"type":"object","required":["evaluator"],"title":"EvaluatorForkRequest","description":"Body for forking an evaluator variant into a new variant.\n\nForking copies the variant's history into a new branch so experiments\ncan proceed without touching the original."},"EvaluatorQuery":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorArtifactQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"EvaluatorQuery"},"EvaluatorQueryRequest":{"properties":{"evaluator":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorQuery"},{"type":"null"}],"description":"Filter on evaluator attributes (flags, tags, meta)."},"evaluator_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Refs","description":"Restrict the query to these evaluators. Accepts `id` or `slug` per reference."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When true, include soft-deleted evaluators in the response."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination controls (limit, order, next, newest, oldest)."}},"type":"object","title":"EvaluatorQueryRequest","description":"Body for filtering evaluators. See the Query Pattern guide for field semantics."},"EvaluatorResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when an evaluator is returned, 0 otherwise.","default":0},"evaluator":{"anyOf":[{"$ref":"#/components/schemas/Evaluator"},{"type":"null"}],"description":"The evaluator artifact, or null when none matched."}},"type":"object","title":"EvaluatorResponse","description":"Envelope for a single evaluator response."},"EvaluatorRevision":{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"EvaluatorRevision"},"EvaluatorRevisionCommit":{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"EvaluatorRevisionCommit"},"EvaluatorRevisionCommitRequest":{"properties":{"evaluator_revision_commit":{"$ref":"#/components/schemas/EvaluatorRevisionCommit","description":"Commit payload carrying the `evaluator_variant_id`, optional commit `message`, and the revision `data`."}},"type":"object","required":["evaluator_revision_commit"],"title":"EvaluatorRevisionCommitRequest","description":"Body for committing a new revision on a variant."},"EvaluatorRevisionCreate":{"properties":{"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorRevisionCreate"},"EvaluatorRevisionCreateRequest":{"properties":{"evaluator_revision":{"$ref":"#/components/schemas/EvaluatorRevisionCreate","description":"Revision payload. Requires the parent `evaluator_variant_id` and a `data` object."}},"type":"object","required":["evaluator_revision"],"title":"EvaluatorRevisionCreateRequest","description":"Body for creating a new revision (commit) on an evaluator variant."},"EvaluatorRevisionData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"EvaluatorRevisionData"},"EvaluatorRevisionData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"EvaluatorRevisionData"},"EvaluatorRevisionDeployRequest":{"properties":{"evaluator_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Evaluator to deploy (latest revision)."},"evaluator_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Variant to deploy (latest revision on this variant)."},"evaluator_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific revision to deploy."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment variant."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment revision."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Named key under which the revision is pinned. Defaults to `.revision`."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Commit message stored on the environment revision that records the deployment."}},"type":"object","title":"EvaluatorRevisionDeployRequest","description":"Body for pinning an evaluator revision into an environment revision under a key."},"EvaluatorRevisionEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorRevisionEdit"},"EvaluatorRevisionEditRequest":{"properties":{"evaluator_revision":{"$ref":"#/components/schemas/EvaluatorRevisionEdit","description":"Revision edit payload. Requires the revision `id`."}},"type":"object","required":["evaluator_revision"],"title":"EvaluatorRevisionEditRequest","description":"Body for editing a revision's mutable fields (currently limited; payload data is immutable)."},"EvaluatorRevisionFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"EvaluatorRevisionFlags"},"EvaluatorRevisionFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"EvaluatorRevisionFork"},"EvaluatorRevisionQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"EvaluatorRevisionQuery"},"EvaluatorRevisionQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"},"is_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Managed"},"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Llm"},"is_hook":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hook"},"is_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Code"},"is_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Match"},"is_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Feedback"},"is_chat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Chat"},"has_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Url"},"has_script":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Script"},"has_handler":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Handler"}},"type":"object","title":"EvaluatorRevisionQueryFlags"},"EvaluatorRevisionQueryRequest":{"properties":{"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevisionQuery"},{"type":"null"}],"description":"Filter on revision attributes."},"evaluator_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Refs","description":"Restrict to revisions under these evaluators."},"evaluator_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Variant Refs","description":"Restrict to revisions under these variants."},"evaluator_revision_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Revision Refs","description":"Restrict to these specific revisions."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When true, include soft-deleted revisions."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination controls."},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve","description":"When true, resolve embedded references on each returned revision's `data`."}},"type":"object","title":"EvaluatorRevisionQueryRequest","description":"Body for filtering evaluator revisions. Supports scoping to evaluators, variants, or specific revisions."},"EvaluatorRevisionResolveRequest":{"properties":{"evaluator_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve the latest revision of this evaluator."},"evaluator_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve the latest revision on this variant."},"evaluator_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve this specific revision."},"max_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Depth","description":"Maximum recursion depth when following embedded references. Defaults to 10.","default":10},"max_embeds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Embeds","description":"Maximum number of embeds to resolve. Defaults to 100.","default":100},"error_policy":{"anyOf":[{"$ref":"#/components/schemas/ErrorPolicy"},{"type":"null"}],"description":"How to handle embed-resolution errors (`exception` or `fallback`).","default":"exception"}},"type":"object","title":"EvaluatorRevisionResolveRequest","description":"Body for resolving embedded references on an evaluator revision's `data`."},"EvaluatorRevisionResolveResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when a revision was resolved, 0 otherwise.","default":0},"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevision"},{"type":"null"}],"description":"The resolved revision."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Diagnostic information about the resolution pass (depth, embed count, errors)."}},"type":"object","title":"EvaluatorRevisionResolveResponse","description":"Envelope for a resolved evaluator revision."},"EvaluatorRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when a revision is returned, 0 otherwise.","default":0},"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorRevision"},{"type":"null"}],"description":"The evaluator revision, or null when none matched."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Embed-resolution metadata. Populated when `resolve=true` was requested."}},"type":"object","title":"EvaluatorRevisionResponse","description":"Envelope for a single evaluator revision."},"EvaluatorRevisionRetrieveRequest":{"properties":{"evaluator_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Retrieve the latest revision of this evaluator."},"evaluator_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Retrieve the latest revision on this variant."},"evaluator_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Retrieve this specific revision."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment to resolve through. Requires `key`."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment variant to resolve through. Requires `key`."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific environment revision to resolve through. Requires `key`."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Named deployment key inside the environment revision. Required with environment refs."},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve","description":"When true, resolve embedded references on the returned revision's `data`."}},"type":"object","title":"EvaluatorRevisionRetrieveRequest","description":"Body for retrieving one revision, either by direct reference or through an environment key.\n\nProvide one of: an evaluator / variant / revision reference, or an environment reference plus `key`."},"EvaluatorRevisionsLog":{"properties":{"evaluator_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Revision Id"},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"evaluator_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Variant Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"EvaluatorRevisionsLog"},"EvaluatorRevisionsLogRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/EvaluatorRevisionsLog","description":"Log request scoped to an evaluator / variant / revision by id, slug, or version."}},"type":"object","required":["evaluator"],"title":"EvaluatorRevisionsLogRequest","description":"Body for listing the revision log of an evaluator variant."},"EvaluatorRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of revisions in `evaluator_revisions`.","default":0},"evaluator_revisions":{"items":{"$ref":"#/components/schemas/EvaluatorRevision"},"type":"array","title":"Evaluator Revisions","description":"Matching evaluator revisions."}},"type":"object","title":"EvaluatorRevisionsResponse","description":"Envelope for a list of evaluator revisions."},"EvaluatorTemplate":{"properties":{"name":{"type":"string","title":"Name","description":"Human-readable template name."},"key":{"type":"string","title":"Key","description":"Stable template identifier, used to create evaluators from the template."},"direct_use":{"type":"boolean","title":"Direct Use","description":"Whether the template can be used without further configuration."},"settings_presets":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Settings Presets","description":"Preset parameter configurations shipped with the template."},"settings_template":{"additionalProperties":true,"type":"object","title":"Settings Template","description":"JSON Schema describing the template's configurable parameters."},"outputs_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Outputs Schema","description":"JSON Schema describing the template's evaluator output shape."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Template description."},"oss":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Oss","description":"True when the template is available in OSS builds.","default":false},"requires_llm_api_keys":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Requires Llm Api Keys","description":"True when the template calls an LLM provider and requires an API key.","default":false},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"Tags for grouping templates."},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived","description":"True when the template is deprecated. Hidden unless `include_archived=true`.","default":false}},"type":"object","required":["name","key","direct_use","settings_template"],"title":"EvaluatorTemplate","description":"Static evaluator template definition (built-in evaluator types).\n\nTemplates are shipped with the product and describe the available\nevaluator types. They are read-only and separate from user-owned\nevaluator artifacts."},"EvaluatorTemplatesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of templates in `templates`.","default":0},"templates":{"items":{"$ref":"#/components/schemas/EvaluatorTemplate"},"type":"array","title":"Templates","description":"Built-in evaluator templates."}},"type":"object","title":"EvaluatorTemplatesResponse","description":"Envelope for a list of evaluator templates."},"EvaluatorVariant":{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorVariantFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorVariant"},"EvaluatorVariantCreate":{"properties":{"evaluator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluator Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorVariantCreate"},"EvaluatorVariantCreateRequest":{"properties":{"evaluator_variant":{"$ref":"#/components/schemas/EvaluatorVariantCreate","description":"Variant payload. Requires the parent `evaluator_id`."}},"type":"object","required":["evaluator_variant"],"title":"EvaluatorVariantCreateRequest","description":"Body for creating a new variant on an existing evaluator."},"EvaluatorVariantEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"EvaluatorVariantEdit"},"EvaluatorVariantEditRequest":{"properties":{"evaluator_variant":{"$ref":"#/components/schemas/EvaluatorVariantEdit","description":"Variant edit payload. Requires the variant `id`."}},"type":"object","required":["evaluator_variant"],"title":"EvaluatorVariantEditRequest","description":"Body for editing a variant's metadata."},"EvaluatorVariantFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"EvaluatorVariantFlags"},"EvaluatorVariantFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorVariantFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"EvaluatorVariantFork"},"EvaluatorVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when a variant is returned, 0 otherwise.","default":0},"evaluator_variant":{"anyOf":[{"$ref":"#/components/schemas/EvaluatorVariant"},{"type":"null"}],"description":"The evaluator variant, or null when none matched."}},"type":"object","title":"EvaluatorVariantResponse","description":"Envelope for a single evaluator variant."},"EvaluatorVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of variants in `evaluator_variants`.","default":0},"evaluator_variants":{"items":{"$ref":"#/components/schemas/EvaluatorVariant"},"type":"array","title":"Evaluator Variants","description":"Matching evaluator variants."}},"type":"object","title":"EvaluatorVariantsResponse","description":"Envelope for a list of evaluator variants."},"EvaluatorsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of evaluators in `evaluators`.","default":0},"evaluators":{"items":{"$ref":"#/components/schemas/Evaluator"},"type":"array","title":"Evaluators","description":"Matching evaluator artifacts."}},"type":"object","title":"EvaluatorsResponse","description":"Envelope for a list of evaluators."},"ExistenceOperator":{"type":"string","enum":["exists","not_exists"],"title":"ExistenceOperator"},"Filtering-Input":{"properties":{"operator":{"$ref":"#/components/schemas/LogicalOperator","default":"and"},"conditions":{"items":{"anyOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/Filtering-Input"}]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},"Filtering-Output":{"properties":{"operator":{"$ref":"#/components/schemas/LogicalOperator","default":"and"},"conditions":{"items":{"anyOf":[{"$ref":"#/components/schemas/Condition"},{"$ref":"#/components/schemas/Filtering-Output"}]},"type":"array","title":"Conditions","default":[]}},"type":"object","title":"Filtering"},"Focus":{"type":"string","enum":["trace","span"],"title":"Focus"},"Folder":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"kind":{"anyOf":[{"$ref":"#/components/schemas/FolderKind"},{"type":"null"}],"description":"Resource family this folder organizes. Only `applications` is defined today, and it also covers workflows, evaluators, and testsets (they share the artifact table)."},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path","description":"Dot-separated materialized path built from the folder's slug and its ancestors' slugs. Read-only; derived by the server."},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"Id of the parent folder, or `null` for a root folder."}},"type":"object","title":"Folder"},"FolderCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"kind":{"anyOf":[{"$ref":"#/components/schemas/FolderKind"},{"type":"null"}],"description":"Resource family the folder organizes. Defaults to `applications` when omitted."},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"Id of the parent folder. Omit or set to `null` to create a root folder."}},"type":"object","title":"FolderCreate"},"FolderCreateRequest":{"properties":{"folder":{"$ref":"#/components/schemas/FolderCreate","description":"Folder to create. `slug` is required; `parent_id` nests the new folder under an existing one."}},"type":"object","required":["folder"],"title":"FolderCreateRequest"},"FolderEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"kind":{"anyOf":[{"$ref":"#/components/schemas/FolderKind"},{"type":"null"}],"description":"Resource family. Must match the current folder's kind; defaults to `applications`."},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"New parent folder id. Include the key with a `null` value to move the folder to the root; omit the key to keep the existing parent."}},"type":"object","title":"FolderEdit"},"FolderEditRequest":{"properties":{"folder":{"$ref":"#/components/schemas/FolderEdit","description":"Folder edit payload. `id` must match the path parameter. Only fields present in the payload are changed."}},"type":"object","required":["folder"],"title":"FolderEditRequest"},"FolderIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if a folder was deleted, `0` if no folder matched.","default":0},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id","description":"Id of the deleted folder. Omitted when nothing was deleted."}},"type":"object","title":"FolderIdResponse"},"FolderKind":{"type":"string","enum":["applications"],"title":"FolderKind"},"FolderQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id","description":"Match a single folder id."},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids","description":"Match any of the given folder ids."},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug","description":"Match a folder by slug, regardless of its position in the tree."},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs","description":"Match folders whose slug is in the given list."},"kind":{"anyOf":[{"$ref":"#/components/schemas/FolderKind"},{"type":"null"}],"description":"Match folders of a single resource family."},"kinds":{"anyOf":[{"type":"boolean"},{"items":{"$ref":"#/components/schemas/FolderKind"},"type":"array"},{"type":"null"}],"title":"Kinds","description":"Filter by presence of a kind. `false` returns folders with no kind, `true` returns folders where `kind` is set, and an array restricts to the given kinds."},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id","description":"Match folders whose parent is this id. Send `null` to return only root folders."},"parent_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Parent Ids","description":"Match folders whose parent is any of the given ids."},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path","description":"Exact match on the materialized `path` (e.g. `support.prod`)."},"paths":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Paths","description":"Exact match on any of the given paths."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"Subtree lookup: returns the folder at this path and every descendant."},"prefixes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Prefixes","description":"Subtree lookup across multiple prefixes, OR-ed together."}},"type":"object","title":"FolderQuery"},"FolderQueryRequest":{"properties":{"folder":{"$ref":"#/components/schemas/FolderQuery","description":"Filter object. Any combination of `id`/`ids`, `slug`/`slugs`, `kind`/`kinds`, `parent_id`/`parent_ids`, `path`/`paths`, and `prefix`/`prefixes` narrows the result."}},"type":"object","required":["folder"],"title":"FolderQueryRequest"},"FolderResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of folders returned (`0` or `1`).","default":0},"folder":{"anyOf":[{"$ref":"#/components/schemas/Folder"},{"type":"null"}],"description":"The folder, when found. Omitted when `count` is `0`."}},"type":"object","title":"FolderResponse"},"FoldersResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of folders in `folders`.","default":0},"folders":{"items":{"$ref":"#/components/schemas/Folder"},"type":"array","title":"Folders","description":"Matching folders for the query. Ordering is not guaranteed."}},"type":"object","title":"FoldersResponse"},"Format":{"type":"string","enum":["agenta","opentelemetry"],"title":"Format"},"Formatting":{"properties":{"focus":{"anyOf":[{"$ref":"#/components/schemas/Focus"},{"type":"null"}]},"format":{"anyOf":[{"$ref":"#/components/schemas/Format"},{"type":"null"}]}},"type":"object","title":"Formatting"},"FullJson-Input":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/FullJson-Input"},"type":"array"},{"type":"null"}]},"FullJson-Output":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"items":{"$ref":"#/components/schemas/FullJson-Output"},"type":"array"},{"type":"null"}]},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Header":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"Header"},"InviteRequest":{"properties":{"email":{"type":"string","title":"Email"},"roles":{"anyOf":[{"items":{"type":"string","enum":["owner","admin","developer","editor","annotator","viewer"]},"type":"array"},{"type":"null"}],"title":"Roles"}},"type":"object","required":["email"],"title":"InviteRequest"},"InviteToken":{"properties":{"token":{"type":"string","title":"Token"},"email":{"type":"string","title":"Email"}},"type":"object","required":["token","email"],"title":"InviteToken"},"Invocation":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"Invocation"},"InvocationCreate":{"properties":{"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"InvocationCreate"},"InvocationCreateRequest":{"properties":{"invocation":{"$ref":"#/components/schemas/InvocationCreate"}},"type":"object","required":["invocation"],"title":"InvocationCreateRequest"},"InvocationEdit":{"properties":{"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data"],"title":"InvocationEdit"},"InvocationEditRequest":{"properties":{"invocation":{"$ref":"#/components/schemas/InvocationEdit"}},"type":"object","required":["invocation"],"title":"InvocationEditRequest"},"InvocationLinkResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"invocation_link":{"anyOf":[{"$ref":"#/components/schemas/OTelLink-Output"},{"type":"null"}]}},"type":"object","title":"InvocationLinkResponse"},"InvocationQuery":{"properties":{"origin":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceOrigin"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceKind"},{"type":"null"}]},"channel":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceChannel"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"InvocationQuery"},"InvocationQueryRequest":{"properties":{"invocation":{"anyOf":[{"$ref":"#/components/schemas/InvocationQuery"},{"type":"null"}]},"invocation_links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Invocation Links"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"InvocationQueryRequest"},"InvocationResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"invocation":{"anyOf":[{"$ref":"#/components/schemas/Invocation"},{"type":"null"}]}},"type":"object","title":"InvocationResponse"},"InvocationsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"invocations":{"items":{"$ref":"#/components/schemas/Invocation"},"type":"array","title":"Invocations","default":[]}},"type":"object","title":"InvocationsResponse"},"JsonSchemas-Input":{"properties":{"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"},"inputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Inputs"},"outputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Outputs"}},"type":"object","title":"JsonSchemas"},"JsonSchemas-Output":{"properties":{"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"},"inputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Inputs"},"outputs":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Outputs"}},"type":"object","title":"JsonSchemas"},"LabelJson-Input":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"}]},"LabelJson-Output":{"anyOf":[{"type":"boolean"},{"type":"string"},{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"}]},"LegacyLifecycleDTO":{"properties":{"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Id"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","title":"LegacyLifecycleDTO"},"ListAPIKeysResponse":{"properties":{"prefix":{"type":"string","title":"Prefix"},"created_at":{"type":"string","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"expiration_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiration Date"}},"type":"object","required":["prefix","created_at"],"title":"ListAPIKeysResponse"},"ListOperator":{"type":"string","enum":["in","not_in"],"title":"ListOperator"},"ListOptions":{"properties":{"all":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"All","default":false}},"type":"object","title":"ListOptions"},"LogicalOperator":{"type":"string","enum":["and","or","not","nand","nor"],"title":"LogicalOperator"},"MetricSpec":{"properties":{"type":{"$ref":"#/components/schemas/MetricType","default":"none"},"path":{"type":"string","title":"Path","default":"*"},"bins":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bins"},"vmin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vmin"},"vmax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vmax"},"edge":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Edge"}},"type":"object","title":"MetricSpec"},"MetricType":{"type":"string","enum":["numeric/continuous","numeric/discrete","binary","categorical/single","categorical/multiple","string","json","none","*"],"title":"MetricType"},"MetricsBucket":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"interval":{"type":"integer","title":"Interval"},"metrics":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Metrics"}},"type":"object","required":["timestamp","interval"],"title":"MetricsBucket"},"NumericOperator":{"type":"string","enum":["eq","neq","gt","lt","gte","lte","btwn"],"title":"NumericOperator"},"OTelEvent-Input":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"OTelEvent-Output":{"properties":{"name":{"type":"string","title":"Name"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"}],"title":"Timestamp"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","required":["name","timestamp"],"title":"OTelEvent"},"OTelHash-Input":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"OTelHash-Output":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelHash"},"OTelLink-Input":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelLink"},"OTelLink-Output":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelLink"},"OTelLinksResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of spans that were accepted and published to the ingest stream. Compare against the number of spans you sent to detect partial failures.","default":0},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"},{"type":"null"}],"title":"Links","description":"List of `(trace_id, span_id)` pairs for the accepted spans, in submission order."}},"type":"object","title":"OTelLinksResponse","description":"Response from span ingestion.\n\n`count` reflects how many spans were successfully parsed and published\nto the ingest stream. If you submitted N spans and see `count < N`,\nsome spans failed server-side validation and were not persisted (check\nserver logs for details). See [Tracing — Async write\ncontract](/reference/api-guide/tracing#async-write-contract-202) for\nthe full semantics of the `202 Accepted` response."},"OTelReference-Input":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"OTelReference-Output":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"}},"type":"object","title":"OTelReference"},"OTelSpanKind":{"type":"string","enum":["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"],"title":"OTelSpanKind"},"OTelStatusCode":{"type":"string","enum":["STATUS_CODE_UNSET","STATUS_CODE_OK","STATUS_CODE_ERROR"],"title":"OTelStatusCode"},"OTelTracingRequest":{"properties":{"spans":{"anyOf":[{"items":{"$ref":"#/components/schemas/Span-Input"},"type":"array"},{"type":"null"}],"title":"Spans","description":"Flat list of spans. Use this when you already have a flat list and parent/child relationships are expressed via each span's `parent_id`."},"traces":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SpansTree-Input"},"type":"object"},{"type":"null"}],"title":"Traces","description":"Nested tree of spans keyed by `trace_id` → span name, with children under each node's `spans` field. This matches the shape returned by `POST /tracing/spans/query` with `focus=\"trace\"`."}},"type":"object","title":"OTelTracingRequest","description":"Ingest or query payload for OpenTelemetry-style spans.\n\nExactly one of `spans` or `traces` should be provided. Use `spans`\nfor a flat list (parent/child linked via `parent_id`); use `traces`\nfor a nested tree (keyed by `trace_id` then by span name, children\nhanging off each node's `spans` field). The two shapes are\ninterchangeable and the query endpoint returns the `traces` shape by\ndefault.\n\nSee [Tracing](/reference/api-guide/tracing) for the full attribute\nnamespace and the async ingest contract."},"OTelTracingResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Total number of matching traces or spans in the window.","default":0},"spans":{"anyOf":[{"items":{"$ref":"#/components/schemas/Span-Output"},"type":"array"},{"type":"null"}],"title":"Spans","description":"Flat list of spans, populated when the query was run with `focus=\"span\"`."},"traces":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SpansTree-Output"},"type":"object"},{"type":"null"}],"title":"Traces","description":"Nested tree of spans keyed by `trace_id` → span name, populated when the query was run with `focus=\"trace\"` (default)."}},"type":"object","title":"OTelTracingResponse","description":"Response from span/trace queries.\n\nExactly one of `spans` or `traces` is populated, controlled by the\n`focus` field in the request (`\"span\"` for flat lists, `\"trace\"` for\nnested trees). The shapes here match what the ingest endpoint accepts,\nso you can round-trip data between environments."},"OldAnalyticsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of time buckets returned.","default":0},"buckets":{"items":{"$ref":"#/components/schemas/Bucket"},"type":"array","title":"Buckets","description":"Time-bucketed aggregates with fixed fields (`total`, `errors`) holding `count`, `duration`, `costs`, and `tokens`.","default":[]}},"type":"object","title":"OldAnalyticsResponse","description":"Legacy analytics response with a fixed metric schema."},"OrganizationDetails":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"owner_id":{"type":"string","format":"uuid","title":"Owner Id"},"members":{"items":{"type":"string"},"type":"array","title":"Members"},"invitations":{"items":{},"type":"array","title":"Invitations"},"workspaces":{"items":{"type":"string"},"type":"array","title":"Workspaces"},"default_workspace":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Default Workspace"}},"type":"object","required":["id","owner_id"],"title":"OrganizationDetails"},"OrganizationDomainCreate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"domain":{"type":"string","title":"Domain"}},"type":"object","required":["domain"],"title":"OrganizationDomainCreate","description":"Request model for creating a domain."},"OrganizationDomainResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"additionalProperties":true,"type":"object","title":"Flags"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"}},"type":"object","required":["id","slug","name","description","flags","token","created_at","updated_at","organization_id"],"title":"OrganizationDomainResponse","description":"Response model for a domain."},"OrganizationDomainVerify":{"properties":{"domain_id":{"type":"string","title":"Domain Id"}},"type":"object","required":["domain_id"],"title":"OrganizationDomainVerify","description":"Request model for verifying a domain."},"OrganizationProviderCreate":{"properties":{"slug":{"type":"string","pattern":"^[a-z-]+$","title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"settings":{"additionalProperties":true,"type":"object","title":"Settings"}},"type":"object","required":["slug","settings"],"title":"OrganizationProviderCreate","description":"Request model for creating an SSO provider."},"OrganizationProviderResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"additionalProperties":true,"type":"object","title":"Flags"},"settings":{"additionalProperties":true,"type":"object","title":"Settings"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"}},"type":"object","required":["id","slug","name","description","flags","settings","created_at","updated_at","organization_id"],"title":"OrganizationProviderResponse","description":"Response model for an SSO provider."},"OrganizationProviderUpdate":{"properties":{"slug":{"anyOf":[{"type":"string","pattern":"^[a-z-]+$"},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"}},"type":"object","title":"OrganizationProviderUpdate","description":"Request model for updating an SSO provider."},"OrganizationUpdate":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","title":"OrganizationUpdate"},"Permission":{"type":"string","enum":["read_system","view_applications","edit_application","create_app_variant","delete_app_variant","modify_variant_configurations","delete_application_variant","run_service","view_webhooks","edit_webhooks","view_secret","edit_secret","view_spans","edit_spans","view_folders","edit_folders","view_api_keys","edit_api_keys","view_app_environment_deployment","edit_app_environment_deployment","create_app_environment_deployment","view_testset","edit_testset","create_testset","delete_testset","view_evaluation","run_evaluations","edit_evaluation","create_evaluation","delete_evaluation","deploy_application","view_workspace","edit_workspace","create_workspace","delete_workspace","modify_user_roles","add_new_user_to_workspace","edit_organization","delete_organization","add_new_user_to_organization","reset_password","view_billing","edit_billing","view_workflows","edit_workflows","run_workflows","view_evaluators","edit_evaluators","view_environments","edit_environments","deploy_environments","view_queries","edit_queries","view_testsets","edit_testsets","view_annotations","edit_annotations","view_invocations","edit_invocations","view_evaluation_runs","edit_evaluation_runs","view_evaluation_scenarios","edit_evaluation_scenarios","view_evaluation_results","edit_evaluation_results","view_evaluation_metrics","edit_evaluation_metrics","view_evaluation_queues","edit_evaluation_queues","view_tools","edit_tools","run_tools"],"title":"Permission"},"Plan":{"type":"string","enum":["cloud_v0_hobby","cloud_v0_pro","cloud_v0_business","cloud_v0_humanity_labs","cloud_v0_x_labs","cloud_v0_agenta_ai","self_hosted_enterprise"],"title":"Plan"},"ProjectsResponse":{"properties":{"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"workspace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"},"workspace_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Name"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"project_name":{"type":"string","title":"Project Name"},"is_default_project":{"type":"boolean","title":"Is Default Project","default":false},"user_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Role"},"is_demo":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Demo"}},"type":"object","required":["project_id","project_name"],"title":"ProjectsResponse"},"QueriesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queries":{"items":{"$ref":"#/components/schemas/Query"},"type":"array","title":"Queries","default":[]}},"type":"object","title":"QueriesResponse"},"Query":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Query"},"QueryCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"QueryCreate"},"QueryCreateRequest":{"properties":{"query":{"$ref":"#/components/schemas/QueryCreate"}},"type":"object","required":["query"],"title":"QueryCreateRequest"},"QueryEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"QueryEdit"},"QueryEditRequest":{"properties":{"query":{"$ref":"#/components/schemas/QueryEdit"}},"type":"object","required":["query"],"title":"QueryEditRequest"},"QueryFlags":{"properties":{},"type":"object","title":"QueryFlags"},"QueryQueryFlags":{"properties":{},"type":"object","title":"QueryQueryFlags"},"QueryResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query":{"anyOf":[{"$ref":"#/components/schemas/Query"},{"type":"null"}]}},"type":"object","title":"QueryResponse"},"QueryRevision":{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"QueryRevision"},"QueryRevisionCommit":{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"QueryRevisionCommit"},"QueryRevisionCommitRequest":{"properties":{"query_revision_commit":{"$ref":"#/components/schemas/QueryRevisionCommit"}},"type":"object","required":["query_revision_commit"],"title":"QueryRevisionCommitRequest"},"QueryRevisionCreate":{"properties":{"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"QueryRevisionCreate"},"QueryRevisionCreateRequest":{"properties":{"query_revision":{"$ref":"#/components/schemas/QueryRevisionCreate"}},"type":"object","required":["query_revision"],"title":"QueryRevisionCreateRequest"},"QueryRevisionData-Input":{"properties":{"formatting":{"anyOf":[{"$ref":"#/components/schemas/Formatting"},{"type":"null"}]},"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Input"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]},"trace_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trace Ids"},"traces":{"anyOf":[{"items":{"$ref":"#/components/schemas/Trace-Input"},"type":"array"},{"type":"null"}],"title":"Traces"}},"type":"object","title":"QueryRevisionData"},"QueryRevisionData-Output":{"properties":{"formatting":{"anyOf":[{"$ref":"#/components/schemas/Formatting"},{"type":"null"}]},"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Output"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]},"trace_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Trace Ids"},"traces":{"anyOf":[{"items":{"$ref":"#/components/schemas/Trace-Output"},"type":"array"},{"type":"null"}],"title":"Traces"}},"type":"object","title":"QueryRevisionData"},"QueryRevisionEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"QueryRevisionEdit"},"QueryRevisionEditRequest":{"properties":{"query_revision":{"$ref":"#/components/schemas/QueryRevisionEdit"}},"type":"object","required":["query_revision"],"title":"QueryRevisionEditRequest"},"QueryRevisionQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"QueryRevisionQuery"},"QueryRevisionQueryRequest":{"properties":{"query_revision":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionQuery"},{"type":"null"}]},"query_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Refs"},"query_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Variant Refs"},"query_revision_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Revision Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"QueryRevisionQueryRequest"},"QueryRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query_revision":{"anyOf":[{"$ref":"#/components/schemas/QueryRevision"},{"type":"null"}]}},"type":"object","title":"QueryRevisionResponse"},"QueryRevisionRetrieveRequest":{"properties":{"query_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"query_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"query_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"include_trace_ids":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Trace Ids"},"include_traces":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Traces"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"QueryRevisionRetrieveRequest"},"QueryRevisionsLog":{"properties":{"query_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"query_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"QueryRevisionsLog"},"QueryRevisionsLogRequest":{"properties":{"query_revisions":{"$ref":"#/components/schemas/QueryRevisionsLog"}},"type":"object","required":["query_revisions"],"title":"QueryRevisionsLogRequest"},"QueryRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query_revisions":{"items":{"$ref":"#/components/schemas/QueryRevision"},"type":"array","title":"Query Revisions","default":[]}},"type":"object","title":"QueryRevisionsResponse"},"QueryVariant":{"properties":{"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"QueryVariant"},"QueryVariantCreate":{"properties":{"query_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Query Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"QueryVariantCreate"},"QueryVariantCreateRequest":{"properties":{"query_variant":{"$ref":"#/components/schemas/QueryVariantCreate"}},"type":"object","required":["query_variant"],"title":"QueryVariantCreateRequest"},"QueryVariantEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"QueryVariantEdit"},"QueryVariantEditRequest":{"properties":{"query_variant":{"$ref":"#/components/schemas/QueryVariantEdit"}},"type":"object","required":["query_variant"],"title":"QueryVariantEditRequest"},"QueryVariantQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"QueryVariantQuery"},"QueryVariantQueryRequest":{"properties":{"query_variant":{"anyOf":[{"$ref":"#/components/schemas/QueryVariantQuery"},{"type":"null"}]},"query_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Refs"},"query_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Variant Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"QueryVariantQueryRequest"},"QueryVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query_variant":{"anyOf":[{"$ref":"#/components/schemas/QueryVariant"},{"type":"null"}]}},"type":"object","title":"QueryVariantResponse"},"QueryVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query_variants":{"items":{"$ref":"#/components/schemas/QueryVariant"},"type":"array","title":"Query Variants","default":[]}},"type":"object","title":"QueryVariantsResponse"},"Reference":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Reference"},"ReferenceRequestModel-Input":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},"ReferenceRequestModel-Output":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commit Message"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"ReferenceRequestModel"},"ResendInviteRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"ResendInviteRequest"},"ResolutionInfo":{"properties":{"references_used":{"items":{"additionalProperties":{"$ref":"#/components/schemas/Reference"},"type":"object"},"type":"array","title":"References Used"},"depth_reached":{"type":"integer","title":"Depth Reached"},"embeds_resolved":{"type":"integer","title":"Embeds Resolved"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","default":[]}},"type":"object","required":["references_used","depth_reached","embeds_resolved"],"title":"ResolutionInfo"},"RevisionFork":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"RevisionFork"},"SSOProviderDTO":{"properties":{"provider":{"$ref":"#/components/schemas/SSOProviderSettingsDTO"}},"type":"object","required":["provider"],"title":"SSOProviderDTO"},"SSOProviderInfo":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug"},"third_party_id":{"type":"string","title":"Third Party Id"}},"type":"object","required":["id","slug","third_party_id"],"title":"SSOProviderInfo"},"SSOProviderSettingsDTO":{"properties":{"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"issuer_url":{"type":"string","title":"Issuer Url"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"extra":{"additionalProperties":true,"type":"object","title":"Extra"}},"type":"object","required":["client_id","client_secret","issuer_url","scopes"],"title":"SSOProviderSettingsDTO"},"SSOProviders":{"properties":{"providers":{"items":{"$ref":"#/components/schemas/SSOProviderInfo"},"type":"array","title":"Providers"}},"type":"object","required":["providers"],"title":"SSOProviders"},"SecretDTO":{"properties":{"kind":{"$ref":"#/components/schemas/SecretKind"},"data":{"anyOf":[{"$ref":"#/components/schemas/StandardProviderDTO"},{"$ref":"#/components/schemas/CustomProviderDTO"},{"$ref":"#/components/schemas/SSOProviderDTO"},{"$ref":"#/components/schemas/WebhookProviderDTO"}],"title":"Data"}},"type":"object","required":["kind","data"],"title":"SecretDTO"},"SecretKind":{"type":"string","enum":["provider_key","custom_provider","sso_provider","webhook_provider"],"title":"SecretKind"},"SecretResponseDTO":{"properties":{"kind":{"$ref":"#/components/schemas/SecretKind"},"data":{"anyOf":[{"$ref":"#/components/schemas/StandardProviderDTO"},{"$ref":"#/components/schemas/CustomProviderDTO"},{"$ref":"#/components/schemas/SSOProviderDTO"},{"$ref":"#/components/schemas/WebhookProviderDTO"}],"title":"Data"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"header":{"$ref":"#/components/schemas/Header"},"lifecycle":{"anyOf":[{"$ref":"#/components/schemas/LegacyLifecycleDTO"},{"type":"null"}]}},"type":"object","required":["kind","data","header"],"title":"SecretResponseDTO"},"SessionIdentitiesUpdate":{"properties":{"session_identities":{"items":{"type":"string"},"type":"array","title":"Session Identities"}},"type":"object","required":["session_identities"],"title":"SessionIdentitiesUpdate"},"SessionIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of session IDs in this page.","default":0},"session_ids":{"items":{"type":"string"},"type":"array","title":"Session Ids","description":"Distinct values of `ag.session.id` in this page.","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor for the next page. Pass verbatim as `windowing.next`."}},"type":"object","title":"SessionIdsResponse"},"SessionsQueryRequest":{"properties":{"realtime":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Realtime","description":"When `true`, paginate by `last_active` (reflects ongoing activity but can shift between pages). When `false` or unset, paginate by the stable `first_active` cursor."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time range. Pass the returned `windowing.next` on subsequent calls to continue iteration."}},"type":"object","title":"SessionsQueryRequest","description":"Request body for `POST /tracing/sessions/query`."},"SimpleApplication":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationData-Output"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"SimpleApplication"},"SimpleApplicationCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleApplicationCreate"},"SimpleApplicationCreateRequest":{"properties":{"application":{"$ref":"#/components/schemas/SimpleApplicationCreate","description":"Application fields plus `data` for the first revision. `data.uri` selects the template (for example `agenta:builtin:completion:v0`); `data.parameters` carries the prompt and model config."}},"type":"object","required":["application"],"title":"SimpleApplicationCreateRequest","description":"Request body for `POST /simple/applications/`.\n\nCreates the application artifact, a default variant, and a first committed\nrevision whose `data` comes from the request. Use this for the common case\nof \"spin up a new application from a template\".\nSee [Simple Endpoints](/reference/api-guide/simple-endpoints)."},"SimpleApplicationData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleApplicationData"},"SimpleApplicationData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleApplicationData"},"SimpleApplicationEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleApplicationEdit"},"SimpleApplicationEditRequest":{"properties":{"application":{"$ref":"#/components/schemas/SimpleApplicationEdit","description":"Fields to change. `id` must match the path. Supplying `data` commits a new revision with that configuration; supplying `flags`/`tags`/`meta` commits a revision with the updated header but the existing `data`."}},"type":"object","required":["application"],"title":"SimpleApplicationEditRequest","description":"Request body for `PUT /simple/applications/{application_id}`.\n\nCommits a new revision on the application's variant whenever fields other\nthan `id` are present. If only `id` is sent, the current state is returned\nwithout committing."},"SimpleApplicationFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"SimpleApplicationFlags"},"SimpleApplicationQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"SimpleApplicationQuery"},"SimpleApplicationQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"},"is_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Managed"},"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Llm"},"is_hook":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hook"},"is_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Code"},"is_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Match"},"is_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Feedback"},"is_chat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Chat"},"has_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Url"},"has_script":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Script"},"has_handler":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Handler"}},"type":"object","title":"SimpleApplicationQueryFlags"},"SimpleApplicationQueryRequest":{"properties":{"application":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplicationQuery"},{"type":"null"}],"description":"Attribute filter. Supports `slug`, `slugs`, `flags`, and `meta`. `flags` filter both artifact flags (`is_application`, etc.) and revision flags (`is_chat`, `has_url`, etc.)."},"application_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Application Refs","description":"Restrict to specific applications by `id` or `slug`."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When `true`, include archived applications. Defaults to `false`.","default":false},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time-range controls."}},"type":"object","title":"SimpleApplicationQueryRequest","description":"Request body for `POST /simple/applications/query`.\n\nReturns one row per application with the currently resolved variant,\nrevision, and `data` merged in — the shape most clients want when listing\napplications for a dashboard or invocation picker."},"SimpleApplicationResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when the application was found, `0` otherwise.","default":0},"application":{"anyOf":[{"$ref":"#/components/schemas/SimpleApplication"},{"type":"null"}],"description":"The application with `variant_id`, `revision_id`, and the revision's `data` merged. `data.url` is the invocation URL."}},"type":"object","title":"SimpleApplicationResponse","description":"Simple-application single-row response envelope."},"SimpleApplicationsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of applications in this page.","default":0},"applications":{"items":{"$ref":"#/components/schemas/SimpleApplication"},"type":"array","title":"Applications","description":"Applications with their current variant, revision, and `data` merged in."}},"type":"object","title":"SimpleApplicationsResponse","description":"Paginated list of simple-application rows."},"SimpleEnvironment":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionData"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"SimpleEnvironment"},"SimpleEnvironmentCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleEnvironmentCreate"},"SimpleEnvironmentCreateRequest":{"properties":{"environment":{"$ref":"#/components/schemas/SimpleEnvironmentCreate"}},"type":"object","required":["environment"],"title":"SimpleEnvironmentCreateRequest"},"SimpleEnvironmentEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentRevisionData"},{"type":"null"}]}},"type":"object","title":"SimpleEnvironmentEdit"},"SimpleEnvironmentEditRequest":{"properties":{"environment":{"$ref":"#/components/schemas/SimpleEnvironmentEdit"}},"type":"object","required":["environment"],"title":"SimpleEnvironmentEditRequest"},"SimpleEnvironmentQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EnvironmentQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"SimpleEnvironmentQuery"},"SimpleEnvironmentQueryRequest":{"properties":{"environment":{"anyOf":[{"$ref":"#/components/schemas/SimpleEnvironmentQuery"},{"type":"null"}]},"environment_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Environment Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","default":false},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleEnvironmentQueryRequest"},"SimpleEnvironmentResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environment":{"anyOf":[{"$ref":"#/components/schemas/SimpleEnvironment"},{"type":"null"}]}},"type":"object","title":"SimpleEnvironmentResponse"},"SimpleEnvironmentsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"environments":{"items":{"$ref":"#/components/schemas/SimpleEnvironment"},"type":"array","title":"Environments","default":[]}},"type":"object","title":"SimpleEnvironmentsResponse"},"SimpleEvaluation":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluation"},"SimpleEvaluationCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationCreate"},"SimpleEvaluationCreateRequest":{"properties":{"evaluation":{"$ref":"#/components/schemas/SimpleEvaluationCreate"}},"type":"object","required":["evaluation"],"title":"SimpleEvaluationCreateRequest"},"SimpleEvaluationData":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"query_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Query Steps"},"testset_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Testset Steps"},"application_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Application Steps"},"evaluator_steps":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Evaluator Steps"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats"}},"type":"object","title":"SimpleEvaluationData"},"SimpleEvaluationEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"version":{"type":"string","title":"Version","default":"2025-07-14"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluationData"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationEdit"},"SimpleEvaluationEditRequest":{"properties":{"evaluation":{"$ref":"#/components/schemas/SimpleEvaluationEdit"}},"type":"object","required":["evaluation"],"title":"SimpleEvaluationEditRequest"},"SimpleEvaluationIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"evaluation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Evaluation Id"}},"type":"object","title":"SimpleEvaluationIdResponse"},"SimpleEvaluationQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Ids"}},"type":"object","title":"SimpleEvaluationQuery"},"SimpleEvaluationQueryRequest":{"properties":{"evaluation":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluationQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationQueryRequest"},"SimpleEvaluationResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"evaluation":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluation"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluationResponse"},"SimpleEvaluationsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"evaluations":{"items":{"$ref":"#/components/schemas/SimpleEvaluation"},"type":"array","title":"Evaluations","default":[]}},"type":"object","title":"SimpleEvaluationsResponse"},"SimpleEvaluator":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorData-Output"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"SimpleEvaluator"},"SimpleEvaluatorCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluatorCreate"},"SimpleEvaluatorCreateRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/SimpleEvaluatorCreate","description":"Simple evaluator payload (slug, name, flags, and `data` with `uri` + `parameters`)."}},"type":"object","required":["evaluator"],"title":"SimpleEvaluatorCreateRequest","description":"Body for creating an evaluator via the simple surface.\n\nCollapses artifact, variant, and first revision into one call. The\nresponse returns the same flat shape that `/simple/evaluators/query`\nexposes."},"SimpleEvaluatorData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleEvaluatorData"},"SimpleEvaluatorData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleEvaluatorData"},"SimpleEvaluatorEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleEvaluatorEdit"},"SimpleEvaluatorEditRequest":{"properties":{"evaluator":{"$ref":"#/components/schemas/SimpleEvaluatorEdit","description":"Simple evaluator edit payload. Requires the evaluator `id`. Renaming is temporarily disabled."}},"type":"object","required":["evaluator"],"title":"SimpleEvaluatorEditRequest","description":"Body for editing an evaluator via the simple surface."},"SimpleEvaluatorFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"SimpleEvaluatorFlags"},"SimpleEvaluatorQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"SimpleEvaluatorQuery"},"SimpleEvaluatorQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"},"is_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Managed"},"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Llm"},"is_hook":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hook"},"is_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Code"},"is_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Match"},"is_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Feedback"},"is_chat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Chat"},"has_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Url"},"has_script":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Script"},"has_handler":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Handler"}},"type":"object","title":"SimpleEvaluatorQueryFlags"},"SimpleEvaluatorQueryRequest":{"properties":{"evaluator":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluatorQuery"},{"type":"null"}],"description":"Filter on evaluator attributes (slug, slugs, flags, meta)."},"evaluator_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Evaluator Refs","description":"Restrict to these evaluators."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When true, include soft-deleted evaluators.","default":false},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination controls."}},"type":"object","title":"SimpleEvaluatorQueryRequest","description":"Body for filtering evaluators via the simple surface."},"SimpleEvaluatorResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 when an evaluator is returned, 0 otherwise.","default":0},"evaluator":{"anyOf":[{"$ref":"#/components/schemas/SimpleEvaluator"},{"type":"null"}],"description":"The flat evaluator record with latest variant and revision merged into `data`."}},"type":"object","title":"SimpleEvaluatorResponse","description":"Envelope for a single simple evaluator."},"SimpleEvaluatorsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of evaluators in `evaluators`.","default":0},"evaluators":{"items":{"$ref":"#/components/schemas/SimpleEvaluator"},"type":"array","title":"Evaluators","description":"Matching flat evaluator records."}},"type":"object","title":"SimpleEvaluatorsResponse","description":"Envelope for a list of simple evaluators."},"SimpleQueriesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queries":{"items":{"$ref":"#/components/schemas/SimpleQuery"},"type":"array","title":"Queries","default":[]}},"type":"object","title":"SimpleQueriesResponse"},"SimpleQuery":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Output"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"SimpleQuery"},"SimpleQueryCreate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleQueryCreate"},"SimpleQueryCreateRequest":{"properties":{"query":{"$ref":"#/components/schemas/SimpleQueryCreate"}},"type":"object","required":["query"],"title":"SimpleQueryCreateRequest"},"SimpleQueryEdit":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"$ref":"#/components/schemas/QueryRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleQueryEdit"},"SimpleQueryEditRequest":{"properties":{"query":{"$ref":"#/components/schemas/SimpleQueryEdit"}},"type":"object","required":["query"],"title":"SimpleQueryEditRequest"},"SimpleQueryQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/QueryQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"}},"type":"object","title":"SimpleQueryQuery"},"SimpleQueryQueryRequest":{"properties":{"query":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueryQuery"},{"type":"null"}]},"query_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Query Refs"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","default":false},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueryQueryRequest"},"SimpleQueryResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"query":{"anyOf":[{"$ref":"#/components/schemas/SimpleQuery"},{"type":"null"}]}},"type":"object","title":"SimpleQueryResponse"},"SimpleQueue":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}],"default":"pending"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueData"},{"type":"null"}]},"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"SimpleQueue"},"SimpleQueueCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"$ref":"#/components/schemas/EvaluationStatus"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueData"},{"type":"null"}]}},"type":"object","title":"SimpleQueueCreate"},"SimpleQueueCreateRequest":{"properties":{"queue":{"$ref":"#/components/schemas/SimpleQueueCreate"}},"type":"object","required":["queue"],"title":"SimpleQueueCreateRequest"},"SimpleQueueData":{"properties":{"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueKind"},{"type":"null"}]},"queries":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Queries"},"testsets":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testsets"},"evaluators":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"additionalProperties":{"type":"string","enum":["custom","human","auto"]},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Evaluators"},"repeats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repeats"},"assignments":{"anyOf":[{"items":{"items":{"type":"string","format":"uuid"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Assignments"},"settings":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueSettings"},{"type":"null"}]}},"type":"object","title":"SimpleQueueData"},"SimpleQueueIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queue_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Queue Id"}},"type":"object","title":"SimpleQueueIdResponse"},"SimpleQueueKind":{"type":"string","enum":["traces","testcases"],"title":"SimpleQueueKind"},"SimpleQueueQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueKind"},{"type":"null"}]},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"User Ids"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"},"run_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Run Ids"},"queue_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Queue Ids"}},"type":"object","title":"SimpleQueueQuery"},"SimpleQueueQueryRequest":{"properties":{"queue":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueueQueryRequest"},"SimpleQueueResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queue":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueue"},{"type":"null"}]}},"type":"object","title":"SimpleQueueResponse"},"SimpleQueueScenariosQuery":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"User Ids"}},"type":"object","title":"SimpleQueueScenariosQuery"},"SimpleQueueScenariosQueryRequest":{"properties":{"queue":{"anyOf":[{"$ref":"#/components/schemas/SimpleQueueScenariosQuery"},{"type":"null"}]},"scenario":{"anyOf":[{"$ref":"#/components/schemas/EvaluationScenarioQuery"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueueScenariosQueryRequest"},"SimpleQueueScenariosResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"scenarios":{"items":{"$ref":"#/components/schemas/EvaluationScenario"},"type":"array","title":"Scenarios","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueueScenariosResponse"},"SimpleQueueSettings":{"properties":{"batch_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Size"},"batch_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Offset"}},"type":"object","title":"SimpleQueueSettings"},"SimpleQueueTestcasesCreateRequest":{"properties":{"testcase_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Testcase Ids"}},"type":"object","required":["testcase_ids"],"title":"SimpleQueueTestcasesCreateRequest"},"SimpleQueueTracesCreateRequest":{"properties":{"trace_ids":{"items":{"type":"string"},"type":"array","title":"Trace Ids"}},"type":"object","required":["trace_ids"],"title":"SimpleQueueTracesCreateRequest"},"SimpleQueuesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","default":0},"queues":{"items":{"$ref":"#/components/schemas/SimpleQueue"},"type":"array","title":"Queues","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"SimpleQueuesResponse"},"SimpleTestset":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Output"},{"type":"null"}]},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"}},"type":"object","title":"SimpleTestset"},"SimpleTestsetCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetCreate"},"SimpleTestsetCreateRequest":{"properties":{"testset":{"$ref":"#/components/schemas/SimpleTestsetCreate","description":"Simple testset to create. `data.testcases` is committed as the first revision on a single variant in one call."}},"type":"object","required":["testset"],"title":"SimpleTestsetCreateRequest"},"SimpleTestsetEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleTestsetEdit"},"SimpleTestsetEditRequest":{"properties":{"testset":{"$ref":"#/components/schemas/SimpleTestsetEdit","description":"Simple testset fields to update. If `data.testcases` is provided, a new revision is committed with those testcases."}},"type":"object","required":["testset"],"title":"SimpleTestsetEditRequest"},"SimpleTestsetQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"SimpleTestsetQuery"},"SimpleTestsetQueryRequest":{"properties":{"testset":{"anyOf":[{"$ref":"#/components/schemas/SimpleTestsetQuery"},{"type":"null"}],"description":"Attribute filter on the testset (flags, tags, meta)."},"testset_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs","description":"Restrict the query to specific testsets."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"Include soft-deleted testsets."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination. See the Query Pattern guide."}},"type":"object","title":"SimpleTestsetQueryRequest"},"SimpleTestsetResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 if a testset was returned, 0 otherwise.","default":0},"testset":{"anyOf":[{"$ref":"#/components/schemas/SimpleTestset"},{"type":"null"}],"description":"The testset with its latest revision testcases merged into `data.testcases`, and the revision ID on `revision_id`."}},"type":"object","title":"SimpleTestsetResponse"},"SimpleTestsetsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of simple testsets returned.","default":0},"testsets":{"items":{"$ref":"#/components/schemas/SimpleTestset"},"type":"array","title":"Testsets","description":"Simple testsets, each with its latest revision testcases merged in."}},"type":"object","title":"SimpleTestsetsResponse"},"SimpleTrace":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"SimpleTrace"},"SimpleTraceChannel":{"type":"string","enum":["otlp","web","sdk","api"],"title":"SimpleTraceChannel"},"SimpleTraceCreate":{"properties":{"origin":{"$ref":"#/components/schemas/SimpleTraceOrigin","default":"custom"},"kind":{"$ref":"#/components/schemas/SimpleTraceKind","default":"adhoc"},"channel":{"$ref":"#/components/schemas/SimpleTraceChannel","default":"api"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"$ref":"#/components/schemas/SimpleTraceReferences"},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"}],"title":"Links"}},"type":"object","required":["data","references","links"],"title":"SimpleTraceCreate"},"SimpleTraceCreateRequest":{"properties":{"trace":{"$ref":"#/components/schemas/SimpleTraceCreate","description":"The trace to create. Must include `data` (the payload being recorded) and typically `origin`, `kind`, and `channel` to describe where it came from. Optional `references` link the trace to Agenta entities (app, variant, revision, evaluator, testset, etc.)."}},"type":"object","required":["trace"],"title":"SimpleTraceCreateRequest","description":"Request body for creating a single-span \"simple\" trace."},"SimpleTraceEdit":{"properties":{"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object","title":"Data"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["data"],"title":"SimpleTraceEdit"},"SimpleTraceEditRequest":{"properties":{"trace":{"$ref":"#/components/schemas/SimpleTraceEdit","description":"The fields to update. `data` is required. `tags`, `meta`, `references`, and `links` overwrite their current values when present."}},"type":"object","required":["trace"],"title":"SimpleTraceEditRequest","description":"Request body for editing an existing \"simple\" trace."},"SimpleTraceKind":{"type":"string","enum":["adhoc","eval","play"],"title":"SimpleTraceKind"},"SimpleTraceLinkResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if a trace was removed, `0` otherwise.","default":0},"link":{"anyOf":[{"$ref":"#/components/schemas/OTelLink-Output"},{"type":"null"}],"description":"The `(trace_id, span_id)` pair that was removed."}},"type":"object","title":"SimpleTraceLinkResponse","description":"Response from `DELETE /simple/traces/{trace_id}`."},"SimpleTraceOrigin":{"type":"string","enum":["custom","human","auto"],"title":"SimpleTraceOrigin"},"SimpleTraceQuery":{"properties":{"origin":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceOrigin"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceKind"},{"type":"null"}]},"channel":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceChannel"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"references":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceReferences"},{"type":"null"}]},"links":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"object"},{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","title":"SimpleTraceQuery"},"SimpleTraceQueryRequest":{"properties":{"trace":{"anyOf":[{"$ref":"#/components/schemas/SimpleTraceQuery"},{"type":"null"}],"description":"Filter fields on the trace itself — `origin`, `kind`, `channel`, `tags`, `meta`, `references`, and inbound `links`. Filtering by `trace.links.invocation` is the common pattern for finding annotations on a given span."},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links","description":"Batch GET by the trace's own `(trace_id, span_id)`. Each entry matches the trace whose own identity equals the pair. Distinct from `trace.links`, which filters on inbound links."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time range."}},"type":"object","title":"SimpleTraceQueryRequest","description":"Request body for `POST /simple/traces/query`."},"SimpleTraceReferences":{"properties":{"query":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"query_variant":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"query_revision":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"testset":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"testset_variant":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"testset_revision":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"application":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"application_variant":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"application_revision":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"evaluator":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"evaluator_variant":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"evaluator_revision":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]},"testcase":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}]}},"type":"object","title":"SimpleTraceReferences"},"SimpleTraceResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if the trace was returned, `0` otherwise.","default":0},"trace":{"anyOf":[{"$ref":"#/components/schemas/SimpleTrace"},{"type":"null"}],"description":"The created or fetched trace, including server-assigned `trace_id` and `span_id`."}},"type":"object","title":"SimpleTraceResponse","description":"Response from a single-trace create/fetch/edit."},"SimpleTracesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of matching traces in this page.","default":0},"traces":{"items":{"$ref":"#/components/schemas/SimpleTrace"},"type":"array","title":"Traces","description":"The matching traces in the high-level `SimpleTrace` shape.","default":[]}},"type":"object","title":"SimpleTracesResponse","description":"Response from `POST /simple/traces/query`."},"SimpleWorkflow":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowData-Output"},{"type":"null"}]},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"SimpleWorkflow"},"SimpleWorkflowCreate":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleWorkflowCreate"},"SimpleWorkflowCreateRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/SimpleWorkflowCreate","description":"Simple-workflow create payload. Creates the artifact, a default variant, and an initial revision in one call."}},"type":"object","required":["workflow"],"title":"SimpleWorkflowCreateRequest"},"SimpleWorkflowData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleWorkflowData"},"SimpleWorkflowData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"SimpleWorkflowData"},"SimpleWorkflowEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowData-Input"},{"type":"null"}]}},"type":"object","title":"SimpleWorkflowEdit"},"SimpleWorkflowEditRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/SimpleWorkflowEdit","description":"Simple-workflow edit payload. Updates artifact-level fields and commits a new revision when `data` changes."}},"type":"object","required":["workflow"],"title":"SimpleWorkflowEditRequest"},"SimpleWorkflowFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"SimpleWorkflowFlags"},"SimpleWorkflowQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowQueryFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"SimpleWorkflowQuery"},"SimpleWorkflowQueryFlags":{"properties":{"is_application":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Application"},"is_evaluator":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Evaluator"},"is_snippet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Snippet"},"is_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Managed"},"is_custom":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom"},"is_llm":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Llm"},"is_hook":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hook"},"is_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Code"},"is_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Match"},"is_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Feedback"},"is_chat":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Chat"},"has_url":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Url"},"has_script":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Script"},"has_handler":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Handler"}},"type":"object","title":"SimpleWorkflowQueryFlags"},"SimpleWorkflowQueryRequest":{"properties":{"workflow":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflowQuery"},{"type":"null"}],"description":"Attribute filter on simple workflows (slug, slugs, flags, tags, meta)."},"workflow_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Workflow Refs","description":"Restrict results to workflows matching these references."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"When true, include archived workflows."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination controls."}},"type":"object","title":"SimpleWorkflowQueryRequest"},"SimpleWorkflowResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a simple workflow is returned, `0` when none matched.","default":0},"workflow":{"anyOf":[{"$ref":"#/components/schemas/SimpleWorkflow"},{"type":"null"}],"description":"Workflow artifact with its resolved variant and revision merged."}},"type":"object","title":"SimpleWorkflowResponse"},"SimpleWorkflowsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of workflows in the response.","default":0},"workflows":{"items":{"$ref":"#/components/schemas/SimpleWorkflow"},"type":"array","title":"Workflows","description":"Workflow artifacts each merged with their resolved variant and revision."}},"type":"object","title":"SimpleWorkflowsResponse"},"Span-Input":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"$ref":"#/components/schemas/TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"$ref":"#/components/schemas/SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"$ref":"#/components/schemas/OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"$ref":"#/components/schemas/OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelReference-Input"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelHash-Input"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEvent-Input"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"Span"},"Span-Output":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"$ref":"#/components/schemas/TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"$ref":"#/components/schemas/SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"$ref":"#/components/schemas/OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"$ref":"#/components/schemas/OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelReference-Output"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelHash-Output"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEvent-Output"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"Span"},"SpanResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if a span was returned, `0` otherwise.","default":0},"span":{"anyOf":[{"$ref":"#/components/schemas/Span-Output"},{"type":"null"}],"description":"The matching span, or `null` if not found."}},"type":"object","title":"SpanResponse"},"SpanType":{"type":"string","enum":["agent","chain","workflow","task","tool","embedding","query","llm","completion","chat","rerank","unknown"],"title":"SpanType"},"SpansNode-Input":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Input"},{"items":{"$ref":"#/components/schemas/SpansNode-Input"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"$ref":"#/components/schemas/TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"$ref":"#/components/schemas/SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"$ref":"#/components/schemas/OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"$ref":"#/components/schemas/OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelReference-Input"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Input"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelHash-Input"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEvent-Input"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"SpansNode"},"SpansNode-Output":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Output"},{"items":{"$ref":"#/components/schemas/SpansNode-Output"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"trace_id":{"type":"string","title":"Trace Id"},"span_id":{"type":"string","title":"Span Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"trace_type":{"anyOf":[{"$ref":"#/components/schemas/TraceType"},{"type":"null"}]},"span_type":{"anyOf":[{"$ref":"#/components/schemas/SpanType"},{"type":"null"}]},"span_kind":{"anyOf":[{"$ref":"#/components/schemas/OTelSpanKind"},{"type":"null"}]},"span_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Name"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"integer"},{"type":"null"}],"title":"End Time"},"status_code":{"anyOf":[{"$ref":"#/components/schemas/OTelStatusCode"},{"type":"null"}]},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"attributes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Attributes"},"references":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelReference-Output"},"type":"array"},{"type":"null"}],"title":"References"},"links":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelLink-Output"},"type":"array"},{"type":"null"}],"title":"Links"},"hashes":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelHash-Output"},"type":"array"},{"type":"null"}],"title":"Hashes"},"exception":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Exception"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/OTelEvent-Output"},"type":"array"},{"type":"null"}],"title":"Events"}},"type":"object","required":["trace_id","span_id"],"title":"SpansNode"},"SpansQueryRequest":{"properties":{"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Input"},{"type":"null"}],"description":"Span-level conditions."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time range."},"query_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve filtering/windowing from a saved query."},"query_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve from the latest revision of a specific query variant."},"query_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve from a specific query revision. Returns `409` when the revision's stored `formatting.focus` is `trace`."}},"type":"object","title":"SpansQueryRequest","description":"Request body for `POST /spans/query`."},"SpansResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Total number of matching spans in the window.","default":0},"spans":{"anyOf":[{"items":{"$ref":"#/components/schemas/Span-Output"},"type":"array"},{"type":"null"}],"title":"Spans","description":"Flat list of matching spans."}},"type":"object","title":"SpansResponse"},"SpansTree-Input":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Input"},{"items":{"$ref":"#/components/schemas/SpansNode-Input"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"}},"type":"object","title":"SpansTree"},"SpansTree-Output":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Output"},{"items":{"$ref":"#/components/schemas/SpansNode-Output"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"}},"type":"object","title":"SpansTree"},"StandardProviderDTO":{"properties":{"kind":{"$ref":"#/components/schemas/StandardProviderKind"},"provider":{"$ref":"#/components/schemas/StandardProviderSettingsDTO"}},"type":"object","required":["kind","provider"],"title":"StandardProviderDTO"},"StandardProviderKind":{"type":"string","enum":["openai","cohere","anyscale","deepinfra","alephalpha","groq","minimax","mistral","mistralai","anthropic","perplexityai","together_ai","openrouter","gemini"],"title":"StandardProviderKind"},"StandardProviderSettingsDTO":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"StandardProviderSettingsDTO"},"Status":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"stacktrace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stacktrace"}},"type":"object","title":"Status"},"StringOperator":{"type":"string","enum":["startswith","endswith","contains","matches","like"],"title":"StringOperator"},"Testcase-Input":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"Testcase-Output":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"set_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Set Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","title":"Testcase"},"TestcaseResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 if a testcase was returned, 0 otherwise.","default":0},"testcase":{"anyOf":[{"$ref":"#/components/schemas/Testcase-Output"},{"type":"null"}],"description":"The testcase blob. `data` carries the user-defined columns; `testcase_dedup_id` (inside `data`) is the caller-supplied dedup key when present."}},"type":"object","title":"TestcaseResponse"},"TestcasesQueryRequest":{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids","description":"Explicit list of testcase IDs to fetch. Combine with `testset_id` or testset references to scope the lookup."},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id","description":"Return all testcases stored in this testset. The testset owns its testcases as a content-addressed bag; a revision references a subset of these."},"testset_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Testset reference used to resolve the latest revision on the default variant. The revision's ordered testcase IDs are used for the lookup and pagination."},"testset_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Testset variant reference used to resolve the latest revision on that variant."},"testset_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific testset revision reference. The revision's ordered testcase IDs drive the lookup and cursor pagination."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination. When a revision reference is used, the cursor walks the revision's deterministic testcase ID list."}},"type":"object","title":"TestcasesQueryRequest"},"TestcasesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of testcases returned on this page.","default":0},"testcases":{"items":{"$ref":"#/components/schemas/Testcase-Output"},"type":"array","title":"Testcases","description":"Testcase blobs matching the query, in revision-order when scoped by a revision reference."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor for the next page, if more results exist."}},"type":"object","title":"TestcasesResponse"},"Testset":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Testset"},"TestsetCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"TestsetCreate"},"TestsetCreateRequest":{"properties":{"testset":{"$ref":"#/components/schemas/TestsetCreate","description":"Testset artifact to create. The call only creates the artifact row; testcases are added by committing a revision (see /testsets/revisions/commit) or by using the /simple/testsets/ surface."}},"type":"object","required":["testset"],"title":"TestsetCreateRequest"},"TestsetEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetEdit"},"TestsetEditRequest":{"properties":{"testset":{"$ref":"#/components/schemas/TestsetEdit","description":"Testset artifact fields to update. The `id` in the body must match the `testset_id` in the path."}},"type":"object","required":["testset"],"title":"TestsetEditRequest"},"TestsetFlags":{"properties":{},"type":"object","title":"TestsetFlags","description":"Placeholder for testset-level flags.\n\nThis model is intentionally empty but kept as a dedicated type so that:\n- existing references to `flags: Optional[TestsetFlags]` remain valid, and\n- structured flags can be added here in the future without breaking the\n surrounding DTOs."},"TestsetQuery":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"TestsetQuery"},"TestsetQueryRequest":{"properties":{"testset":{"anyOf":[{"$ref":"#/components/schemas/TestsetQuery"},{"type":"null"}],"description":"Attribute filter (name, description, slug, flags, tags, meta, folder)."},"testset_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs","description":"Restrict the query to specific testsets by reference (id or slug)."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"Include soft-deleted testsets."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination. See the Query Pattern guide."}},"type":"object","title":"TestsetQueryRequest"},"TestsetResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 if a testset was returned, 0 otherwise.","default":0},"testset":{"anyOf":[{"$ref":"#/components/schemas/Testset"},{"type":"null"}],"description":"The testset artifact. Does not include testcases."}},"type":"object","title":"TestsetResponse"},"TestsetRevision":{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"TestsetRevision"},"TestsetRevisionCommit":{"properties":{"testset_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"delta":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionDelta"},{"type":"null"}]}},"type":"object","title":"TestsetRevisionCommit"},"TestsetRevisionCommitRequest":{"properties":{"testset_revision_commit":{"$ref":"#/components/schemas/TestsetRevisionCommit","description":"New revision to commit. Pass either `data` (full replacement of the testcase list) or `delta` (add/remove/replace operations against the base revision) — not both."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects in the response."}},"type":"object","required":["testset_revision_commit"],"title":"TestsetRevisionCommitRequest"},"TestsetRevisionCreate":{"properties":{"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"TestsetRevisionCreate"},"TestsetRevisionCreateRequest":{"properties":{"testset_revision":{"$ref":"#/components/schemas/TestsetRevisionCreate","description":"Revision to create on an existing variant. Typically used to seed an empty revision; use /testsets/revisions/commit to set testcases."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects in the response. Defaults to true when the response would carry revision data."}},"type":"object","required":["testset_revision"],"title":"TestsetRevisionCreateRequest"},"TestsetRevisionData-Input":{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"$ref":"#/components/schemas/Testcase-Input"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},"TestsetRevisionData-Output":{"properties":{"testcase_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Testcase Ids"},"testcases":{"anyOf":[{"items":{"$ref":"#/components/schemas/Testcase-Output"},"type":"array"},{"type":"null"}],"title":"Testcases"}},"type":"object","title":"TestsetRevisionData"},"TestsetRevisionDelta":{"properties":{"rows":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionDeltaRows"},{"type":"null"}]},"columns":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionDeltaColumns"},{"type":"null"}]}},"type":"object","title":"TestsetRevisionDelta","description":"Operations to apply to a testset revision."},"TestsetRevisionDeltaColumns":{"properties":{"add":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Add"},"remove":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Remove"},"replace":{"anyOf":[{"items":{"prefixItems":[{"type":"string"},{"type":"string"}],"type":"array","maxItems":2,"minItems":2},"type":"array"},{"type":"null"}],"title":"Replace"}},"type":"object","title":"TestsetRevisionDeltaColumns","description":"Column-level operations applied to ALL testcases in the revision."},"TestsetRevisionDeltaRows":{"properties":{"add":{"anyOf":[{"items":{"$ref":"#/components/schemas/Testcase-Input"},"type":"array"},{"type":"null"}],"title":"Add"},"remove":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Remove"},"replace":{"anyOf":[{"items":{"$ref":"#/components/schemas/Testcase-Input"},"type":"array"},{"type":"null"}],"title":"Replace"}},"type":"object","title":"TestsetRevisionDeltaRows","description":"Row-level operations applied to testcases in the revision."},"TestsetRevisionEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetRevisionEdit"},"TestsetRevisionEditRequest":{"properties":{"testset_revision":{"$ref":"#/components/schemas/TestsetRevisionEdit","description":"Revision fields to update. The `id` in the body must match the `testset_revision_id` in the path. Only metadata fields are editable; content is committed as a new revision."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects in the response."}},"type":"object","required":["testset_revision"],"title":"TestsetRevisionEditRequest"},"TestsetRevisionQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"authors":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Authors"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"dates":{"anyOf":[{"items":{"type":"string","format":"date-time"},"type":"array"},{"type":"null"}],"title":"Dates"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"TestsetRevisionQuery"},"TestsetRevisionQueryRequest":{"properties":{"testset_revision":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevisionQuery"},{"type":"null"}],"description":"Attribute filter on the revision (name, description, slug, author, date, message)."},"testset_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs","description":"Scope revisions to these testsets."},"testset_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Variant Refs","description":"Scope revisions to these variants."},"testset_revision_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Revision Refs","description":"Restrict to specific revisions by reference (id, slug, or version)."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"Include soft-deleted revisions."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects for each returned revision. Defaults to true."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination. See the Query Pattern guide."}},"type":"object","title":"TestsetRevisionQueryRequest"},"TestsetRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 if a revision was returned, 0 otherwise.","default":0},"testset_revision":{"anyOf":[{"$ref":"#/components/schemas/TestsetRevision"},{"type":"null"}],"description":"The testset revision. `data.testcase_ids` is the ordered list of testcase IDs; `data.testcases` is populated when `include_testcases` is true."}},"type":"object","title":"TestsetRevisionResponse"},"TestsetRevisionRetrieveRequest":{"properties":{"testset_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Testset reference. If only the testset is provided, the latest revision on its default variant is returned."},"testset_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Variant reference. Returns the latest revision on that variant."},"testset_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Revision reference. Returns that specific revision."},"include_testcase_ids":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcase Ids","description":"Include the ordered list of testcase IDs. Defaults to true (opt-out)."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects. Defaults to true (opt-out). Note: this opt-out default is the opposite of `/queries/revisions/retrieve`, where trace materialization is opt-in."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Windowing applied to the testcases list when materialized."}},"type":"object","title":"TestsetRevisionRetrieveRequest"},"TestsetRevisionsLog":{"properties":{"testset_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"testset_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"TestsetRevisionsLog"},"TestsetRevisionsLogRequest":{"properties":{"testset_revision":{"$ref":"#/components/schemas/TestsetRevisionsLog","description":"Scope for the log: one of `testset_id`, `testset_variant_id`, or `testset_revision_id`. Optional `depth` limits how far back to walk."},"include_testcases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Testcases","description":"Include full testcase objects for each returned revision."}},"type":"object","required":["testset_revision"],"title":"TestsetRevisionsLogRequest"},"TestsetRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of revisions returned.","default":0},"testset_revisions":{"items":{"$ref":"#/components/schemas/TestsetRevision"},"type":"array","title":"Testset Revisions","description":"Testset revisions matching the query, in the requested order."}},"type":"object","title":"TestsetRevisionsResponse"},"TestsetVariant":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetVariant"},"TestsetVariantCreate":{"properties":{"testset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Testset Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"TestsetVariantCreate"},"TestsetVariantCreateRequest":{"properties":{"testset_variant":{"$ref":"#/components/schemas/TestsetVariantCreate","description":"Variant to create on an existing testset. Pass `testset_id` to identify the parent artifact."}},"type":"object","required":["testset_variant"],"title":"TestsetVariantCreateRequest"},"TestsetVariantEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"TestsetVariantEdit"},"TestsetVariantEditRequest":{"properties":{"testset_variant":{"$ref":"#/components/schemas/TestsetVariantEdit","description":"Variant fields to update. The `id` in the body must match the `testset_variant_id` in the path."}},"type":"object","required":["testset_variant"],"title":"TestsetVariantEditRequest"},"TestsetVariantQuery":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/TestsetFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Slugs"}},"type":"object","title":"TestsetVariantQuery"},"TestsetVariantQueryRequest":{"properties":{"testset_variant":{"anyOf":[{"$ref":"#/components/schemas/TestsetVariantQuery"},{"type":"null"}],"description":"Attribute filter on the variant (name, description, slug, flags, tags, meta)."},"testset_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Refs","description":"Scope to variants whose parent testset matches one of these references."},"testset_variant_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Reference"},"type":"array"},{"type":"null"}],"title":"Testset Variant Refs","description":"Restrict the query to specific variants by reference (id or slug)."},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived","description":"Include soft-deleted variants."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor-based pagination. See the Query Pattern guide."}},"type":"object","title":"TestsetVariantQueryRequest"},"TestsetVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"1 if a variant was returned, 0 otherwise.","default":0},"testset_variant":{"anyOf":[{"$ref":"#/components/schemas/TestsetVariant"},{"type":"null"}],"description":"The testset variant (branch)."}},"type":"object","title":"TestsetVariantResponse"},"TestsetVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of variants returned.","default":0},"testset_variants":{"items":{"$ref":"#/components/schemas/TestsetVariant"},"type":"array","title":"Testset Variants","description":"Testset variants matching the query."}},"type":"object","title":"TestsetVariantsResponse"},"TestsetsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of testsets returned on this page.","default":0},"testsets":{"items":{"$ref":"#/components/schemas/Testset"},"type":"array","title":"Testsets","description":"Testset artifacts matching the query, without testcases."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor for the next page, if more results exist."}},"type":"object","title":"TestsetsResponse"},"TextOptions":{"properties":{"case_sensitive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Case Sensitive","default":false},"exact_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exact Match","default":false}},"type":"object","title":"TextOptions"},"ToolAuthScheme":{"type":"string","enum":["oauth","api_key"],"title":"ToolAuthScheme"},"ToolCall":{"properties":{"data":{"$ref":"#/components/schemas/ToolCallData"}},"type":"object","required":["data"],"title":"ToolCall","description":"Request envelope — wraps the raw OpenAI tool call."},"ToolCallData":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type","default":"function"},"function":{"$ref":"#/components/schemas/ToolCallFunction"}},"type":"object","required":["id","function"],"title":"ToolCallData","description":"OpenAI tool_calls array item — passed verbatim from the LLM."},"ToolCallFunction":{"properties":{"name":{"type":"string","title":"Name"},"arguments":{"title":"Arguments"}},"type":"object","required":["name","arguments"],"title":"ToolCallFunction","description":"Mirrors OpenAI function call: {name, arguments}."},"ToolCallResponse":{"properties":{"call":{"$ref":"#/components/schemas/ToolResult"}},"type":"object","required":["call"],"title":"ToolCallResponse"},"ToolCatalogAction":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo"}},"type":"object","required":["key","name"],"title":"ToolCatalogAction"},"ToolCatalogActionDetails":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"}},"type":"object","required":["key","name"],"title":"ToolCatalogActionDetails"},"ToolCatalogActionResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"action":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogAction"},{"$ref":"#/components/schemas/ToolCatalogActionDetails"},{"type":"null"}],"title":"Action"}},"type":"object","title":"ToolCatalogActionResponse"},"ToolCatalogActionsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"total":{"type":"integer","title":"Total","default":0},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"},"actions":{"items":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogAction"},{"$ref":"#/components/schemas/ToolCatalogActionDetails"}]},"type":"array","title":"Actions","default":[]}},"type":"object","title":"ToolCatalogActionsResponse"},"ToolCatalogIntegration":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"actions_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Actions Count"},"auth_schemes":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolAuthScheme"},"type":"array"},{"type":"null"}],"title":"Auth Schemes"}},"type":"object","required":["key","name"],"title":"ToolCatalogIntegration"},"ToolCatalogIntegrationDetails":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"actions_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Actions Count"},"auth_schemes":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolAuthScheme"},"type":"array"},{"type":"null"}],"title":"Auth Schemes"},"actions":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolCatalogAction"},"type":"array"},{"type":"null"}],"title":"Actions"}},"type":"object","required":["key","name"],"title":"ToolCatalogIntegrationDetails"},"ToolCatalogIntegrationResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"integration":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogIntegration"},{"$ref":"#/components/schemas/ToolCatalogIntegrationDetails"},{"type":"null"}],"title":"Integration"}},"type":"object","title":"ToolCatalogIntegrationResponse"},"ToolCatalogIntegrationsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"total":{"type":"integer","title":"Total","default":0},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"},"integrations":{"items":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogIntegration"},{"$ref":"#/components/schemas/ToolCatalogIntegrationDetails"}]},"type":"array","title":"Integrations","default":[]}},"type":"object","title":"ToolCatalogIntegrationsResponse"},"ToolCatalogProvider":{"properties":{"key":{"$ref":"#/components/schemas/ToolProviderKind"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"integrations_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Integrations Count"}},"type":"object","required":["key","name"],"title":"ToolCatalogProvider"},"ToolCatalogProviderDetails":{"properties":{"key":{"$ref":"#/components/schemas/ToolProviderKind"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"integrations_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Integrations Count"},"integrations":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolCatalogIntegration"},"type":"array"},{"type":"null"}],"title":"Integrations"}},"type":"object","required":["key","name"],"title":"ToolCatalogProviderDetails"},"ToolCatalogProviderResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"provider":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogProvider"},{"$ref":"#/components/schemas/ToolCatalogProviderDetails"},{"type":"null"}],"title":"Provider"}},"type":"object","title":"ToolCatalogProviderResponse"},"ToolCatalogProvidersResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"providers":{"items":{"anyOf":[{"$ref":"#/components/schemas/ToolCatalogProvider"},{"$ref":"#/components/schemas/ToolCatalogProviderDetails"}]},"type":"array","title":"Providers","default":[]}},"type":"object","title":"ToolCatalogProvidersResponse"},"ToolConnection":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"provider_key":{"$ref":"#/components/schemas/ToolProviderKind"},"integration_key":{"type":"string","title":"Integration Key"},"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Data"},"status":{"anyOf":[{"$ref":"#/components/schemas/ToolConnectionStatus"},{"type":"null"}]}},"type":"object","required":["provider_key","integration_key"],"title":"ToolConnection"},"ToolConnectionCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"provider_key":{"$ref":"#/components/schemas/ToolProviderKind"},"integration_key":{"type":"string","title":"Integration Key"},"data":{"anyOf":[{"$ref":"#/components/schemas/ToolConnectionCreateData"},{"type":"null"}]}},"type":"object","required":["provider_key","integration_key"],"title":"ToolConnectionCreate"},"ToolConnectionCreateData":{"properties":{"callback_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Callback Url"},"auth_scheme":{"anyOf":[{"$ref":"#/components/schemas/ToolAuthScheme"},{"type":"null"}]}},"type":"object","title":"ToolConnectionCreateData"},"ToolConnectionCreateRequest":{"properties":{"connection":{"$ref":"#/components/schemas/ToolConnectionCreate"}},"type":"object","required":["connection"],"title":"ToolConnectionCreateRequest"},"ToolConnectionResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"connection":{"anyOf":[{"$ref":"#/components/schemas/ToolConnection"},{"type":"null"}]}},"type":"object","title":"ToolConnectionResponse"},"ToolConnectionStatus":{"properties":{"redirect_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Url"}},"type":"object","title":"ToolConnectionStatus"},"ToolConnectionsResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"connections":{"items":{"$ref":"#/components/schemas/ToolConnection"},"type":"array","title":"Connections","default":[]}},"type":"object","title":"ToolConnectionsResponse"},"ToolProviderKind":{"type":"string","enum":["composio","agenta"],"title":"ToolProviderKind"},"ToolResult":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"anyOf":[{"$ref":"#/components/schemas/Status"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/ToolResultData"},{"type":"null"}]}},"type":"object","title":"ToolResult","description":"Response envelope with Agenta identity, status, and the OpenAI tool message."},"ToolResultData":{"properties":{"role":{"type":"string","title":"Role","default":"tool"},"tool_call_id":{"type":"string","title":"Tool Call Id"},"content":{"type":"string","title":"Content"}},"type":"object","required":["tool_call_id","content"],"title":"ToolResultData","description":"OpenAI tool message — passed verbatim back to the LLM."},"Trace-Input":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Input"},{"items":{"$ref":"#/components/schemas/SpansNode-Input"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Trace"},"Trace-Output":{"properties":{"spans":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/SpansNode-Output"},{"items":{"$ref":"#/components/schemas/SpansNode-Output"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Spans"},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id"}},"type":"object","title":"Trace"},"TraceIdResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if a `trace_id` was returned, `0` otherwise.","default":0},"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id","description":"32-char hex UUID identifying the trace that was created or edited."}},"type":"object","title":"TraceIdResponse"},"TraceIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of distinct trace IDs in this response.","default":0},"trace_ids":{"items":{"type":"string"},"type":"array","title":"Trace Ids","description":"32-char hex UUIDs of the traces that were ingested. Compare against the number you submitted to detect partial failures.","default":[]}},"type":"object","title":"TraceIdsResponse"},"TraceRequest":{"properties":{"trace":{"anyOf":[{"$ref":"#/components/schemas/Trace-Input"},{"type":"null"}],"description":"A single trace record (trace_id plus nested spans). The `trace_id` must match the path parameter on edit endpoints."}},"type":"object","title":"TraceRequest","description":"Ingest or edit payload for a single canonical `Trace`."},"TraceResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` if a trace was returned, `0` otherwise.","default":0},"trace":{"anyOf":[{"$ref":"#/components/schemas/Trace-Output"},{"type":"null"}],"description":"The trace in the canonical `Trace` shape (`trace_id` + nested `spans` tree)."}},"type":"object","title":"TraceResponse"},"TraceType":{"type":"string","enum":["invocation","annotation","unknown"],"title":"TraceType"},"TracesQueryRequest":{"properties":{"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Input"},{"type":"null"}],"description":"Span-level conditions. A trace matches when any of its spans matches."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time range (see [Query Pattern](/reference/api-guide/query-pattern#windowing))."},"query_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve filtering/windowing from a saved query by `id`/`slug`. Only one of the three `query_*_ref` fields is needed."},"query_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve from the latest revision of a specific query variant."},"query_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Resolve from a specific query revision. Returns `409` when the revision's stored `formatting.focus` is `span`."}},"type":"object","title":"TracesQueryRequest","description":"Request body for `POST /traces/query`."},"TracesRequest":{"properties":{"traces":{"anyOf":[{"items":{"$ref":"#/components/schemas/Trace-Input"},"type":"array"},{"type":"null"}],"title":"Traces","description":"List of trace records. Each record is a `trace_id` plus the nested `spans` tree. Equivalent to the map-shaped payload accepted by `POST /tracing/spans/ingest`."}},"type":"object","title":"TracesRequest","description":"Ingest payload in the canonical `Traces` list shape.\n\nUsed by `POST /traces/ingest`. Each entry is one trace with its\n`trace_id` and a nested `spans` tree."},"TracesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Total number of matching traces in the window.","default":0},"traces":{"anyOf":[{"items":{"$ref":"#/components/schemas/Trace-Output"},"type":"array"},{"type":"null"}],"title":"Traces","description":"List of traces in the canonical `Traces` shape. For the map-shaped payload keyed by `trace_id`, call `POST /tracing/spans/query` with `focus=\"trace\"`."}},"type":"object","title":"TracesResponse"},"TracingQuery":{"properties":{"formatting":{"anyOf":[{"$ref":"#/components/schemas/Formatting"},{"type":"null"}]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]},"filtering":{"anyOf":[{"$ref":"#/components/schemas/Filtering-Output"},{"type":"null"}]}},"type":"object","title":"TracingQuery"},"UpdateProjectRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"make_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Make Default"}},"type":"object","title":"UpdateProjectRequest"},"UpdateSecretDTO":{"properties":{"header":{"anyOf":[{"$ref":"#/components/schemas/Header"},{"type":"null"}]},"secret":{"anyOf":[{"$ref":"#/components/schemas/SecretDTO"},{"type":"null"}]}},"type":"object","title":"UpdateSecretDTO"},"UpdateWorkspace":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","title":"UpdateWorkspace"},"UserIdsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of user IDs in this page.","default":0},"user_ids":{"items":{"type":"string"},"type":"array","title":"User Ids","description":"Distinct values of `ag.user.id` in this page.","default":[]},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor for the next page. Pass verbatim as `windowing.next`."}},"type":"object","title":"UserIdsResponse"},"UserRole":{"properties":{"email":{"type":"string","title":"Email"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"organization_id":{"type":"string","title":"Organization Id"}},"type":"object","required":["email","organization_id"],"title":"UserRole"},"UserUpdate":{"properties":{"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","title":"UserUpdate"},"UsersQueryRequest":{"properties":{"realtime":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Realtime","description":"When `true`, paginate by `last_active`. When `false` or unset, paginate by the stable `first_active` cursor."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Cursor pagination and time range."}},"type":"object","title":"UsersQueryRequest","description":"Request body for `POST /tracing/users/query`."},"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"},"VariantFork":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"VariantFork"},"WebhookDeliveriesResponse":{"properties":{"count":{"type":"integer","title":"Count"},"deliveries":{"items":{"$ref":"#/components/schemas/WebhookDelivery"},"type":"array","title":"Deliveries","default":[]}},"type":"object","required":["count"],"title":"WebhookDeliveriesResponse"},"WebhookDelivery":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"$ref":"#/components/schemas/Status"},"data":{"anyOf":[{"$ref":"#/components/schemas/WebhookDeliveryData"},{"type":"null"}]},"subscription_id":{"type":"string","format":"uuid","title":"Subscription Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"}},"type":"object","required":["status","subscription_id","event_id"],"title":"WebhookDelivery"},"WebhookDeliveryCreate":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"status":{"$ref":"#/components/schemas/Status"},"data":{"anyOf":[{"$ref":"#/components/schemas/WebhookDeliveryData"},{"type":"null"}]},"subscription_id":{"type":"string","format":"uuid","title":"Subscription Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"}},"type":"object","required":["status","subscription_id","event_id"],"title":"WebhookDeliveryCreate"},"WebhookDeliveryCreateRequest":{"properties":{"delivery":{"$ref":"#/components/schemas/WebhookDeliveryCreate"}},"type":"object","required":["delivery"],"title":"WebhookDeliveryCreateRequest"},"WebhookDeliveryData":{"properties":{"event_type":{"anyOf":[{"$ref":"#/components/schemas/WebhookEventType"},{"type":"null"}]},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"},"response":{"anyOf":[{"$ref":"#/components/schemas/WebhookDeliveryResponseInfo"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["url"],"title":"WebhookDeliveryData"},"WebhookDeliveryQuery":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/Status"},{"type":"null"}]},"subscription_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subscription Id"},"event_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Event Id"}},"type":"object","title":"WebhookDeliveryQuery"},"WebhookDeliveryQueryRequest":{"properties":{"delivery":{"anyOf":[{"$ref":"#/components/schemas/WebhookDeliveryQuery"},{"type":"null"}]},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"WebhookDeliveryQueryRequest"},"WebhookDeliveryResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"delivery":{"anyOf":[{"$ref":"#/components/schemas/WebhookDelivery"},{"type":"null"}]}},"type":"object","title":"WebhookDeliveryResponse"},"WebhookDeliveryResponseInfo":{"properties":{"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"type":"object","title":"WebhookDeliveryResponseInfo"},"WebhookEventType":{"type":"string","enum":["webhooks.subscriptions.tested","traces.fetched","traces.queried","testcases.fetched","testcases.queried","applications.revisions.retrieved","applications.revisions.fetched","applications.revisions.queried","applications.revisions.logged","applications.revisions.committed","queries.revisions.retrieved","queries.revisions.fetched","queries.revisions.queried","queries.revisions.logged","queries.revisions.committed","testsets.revisions.retrieved","testsets.revisions.fetched","testsets.revisions.queried","testsets.revisions.logged","testsets.revisions.committed","evaluators.revisions.retrieved","evaluators.revisions.fetched","evaluators.revisions.queried","evaluators.revisions.logged","evaluators.revisions.committed","environments.revisions.retrieved","environments.revisions.fetched","environments.revisions.queried","environments.revisions.logged","environments.revisions.committed"],"title":"WebhookEventType","description":"Subscribable event types — a strict subset of EventType.\n\nValues are derived from EventType so the strings stay in sync.\nTo add a new subscribable event type, it must first exist in EventType."},"WebhookProviderDTO":{"properties":{"provider":{"$ref":"#/components/schemas/WebhookProviderSettingsDTO"}},"type":"object","required":["provider"],"title":"WebhookProviderDTO"},"WebhookProviderSettingsDTO":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"WebhookProviderSettingsDTO"},"WebhookSubscription":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"$ref":"#/components/schemas/WebhookSubscriptionData"},"secret_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Secret Id"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscription"},"WebhookSubscriptionCreate":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"data":{"$ref":"#/components/schemas/WebhookSubscriptionData"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscriptionCreate"},"WebhookSubscriptionCreateRequest":{"properties":{"subscription":{"$ref":"#/components/schemas/WebhookSubscriptionCreate"}},"type":"object","required":["subscription"],"title":"WebhookSubscriptionCreateRequest"},"WebhookSubscriptionData":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers"},"payload_fields":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Fields"},"auth_mode":{"anyOf":[{"type":"string","enum":["signature","authorization"]},{"type":"null"}],"title":"Auth Mode"},"event_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/WebhookEventType"},"type":"array"},{"type":"null"}],"title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookSubscriptionData"},"WebhookSubscriptionEdit":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"$ref":"#/components/schemas/WebhookSubscriptionData"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"}},"type":"object","required":["data"],"title":"WebhookSubscriptionEdit"},"WebhookSubscriptionEditRequest":{"properties":{"subscription":{"$ref":"#/components/schemas/WebhookSubscriptionEdit"}},"type":"object","required":["subscription"],"title":"WebhookSubscriptionEditRequest"},"WebhookSubscriptionQuery":{"properties":{"flags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"WebhookSubscriptionQuery"},"WebhookSubscriptionQueryRequest":{"properties":{"subscription":{"anyOf":[{"$ref":"#/components/schemas/WebhookSubscriptionQuery"},{"type":"null"}]},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Archived"},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}]}},"type":"object","title":"WebhookSubscriptionQueryRequest"},"WebhookSubscriptionResponse":{"properties":{"count":{"type":"integer","title":"Count","default":0},"subscription":{"anyOf":[{"$ref":"#/components/schemas/WebhookSubscription"},{"type":"null"}]}},"type":"object","title":"WebhookSubscriptionResponse"},"WebhookSubscriptionTestRequest":{"properties":{"subscription_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subscription Id"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/WebhookSubscriptionEdit"},{"$ref":"#/components/schemas/WebhookSubscriptionCreate"},{"type":"null"}],"title":"Subscription"}},"type":"object","title":"WebhookSubscriptionTestRequest"},"WebhookSubscriptionsResponse":{"properties":{"count":{"type":"integer","title":"Count"},"subscriptions":{"items":{"$ref":"#/components/schemas/WebhookSubscription"},"type":"array","title":"Subscriptions","default":[]}},"type":"object","required":["count"],"title":"WebhookSubscriptionsResponse"},"Windowing":{"properties":{"newest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Newest"},"oldest":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Oldest"},"next":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"order":{"anyOf":[{"type":"string","enum":["ascending","descending"]},{"type":"null"}],"title":"Order"},"interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"}},"type":"object","title":"Windowing"},"Workflow":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowArtifactFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"Workflow"},"WorkflowArtifactFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"WorkflowArtifactFlags"},"WorkflowCatalogFlags":{"properties":{"is_archived":{"type":"boolean","title":"Is Archived","default":false},"is_recommended":{"type":"boolean","title":"Is Recommended","default":false},"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"WorkflowCatalogFlags"},"WorkflowCatalogPreset":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"WorkflowCatalogPreset"},"WorkflowCatalogPresetResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when the preset is returned, `0` when not found.","default":0},"preset":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogPreset"},{"type":"null"}],"description":"Named parameter set defined against a template."}},"type":"object","title":"WorkflowCatalogPresetResponse"},"WorkflowCatalogPresetsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of presets returned.","default":0},"presets":{"items":{"$ref":"#/components/schemas/WorkflowCatalogPreset"},"type":"array","title":"Presets","description":"Named parameter sets defined against a template."}},"type":"object","title":"WorkflowCatalogPresetsResponse"},"WorkflowCatalogTemplate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogFlags"},{"type":"null"}]},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","required":["key"],"title":"WorkflowCatalogTemplate"},"WorkflowCatalogTemplateResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when the template is returned, `0` when not found.","default":0},"template":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogTemplate"},{"type":"null"}],"description":"Workflow blueprint (key, name, description, flags, default data)."}},"type":"object","title":"WorkflowCatalogTemplateResponse"},"WorkflowCatalogTemplatesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of templates returned.","default":0},"templates":{"items":{"$ref":"#/components/schemas/WorkflowCatalogTemplate"},"type":"array","title":"Templates","description":"Workflow blueprints shipped with the product."}},"type":"object","title":"WorkflowCatalogTemplatesResponse"},"WorkflowCatalogType":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"key":{"type":"string","title":"Key"},"json_schema":{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object","title":"Json Schema"}},"type":"object","required":["key","json_schema"],"title":"WorkflowCatalogType"},"WorkflowCatalogTypeResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a type definition is returned, `0` when not found.","default":0},"type":{"anyOf":[{"$ref":"#/components/schemas/WorkflowCatalogType"},{"type":"null"}],"description":"JSON Schema fragment referenced by workflow input/output schemas via `x-ag-type-ref`."}},"type":"object","title":"WorkflowCatalogTypeResponse"},"WorkflowCatalogTypesResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of type definitions available.","default":0},"types":{"items":{"$ref":"#/components/schemas/WorkflowCatalogType"},"type":"array","title":"Types","description":"Shared JSON Schema fragments shipped with the product."}},"type":"object","title":"WorkflowCatalogTypesResponse"},"WorkflowCreate":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowCreate"},"WorkflowCreateRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowCreate","description":"Workflow artifact to create. Must include a project-unique `slug`; `name`, `description`, `flags`, `tags`, and `meta` are optional."}},"type":"object","required":["workflow"],"title":"WorkflowCreateRequest"},"WorkflowEdit":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowEdit"},"WorkflowEditRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowEdit","description":"Workflow fields to update. `id` is required and must match the path parameter; only supplied fields are modified."}},"type":"object","required":["workflow"],"title":"WorkflowEditRequest"},"WorkflowFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"WorkflowFlags","description":"Legacy full workflow flag set."},"WorkflowFork":{"properties":{"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFork"},{"type":"null"}]},"revision":{"anyOf":[{"$ref":"#/components/schemas/RevisionFork"},{"type":"null"}]},"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFork"},{"type":"null"}]},"variant":{"anyOf":[{"$ref":"#/components/schemas/VariantFork"},{"type":"null"}]},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"WorkflowFork"},"WorkflowForkRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowFork","description":"Fork payload. Identify the source by `workflow_id` and `workflow_variant_id` (or equivalent slugs), supply a new `workflow_variant.slug` for the forked branch."}},"type":"object","required":["workflow"],"title":"WorkflowForkRequest"},"WorkflowResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a workflow is returned, `0` when none matched.","default":0},"workflow":{"anyOf":[{"$ref":"#/components/schemas/Workflow"},{"type":"null"}],"description":"The workflow artifact."}},"type":"object","title":"WorkflowResponse"},"WorkflowRevision-Input":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Input"},{"type":"null"}]}},"type":"object","title":"WorkflowRevision"},"WorkflowRevision-Output":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"author":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author"},"date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Output"},{"type":"null"}]}},"type":"object","title":"WorkflowRevision"},"WorkflowRevisionCommit":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"}},"type":"object","title":"WorkflowRevisionCommit"},"WorkflowRevisionCommitRequest":{"properties":{"workflow_revision":{"$ref":"#/components/schemas/WorkflowRevisionCommit","description":"Revision to append to a variant's history. Requires `workflow_variant_id` and optional `message`; `data` carries the new configuration."}},"type":"object","required":["workflow_revision"],"title":"WorkflowRevisionCommitRequest"},"WorkflowRevisionCreate":{"properties":{"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowRevisionCreate"},"WorkflowRevisionCreateRequest":{"properties":{"workflow_revision":{"$ref":"#/components/schemas/WorkflowRevisionCreate","description":"Revision to create on an existing variant. The revision is immutable once persisted; to change the payload, commit a new revision."}},"type":"object","required":["workflow_revision"],"title":"WorkflowRevisionCreateRequest"},"WorkflowRevisionData-Input":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Input"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"WorkflowRevisionData"},"WorkflowRevisionData-Output":{"properties":{"uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uri"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"headers":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/Reference"}]},"type":"object"},{"type":"null"}],"title":"Headers"},"runtime":{"anyOf":[{"type":"string","enum":["python","typescript","javascript"]},{"type":"null"}],"title":"Runtime"},"script":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script"},"schemas":{"anyOf":[{"$ref":"#/components/schemas/JsonSchemas-Output"},{"type":"null"}]},"parameters":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Parameters"}},"type":"object","title":"WorkflowRevisionData"},"WorkflowRevisionDeployRequest":{"properties":{"workflow_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Workflow artifact to deploy. One of the workflow refs is required."},"workflow_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Workflow variant to deploy. Resolves to the latest revision of this variant."},"workflow_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific workflow revision to deploy."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment artifact. One of the environment refs is required."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment variant."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Target environment revision."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Reference key to set on the environment revision. Defaults to `.revision` when omitted."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Commit message recorded on the resulting environment revision."}},"type":"object","title":"WorkflowRevisionDeployRequest"},"WorkflowRevisionEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowRevisionEdit"},"WorkflowRevisionEditRequest":{"properties":{"workflow_revision":{"$ref":"#/components/schemas/WorkflowRevisionEdit","description":"Revision fields to update (lifecycle metadata only). Data and configuration are immutable — commit a new revision to change them."}},"type":"object","required":["workflow_revision"],"title":"WorkflowRevisionEditRequest"},"WorkflowRevisionFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"is_llm":{"type":"boolean","title":"Is Llm","default":false},"is_hook":{"type":"boolean","title":"Is Hook","default":false},"is_code":{"type":"boolean","title":"Is Code","default":false},"is_match":{"type":"boolean","title":"Is Match","default":false},"is_feedback":{"type":"boolean","title":"Is Feedback","default":false},"is_chat":{"type":"boolean","title":"Is Chat","default":false},"has_url":{"type":"boolean","title":"Has Url","default":false},"has_script":{"type":"boolean","title":"Has Script","default":false},"has_handler":{"type":"boolean","title":"Has Handler","default":false}},"type":"object","title":"WorkflowRevisionFlags"},"WorkflowRevisionFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"data":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevisionData-Input"},{"type":"null"}]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"WorkflowRevisionFork"},"WorkflowRevisionResolveRequest":{"properties":{"workflow_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Workflow artifact; resolves against its latest revision."},"workflow_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Workflow variant; resolves against its latest revision."},"workflow_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific workflow revision to resolve."},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevision-Input"},{"type":"null"}],"description":"Resolve the references embedded in this revision payload directly, without fetching it first."},"max_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Depth","description":"Maximum recursive depth for nested `@ag.references`.","default":10},"max_embeds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Embeds","description":"Maximum number of embeds to resolve in one call.","default":100},"error_policy":{"anyOf":[{"$ref":"#/components/schemas/ErrorPolicy"},{"type":"null"}],"description":"How to handle unresolved references: `EXCEPTION` or `IGNORE`.","default":"exception"}},"type":"object","title":"WorkflowRevisionResolveRequest"},"WorkflowRevisionResolveResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a revision is returned, `0` when none matched.","default":0},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevision-Output"},{"type":"null"}],"description":"The workflow revision with `@ag.references` replaced by their resolved payloads."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Metadata describing which references were resolved, depth reached, and errors."}},"type":"object","title":"WorkflowRevisionResolveResponse"},"WorkflowRevisionResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a revision is returned, `0` when none matched.","default":0},"workflow_revision":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRevision-Output"},{"type":"null"}],"description":"The workflow revision."},"resolution_info":{"anyOf":[{"$ref":"#/components/schemas/ResolutionInfo"},{"type":"null"}],"description":"Reference-resolution metadata; populated when `resolve=true` on retrieve."}},"type":"object","title":"WorkflowRevisionResponse"},"WorkflowRevisionRetrieveRequest":{"properties":{"workflow_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Return the latest revision across all variants of this workflow."},"workflow_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Return the latest revision of this variant."},"workflow_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Return this exact revision (by `id`, or by `slug` + `version`)."},"environment_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment artifact backing the deployment to resolve from."},"environment_variant_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Environment variant backing the deployment to resolve from."},"environment_revision_ref":{"anyOf":[{"$ref":"#/components/schemas/Reference"},{"type":"null"}],"description":"Specific environment revision to resolve from."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"Key into the environment revision's reference map. Required when retrieving via environment refs."},"resolve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolve","description":"When true, resolve `@ag.references` tokens embedded in the revision configuration before returning it."}},"type":"object","title":"WorkflowRevisionRetrieveRequest"},"WorkflowRevisionsLog":{"properties":{"workflow_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Revision Id"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"workflow_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Variant Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Depth"}},"type":"object","title":"WorkflowRevisionsLog"},"WorkflowRevisionsLogRequest":{"properties":{"workflow":{"$ref":"#/components/schemas/WorkflowRevisionsLog","description":"Log query. Supply `workflow_id`, `workflow_variant_id`, or `workflow_revision_id` to scope the log, and an optional `depth`."}},"type":"object","required":["workflow"],"title":"WorkflowRevisionsLogRequest"},"WorkflowRevisionsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of revisions in this page.","default":0},"workflow_revisions":{"items":{"$ref":"#/components/schemas/WorkflowRevision-Output"},"type":"array","title":"Workflow Revisions","description":"Workflow revisions matching the query, ordered by commit time."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Pagination cursor."}},"type":"object","title":"WorkflowRevisionsResponse"},"WorkflowVariant":{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Output"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Output"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"created_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Id"},"updated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By Id"},"deleted_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Deleted By Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowVariant"},"WorkflowVariantCreate":{"properties":{"workflow_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workflow Id"},"artifact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Artifact Id"},"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowVariantCreate"},"WorkflowVariantCreateRequest":{"properties":{"workflow_variant":{"$ref":"#/components/schemas/WorkflowVariantCreate","description":"Variant to create under an existing workflow. Requires `workflow_id` (the artifact) and a project-unique `slug`."}},"type":"object","required":["workflow_variant"],"title":"WorkflowVariantCreateRequest"},"WorkflowVariantEdit":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"}},"type":"object","title":"WorkflowVariantEdit"},"WorkflowVariantEditRequest":{"properties":{"workflow_variant":{"$ref":"#/components/schemas/WorkflowVariantEdit","description":"Variant fields to update. `id` is required and must match the path parameter."}},"type":"object","required":["workflow_variant"],"title":"WorkflowVariantEditRequest"},"WorkflowVariantFlags":{"properties":{"is_application":{"type":"boolean","title":"Is Application","default":false},"is_evaluator":{"type":"boolean","title":"Is Evaluator","default":false},"is_snippet":{"type":"boolean","title":"Is Snippet","default":false}},"type":"object","title":"WorkflowVariantFlags"},"WorkflowVariantFork":{"properties":{"flags":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariantFlags"},{"type":"null"}]},"tags":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/LabelJson-Input"},"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/FullJson-Input"},"type":"object"},{"type":"null"}],"title":"Meta"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"WorkflowVariantFork"},"WorkflowVariantResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"`1` when a variant is returned, `0` when none matched.","default":0},"workflow_variant":{"anyOf":[{"$ref":"#/components/schemas/WorkflowVariant"},{"type":"null"}],"description":"The workflow variant."}},"type":"object","title":"WorkflowVariantResponse"},"WorkflowVariantsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of variants in this page.","default":0},"workflow_variants":{"items":{"$ref":"#/components/schemas/WorkflowVariant"},"type":"array","title":"Workflow Variants","description":"Workflow variants matching the query."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Pagination cursor."}},"type":"object","title":"WorkflowVariantsResponse"},"WorkflowsResponse":{"properties":{"support_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Id"},"support_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Support Ts"},"count":{"type":"integer","title":"Count","description":"Number of workflows in this page.","default":0},"workflows":{"items":{"$ref":"#/components/schemas/Workflow"},"type":"array","title":"Workflows","description":"Workflow artifacts matching the query."},"windowing":{"anyOf":[{"$ref":"#/components/schemas/Windowing"},{"type":"null"}],"description":"Pagination cursor; pass `windowing.next` back to fetch the following page."}},"type":"object","title":"WorkflowsResponse"},"Workspace":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","required":["name","type"],"title":"Workspace"},"WorkspaceMemberResponse":{"properties":{"user":{"additionalProperties":true,"type":"object","title":"User"},"roles":{"items":{"$ref":"#/components/schemas/WorkspacePermission"},"type":"array","title":"Roles"}},"type":"object","required":["user","roles"],"title":"WorkspaceMemberResponse"},"WorkspacePermission":{"properties":{"role_name":{"$ref":"#/components/schemas/WorkspaceRole"},"role_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Description"},"permissions":{"anyOf":[{"items":{"$ref":"#/components/schemas/Permission"},"type":"array"},{"type":"null"}],"title":"Permissions"}},"type":"object","required":["role_name"],"title":"WorkspacePermission"},"WorkspaceResponse":{"properties":{"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"organization":{"type":"string","title":"Organization"},"members":{"anyOf":[{"items":{"$ref":"#/components/schemas/WorkspaceMemberResponse"},"type":"array"},{"type":"null"}],"title":"Members"}},"type":"object","required":["id","type","organization"],"title":"WorkspaceResponse"},"WorkspaceRole":{"type":"string","enum":["owner","admin","developer","editor","annotator","viewer"],"title":"WorkspaceRole"},"ee__src__models__api__organization_models__Organization":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"owner_id":{"type":"string","format":"uuid","title":"Owner Id"},"members":{"items":{"type":"string"},"type":"array","title":"Members"},"invitations":{"items":{},"type":"array","title":"Invitations"},"workspaces":{"items":{"type":"string"},"type":"array","title":"Workspaces"}},"type":"object","required":["id","owner_id"],"title":"Organization"},"oss__src__models__api__organization_models__Organization":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"flags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Flags"},"tags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tags"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"owner_id":{"type":"string","format":"uuid","title":"Owner Id"},"members":{"items":{"type":"string"},"type":"array","title":"Members"},"invitations":{"items":{},"type":"array","title":"Invitations"},"workspaces":{"items":{"type":"string"},"type":"array","title":"Workspaces"}},"type":"object","required":["id","owner_id"],"title":"Organization"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","name":"Authorization","in":"header"}}},"tags":[{"name":"Status","description":"API server liveness and readiness status."},{"name":"Organizations","description":"Manage organizations, workspaces, SSO domains, and identity providers."},{"name":"Workspaces","description":"Manage workspaces within an organization and their members."},{"name":"Projects","description":"Manage projects within a workspace."},{"name":"Users","description":"User profile and account management — view profile, update username, reset password."},{"name":"Keys","description":"Create and revoke API keys used to authenticate programmatic requests."},{"name":"Workflows","description":"Workflow definitions — the runnable pipelines that back an application."},{"name":"Applications","description":"LLM applications — create, update, list, and delete apps."},{"name":"Evaluators","description":"Evaluator definitions — the metrics and judges used in evaluation runs."},{"name":"Testsets","description":"Test datasets — collections of input/output pairs used in evaluations."},{"name":"Testcases","description":"Individual test cases within a testset."},{"name":"Queries","description":"Saved query definitions used to filter and retrieve trace data."},{"name":"Traces","description":"Ingest and query traces, spans, and metrics from running applications."},{"name":"Invocations","description":"Run an application against a payload and capture the resulting trace."},{"name":"Annotations","description":"Attach evaluator-style feedback to existing traces and spans."},{"name":"Evaluations","description":"Evaluation runs — execute evaluators against variants and testsets."},{"name":"Environments","description":"Deployment environments (e.g. production, staging) and their active variants."},{"name":"Secrets","description":"Manage provider credentials and secret values stored in the vault."},{"name":"Tools","description":"External tool connections and OAuth integrations available to applications."},{"name":"Folders","description":"Organize applications and other resources into folder hierarchies."},{"name":"Webhooks","description":"Register and manage webhooks that fire on platform events."},{"name":"OpenTelemetry","description":"OTLP-compatible endpoints for ingesting traces directly from OpenTelemetry-instrumented services."},{"name":"Access","description":"Authentication discovery, organization access checks, and SSO callback endpoints."},{"name":"Billing","description":"Subscription, plan, and usage endpoints for workspace billing."},{"name":"Admin","description":"Internal administration endpoints — restricted to platform operators."},{"name":"Legacy","description":"Stable legacy endpoints retained for existing integrations — not deprecated, but new integrations should prefer the canonical surface."},{"name":"Deprecated","description":"Deprecated endpoints kept for backwards compatibility — avoid in new integrations."}],"security":[{"APIKeyHeader":[]}],"servers":[{"url":"/api"},{"url":"http://localhost/api"}]} \ No newline at end of file diff --git a/docs/docs/self-host/04-dynamic-access-controls.mdx b/docs/docs/self-host/04-dynamic-access-controls.mdx index 98a72e343c..6ab6e8b86a 100644 --- a/docs/docs/self-host/04-dynamic-access-controls.mdx +++ b/docs/docs/self-host/04-dynamic-access-controls.mdx @@ -78,7 +78,7 @@ Used by `counters` and `gauges` map values. ### Flag keys {#flag-keys} -`rbac`, `access`, `domains`, `sso`. Values are booleans. +`rbac`, `audit`, `access`, `domains`, `sso`. Values are booleans. ### Counter keys {#counter-keys} @@ -87,9 +87,10 @@ Used by `counters` and `gauges` map values. `traces_ingested` and `events_ingested` are independent retention domains: each has its own counter, its own retention window, its own admin flush endpoint (`/admin/spans/flush` and `/admin/events/flush`), and its own cron -schedule. Setting one does not affect the other. `events_ingested` is a -retention-only counter; operators set its `retention` per plan to bound how -long event rows live. +schedule. Setting one does not affect the other. `events_ingested` is +also an enforced usage counter: event publishing performs a soft quota +check before queueing, the events worker applies the authoritative meter +adjust, and operators can set `limit` as well as `retention` per plan. `traces_retrieved` is the only counter with a non-default `scope` and `period` in the code defaults: `scope=user`, `period=daily`, declared on @@ -124,6 +125,7 @@ starting point for any further customization via `AGENTA_ACCESS_PLANS`: "description": "Self-hosted enterprise — full access, no quotas.", "flags": { "rbac": true, + "audit": true, "access": true, "domains": true, "sso": true @@ -144,7 +146,7 @@ starting point for any further customization via `AGENTA_ACCESS_PLANS`: What's notable about the code-default shape: -- **All four flags are `true`.** RBAC, access controls, custom domains, and SSO are all on by default. +- **All five flags are `true`.** RBAC, audit-log access, access controls, custom domains, and SSO are all on by default. - **No counter has a `limit`.** Every counter is `limit: null` (omitted), so the meters layer tracks usage but never blocks a request. `strict: true` is structurally present so it kicks in the moment a `limit` is added. - **`traces_ingested` retention is unset.** The tracing-flush job iterates plans and skips this one — traces are kept forever unless you opt in. - **`events_ingested` retention is also unset.** Same behavior for events. diff --git a/hosting/docker-compose/ee/docker-compose.dev.yml b/hosting/docker-compose/ee/docker-compose.dev.yml index 81e850991f..fd11a1b266 100644 --- a/hosting/docker-compose/ee/docker-compose.dev.yml +++ b/hosting/docker-compose/ee/docker-compose.dev.yml @@ -86,6 +86,10 @@ services: "/sdks/python/agenta", "--reload-dir", "/clients/python/agenta_client", + "--reload-exclude", + "*.pyc", + "--reload-exclude", + "__pycache__", "--root-path", "/api", "--loop", @@ -369,6 +373,10 @@ services: "/sdks/python/agenta", "--reload-dir", "/clients/python/agenta_client", + "--reload-exclude", + "*.pyc", + "--reload-exclude", + "__pycache__", "--root-path", "/services", "--loop", diff --git a/hosting/docker-compose/oss/docker-compose.dev.yml b/hosting/docker-compose/oss/docker-compose.dev.yml index 28c0d1c408..b5c0f5e704 100644 --- a/hosting/docker-compose/oss/docker-compose.dev.yml +++ b/hosting/docker-compose/oss/docker-compose.dev.yml @@ -84,6 +84,10 @@ services: "/sdks/python/agenta", "--reload-dir", "/clients/python/agenta_client", + "--reload-exclude", + "*.pyc", + "--reload-exclude", + "__pycache__", "--root-path", "/api", "--loop", @@ -365,6 +369,10 @@ services: "/sdks/python/agenta", "--reload-dir", "/clients/python/agenta_client", + "--reload-exclude", + "*.pyc", + "--reload-exclude", + "__pycache__", "--root-path", "/services", "--loop", diff --git a/web/packages/agenta-api-client/src/generated/api/types/WebhookEventType.ts b/web/packages/agenta-api-client/src/generated/api/types/WebhookEventType.ts index ce9842d399..83af5d0d88 100644 --- a/web/packages/agenta-api-client/src/generated/api/types/WebhookEventType.ts +++ b/web/packages/agenta-api-client/src/generated/api/types/WebhookEventType.ts @@ -7,7 +7,35 @@ * To add a new subscribable event type, it must first exist in EventType. */ export const WebhookEventType = { - EnvironmentsRevisionsCommitted: "environments.revisions.committed", WebhooksSubscriptionsTested: "webhooks.subscriptions.tested", + TracesFetched: "traces.fetched", + TracesQueried: "traces.queried", + TestcasesFetched: "testcases.fetched", + TestcasesQueried: "testcases.queried", + ApplicationsRevisionsRetrieved: "applications.revisions.retrieved", + ApplicationsRevisionsFetched: "applications.revisions.fetched", + ApplicationsRevisionsQueried: "applications.revisions.queried", + ApplicationsRevisionsLogged: "applications.revisions.logged", + ApplicationsRevisionsCommitted: "applications.revisions.committed", + QueriesRevisionsRetrieved: "queries.revisions.retrieved", + QueriesRevisionsFetched: "queries.revisions.fetched", + QueriesRevisionsQueried: "queries.revisions.queried", + QueriesRevisionsLogged: "queries.revisions.logged", + QueriesRevisionsCommitted: "queries.revisions.committed", + TestsetsRevisionsRetrieved: "testsets.revisions.retrieved", + TestsetsRevisionsFetched: "testsets.revisions.fetched", + TestsetsRevisionsQueried: "testsets.revisions.queried", + TestsetsRevisionsLogged: "testsets.revisions.logged", + TestsetsRevisionsCommitted: "testsets.revisions.committed", + EvaluatorsRevisionsRetrieved: "evaluators.revisions.retrieved", + EvaluatorsRevisionsFetched: "evaluators.revisions.fetched", + EvaluatorsRevisionsQueried: "evaluators.revisions.queried", + EvaluatorsRevisionsLogged: "evaluators.revisions.logged", + EvaluatorsRevisionsCommitted: "evaluators.revisions.committed", + EnvironmentsRevisionsRetrieved: "environments.revisions.retrieved", + EnvironmentsRevisionsFetched: "environments.revisions.fetched", + EnvironmentsRevisionsQueried: "environments.revisions.queried", + EnvironmentsRevisionsLogged: "environments.revisions.logged", + EnvironmentsRevisionsCommitted: "environments.revisions.committed", } as const; export type WebhookEventType = (typeof WebhookEventType)[keyof typeof WebhookEventType];