{"openapi":"3.1.0","info":{"title":"API Reference","version":"1.0.0"},"paths":{"/api/request-logs/":{"post":{"operationId":"create-span","summary":"Create Span","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["spans"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogCreateRequest"}}}}},"get":{"operationId":"api-request-logs-list","summary":"Api Request Logs List","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["logs"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedRequestLogCreateList"}}}}}}},"/api/request-logs/{unique_id}/":{"get":{"operationId":"retrieve-span","summary":"Retrieve Span","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["spans"],"parameters":[{"name":"unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2Detail"}}}}}},"patch":{"operationId":"update-span","summary":"Update Span","description":"Update mutable fields via lightweight UPDATE (CH 25.7+).","tags":["spans"],"parameters":[{"name":"unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2Detail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHLogV2DetailRequest"}}}}},"post":{"operationId":"api-request-logs-create-2","summary":"Api Request Logs Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["logs"],"parameters":[{"name":"unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2Detail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2DetailRequest"}}}}},"put":{"operationId":"api-request-logs-update","summary":"Api Request Logs Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2Detail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2DetailRequest"}}}}}},"/api/request-logs/bulk/":{"post":{"operationId":"bulk-create-spans","summary":"Bulk Create Spans","description":"The single canonical mixin for bulk endpoints.\n\nEvery view in this codebase that processes a SET of items in one request\n(``/api/.../bulk/``, ``/.../bulk-create/``, ``/.../bulk-delete/``) MUST\ninherit this mixin. There is intentionally only one — strategy choice\n(per-item loop vs batched query vs async dispatch vs criterion-delete)\nlives in the SUBCLASS body of ``process_bulk``, not in the class\nhierarchy. Helpers in ``utils/bulk/strategies.py`` cover the common\nstrategies; subclasses can also implement custom logic.\n\nWhy a single mixin: see ``BE_conventions/bulk.md``. Variation by\nstrategy was the road we explicitly avoided.\n\nSubclass contract (required):\n    ``bulk_serializer_class``       — DRF serializer for the request body\n    ``get_bulk_items(validated_data) -> list``\n    ``process_bulk(items, **ctx) -> BulkOperationResponse``\n\nSubclass contract (optional):\n    ``bulk_max_size``               — default 500\n    ``get_bulk_context(request, validated_data) -> dict``\n    ``get_bulk_status_code(response) -> int``\n\nThe mixin defines ``post()`` to call ``handle_bulk_request``. DELETE-shaped\nbulk endpoints (criterion-based deletion) restrict ``http_method_names`` to\n``[\"delete\", \"options\"]`` and define ``delete()`` that delegates to\n``handle_bulk_request``.\n\nStatus code policy (override ``get_bulk_status_code`` for custom):\n    all-success     → 200\n    partial-success → 207\n    all-failure     → 400\n    over-limit      → 422 (returned directly, never reaches process_bulk)\n\nUsage::\n\n    class MyBulkView(BulkOperationMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        bulk_serializer_class = MyRequestSerializer\n        bulk_max_size = 100\n\n        def get_bulk_items(self, validated_data):\n            return validated_data[\"items\"]\n\n        def process_bulk(self, items, **ctx):\n            from utils.bulk.strategies import run_bulk_loop\n\n            def handle(*, item, index):\n                self._do_one(item, **ctx)\n\n            return run_bulk_loop(items, process_item=handle, is_atomic=True)","tags":["spans"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Spans_bulkCreateSpans_Response_200"}}}}}}},"/api/request-logs/list/":{"post":{"operationId":"list-spans","summary":"List Spans","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["spans"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHLogV2Detail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHLogV2DetailRequest"}}}}},"get":{"operationId":"api-request-logs-list-list","summary":"Api Request Logs List List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["logs"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicCHLogV2DetailList"}}}}}},"put":{"operationId":"api-request-logs-list-update","summary":"Api Request Logs List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHLogV2Detail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHLogV2DetailRequest"}}}}},"patch":{"operationId":"api-request-logs-list-partial-update","summary":"Api Request Logs List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHLogV2Detail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicCHLogV2DetailRequest"}}}}}},"/api/request-logs/summary/":{"post":{"operationId":"get-spans-summary","summary":"Get Spans Summary","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["spans"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2List"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2ListRequest"}}}}},"get":{"operationId":"api-request-logs-summary-retrieve","summary":"Api Request Logs Summary Retrieve","description":"Get logs summary. Uses MV when no filters, raw logs otherwise.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2List"}}}}}},"put":{"operationId":"api-request-logs-summary-update","summary":"Api Request Logs Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2List"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2ListRequest"}}}}},"patch":{"operationId":"api-request-logs-summary-partial-update","summary":"Api Request Logs Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2List"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHLogV2ListRequest"}}}}}},"/api/{unique_organization_id}/traces/{trace_unique_id}/":{"get":{"operationId":"retrieve-public-trace","summary":"Retrieve Public Trace","description":"Retrieve a single trace by trace_unique_id.\n\nPublic path (unique_organization_id in kwargs): checks ch_trace_metadata.is_public.\nAuthenticated path: gets org from auth context.","tags":["traces"],"parameters":[{"name":"trace_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"unique_organization_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Traces_retrievePublicTrace_Response_200"}}}}}},"post":{"operationId":"api-traces-create-2","summary":"Api Traces Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"trace_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"unique_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_traces_create_2_Response_200"}}}}}},"put":{"operationId":"api-traces-update-2","summary":"Api Traces Update 2","description":"Update a trace (placeholder for future implementation).","tags":["platformApi"],"parameters":[{"name":"trace_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"unique_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_traces_update_2_Response_200"}}}}}},"delete":{"operationId":"api-traces-destroy-2","summary":"Api Traces Destroy 2","description":"Delete a single trace by trace_unique_id.\nDeletes from CHLogV3 (raw spans) and CHTraceAggregation.\nParses start_time/end_time from query params for CH ORDER BY key efficiency.","tags":["platformApi"],"parameters":[{"name":"trace_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"unique_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-traces-partial-update-2","summary":"Api Traces Partial Update 2","description":"Toggle is_public on a trace via ch_trace_metadata upsert.\n\nReplacingMergeTree — INSERT with newer updated_at supersedes old row.\nPK hit on (org_id, trace_unique_id).","tags":["platformApi"],"parameters":[{"name":"trace_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"unique_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_traces_partial_update_2_Response_200"}}}}}}},"/api/traces/{trace_unique_id}/":{"get":{"operationId":"retrieve-trace","summary":"Retrieve Trace","description":"Retrieve a single trace by trace_unique_id.\n\nPublic path (unique_organization_id in kwargs): checks ch_trace_metadata.is_public.\nAuthenticated path: gets org from auth context.","tags":["traces"],"parameters":[{"name":"trace_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Traces_retrieveTrace_Response_200"}}}}}},"delete":{"operationId":"delete-trace","summary":"Delete Trace","description":"Delete a single trace by trace_unique_id.\nDeletes from CHLogV3 (raw spans) and CHTraceAggregation.\nParses start_time/end_time from query params for CH ORDER BY key efficiency.","tags":["traces"],"parameters":[{"name":"trace_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"share-trace","summary":"Share Trace","description":"Toggle is_public on a trace via ch_trace_metadata upsert.\n\nReplacingMergeTree — INSERT with newer updated_at supersedes old row.\nPK hit on (org_id, trace_unique_id).","tags":["traces"],"parameters":[{"name":"trace_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Traces_shareTrace_Response_200"}}}}}},"post":{"operationId":"api-traces-create","summary":"Api Traces Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["logs"],"parameters":[{"name":"trace_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_api_traces_create_Response_200"}}}}}},"put":{"operationId":"api-traces-update","summary":"Api Traces Update","description":"Update a trace (placeholder for future implementation).","tags":["logs"],"parameters":[{"name":"trace_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_api_traces_update_Response_200"}}}}}}},"/api/traces/bulk/":{"post":{"operationId":"bulk-delete-traces","summary":"Bulk Delete Traces","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["traces"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Traces_bulkDeleteTraces_Response_200"}}}}}},"put":{"operationId":"api-traces-bulk-update","summary":"Api Traces Bulk Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_api_traces_bulk_update_Response_200"}}}}}},"patch":{"operationId":"api-traces-bulk-partial-update","summary":"Api Traces Bulk Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_api_traces_bulk_partial_update_Response_200"}}}}}}},"/api/traces/list/":{"post":{"operationId":"list-traces","summary":"List Traces","description":"Handle POST requests the same as GET for filtering.","tags":["traces"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHTraceList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHTraceListRequest"}}}}},"get":{"operationId":"api-traces-list-list","summary":"Api Traces List List","description":"Get traces.","tags":["logs"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCHTraceListList"}}}}}},"put":{"operationId":"api-traces-list-update","summary":"Api Traces List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHTraceList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHTraceListRequest"}}}}},"patch":{"operationId":"api-traces-list-partial-update","summary":"Api Traces List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHTraceList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHTraceListRequest"}}}}}},"/api/v1/traces/ingest":{"post":{"operationId":"create-trace-legacy","summary":"Create Trace Legacy","description":"Process Vercel traces.","tags":["traces"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Traces_createTraceLegacy_Response_200"}}}}}}},"/api/v2/traces":{"post":{"operationId":"create-trace","summary":"Create Trace","description":"OTel Ingest v2 — passthrough endpoint.\n\nAccepts OTLP/HTTP JSON (primary) or protobuf (fallback).\nPromotes recognized Gen AI semantic conventions to typed columns.\nStores ALL remaining attributes in metadata — nothing is dropped.","tags":["traces"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Traces_createTrace_Response_200"}}}}}}},"/api/log_threads/":{"post":{"operationId":"list-threads","summary":"List Threads","description":"Handle POST requests the same as GET for filtering.","tags":["threads"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadListRequest"}}}}},"get":{"operationId":"api-log-threads-list","summary":"Api Log Threads List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["logs"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCHThreadListList"}}}}}},"put":{"operationId":"api-log-threads-update","summary":"Api Log Threads Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadListRequest"}}}}},"patch":{"operationId":"api-log-threads-partial-update","summary":"Api Log Threads Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHThreadListRequest"}}}}}},"/api/users/list/":{"post":{"operationId":"list-customers","summary":"List Customers","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserListRequest"}}}}},"get":{"operationId":"api-users-list-list","summary":"Api Users List List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["users"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCustomerUserListList"}}}}}},"put":{"operationId":"api-users-list-update","summary":"Api Users List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserListRequest"}}}}},"patch":{"operationId":"api-users-list-partial-update","summary":"Api Users List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCustomerUserListRequest"}}}}}},"/api/users/{customer_identifier}/":{"get":{"operationId":"retrieve-user","summary":"Retrieve User","description":"Consolidated single/detail view for customer users.\n\nServes BOTH:\n- Public API: /api/users/<customer_identifier>/ (URL path lookup)\n- Dashboard: /clickhouse/customer-users/<id>/?customer_identifier=xxx (query param lookup)\n\nRetrieves customer user from PostgreSQL (not ClickHouse) because:\n1. Point retrieval is weak in ClickHouse\n2. Update operations require PostgreSQL\n3. All aggregation data is already returned in the list view\n\nThis view returns editable fields + real-time usage from Redis.\nRate limited to protect against expensive point queries.\n\nUses SuperAdminMixin for queryset routing + object-level ownership.\nNo manual org injection needed - SuperAdminMixin handles patch() automatically.","tags":["users"],"parameters":[{"name":"customer_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetail"}}}}}},"patch":{"operationId":"update-user","summary":"Update User","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"customer_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCustomerUserDetailRequest"}}}}},"delete":{"operationId":"delete-user","summary":"Delete User","description":"Consolidated single/detail view for customer users.\n\nServes BOTH:\n- Public API: /api/users/<customer_identifier>/ (URL path lookup)\n- Dashboard: /clickhouse/customer-users/<id>/?customer_identifier=xxx (query param lookup)\n\nRetrieves customer user from PostgreSQL (not ClickHouse) because:\n1. Point retrieval is weak in ClickHouse\n2. Update operations require PostgreSQL\n3. All aggregation data is already returned in the list view\n\nThis view returns editable fields + real-time usage from Redis.\nRate limited to protect against expensive point queries.\n\nUses SuperAdminMixin for queryset routing + object-level ownership.\nNo manual org injection needed - SuperAdminMixin handles patch() automatically.","tags":["users"],"parameters":[{"name":"customer_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"post":{"operationId":"api-users-create-2","summary":"Api Users Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["users"],"parameters":[{"name":"customer_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetailRequest"}}}}},"put":{"operationId":"api-users-update-2","summary":"Api Users Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"customer_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetailRequest"}}}}}},"/api/accounts/":{"get":{"operationId":"api-accounts-list","summary":"Api Accounts List","description":"GET/POST /api/accounts/\n\nList and create platform accounts.\nRequires superadmin access (JWT or API key).\n\nGET: List all accounts with summarized info (paginated)\nPOST: Create a new account with email, password, and organization\n\nRequest body for POST:\n{\n    \"email\": \"user@example.com\",      // required\n    \"password\": \"securepass123\",      // required, min 8 chars\n    \"organization_name\": \"Org Name\",  // optional, default \"Test Org\"\n    \"create_organization\": true,      // optional, default true\n    \"is_active\": true                 // optional, default true\n}","tags":["users"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPlatformAccountListList"}}}}}},"post":{"operationId":"api-accounts-create","summary":"Api Accounts Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformAccountCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformAccountCreateRequest"}}}}},"put":{"operationId":"api-accounts-update","summary":"Api Accounts Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformAccountList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformAccountListRequest"}}}}},"patch":{"operationId":"api-accounts-partial-update","summary":"Api Accounts Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformAccountList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPlatformAccountListRequest"}}}}}},"/api/accounts/{email}/":{"get":{"operationId":"api-accounts-retrieve","summary":"Api Accounts Retrieve","description":"GET/PATCH/DELETE /api/accounts/{email}/\n\nRetrieve, update, or delete a single platform account by email.\nRequires superadmin access (JWT or API key).\n\nGET: Retrieve account details with full organization info\nPATCH: Update account fields (password, is_active, first_name, last_name)\nDELETE: Delete account and optionally their organization\n\nQuery params for DELETE:\n- is_delete_organization (bool): Whether to delete the organization (default: true)","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformAccountDetail"}}}}}},"put":{"operationId":"api-accounts-update-2","summary":"Api Accounts Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformAccountDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformAccountDetailRequest"}}}}},"delete":{"operationId":"api-accounts-destroy","summary":"Api Accounts Destroy","description":"GET/PATCH/DELETE /api/accounts/{email}/\n\nRetrieve, update, or delete a single platform account by email.\nRequires superadmin access (JWT or API key).\n\nGET: Retrieve account details with full organization info\nPATCH: Update account fields (password, is_active, first_name, last_name)\nDELETE: Delete account and optionally their organization\n\nQuery params for DELETE:\n- is_delete_organization (bool): Whether to delete the organization (default: true)","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-accounts-partial-update-2","summary":"Api Accounts Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformAccountUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPlatformAccountUpdateRequest"}}}}}},"/api/accounts/{email}/add-to-org/":{"get":{"operationId":"api-accounts-add-to-org-retrieve","summary":"Api Accounts Add To Org Retrieve","description":"Handle GET actions.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_accounts_add_to_org_retrieve_Response_200"}}}}}},"post":{"operationId":"api-accounts-add-to-org-create","summary":"Api Accounts Add To Org Create","description":"Handle POST actions.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_accounts_add_to_org_create_Response_200"}}}}}},"delete":{"operationId":"api-accounts-add-to-org-destroy","summary":"Api Accounts Add To Org Destroy","description":"Handle DELETE actions.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/api/accounts/{email}/allow-signup/":{"get":{"operationId":"api-accounts-allow-signup-retrieve","summary":"Api Accounts Allow Signup Retrieve","description":"Handle GET actions.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_accounts_allow_signup_retrieve_Response_200"}}}}}},"post":{"operationId":"api-accounts-allow-signup-create","summary":"Api Accounts Allow Signup Create","description":"Handle POST actions.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_accounts_allow_signup_create_Response_200"}}}}}},"delete":{"operationId":"api-accounts-allow-signup-destroy","summary":"Api Accounts Allow Signup Destroy","description":"Handle DELETE actions.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/api/accounts/{email}/change-role/":{"get":{"operationId":"api-accounts-change-role-retrieve","summary":"Api Accounts Change Role Retrieve","description":"Handle GET actions.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_accounts_change_role_retrieve_Response_200"}}}}}},"post":{"operationId":"api-accounts-change-role-create","summary":"Api Accounts Change Role Create","description":"Handle POST actions.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_accounts_change_role_create_Response_200"}}}}}},"delete":{"operationId":"api-accounts-change-role-destroy","summary":"Api Accounts Change Role Destroy","description":"Handle DELETE actions.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/api/accounts/{email}/invitations/":{"get":{"operationId":"api-accounts-invitations-retrieve","summary":"Api Accounts Invitations Retrieve","description":"Handle GET actions.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_accounts_invitations_retrieve_Response_200"}}}}}},"post":{"operationId":"api-accounts-invitations-create-2","summary":"Api Accounts Invitations Create 2","description":"Handle POST actions.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_accounts_invitations_create_2_Response_200"}}}}}},"delete":{"operationId":"api-accounts-invitations-destroy-2","summary":"Api Accounts Invitations Destroy 2","description":"Handle DELETE actions.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/api/accounts/{email}/remove-from-org/":{"get":{"operationId":"api-accounts-remove-from-org-retrieve","summary":"Api Accounts Remove From Org Retrieve","description":"Handle GET actions.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_accounts_remove_from_org_retrieve_Response_200"}}}}}},"post":{"operationId":"api-accounts-remove-from-org-create","summary":"Api Accounts Remove From Org Create","description":"Handle POST actions.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_accounts_remove_from_org_create_Response_200"}}}}}},"delete":{"operationId":"api-accounts-remove-from-org-destroy","summary":"Api Accounts Remove From Org Destroy","description":"Handle DELETE actions.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/api/accounts/{email}/revoke-signup-allow/":{"get":{"operationId":"api-accounts-revoke-signup-allow-retrieve","summary":"Api Accounts Revoke Signup Allow Retrieve","description":"Handle GET actions.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_accounts_revoke_signup_allow_retrieve_Response_200"}}}}}},"post":{"operationId":"api-accounts-revoke-signup-allow-create","summary":"Api Accounts Revoke Signup Allow Create","description":"Handle POST actions.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_accounts_revoke_signup_allow_create_Response_200"}}}}}},"delete":{"operationId":"api-accounts-revoke-signup-allow-destroy","summary":"Api Accounts Revoke Signup Allow Destroy","description":"Handle DELETE actions.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/api/accounts/{email}/transfer-ownership/":{"get":{"operationId":"api-accounts-transfer-ownership-retrieve","summary":"Api Accounts Transfer Ownership Retrieve","description":"Handle GET actions.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_accounts_transfer_ownership_retrieve_Response_200"}}}}}},"post":{"operationId":"api-accounts-transfer-ownership-create","summary":"Api Accounts Transfer Ownership Create","description":"Handle POST actions.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_accounts_transfer_ownership_create_Response_200"}}}}}},"delete":{"operationId":"api-accounts-transfer-ownership-destroy","summary":"Api Accounts Transfer Ownership Destroy","description":"Handle DELETE actions.","tags":["users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/api/accounts/invitations/":{"get":{"operationId":"api-accounts-invitations-list","summary":"Api Accounts Invitations List","description":"GET/POST /api/accounts/invitations/\n\nList all invitations with optional filters.\nRequires superadmin access.\n\nPOST is for filtering (not creation) - follows POST-for-Filtering pattern.\nUses standard filter format via `filters` payload key.\n\nQuery Parameters:\n    - page (int): Page number (default: 1)\n    - page_size (int): Items per page (default: 20, max: 100)\n    - sort_by (str): Field to sort by (default: -sent_at)\n\nFilters (in request body under \"filters\" key):\n    - organization_id: Filter by organization ID\n    - email: Filter by invited email (icontains, equals, startswith)\n    - accepted_at__isnull: Filter pending (true) vs accepted (false)","tags":["users"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedInvitationListList"}}}}}},"post":{"operationId":"api-accounts-invitations-create","summary":"Api Accounts Invitations Create","description":"POST is for filtering, delegate to GET.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationListRequest"}}}}},"put":{"operationId":"api-accounts-invitations-update","summary":"Api Accounts Invitations Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationListRequest"}}}}},"patch":{"operationId":"api-accounts-invitations-partial-update","summary":"Api Accounts Invitations Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedInvitationListRequest"}}}}}},"/api/accounts/invitations/{code}/":{"delete":{"operationId":"api-accounts-invitations-destroy","summary":"Api Accounts Invitations Destroy","description":"DELETE /api/accounts/invitations/{code}/\n\nRevoke/delete an invitation by its code (UUID).\nAlso removes the pending OrganizationUserRole if it exists.","tags":["users"],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/api/accounts/invitations/create/":{"post":{"operationId":"api-accounts-invitations-create-create","summary":"Api Accounts Invitations Create Create","description":"POST /api/accounts/invitations/\n\nCreate an invitation (golden finger - conjure invitation from thin air).\nDoes NOT send email - just creates the invitation record.\n\nRequest body:\n{\n    \"email\": \"invited@example.com\",  // required\n    \"organization_id\": 123,          // required\n    \"role\": \"member\",                // optional, default: member\n    \"message\": \"Welcome!\"            // optional\n}","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_accounts_invitations_create_create_Response_200"}}}}}}},"/api/accounts/list/":{"get":{"operationId":"api-accounts-list-list","summary":"Api Accounts List List","description":"GET/POST /api/accounts/list/\n\nFiltered listing of platform accounts.\nRequires superadmin access (JWT or API key).\n\nPOST is for filtering (not creation) - follows POST-for-Filtering pattern.\nUses standard filter format via `filters` payload key.\n\nQuery Parameters:\n    - page (int): Page number (default: 1)\n    - page_size (int): Items per page (default: 20, max: 100)\n    - sort_by (str): Field to sort by (default: -created_at)\n\nFilters (in request body under \"filters\" key):\n    - email: Filter by email (icontains, equals, startswith)\n    - is_active: Filter active/inactive accounts\n    - curr_org__isnull: Filter by organization presence\n    - created_at: Filter by creation date (time range)","tags":["users"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPlatformAccountListList"}}}}}},"post":{"operationId":"api-accounts-list-create","summary":"Api Accounts List Create","description":"POST is for filtering, delegate to GET.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformAccountList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformAccountListRequest"}}}}},"put":{"operationId":"api-accounts-list-update","summary":"Api Accounts List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformAccountList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformAccountListRequest"}}}}},"patch":{"operationId":"api-accounts-list-partial-update","summary":"Api Accounts List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformAccountList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPlatformAccountListRequest"}}}}}},"/api/accounts/signup-allowlist/":{"get":{"operationId":"api-accounts-signup-allowlist-retrieve","summary":"Api Accounts Signup Allowlist Retrieve","description":"GET /api/accounts/signup-allowlist/ — live read-out of both\nallowlist SETs (emails + domains) plus the current lockdown flag.\n\nMutations go through ``PlatformAccountActionsView`` (``allow-signup``\nand ``revoke-signup-allow`` actions). This view is read-only.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_accounts_signup_allowlist_retrieve_Response_200"}}}}}}},"/api/accounts/summary/":{"get":{"operationId":"api-accounts-summary-retrieve","summary":"Api Accounts Summary Retrieve","description":"Compute and return account summary statistics.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_accounts_summary_retrieve_Response_200"}}}}}},"post":{"operationId":"api-accounts-summary-create","summary":"Api Accounts Summary Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_accounts_summary_create_Response_200"}}}}}},"put":{"operationId":"api-accounts-summary-update","summary":"Api Accounts Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_accounts_summary_update_Response_200"}}}}}},"patch":{"operationId":"api-accounts-summary-partial-update","summary":"Api Accounts Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_accounts_summary_partial_update_Response_200"}}}}}}},"/api/create-api-key/":{"get":{"operationId":"api-create-api-key-list","summary":"Api Create Api Key List","description":"Plug-and-play plan-level count-limit enforcement on resource creation.\n\nA view declares ONE resource tag — its ``permission_resource`` (the same\n``Resources`` value that drives the RBAC permission) — and this mixin hooks\n``create()`` to enforce that resource's plan count limit automatically. No\nseparate ``plan_limited_resource``: the resource tag is the single source.\n\n    class DatasetsView(PlanLimitMixin, PermissionMapMixin, ListCreateAPIView):\n        permission_resource = Resources.DATASETS\n        # RBAC perm AND the dataset count cap both derive from this tag.\n\nThe \"what\" (model/field/filters/error per resource) lives in the\n``utils.plan_limits`` registry; ``PLAN_LIMIT_BY_RESOURCE`` maps the resource\ntag → its ``GatedResource``. A tag with no registry entry simply has no cap.\n\nHow the hook fires: DRF's ``ListCreateAPIView.post()`` delegates to\n``self.create()``, and views that override ``post()`` end with\n``super().post()`` — both reach this mixin's ``create()`` (it sits before\nthe generic view in the MRO). Views that define their own ``create()`` just\nneed to call ``super().create()`` and honour its return value.\n\nOrg resolution: ``get_limit_organization()`` defaults to the view's\n``get_organization()`` (the org the resource is created under, after any\nsuperadmin injection), falling back to the request user's org. Override it\nfor bespoke resolution (e.g. a superadmin *target* org).\n\nCustom non-``create()`` handlers (e.g. an ``update_or_create`` upsert) can't\nbe hooked; those call ``enforce_declared_limit()`` explicitly — still driven\noff the same resource tag.\n\nStaff exemption: Respan staff acting on an org's behalf bypass ALL plan\nlimits — a cross-cutting policy enforced centrally in\n``enforce_declared_limit`` (see ``is_plan_limit_exempt``), not re-stated per\nview. Every gated resource inherits it.","tags":["users"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedOrganizationKeyReadList"}}}}}},"post":{"operationId":"api-create-api-key-create","summary":"Api Create Api Key Create","description":"Create a new API key for the organization.\n\n``super().post()`` routes through\n``OrganizationInjectionMixin.post`` which calls\n``inject_target_organization(request)`` — that handles superadmin-\ngated ``organization`` / ``organization_id`` injection for us. We\nonly need to pin ``user`` (which the injection helper does not\ntouch) before delegating.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKey"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKeyRequest"}}}}}},"/api/delete-key/{id}/":{"get":{"operationId":"api-delete-key-retrieve","summary":"Api Delete Key Retrieve","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKeyRead"}}}}}},"delete":{"operationId":"api-delete-key-destroy","summary":"Api Delete Key Destroy","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-delete-key-partial-update","summary":"Api Delete Key Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKeyUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedOrganizationKeyUpdateRequest"}}}}}},"/api/get-keys":{"get":{"operationId":"api-get-keys-list","summary":"Api Get Keys List","description":"Plug-and-play plan-level count-limit enforcement on resource creation.\n\nA view declares ONE resource tag — its ``permission_resource`` (the same\n``Resources`` value that drives the RBAC permission) — and this mixin hooks\n``create()`` to enforce that resource's plan count limit automatically. No\nseparate ``plan_limited_resource``: the resource tag is the single source.\n\n    class DatasetsView(PlanLimitMixin, PermissionMapMixin, ListCreateAPIView):\n        permission_resource = Resources.DATASETS\n        # RBAC perm AND the dataset count cap both derive from this tag.\n\nThe \"what\" (model/field/filters/error per resource) lives in the\n``utils.plan_limits`` registry; ``PLAN_LIMIT_BY_RESOURCE`` maps the resource\ntag → its ``GatedResource``. A tag with no registry entry simply has no cap.\n\nHow the hook fires: DRF's ``ListCreateAPIView.post()`` delegates to\n``self.create()``, and views that override ``post()`` end with\n``super().post()`` — both reach this mixin's ``create()`` (it sits before\nthe generic view in the MRO). Views that define their own ``create()`` just\nneed to call ``super().create()`` and honour its return value.\n\nOrg resolution: ``get_limit_organization()`` defaults to the view's\n``get_organization()`` (the org the resource is created under, after any\nsuperadmin injection), falling back to the request user's org. Override it\nfor bespoke resolution (e.g. a superadmin *target* org).\n\nCustom non-``create()`` handlers (e.g. an ``update_or_create`` upsert) can't\nbe hooked; those call ``enforce_declared_limit()`` explicitly — still driven\noff the same resource tag.\n\nStaff exemption: Respan staff acting on an org's behalf bypass ALL plan\nlimits — a cross-cutting policy enforced centrally in\n``enforce_declared_limit`` (see ``is_plan_limit_exempt``), not re-stated per\nview. Every gated resource inherits it.","tags":["users"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedOrganizationKeyReadList"}}}}}},"post":{"operationId":"api-get-keys-create","summary":"Api Get Keys Create","description":"Create a new API key for the organization.\n\n``super().post()`` routes through\n``OrganizationInjectionMixin.post`` which calls\n``inject_target_organization(request)`` — that handles superadmin-\ngated ``organization`` / ``organization_id`` injection for us. We\nonly need to pin ``user`` (which the injection helper does not\ntouch) before delegating.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKey"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKeyRequest"}}}}}},"/api/keys/":{"get":{"operationId":"api-keys-list","summary":"Api Keys List","description":"Plug-and-play plan-level count-limit enforcement on resource creation.\n\nA view declares ONE resource tag — its ``permission_resource`` (the same\n``Resources`` value that drives the RBAC permission) — and this mixin hooks\n``create()`` to enforce that resource's plan count limit automatically. No\nseparate ``plan_limited_resource``: the resource tag is the single source.\n\n    class DatasetsView(PlanLimitMixin, PermissionMapMixin, ListCreateAPIView):\n        permission_resource = Resources.DATASETS\n        # RBAC perm AND the dataset count cap both derive from this tag.\n\nThe \"what\" (model/field/filters/error per resource) lives in the\n``utils.plan_limits`` registry; ``PLAN_LIMIT_BY_RESOURCE`` maps the resource\ntag → its ``GatedResource``. A tag with no registry entry simply has no cap.\n\nHow the hook fires: DRF's ``ListCreateAPIView.post()`` delegates to\n``self.create()``, and views that override ``post()`` end with\n``super().post()`` — both reach this mixin's ``create()`` (it sits before\nthe generic view in the MRO). Views that define their own ``create()`` just\nneed to call ``super().create()`` and honour its return value.\n\nOrg resolution: ``get_limit_organization()`` defaults to the view's\n``get_organization()`` (the org the resource is created under, after any\nsuperadmin injection), falling back to the request user's org. Override it\nfor bespoke resolution (e.g. a superadmin *target* org).\n\nCustom non-``create()`` handlers (e.g. an ``update_or_create`` upsert) can't\nbe hooked; those call ``enforce_declared_limit()`` explicitly — still driven\noff the same resource tag.\n\nStaff exemption: Respan staff acting on an org's behalf bypass ALL plan\nlimits — a cross-cutting policy enforced centrally in\n``enforce_declared_limit`` (see ``is_plan_limit_exempt``), not re-stated per\nview. Every gated resource inherits it.","tags":["users"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedOrganizationKeyReadList"}}}}}},"post":{"operationId":"api-keys-create","summary":"Api Keys Create","description":"Create a new API key for the organization.\n\n``super().post()`` routes through\n``OrganizationInjectionMixin.post`` which calls\n``inject_target_organization(request)`` — that handles superadmin-\ngated ``organization`` / ``organization_id`` injection for us. We\nonly need to pin ``user`` (which the injection helper does not\ntouch) before delegating.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKey"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKeyRequest"}}}}}},"/api/keys/{id}/":{"get":{"operationId":"api-keys-retrieve","summary":"Api Keys Retrieve","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKeyRead"}}}}}},"delete":{"operationId":"api-keys-destroy","summary":"Api Keys Destroy","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-keys-partial-update","summary":"Api Keys Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKeyUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedOrganizationKeyUpdateRequest"}}}}}},"/api/keys/list/":{"get":{"operationId":"api-keys-list-list","summary":"Api Keys List List","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["users"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedOrganizationKeyReadList"}}}}}},"post":{"operationId":"api-keys-list-filtered","summary":"Api Keys List Filtered","description":"List API keys with complex filtering via POST body.","tags":["users"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedOrganizationKeyReadList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKeyFilterRequestRequest"}}}}}},"/api/keys/summary/":{"get":{"operationId":"api-keys-summary-retrieve","summary":"Api Keys Summary Retrieve","description":"GET/POST /api/keys/summary/\n\nGet summary statistics for API keys.\n\nReturns:\n    {\n        \"total_count\": 5\n    }\n\nPOST supports filtering via body (POST-for-filtering pattern).","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKeySummaryResponse"}}}}}},"post":{"operationId":"api-keys-summary-filtered","summary":"Api Keys Summary Filtered","description":"Summary of API keys matching a POST-body filter.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKeySummaryResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKeyFilterRequestRequest"}}}}},"put":{"operationId":"api-keys-summary-update","summary":"Api Keys Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_keys_summary_update_Response_200"}}}}}},"patch":{"operationId":"api-keys-summary-partial-update","summary":"Api Keys Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_keys_summary_partial_update_Response_200"}}}}}}},"/api/organization/statistics/":{"get":{"operationId":"api-organization-statistics-retrieve","summary":"Api Organization Statistics Retrieve","description":"GET /api/organization/statistics/ - Retrieve organization statistics for a time range.\n\nReturns comprehensive metrics including:\n\nRequest & Token:\n    - total_requests, total_tokens, avg_tokens_per_request\n    - max_tokens_single_request, requests_per_active_day\n\nModel Usage:\n    - top_model (most used model name)\n    - top_model_requests (count for top model; divide by total_requests for %)\n    - number_of_models_used\n\nTime & Activity:\n    - most_active_day, peak_month\n    - days_since_org_created (from org.created_at, not ClickHouse)\n\nPrompt:\n    - total_prompts (all prompts in org, all time)\n    - prompts_used (logs using prompts in time range)\n\nPerformance:\n    - avg_latency_ms, success_rate\n\nTeam / Org:\n    - team_members_added (API users added in time range)\n    - total_users (customer users from ch_customer_user_agg, all time)\n    - team_member_emails (all team member emails)\n\nImportant Notes:\n    - ClickHouse metrics reflect post-deployment data only\n    - total_users refers to customer users, not team members\n    - top_model_requests is raw count; calculate percentage in frontend\n\nCaching & Performance:\n- Results cached in PostgreSQL (OrganizationDigest table)\n- Redis lock prevents concurrent computations\n- Returns 429 if computation already in progress\n- Rate limited to 10 requests/minute per organization\n\nAuthentication:\n- JWT (user sessions)\n- API Key (programmatic access)\n\nQuery Parameters:\n    - start_time (ISO 8601 UTC, required): Start of time range\n    - end_time (ISO 8601 UTC, required): End of time range\n\nResponse (200 OK):\n    {\n        \"organization_name\": \"Acme Inc\",\n        \"total_requests\": 15000,\n        \"total_tokens\": 2500000,\n        \"avg_tokens_per_request\": 166.67,\n        \"max_tokens_single_request\": 8000,\n        \"requests_per_active_day\": 250.0,\n        \"top_model\": \"gpt-4\",\n        \"top_model_requests\": 9825,\n        \"number_of_models_used\": 5,\n        \"most_active_day\": \"2024-06-15\",\n        \"peak_month\": \"June\",\n        \"days_since_org_created\": 180,\n        \"total_prompts\": 12,\n        \"prompts_used\": 8500,\n        \"avg_latency_ms\": 850.5,\n        \"success_rate\": 99.2,\n        \"team_members_added\": 3,\n        \"total_users\": 792,\n        \"team_member_emails\": [\"user1@example.com\", \"user2@example.com\"]\n    }\n\nError Responses:\n    - 400: Invalid parameters or computation failed\n    - 401: Authentication failed\n    - 404: Organization not found\n    - 429: Computation already in progress (locked)\n\nSee: boilerplates/keywordsai/feature_docs/users/organization_statistics_api_docs.md","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_organization_statistics_retrieve_Response_200"}}}}}}},"/api/organizations/{org_id}/feature-flags/":{"get":{"operationId":"api-organizations-feature-flags-retrieve","summary":"Api Organizations Feature Flags Retrieve","description":"List and create feature flags for an organization.\n\nGET    /api/organizations/<org_id>/feature-flags/\nPOST   /api/organizations/<org_id>/feature-flags/","tags":["users"],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_organizations_feature_flags_retrieve_Response_200"}}}}}},"post":{"operationId":"api-organizations-feature-flags-create","summary":"Api Organizations Feature Flags Create","description":"List and create feature flags for an organization.\n\nGET    /api/organizations/<org_id>/feature-flags/\nPOST   /api/organizations/<org_id>/feature-flags/","tags":["users"],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_organizations_feature_flags_create_Response_200"}}}}}}},"/api/organizations/{org_id}/feature-flags/{feature}/":{"delete":{"operationId":"api-organizations-feature-flags-destroy","summary":"Api Organizations Feature Flags Destroy","description":"Disable a feature flag for an organization.\n\nDELETE /api/organizations/<org_id>/feature-flags/<feature>/","tags":["users"],"parameters":[{"name":"feature","in":"path","required":true,"schema":{"type":"string"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/api/temporary-keys/{id}/":{"put":{"operationId":"api-temporary-keys-update","summary":"Api Temporary Keys Update","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKeyUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKeyUpdateRequest"}}}}},"get":{"operationId":"retrieve-api-key","summary":"Retrieve Api Key","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["temporaryApiKeys"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKeyUpdate"}}}}}},"patch":{"operationId":"update-api-key","summary":"Update Api Key","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["temporaryApiKeys"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKeyUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedOrganizationKeyUpdateRequest"}}}}},"delete":{"operationId":"delete-api-key","summary":"Delete Api Key","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["temporaryApiKeys"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/api/update-key/{id}/":{"get":{"operationId":"api-update-key-retrieve","summary":"Api Update Key Retrieve","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKeyRead"}}}}}},"delete":{"operationId":"api-update-key-destroy","summary":"Api Update Key Destroy","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-update-key-partial-update","summary":"Api Update Key Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKeyUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedOrganizationKeyUpdateRequest"}}}}}},"/api/user-org-settings/":{"get":{"operationId":"api-user-org-settings-retrieve","summary":"Api User Org Settings Retrieve","description":"GET/PATCH ``/api/user-org-settings/`` -- the caller's per-org settings.\n\nA singleton per (user, current org): there is no ``{id}`` in the URL, so\n``get_object`` resolves the one row for (request.user, current org). GET of a\nnever-written pair serializes an unsaved default ({pins: []}) rather than\ncreating a row; PATCH upserts last-write-wins.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOrgSetting"}}}}}},"patch":{"operationId":"api-user-org-settings-partial-update","summary":"Api User Org Settings Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOrgSetting"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedUserOrgSettingRequest"}}}}}},"/api/user/detail/{customer_identifier}/":{"get":{"operationId":"api-user-detail-retrieve","summary":"Api User Detail Retrieve","description":"Consolidated single/detail view for customer users.\n\nServes BOTH:\n- Public API: /api/users/<customer_identifier>/ (URL path lookup)\n- Dashboard: /clickhouse/customer-users/<id>/?customer_identifier=xxx (query param lookup)\n\nRetrieves customer user from PostgreSQL (not ClickHouse) because:\n1. Point retrieval is weak in ClickHouse\n2. Update operations require PostgreSQL\n3. All aggregation data is already returned in the list view\n\nThis view returns editable fields + real-time usage from Redis.\nRate limited to protect against expensive point queries.\n\nUses SuperAdminMixin for queryset routing + object-level ownership.\nNo manual org injection needed - SuperAdminMixin handles patch() automatically.","tags":["users"],"parameters":[{"name":"customer_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetail"}}}}}},"post":{"operationId":"api-user-detail-create","summary":"Api User Detail Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["users"],"parameters":[{"name":"customer_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetailRequest"}}}}},"put":{"operationId":"api-user-detail-update","summary":"Api User Detail Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"customer_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetailRequest"}}}}},"delete":{"operationId":"api-user-detail-destroy","summary":"Api User Detail Destroy","description":"Consolidated single/detail view for customer users.\n\nServes BOTH:\n- Public API: /api/users/<customer_identifier>/ (URL path lookup)\n- Dashboard: /clickhouse/customer-users/<id>/?customer_identifier=xxx (query param lookup)\n\nRetrieves customer user from PostgreSQL (not ClickHouse) because:\n1. Point retrieval is weak in ClickHouse\n2. Update operations require PostgreSQL\n3. All aggregation data is already returned in the list view\n\nThis view returns editable fields + real-time usage from Redis.\nRate limited to protect against expensive point queries.\n\nUses SuperAdminMixin for queryset routing + object-level ownership.\nNo manual org injection needed - SuperAdminMixin handles patch() automatically.","tags":["users"],"parameters":[{"name":"customer_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-user-detail-partial-update","summary":"Api User Detail Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"customer_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCustomerUserDetailRequest"}}}}}},"/api/user/update/{customer_identifier}/":{"get":{"operationId":"api-user-update-retrieve","summary":"Api User Update Retrieve","description":"Consolidated single/detail view for customer users.\n\nServes BOTH:\n- Public API: /api/users/<customer_identifier>/ (URL path lookup)\n- Dashboard: /clickhouse/customer-users/<id>/?customer_identifier=xxx (query param lookup)\n\nRetrieves customer user from PostgreSQL (not ClickHouse) because:\n1. Point retrieval is weak in ClickHouse\n2. Update operations require PostgreSQL\n3. All aggregation data is already returned in the list view\n\nThis view returns editable fields + real-time usage from Redis.\nRate limited to protect against expensive point queries.\n\nUses SuperAdminMixin for queryset routing + object-level ownership.\nNo manual org injection needed - SuperAdminMixin handles patch() automatically.","tags":["users"],"parameters":[{"name":"customer_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetail"}}}}}},"post":{"operationId":"api-user-update-create","summary":"Api User Update Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["users"],"parameters":[{"name":"customer_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetailRequest"}}}}},"put":{"operationId":"api-user-update-update","summary":"Api User Update Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"customer_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetailRequest"}}}}},"delete":{"operationId":"api-user-update-destroy","summary":"Api User Update Destroy","description":"Consolidated single/detail view for customer users.\n\nServes BOTH:\n- Public API: /api/users/<customer_identifier>/ (URL path lookup)\n- Dashboard: /clickhouse/customer-users/<id>/?customer_identifier=xxx (query param lookup)\n\nRetrieves customer user from PostgreSQL (not ClickHouse) because:\n1. Point retrieval is weak in ClickHouse\n2. Update operations require PostgreSQL\n3. All aggregation data is already returned in the list view\n\nThis view returns editable fields + real-time usage from Redis.\nRate limited to protect against expensive point queries.\n\nUses SuperAdminMixin for queryset routing + object-level ownership.\nNo manual org injection needed - SuperAdminMixin handles patch() automatically.","tags":["users"],"parameters":[{"name":"customer_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-user-update-partial-update","summary":"Api User Update Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"customer_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCustomerUserDetailRequest"}}}}}},"/api/users/":{"get":{"operationId":"api-users-list","summary":"Api Users List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["users"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCustomerUserListList"}}}}}},"post":{"operationId":"api-users-create","summary":"Api Users Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserListRequest"}}}}},"put":{"operationId":"api-users-update","summary":"Api Users Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserListRequest"}}}}},"patch":{"operationId":"api-users-partial-update","summary":"Api Users Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCustomerUserListRequest"}}}}}},"/api/users/summary/":{"get":{"operationId":"api-users-summary-retrieve","summary":"Api Users Summary Retrieve","description":"Get summary statistics for customer users.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_users_summary_retrieve_Response_200"}}}}}},"post":{"operationId":"api-users-summary-create","summary":"Api Users Summary Create","description":"Handle POST requests the same as GET for filtering.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_users_summary_create_Response_200"}}}}}},"put":{"operationId":"api-users-summary-update","summary":"Api Users Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_users_summary_update_Response_200"}}}}}},"patch":{"operationId":"api-users-summary-partial-update","summary":"Api Users Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_api_users_summary_partial_update_Response_200"}}}}}}},"/clickhouse/customer-users/":{"get":{"operationId":"clickhouse-customer-users-list","summary":"Clickhouse Customer Users List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["users"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCustomerUserListList"}}}}}},"post":{"operationId":"clickhouse-customer-users-create","summary":"Clickhouse Customer Users Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserListRequest"}}}}},"put":{"operationId":"clickhouse-customer-users-update","summary":"Clickhouse Customer Users Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserListRequest"}}}}},"patch":{"operationId":"clickhouse-customer-users-partial-update","summary":"Clickhouse Customer Users Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCustomerUserListRequest"}}}}}},"/clickhouse/customer-users/{id}/":{"get":{"operationId":"clickhouse-customer-users-retrieve","summary":"Clickhouse Customer Users Retrieve","description":"Consolidated single/detail view for customer users.\n\nServes BOTH:\n- Public API: /api/users/<customer_identifier>/ (URL path lookup)\n- Dashboard: /clickhouse/customer-users/<id>/?customer_identifier=xxx (query param lookup)\n\nRetrieves customer user from PostgreSQL (not ClickHouse) because:\n1. Point retrieval is weak in ClickHouse\n2. Update operations require PostgreSQL\n3. All aggregation data is already returned in the list view\n\nThis view returns editable fields + real-time usage from Redis.\nRate limited to protect against expensive point queries.\n\nUses SuperAdminMixin for queryset routing + object-level ownership.\nNo manual org injection needed - SuperAdminMixin handles patch() automatically.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetail"}}}}}},"post":{"operationId":"clickhouse-customer-users-create-2","summary":"Clickhouse Customer Users Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetailRequest"}}}}},"put":{"operationId":"clickhouse-customer-users-update-2","summary":"Clickhouse Customer Users Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetailRequest"}}}}},"delete":{"operationId":"clickhouse-customer-users-destroy","summary":"Clickhouse Customer Users Destroy","description":"Consolidated single/detail view for customer users.\n\nServes BOTH:\n- Public API: /api/users/<customer_identifier>/ (URL path lookup)\n- Dashboard: /clickhouse/customer-users/<id>/?customer_identifier=xxx (query param lookup)\n\nRetrieves customer user from PostgreSQL (not ClickHouse) because:\n1. Point retrieval is weak in ClickHouse\n2. Update operations require PostgreSQL\n3. All aggregation data is already returned in the list view\n\nThis view returns editable fields + real-time usage from Redis.\nRate limited to protect against expensive point queries.\n\nUses SuperAdminMixin for queryset routing + object-level ownership.\nNo manual org injection needed - SuperAdminMixin handles patch() automatically.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"clickhouse-customer-users-partial-update-2","summary":"Clickhouse Customer Users Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCustomerUserDetailRequest"}}}}}},"/clickhouse/customer-users/list/":{"get":{"operationId":"clickhouse-customer-users-list-list","summary":"Clickhouse Customer Users List List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["users"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCustomerUserListList"}}}}}},"post":{"operationId":"clickhouse-customer-users-list-create","summary":"Clickhouse Customer Users List Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserListRequest"}}}}},"put":{"operationId":"clickhouse-customer-users-list-update","summary":"Clickhouse Customer Users List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserListRequest"}}}}},"patch":{"operationId":"clickhouse-customer-users-list-partial-update","summary":"Clickhouse Customer Users List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCustomerUserListRequest"}}}}}},"/clickhouse/customer-users/summary/":{"get":{"operationId":"clickhouse-customer-users-summary-retrieve","summary":"Clickhouse Customer Users Summary Retrieve","description":"Get summary statistics for customer users.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_clickhouse_customer_users_summary_retrieve_Response_200"}}}}}},"post":{"operationId":"clickhouse-customer-users-summary-create","summary":"Clickhouse Customer Users Summary Create","description":"Handle POST requests the same as GET for filtering.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_clickhouse_customer_users_summary_create_Response_200"}}}}}},"put":{"operationId":"clickhouse-customer-users-summary-update","summary":"Clickhouse Customer Users Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_clickhouse_customer_users_summary_update_Response_200"}}}}}},"patch":{"operationId":"clickhouse-customer-users-summary-partial-update","summary":"Clickhouse Customer Users Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_clickhouse_customer_users_summary_partial_update_Response_200"}}}}}}},"/clickhouse/customers/":{"get":{"operationId":"clickhouse-customers-list","summary":"Clickhouse Customers List","description":"List/search organizations (customers).\n\nSupports both JWT and API key authentication.\nRequires superadmin access (is_superadmin=True).","tags":["users"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCHCustomerListList"}}}}}},"post":{"operationId":"clickhouse-customers-create","summary":"Clickhouse Customers Create","description":"List customers with complex filtering via POST body.","tags":["users"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCHCustomerListList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHCustomerFilterRequestRequest"}}}}}},"/clickhouse/customers/{unique_organization_id}/":{"get":{"operationId":"clickhouse-customers-retrieve","summary":"Clickhouse Customers Retrieve","description":"Retrieve a single organization (customer) by ID.\n\nSupports both JWT and API key authentication.\nRequires superadmin access (is_superadmin=True).","tags":["users"],"parameters":[{"name":"unique_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHCustomerDetail"}}}}}}},"/clickhouse/customers/list/":{"get":{"operationId":"clickhouse-customers-list-list","summary":"Clickhouse Customers List List","description":"List/search organizations (customers).\n\nSupports both JWT and API key authentication.\nRequires superadmin access (is_superadmin=True).","tags":["users"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCHCustomerListList"}}}}}},"post":{"operationId":"clickhouse-customers-list-create","summary":"Clickhouse Customers List Create","description":"List customers with complex filtering via POST body.","tags":["users"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCHCustomerListList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHCustomerFilterRequestRequest"}}}}}},"/user/delete-role/{id}/":{"delete":{"operationId":"user-delete-role-destroy","summary":"User Delete Role Destroy","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/user/invitations/accept/":{"post":{"operationId":"user-invitations-accept-create","summary":"User Invitations Accept Create","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationAccept"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationAcceptRequest"}}}}}},"/user/invitations/create/":{"get":{"operationId":"user-invitations-create-list","summary":"User Invitations Create List","description":"Plug-and-play plan-level count-limit enforcement on resource creation.\n\nA view declares ONE resource tag — its ``permission_resource`` (the same\n``Resources`` value that drives the RBAC permission) — and this mixin hooks\n``create()`` to enforce that resource's plan count limit automatically. No\nseparate ``plan_limited_resource``: the resource tag is the single source.\n\n    class DatasetsView(PlanLimitMixin, PermissionMapMixin, ListCreateAPIView):\n        permission_resource = Resources.DATASETS\n        # RBAC perm AND the dataset count cap both derive from this tag.\n\nThe \"what\" (model/field/filters/error per resource) lives in the\n``utils.plan_limits`` registry; ``PLAN_LIMIT_BY_RESOURCE`` maps the resource\ntag → its ``GatedResource``. A tag with no registry entry simply has no cap.\n\nHow the hook fires: DRF's ``ListCreateAPIView.post()`` delegates to\n``self.create()``, and views that override ``post()`` end with\n``super().post()`` — both reach this mixin's ``create()`` (it sits before\nthe generic view in the MRO). Views that define their own ``create()`` just\nneed to call ``super().create()`` and honour its return value.\n\nOrg resolution: ``get_limit_organization()`` defaults to the view's\n``get_organization()`` (the org the resource is created under, after any\nsuperadmin injection), falling back to the request user's org. Override it\nfor bespoke resolution (e.g. a superadmin *target* org).\n\nCustom non-``create()`` handlers (e.g. an ``update_or_create`` upsert) can't\nbe hooked; those call ``enforce_declared_limit()`` explicitly — still driven\noff the same resource tag.\n\nStaff exemption: Respan staff acting on an org's behalf bypass ALL plan\nlimits — a cross-cutting policy enforced centrally in\n``enforce_declared_limit`` (see ``is_plan_limit_exempt``), not re-stated per\nview. Every gated resource inherits it.","tags":["users"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedInvitationCreateList"}}}}}},"post":{"operationId":"user-invitations-create-create","summary":"User Invitations Create Create","description":"Plug-and-play plan-level count-limit enforcement on resource creation.\n\nA view declares ONE resource tag — its ``permission_resource`` (the same\n``Resources`` value that drives the RBAC permission) — and this mixin hooks\n``create()`` to enforce that resource's plan count limit automatically. No\nseparate ``plan_limited_resource``: the resource tag is the single source.\n\n    class DatasetsView(PlanLimitMixin, PermissionMapMixin, ListCreateAPIView):\n        permission_resource = Resources.DATASETS\n        # RBAC perm AND the dataset count cap both derive from this tag.\n\nThe \"what\" (model/field/filters/error per resource) lives in the\n``utils.plan_limits`` registry; ``PLAN_LIMIT_BY_RESOURCE`` maps the resource\ntag → its ``GatedResource``. A tag with no registry entry simply has no cap.\n\nHow the hook fires: DRF's ``ListCreateAPIView.post()`` delegates to\n``self.create()``, and views that override ``post()`` end with\n``super().post()`` — both reach this mixin's ``create()`` (it sits before\nthe generic view in the MRO). Views that define their own ``create()`` just\nneed to call ``super().create()`` and honour its return value.\n\nOrg resolution: ``get_limit_organization()`` defaults to the view's\n``get_organization()`` (the org the resource is created under, after any\nsuperadmin injection), falling back to the request user's org. Override it\nfor bespoke resolution (e.g. a superadmin *target* org).\n\nCustom non-``create()`` handlers (e.g. an ``update_or_create`` upsert) can't\nbe hooked; those call ``enforce_declared_limit()`` explicitly — still driven\noff the same resource tag.\n\nStaff exemption: Respan staff acting on an org's behalf bypass ALL plan\nlimits — a cross-cutting policy enforced centrally in\n``enforce_declared_limit`` (see ``is_plan_limit_exempt``), not re-stated per\nview. Every gated resource inherits it.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationCreateRequest"}}}}}},"/user/invitations/organization-user-roles/":{"get":{"operationId":"user-invitations-organization-user-roles-list","summary":"User Invitations Organization User Roles List","description":"Plug-and-play plan-level count-limit enforcement on resource creation.\n\nA view declares ONE resource tag — its ``permission_resource`` (the same\n``Resources`` value that drives the RBAC permission) — and this mixin hooks\n``create()`` to enforce that resource's plan count limit automatically. No\nseparate ``plan_limited_resource``: the resource tag is the single source.\n\n    class DatasetsView(PlanLimitMixin, PermissionMapMixin, ListCreateAPIView):\n        permission_resource = Resources.DATASETS\n        # RBAC perm AND the dataset count cap both derive from this tag.\n\nThe \"what\" (model/field/filters/error per resource) lives in the\n``utils.plan_limits`` registry; ``PLAN_LIMIT_BY_RESOURCE`` maps the resource\ntag → its ``GatedResource``. A tag with no registry entry simply has no cap.\n\nHow the hook fires: DRF's ``ListCreateAPIView.post()`` delegates to\n``self.create()``, and views that override ``post()`` end with\n``super().post()`` — both reach this mixin's ``create()`` (it sits before\nthe generic view in the MRO). Views that define their own ``create()`` just\nneed to call ``super().create()`` and honour its return value.\n\nOrg resolution: ``get_limit_organization()`` defaults to the view's\n``get_organization()`` (the org the resource is created under, after any\nsuperadmin injection), falling back to the request user's org. Override it\nfor bespoke resolution (e.g. a superadmin *target* org).\n\nCustom non-``create()`` handlers (e.g. an ``update_or_create`` upsert) can't\nbe hooked; those call ``enforce_declared_limit()`` explicitly — still driven\noff the same resource tag.\n\nStaff exemption: Respan staff acting on an org's behalf bypass ALL plan\nlimits — a cross-cutting policy enforced centrally in\n``enforce_declared_limit`` (see ``is_plan_limit_exempt``), not re-stated per\nview. Every gated resource inherits it.","tags":["users"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedInvitationCreateList"}}}}}},"post":{"operationId":"user-invitations-organization-user-roles-create","summary":"User Invitations Organization User Roles Create","description":"Plug-and-play plan-level count-limit enforcement on resource creation.\n\nA view declares ONE resource tag — its ``permission_resource`` (the same\n``Resources`` value that drives the RBAC permission) — and this mixin hooks\n``create()`` to enforce that resource's plan count limit automatically. No\nseparate ``plan_limited_resource``: the resource tag is the single source.\n\n    class DatasetsView(PlanLimitMixin, PermissionMapMixin, ListCreateAPIView):\n        permission_resource = Resources.DATASETS\n        # RBAC perm AND the dataset count cap both derive from this tag.\n\nThe \"what\" (model/field/filters/error per resource) lives in the\n``utils.plan_limits`` registry; ``PLAN_LIMIT_BY_RESOURCE`` maps the resource\ntag → its ``GatedResource``. A tag with no registry entry simply has no cap.\n\nHow the hook fires: DRF's ``ListCreateAPIView.post()`` delegates to\n``self.create()``, and views that override ``post()`` end with\n``super().post()`` — both reach this mixin's ``create()`` (it sits before\nthe generic view in the MRO). Views that define their own ``create()`` just\nneed to call ``super().create()`` and honour its return value.\n\nOrg resolution: ``get_limit_organization()`` defaults to the view's\n``get_organization()`` (the org the resource is created under, after any\nsuperadmin injection), falling back to the request user's org. Override it\nfor bespoke resolution (e.g. a superadmin *target* org).\n\nCustom non-``create()`` handlers (e.g. an ``update_or_create`` upsert) can't\nbe hooked; those call ``enforce_declared_limit()`` explicitly — still driven\noff the same resource tag.\n\nStaff exemption: Respan staff acting on an org's behalf bypass ALL plan\nlimits — a cross-cutting policy enforced centrally in\n``enforce_declared_limit`` (see ``is_plan_limit_exempt``), not re-stated per\nview. Every gated resource inherits it.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUserRole"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationCreateRequest"}}}}}},"/user/organization-images/":{"get":{"operationId":"user-organization-images-retrieve","summary":"User Organization Images Retrieve","description":"List all image assets for the organization.\n\nQuery parameters:\n- has_metadata: Include image metadata (size, type, etc.) - default: false\n\nReturns:\n- 200: List of image assets","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_user_organization_images_retrieve_Response_200"}}}}}},"post":{"operationId":"user-organization-images-create","summary":"User Organization Images Create","description":"Upload a new image asset to the organization.\n\nRequest format (multipart/form-data):\n- image: Image file (required)\n- filename: Custom filename (optional, will generate UUID if not provided)\n\nRequest format (JSON):\n- image_data: Base64 encoded image data (required)\n- filename: Custom filename (optional)\n- content_type: MIME type (optional, will guess from filename)\n\nReturns:\n- 201: Image uploaded successfully\n- 400: Invalid request or unsupported image format\n- 413: File too large\n- 500: Upload failed","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_user_organization_images_create_Response_200"}}}}}},"delete":{"operationId":"user-organization-images-destroy","summary":"User Organization Images Destroy","description":"Delete an image asset from the organization.\n\nRequest format (JSON):\n- url: Full URL of the image to delete (required)\nOR\n- filename: Filename of the image to delete (required)\n\nReturns:\n- 200: Image deleted successfully\n- 400: Invalid request or image not found\n- 500: Deletion failed","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"user-organization-images-partial-update","summary":"User Organization Images Partial Update","description":"Update image asset metadata or replace an image.\n\nRequest format (JSON):\n- old_url: URL of the image to update (required)\n- new_filename: New filename for the image (optional)\n- image_data: Base64 encoded new image data (optional, for replacement)\n- content_type: MIME type for new image (optional)\n\nReturns:\n- 200: Image updated successfully\n- 400: Invalid request\n- 404: Image not found\n- 500: Update failed","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_user_organization_images_partial_update_Response_200"}}}}}}},"/user/organization-members/":{"get":{"operationId":"user-organization-members-list","summary":"User Organization Members List","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationUserRole"}}}}}}}},"/user/organization-notification-methods/":{"get":{"operationId":"user-organization-notification-methods-list","summary":"User Organization Notification Methods List","description":"List and create organization notification methods.\n\nGET: List all notification methods for the current organization.\nPOST: Create a new notification method for the current organization.\n\nSuperAdminMixin handles org + project_id auto-injection on POST.","tags":["users"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedOrganizationNotificationMethodListList"}}}}}},"post":{"operationId":"user-organization-notification-methods-create","summary":"User Organization Notification Methods Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationNotificationMethodCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationNotificationMethodCreateRequest"}}}}},"put":{"operationId":"user-organization-notification-methods-update","summary":"User Organization Notification Methods Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationNotificationMethodList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationNotificationMethodListRequest"}}}}},"patch":{"operationId":"user-organization-notification-methods-partial-update","summary":"User Organization Notification Methods Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationNotificationMethodList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedOrganizationNotificationMethodListRequest"}}}}}},"/user/organization-notification-methods/{id}/":{"get":{"operationId":"user-organization-notification-methods-retrieve","summary":"User Organization Notification Methods Retrieve","description":"Retrieve, update, or delete a specific organization notification method.\n\nGET: Retrieve a notification method by ID.\nPATCH/PUT: Update a notification method.\nDELETE: Delete a notification method.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationNotificationMethodDetail"}}}}}},"post":{"operationId":"user-organization-notification-methods-create-2","summary":"User Organization Notification Methods Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationNotificationMethodDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationNotificationMethodDetailRequest"}}}}},"put":{"operationId":"user-organization-notification-methods-update-2","summary":"User Organization Notification Methods Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationNotificationMethodUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationNotificationMethodUpdateRequest"}}}}},"delete":{"operationId":"user-organization-notification-methods-destroy","summary":"User Organization Notification Methods Destroy","description":"Retrieve, update, or delete a specific organization notification method.\n\nGET: Retrieve a notification method by ID.\nPATCH/PUT: Update a notification method.\nDELETE: Delete a notification method.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"user-organization-notification-methods-partial-update-2","summary":"User Organization Notification Methods Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationNotificationMethodUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedOrganizationNotificationMethodUpdateRequest"}}}}}},"/user/organization-notification-methods/summary/":{"get":{"operationId":"user-organization-notification-methods-summary-retrieve","summary":"User Organization Notification Methods Summary Retrieve","description":"GET /user/organization-notification-methods/summary/\n\nTrue total for the notification methods paginator — the list view's\nLogPaginator envelope carries no real total_count.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationNotificationMethodSummaryResponse"}}}}}}},"/user/organization-user-role/{id}/":{"get":{"operationId":"user-organization-user-role-retrieve","summary":"User Organization User Role Retrieve","description":"GET/PATCH/DELETE /api/users/member/<id>/\n\nRetrieve, update, or delete organization member role.\n\nPermission (via ObjectOwnershipMixin config in SuperAdminMixin):\n- User can GET their OWN role (read-only)\n- Org Admin can GET/PATCH/DELETE any role in org\n- Superadmin: same as regular user (org-scoped, not cross-org)\n\nNote: Member management is intentionally org-scoped even for superadmins.\n\nWrites are admin-only. Every writable field on OrganizationUserRole\n(role, permissions_override, pending, ...) is privilege-defining, so a\nmember must NOT be able to PATCH their own row — that is direct\nself-escalation to admin/owner. ``is_requiring_org_admin_for_write``\nenforces org-admin for any write while still letting members GET their\nown role. Role changes go through this admin-gated path (the serializer\nkeeps fields writable for that flow); members have no legitimate\nself-write field here.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUserRole"}}}}}},"post":{"operationId":"user-organization-user-role-create","summary":"User Organization User Role Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUserRole"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUserRoleRequest"}}}}},"put":{"operationId":"user-organization-user-role-update","summary":"User Organization User Role Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUserRole"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUserRoleRequest"}}}}},"delete":{"operationId":"user-organization-user-role-destroy","summary":"User Organization User Role Destroy","description":"GET/PATCH/DELETE /api/users/member/<id>/\n\nRetrieve, update, or delete organization member role.\n\nPermission (via ObjectOwnershipMixin config in SuperAdminMixin):\n- User can GET their OWN role (read-only)\n- Org Admin can GET/PATCH/DELETE any role in org\n- Superadmin: same as regular user (org-scoped, not cross-org)\n\nNote: Member management is intentionally org-scoped even for superadmins.\n\nWrites are admin-only. Every writable field on OrganizationUserRole\n(role, permissions_override, pending, ...) is privilege-defining, so a\nmember must NOT be able to PATCH their own row — that is direct\nself-escalation to admin/owner. ``is_requiring_org_admin_for_write``\nenforces org-admin for any write while still letting members GET their\nown role. Role changes go through this admin-gated path (the serializer\nkeeps fields writable for that flow); members have no legitimate\nself-write field here.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"user-organization-user-role-partial-update","summary":"User Organization User Role Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUserRole"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedOrganizationUserRoleRequest"}}}}}},"/user/organization/{unique_organization_id}/":{"get":{"operationId":"user-organization-retrieve","summary":"User Organization Retrieve","description":"View for managing organizations.\n\nSpecial case: Organization model IS the org (no organization_id field).\nUses ownership_object_field_name = \"id\" to check org.id == user.curr_org_id.","tags":["users"],"parameters":[{"name":"unique_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}}}}},"post":{"operationId":"user-organization-create","summary":"User Organization Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["users"],"parameters":[{"name":"unique_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"disabled_span_behaviors":{"type":"array","items":{"type":"string"},"description":"Behavior slugs excluded from span-behavior evaluation."},"warnings_settings":{"$ref":"#/components/schemas/UserOrganizationUniqueOrganizationIdPostRequestBodyContentMultipartFormDataSchemaWarningsSettings"},"custom_property_index_mapping":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Custom property key -> indexed ClickHouse column name (e.g. custom_string_1)."},"created_at":{"type":["string","null"],"format":"date-time"},"first_api_call_at":{"type":["string","null"],"format":"date-time"},"last_api_call_at":{"type":["string","null"],"format":"date-time"},"logo":{"type":"string","format":"binary"},"notes":{"type":"string"},"name":{"type":"string"},"digest_email_inboxes":{"type":"array","items":{"type":"string"}},"organization_size":{"type":"integer"},"product_use_cases":{"type":"array","items":{"type":"string"}},"prioritize_objectives":{"type":"array","items":{"type":"string"}},"unique_organization_id":{"type":"string"},"budget_goal":{"type":"string"},"monthly_spending":{"type":"number","format":"double"},"preset_models":{"type":"array","items":{"type":"string"}},"preset_option":{"type":"string"},"dynamic_routing_enabled":{"type":"boolean"},"fallback_model_enabled":{"type":"boolean"},"fallback_models":{"type":"array","items":{"type":"string"}},"alert_settings":{"description":"Any type"},"system_fallback_enabled":{"type":"boolean"},"alerts_enabled":{"type":"boolean"},"disable_log":{"type":"boolean"},"has_api_call":{"type":"boolean"},"onboarded":{"type":"boolean"},"has_api_call_with_non_default_key":{"type":"boolean"},"onboarding_integration_options":{"description":"Any type"},"onboarding_key":{"type":"string"},"curr_onboarding_step":{"type":"integer"},"onboarding_start":{"type":"string","format":"date-time"},"onboarding_end":{"type":["string","null"],"format":"date-time"},"enable_cache":{"type":"boolean"},"archive_duration":{"type":"integer"},"cache_saved_cost":{"type":"number","format":"double"},"cache_hit_count":{"type":"integer","format":"int64"},"cache_hit_tokens":{"type":"integer","format":"int64"},"omit_log_when_cache_hit":{"type":"boolean"},"cache_saved_time":{"type":"number","format":"double"},"last_cache_aggregations_update":{"type":"string","format":"date-time"},"classification_percentage":{"type":["number","null"],"format":"double"},"use_custom_credentials":{"type":"boolean"},"default_customer_user_budget":{"type":["number","null"],"format":"double"},"credit_low_balance_threshold":{"type":["number","null"],"format":"double","description":"Credit balance threshold (in USD) to trigger low balance warning webhook. When credit balance drops below this value, a credit_low_balance_threshold_reached webhook event is dispatched once until balance goes above threshold again."},"credit_auto_top_off_threshold":{"type":["number","null"],"format":"double","description":"Credit balance threshold (in USD) to trigger auto top-off. When credit balance drops below this value, automatically charge credit_auto_top_off_amount via Stripe."},"credit_auto_top_off_amount":{"type":["number","null"],"format":"double","description":"Amount (in USD) to automatically charge when credit balance drops below credit_auto_top_off_threshold. Requires stripe_customer_id with valid payment method."},"is_auto_top_off_enabled":{"type":"boolean","description":"Enable automatic credit top-off. When enabled and balance drops below credit_auto_top_off_threshold, automatically charges credit_auto_top_off_amount via Stripe. Requires stripe_customer_id with valid payment method."},"metadata_keys":{"type":["array","null"],"items":{"type":"string"}},"custom_models":{"type":["array","null"],"items":{"type":"string"}},"spend_cap":{"type":["number","null"],"format":"double","description":"Spend cap amount in USD. Enforced in real-time via atomic Redis limiter."},"spend_cap_warning_threshold":{"type":["number","null"],"format":"double","description":"Spend threshold in USD to trigger warning alert."},"budget_duration":{"$ref":"#/components/schemas/BudgetDurationEnum","description":"Duration for spend_cap enforcement: daily, weekly, or monthly.\n\n* `daily` - daily\n* `weekly` - weekly\n* `monthly` - monthly"},"use_keywordsai_credentials":{"type":"boolean"},"rate_limit":{"type":["number","null"],"format":"double"},"customer_user_rate_limit":{"type":["number","null"],"format":"double"},"retry_enabled":{"type":"boolean"},"retry_after":{"type":"number","format":"double"},"num_retries":{"type":"integer"},"custom_preset_models":{"type":"array","items":{"type":"string"}},"image_assets":{"type":"array","items":{"type":"string"}},"logs_retention_period_in_days":{"type":["integer","null"]},"is_extended_retention_enabled":{"type":"boolean"},"is_custom_retention_enabled":{"type":"boolean"},"starred":{"type":"boolean"},"is_span_behaviors_enabled":{"type":"boolean"},"curr_owner":{"type":["integer","null"]}},"required":["name"]}}}}},"put":{"operationId":"user-organization-update","summary":"User Organization Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"unique_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrganizationUpdateRequest"}}}}},"delete":{"operationId":"user-organization-destroy","summary":"User Organization Destroy","description":"View for managing organizations.\n\nSpecial case: Organization model IS the org (no organization_id field).\nUses ownership_object_field_name = \"id\" to check org.id == user.curr_org_id.","tags":["users"],"parameters":[{"name":"unique_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"user-organization-partial-update","summary":"User Organization Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"unique_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedAdminOrganizationUpdateRequest"}}}}}},"/user/organization/{unique_organization_id}/logo/":{"patch":{"operationId":"user-organization-logo-partial-update","summary":"User Organization Logo Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"unique_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationLogoUpload"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"logo":{"type":"string","format":"binary"}}}}}}}},"/user/organization/{unique_organization_id}/set-team-domain/":{"post":{"operationId":"user-organization-set-team-domain-create","summary":"User Organization Set Team Domain Create","description":"POST /api/users/organization/<unique_organization_id>/set-team-domain/\n\nSet the team domain (email_domain) for an organization.\nLinks the organization to a CompanyOrganization matching the domain,\ncreating one if it doesn't exist.\n\nSuperadmin-only endpoint.\n\nRequest Body:\n    - email_domain (string, required): The email domain to set (e.g. \"acme.com\")\n\nResponse (200 OK):\n    {\n        \"message\": \"Team domain set successfully\",\n        \"organization_id\": 123,\n        \"email_domain\": \"acme.com\",\n        \"company_organization_id\": 456\n    }\n\nError Responses:\n    - 400: Missing or empty email_domain\n    - 404: Organization not found","tags":["users"],"parameters":[{"name":"unique_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_user_organization_set_team_domain_create_Response_200"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSetTeamDomainRequestRequest"}}}}}},"/user/organization/{unique_organization_id}/transfer-ownership/":{"post":{"operationId":"user-organization-transfer-ownership-create","summary":"User Organization Transfer Ownership Create","description":"POST /api/users/organization/<unique_organization_id>/transfer-ownership/ - Transfer organization ownership\n\nTransfers ownership of an organization from the current owner to another member.\nOnly the current owner can initiate this transfer.\n\nRequest Body:\n    - new_owner_id (int, optional): ID of the new owner\n    - new_owner_email (string, optional): Email of the new owner\n    - Exactly one of new_owner_id or new_owner_email must be provided\n\nResponse (200 OK):\n    {\n        \"message\": \"Ownership transferred successfully\",\n        \"organization_id\": 123,\n        \"new_owner_id\": 456,\n        \"new_owner_email\": \"newowner@example.com\"\n    }\n\nError Responses:\n    - 400: Invalid request (validation errors, cannot transfer to current owner)\n    - 403: User is not the organization owner\n    - 404: Organization not found, or new owner not found/not a member","tags":["users"],"parameters":[{"name":"unique_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_user_organization_transfer_ownership_create_Response_200"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationTransferOwnershipRequestRequest"}}}}}},"/user/organization/statistics/":{"get":{"operationId":"user-organization-statistics-retrieve","summary":"User Organization Statistics Retrieve","description":"GET /api/organization/statistics/ - Retrieve organization statistics for a time range.\n\nReturns comprehensive metrics including:\n\nRequest & Token:\n    - total_requests, total_tokens, avg_tokens_per_request\n    - max_tokens_single_request, requests_per_active_day\n\nModel Usage:\n    - top_model (most used model name)\n    - top_model_requests (count for top model; divide by total_requests for %)\n    - number_of_models_used\n\nTime & Activity:\n    - most_active_day, peak_month\n    - days_since_org_created (from org.created_at, not ClickHouse)\n\nPrompt:\n    - total_prompts (all prompts in org, all time)\n    - prompts_used (logs using prompts in time range)\n\nPerformance:\n    - avg_latency_ms, success_rate\n\nTeam / Org:\n    - team_members_added (API users added in time range)\n    - total_users (customer users from ch_customer_user_agg, all time)\n    - team_member_emails (all team member emails)\n\nImportant Notes:\n    - ClickHouse metrics reflect post-deployment data only\n    - total_users refers to customer users, not team members\n    - top_model_requests is raw count; calculate percentage in frontend\n\nCaching & Performance:\n- Results cached in PostgreSQL (OrganizationDigest table)\n- Redis lock prevents concurrent computations\n- Returns 429 if computation already in progress\n- Rate limited to 10 requests/minute per organization\n\nAuthentication:\n- JWT (user sessions)\n- API Key (programmatic access)\n\nQuery Parameters:\n    - start_time (ISO 8601 UTC, required): Start of time range\n    - end_time (ISO 8601 UTC, required): End of time range\n\nResponse (200 OK):\n    {\n        \"organization_name\": \"Acme Inc\",\n        \"total_requests\": 15000,\n        \"total_tokens\": 2500000,\n        \"avg_tokens_per_request\": 166.67,\n        \"max_tokens_single_request\": 8000,\n        \"requests_per_active_day\": 250.0,\n        \"top_model\": \"gpt-4\",\n        \"top_model_requests\": 9825,\n        \"number_of_models_used\": 5,\n        \"most_active_day\": \"2024-06-15\",\n        \"peak_month\": \"June\",\n        \"days_since_org_created\": 180,\n        \"total_prompts\": 12,\n        \"prompts_used\": 8500,\n        \"avg_latency_ms\": 850.5,\n        \"success_rate\": 99.2,\n        \"team_members_added\": 3,\n        \"total_users\": 792,\n        \"team_member_emails\": [\"user1@example.com\", \"user2@example.com\"]\n    }\n\nError Responses:\n    - 400: Invalid parameters or computation failed\n    - 401: Authentication failed\n    - 404: Organization not found\n    - 429: Computation already in progress (locked)\n\nSee: boilerplates/keywordsai/feature_docs/users/organization_statistics_api_docs.md","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users_user_organization_statistics_retrieve_Response_200"}}}}}}},"/user/organizations/":{"post":{"operationId":"user-organizations-create","summary":"User Organizations Create","description":"Args:\n    - user: The user creating the organization\n    - company_organization: The company organization to add the organization to\n    - subscription: The subscription to add to the organization\n    - role: The role to add to the organization\nSignals:\n- post_save: Organization\n    - Add the free trial \"seat_based_team\" subscription if the organization is newly created","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationCreateRequest"}}}}}},"/user/tag-assignments/{feature_type}/objects/{object_id}/list/":{"get":{"operationId":"user-tag-assignments-objects-list-list","summary":"User Tag Assignments Objects List List","description":"List tag objects assigned to a specific feature.\n\nEndpoints:\n    GET /api/tag-assignments/{feature_type}/objects/{object_id}/list/\n\nInput (GET):\n    - feature_type (path): One of ResourceTypeChoices (e.g. \"monitors\", \"evaluators\", \"prompts\", \"logs\", \"datasets\", \"experiments\", \"testsets\", \"models\")\n    - object_id (path): ID of the feature object to list tags for\n\nReturns (200 OK):\n    Paginated list of GenericTag-like rows for the specified feature object, newest first.\n\nExample Request:\n    GET /api/tag-assignments/monitors/objects/monitor_123/list/\n\nExample Response:\n    {\n        \"count\": 1,\n        \"next\": null,\n        \"previous\": null,\n        \"results\": [\n            {\n                \"generic_tag_id\": \"3ac3c0f0-3b5b-4b3f-8d9b-1e2f3a4b5c6d\",\n                \"generic_tag_name\": \"Priority\",\n                \"generic_tag_color\": \"#4F46E5\",\n                \"generic_tag_created_at\": \"2025-09-11T09:43:55.858321Z\",\n                \"generic_tag_updated_at\": \"2025-09-11T09:43:55.858331Z\",\n                \"generic_tag_organization_id\": 2\n            }\n        ]\n    }","tags":["users"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedTagManagerList"}}}}}},"post":{"operationId":"user-tag-assignments-objects-list-create","summary":"User Tag Assignments Objects List Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["users"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagManager"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagManagerRequest"}}}}},"put":{"operationId":"user-tag-assignments-objects-list-update","summary":"User Tag Assignments Objects List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagManager"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagManagerRequest"}}}}},"patch":{"operationId":"user-tag-assignments-objects-list-partial-update","summary":"User Tag Assignments Objects List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagManager"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedTagManagerRequest"}}}}}},"/user/tag-assignments/{feature_type}/tags/{tag_id}/objects/{object_id}/create/":{"post":{"operationId":"user-tag-assignments-tags-objects-create-create","summary":"User Tag Assignments Tags Objects Create Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["users"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagManager"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagManagerRequest"}}}}}},"/user/tag-assignments/{feature_type}/tags/{tag_id}/objects/{object_id}/delete/":{"delete":{"operationId":"user-tag-assignments-tags-objects-delete-destroy","summary":"User Tag Assignments Tags Objects Delete Destroy","description":"Create or delete a tag assignment.\n\nEndpoints:\n    POST /api/tag-assignments/{feature_type}/tags/{tag_id}/objects/{object_id}/\n    DELETE /api/tag-assignments/{feature_type}/tags/{tag_id}/objects/{object_id}/\n\nInput (POST/DELETE):\n    - feature_type (path): One of ResourceTypeChoices\n    - tag_id (path): GenericTag.id to assign/remove\n    - object_id (path): Target feature object id\n    - Body (POST): {} (all params from path; organization is auto-set)\n\nReturns:\n    - POST: 201 Created with TagManager object\n    - DELETE: 204 No Content on success, 404 if assignment not found","tags":["users"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/user/tags/":{"get":{"operationId":"user-tags-list","summary":"User Tags List","description":"List all generic tags for the organization, or create a new generic tag.\n\nEndpoints:\n    GET /api/tags/\n    POST /api/tags/\n\nInput (GET):\n    - None (uses authenticated user's organization)\n\nInput (POST):\n    - name (string, required)\n    - color (string, optional; hex code), defaults to \"#000000\"\n\nExample Request (POST):\n    {\n        \"name\": \"Priority\",\n        \"color\": \"#4F46E5\"\n    }\n\nExample Response (201 Created):\n    {\n        \"id\": \"3ac3c0f0-3b5b-4b3f-8d9b-1e2f3a4b5c6d\",\n        \"name\": \"Priority\",\n        \"color\": \"#4F46E5\",\n        \"description\": \"\",\n        \"organization\": 2,\n        \"created_at\": \"2025-09-11T09:43:55.858321Z\",\n        \"updated_at\": \"2025-09-11T09:43:55.858331Z\",\n        \"usage\": []\n    }","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GenericTag"}}}}}}},"post":{"operationId":"user-tags-create","summary":"User Tags Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTag"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTagRequest"}}}}},"put":{"operationId":"user-tags-update","summary":"User Tags Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTag"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTagRequest"}}}}},"patch":{"operationId":"user-tags-partial-update","summary":"User Tags Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTag"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedGenericTagRequest"}}}}}},"/user/tags/{id}/":{"get":{"operationId":"user-tags-retrieve","summary":"User Tags Retrieve","description":"Retrieve, update, or delete a specific generic tag.\n\nEndpoints:\n    GET /api/tags/{id}/\n    PATCH /api/tags/{id}/\n    DELETE /api/tags/{id}/\n\nInput (PATCH):\n    - name (string, optional)\n    - color (string, optional)\n\nExample Response (GET):\n    {\n        \"id\": \"3ac3c0f0-3b5b-4b3f-8d9b-1e2f3a4b5c6d\",\n        \"name\": \"Priority\",\n        \"color\": \"#4F46E5\",\n        \"organization\": 2,\n        \"created_at\": \"2025-09-11T09:43:55.858321Z\",\n        \"updated_at\": \"2025-09-11T09:43:55.858331Z\"\n    }","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTag"}}}}}},"post":{"operationId":"user-tags-create-2","summary":"User Tags Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTag"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTagRequest"}}}}},"put":{"operationId":"user-tags-update-2","summary":"User Tags Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTag"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTagRequest"}}}}},"delete":{"operationId":"user-tags-destroy","summary":"User Tags Destroy","description":"Retrieve, update, or delete a specific generic tag.\n\nEndpoints:\n    GET /api/tags/{id}/\n    PATCH /api/tags/{id}/\n    DELETE /api/tags/{id}/\n\nInput (PATCH):\n    - name (string, optional)\n    - color (string, optional)\n\nExample Response (GET):\n    {\n        \"id\": \"3ac3c0f0-3b5b-4b3f-8d9b-1e2f3a4b5c6d\",\n        \"name\": \"Priority\",\n        \"color\": \"#4F46E5\",\n        \"organization\": 2,\n        \"created_at\": \"2025-09-11T09:43:55.858321Z\",\n        \"updated_at\": \"2025-09-11T09:43:55.858331Z\"\n    }","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"user-tags-partial-update-2","summary":"User Tags Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTag"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedGenericTagRequest"}}}}}},"/user/webhook/{id}/":{"get":{"operationId":"user-webhook-retrieve","summary":"User Webhook Retrieve","description":"Emit a deprecation-hit WARNING for legacy ``/user/webhook*`` routes,\nthen delegate unchanged to the canonical view.\n\nMixed in BEFORE the canonical view class so this ``dispatch`` runs first\nand ``super().dispatch`` falls through to the real handler. Telemetry only\n— fail-open so a logging hiccup can never break the request. No secrets are\nlogged (path/method/route-name only).","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"is_including_secrets","in":"query","description":"Set to true to reveal the webhook secret value. Default: false.","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDetail"}}}}}},"post":{"operationId":"user-webhook-create","summary":"User Webhook Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDetailRequest"}}}}},"put":{"operationId":"user-webhook-update","summary":"User Webhook Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdateRequest"}}}}},"delete":{"operationId":"user-webhook-destroy","summary":"User Webhook Destroy","description":"Emit a deprecation-hit WARNING for legacy ``/user/webhook*`` routes,\nthen delegate unchanged to the canonical view.\n\nMixed in BEFORE the canonical view class so this ``dispatch`` runs first\nand ``super().dispatch`` falls through to the real handler. Telemetry only\n— fail-open so a logging hiccup can never break the request. No secrets are\nlogged (path/method/route-name only).","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"user-webhook-partial-update","summary":"User Webhook Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedWebhookUpdateRequest"}}}}}},"/user/webhook/{id}/rotate/":{"post":{"operationId":"user-webhook-rotate-create","summary":"User Webhook Rotate Create","description":"Emit a deprecation-hit WARNING for legacy ``/user/webhook*`` routes,\nthen delegate unchanged to the canonical view.\n\nMixed in BEFORE the canonical view class so this ``dispatch`` runs first\nand ``super().dispatch`` falls through to the real handler. Telemetry only\n— fail-open so a logging hiccup can never break the request. No secrets are\nlogged (path/method/route-name only).","tags":["users"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRotate"}}}}}}},"/user/webhooks/":{"get":{"operationId":"user-webhooks-list","summary":"User Webhooks List","description":"Emit a deprecation-hit WARNING for legacy ``/user/webhook*`` routes,\nthen delegate unchanged to the canonical view.\n\nMixed in BEFORE the canonical view class so this ``dispatch`` runs first\nand ``super().dispatch`` falls through to the real handler. Telemetry only\n— fail-open so a logging hiccup can never break the request. No secrets are\nlogged (path/method/route-name only).","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookList"}}}}}}},"post":{"operationId":"user-webhooks-create","summary":"User Webhooks Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreateRequest"}}}}},"put":{"operationId":"user-webhooks-update","summary":"User Webhooks Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookListRequest"}}}}},"patch":{"operationId":"user-webhooks-partial-update","summary":"User Webhooks Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["users"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedWebhookListRequest"}}}}}},"/api/chat/completions":{"post":{"operationId":"create-chat-completion","summary":"Create Chat Completion","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["gateway"],"parameters":[{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ApiChatCompletionsPostParametersFormat"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Gateway_createChatCompletion_Response_200"}}}}}}},"/api/responses":{"post":{"operationId":"create-response","summary":"Create a response","description":"Create an OpenAI-compatible response through Respan. Enter RESPAN_API_KEY in the Authorization control, choose the openai, azure, or perplexity example, and replace PROVIDER_API_KEY with that provider's key. Each example owns its fixed route-provider header and compatible request shape. The OpenAI example is otherwise ready to run. For Azure, also replace YOUR_AZURE_DEPLOYMENT and YOUR_RESOURCE; a Responses-compatible api_version is prefilled. Switching examples clears provider-specific fields left by the previous selection. Provider credentials may alternatively be stored in Settings -> Providers. Successful responses include X-Respan-Log-Id and are logged with the actual provider model and cost.","tags":["gateway"],"parameters":[{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ApiResponsesPostParametersFormat"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}},{"name":"X-Respan-Route-Provider","in":"header","description":"Responses upstream. Each named API Explorer example prepopulates its matching value; keep the header paired with the selected example. The Perplexity opt-in is header-only, case-insensitive, and whitespace-tolerant.","required":false,"schema":{"$ref":"#/components/schemas/ApiResponsesPostParametersXRespanRouteProvider"}}],"responses":{"200":{"description":"Response object or event stream from the selected Responses upstream.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"description":"Any type"}}}}},"400":{"description":"Invalid request, provider route configuration, or upstream provider request. Include input and a route-appropriate model, preset, or models value.","content":{"application/json":{"schema":{"description":"Any type"}}}},"401":{"description":"Missing or invalid Respan authentication, or no usable provider credential. Configure the provider in Settings or supply respan_params.credential_override.","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Request validation failed.","content":{"application/json":{"schema":{"description":"Any type"}}}}},"requestBody":{"description":"OpenAI Responses API request. Standard Responses fields are accepted. Perplexity extensions are accepted only when X-Respan-Route-Provider is perplexity.","content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"OpenAI: use a supported model such as gpt-4o-mini. Azure: use azure/<your-deployment-name>. Perplexity: use a provider-prefixed model, or omit model when using preset or models."},"input":{"$ref":"#/components/schemas/ApiResponsesPostRequestBodyContentApplicationJsonSchemaInput","description":"Text or structured input for the response."},"stream":{"type":"boolean","default":false,"description":"Return Responses API server-sent events when true."},"preset":{"type":"string","description":"Perplexity Agent API preset. May be used without model."},"models":{"type":"array","items":{"type":"string"},"description":"Perplexity Agent API fallback model chain, tried in order."},"max_steps":{"type":"integer","description":"Maximum Perplexity agent steps."},"language_preference":{"type":"string","description":"Preferred response language for Perplexity Agent API."},"response_format":{"$ref":"#/components/schemas/ApiResponsesPostRequestBodyContentApplicationJsonSchemaResponseFormat","description":"Perplexity Agent API structured response configuration."},"skills":{"type":"array","items":{"description":"Any type"},"description":"Perplexity Agent API skills."},"tools":{"type":"array","items":{"description":"Any type"},"description":"Response tools. Perplexity supports web_search with filters such as search_domain_filter."},"respan_params":{"$ref":"#/components/schemas/ApiResponsesPostRequestBodyContentApplicationJsonSchemaRespanParams","description":"Respan metadata, prompt configuration, customer identifiers, provider credentials, and other gateway parameters. route_provider_override here cannot activate the Perplexity route."}},"required":["input"]}}}}}},"/api/prompts/list/":{"post":{"operationId":"list-prompts","summary":"List Prompts","description":"POST delegates to GET — the body carries filters, not a new prompt.","tags":["prompts"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"sort_by","in":"query","description":"Sort field, e.g. `-current_version__updated_at` or `-id`.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPromptListList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptFilterRequestRequest"}}}}},"get":{"operationId":"api-prompts-list-list","summary":"Api Prompts List List","description":"Unified view for prompts list operations with filtering.\n\nSuperadmin: Can see all prompts across all organizations.\nRegular users: Can only see prompts in their organization.","tags":["prompts"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"sort_by","in":"query","description":"Sort field, e.g. `-current_version__updated_at` or `-id`.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicPromptListList"}}}}}},"put":{"operationId":"api-prompts-list-update","summary":"Api Prompts List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptListRequest"}}}}},"patch":{"operationId":"api-prompts-list-partial-update","summary":"Api Prompts List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicPromptListRequest"}}}}}},"/api/prompts/":{"post":{"operationId":"create-prompt","summary":"Create Prompt","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptDetailRequest"}}}}},"get":{"operationId":"api-prompts-list","summary":"Api Prompts List","description":"Unified view for prompts list/create operations.\nSupports both JWT (dashboard) and API key (public API) authentication.\n\nSuperadmins can create prompts in other orgs by passing organization_id\n(via SuperAdminMixin → OrganizationInjectionMixin.inject_target_organization).\nFor superadmin list access with cross-org visibility, use PromptsListView.\nFor superadmin detail access, use PromptView.","tags":["prompts"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicPromptListList"}}}}}},"put":{"operationId":"api-prompts-update","summary":"Api Prompts Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptListRequest"}}}}},"patch":{"operationId":"api-prompts-partial-update","summary":"Api Prompts Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicPromptListRequest"}}}}}},"/api/prompts/bulk/":{"post":{"operationId":"process-prompt-bulk-operations","summary":"Process Prompt Bulk Operations","description":"Process prompt bulk operations (update / commit / deploy) in request order.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOperationResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkOperationResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptBulkRequestRequest"}}}}},"put":{"operationId":"api-prompts-bulk-update","summary":"Api Prompts Bulk Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prompts_api_prompts_bulk_update_Response_200"}}}}}},"patch":{"operationId":"api-prompts-bulk-partial-update","summary":"Api Prompts Bulk Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prompts_api_prompts_bulk_partial_update_Response_200"}}}}}}},"/api/prompts/{prompt_id}/":{"get":{"operationId":"retrieve-prompt","summary":"Retrieve Prompt","description":"Unified view for single prompt operations (retrieve/update/delete).\nSupports both JWT (dashboard) and API key (public API) authentication.\n\nSuperadmin: Can READ any prompt across all organizations via JWT.\n            Can WRITE across organizations via JWT with an active\n            staff_write:prompts (or broad staff_write) scope.\nRegular users: Can only access prompts in their organization.\n\nJWT auth uses pk lookup, API key auth uses prompt_id (partial match).","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptDetail"}}}}}},"patch":{"operationId":"update-prompt","summary":"Update Prompt","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicPromptUpdateRequest"}}}}},"delete":{"operationId":"delete-prompt","summary":"Delete Prompt","description":"Unified view for single prompt operations (retrieve/update/delete).\nSupports both JWT (dashboard) and API key (public API) authentication.\n\nSuperadmin: Can READ any prompt across all organizations via JWT.\n            Can WRITE across organizations via JWT with an active\n            staff_write:prompts (or broad staff_write) scope.\nRegular users: Can only access prompts in their organization.\n\nJWT auth uses pk lookup, API key auth uses prompt_id (partial match).","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"post":{"operationId":"api-prompts-create-2","summary":"Api Prompts Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptDetailRequest"}}}}},"put":{"operationId":"api-prompts-update-2","summary":"Api Prompts Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptUpdateRequest"}}}}}},"/api/prompts/{prompt_id}/versions/":{"post":{"operationId":"create-prompt-version","summary":"Create Prompt Version","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionCreateRequest"}}}}},"get":{"operationId":"list-prompt-versions","summary":"List Prompt Versions","description":"Unified view for prompt versions list/create operations.\nSupports both JWT (dashboard) and API key (public API) authentication.\n\nUses NestedResourceMixin for parent-aware access control:\n- READ child = READ parent → superadmin can view any\n- WRITE child = WRITE parent → requires org match (for JWT auth)\n\nJWT auth: uses prompt pk from URL kwargs, exact matching\nAPI key auth: uses prompt_id from URL kwargs, startswith matching","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicPromptVersionListList"}}}}}},"put":{"operationId":"api-prompts-versions-update","summary":"Api Prompts Versions Update","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionListRequest"}}}}},"patch":{"operationId":"api-prompts-versions-partial-update","summary":"Api Prompts Versions Partial Update","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicPromptVersionListRequest"}}}}}},"/api/prompts/{prompt_id}/versions/{version}/":{"get":{"operationId":"retrieve-prompt-version","summary":"Retrieve Prompt Version","description":"Unified view for single prompt version operations (retrieve/update/delete).\nSupports both JWT (dashboard) and API key (public API) authentication.\n\nUses NestedResourceMixin for parent-aware access control:\n- READ child = READ parent → superadmin can view any\n- WRITE child = WRITE parent → requires org match (for JWT auth)\n\nJWT auth: uses pk lookup\nAPI key auth: uses prompt_id + version lookup","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionDetail"}}}}}},"patch":{"operationId":"update-prompt-version","summary":"Update Prompt Version","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicPromptVersionUpdateRequest"}}}}},"delete":{"operationId":"delete-prompt-version","summary":"Delete Prompt Version","description":"Unified view for single prompt version operations (retrieve/update/delete).\nSupports both JWT (dashboard) and API key (public API) authentication.\n\nUses NestedResourceMixin for parent-aware access control:\n- READ child = READ parent → superadmin can view any\n- WRITE child = WRITE parent → requires org match (for JWT auth)\n\nJWT auth: uses pk lookup\nAPI key auth: uses prompt_id + version lookup","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"post":{"operationId":"api-prompts-versions-create-2","summary":"Api Prompts Versions Create 2","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionDetailRequest"}}}}},"put":{"operationId":"api-prompts-versions-update-2","summary":"Api Prompts Versions Update 2","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionUpdateRequest"}}}}}},"/api/prompts/{prompt_id}/commits/":{"post":{"operationId":"commit-prompt-version","summary":"Commit Prompt Version","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptCommitResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptCommitResponseRequest"}}}}},"put":{"operationId":"api-prompts-commits-update","summary":"Api Prompts Commits Update","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptCommitResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptCommitResponseRequest"}}}}},"patch":{"operationId":"api-prompts-commits-partial-update","summary":"Api Prompts Commits Partial Update","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptCommitResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicPromptCommitResponseRequest"}}}}}},"/api/prompts/{prompt_id}/deployments/":{"post":{"operationId":"deploy-prompt-version","summary":"Deploy Prompt Version","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptDeploymentResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptDeploymentResponseRequest"}}}}},"put":{"operationId":"api-prompts-deployments-update","summary":"Api Prompts Deployments Update","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptDeploymentResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptDeploymentResponseRequest"}}}}},"patch":{"operationId":"api-prompts-deployments-partial-update","summary":"Api Prompts Deployments Partial Update","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptDeploymentResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicPromptDeploymentResponseRequest"}}}}}},"/api/prompts/summary/":{"post":{"operationId":"get-prompts-summary-with-filters","summary":"Get Prompts Summary With Filters","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptsSummaryResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptFilterRequestRequest"}}}}},"get":{"operationId":"api-prompts-summary-retrieve","summary":"Api Prompts Summary Retrieve","description":"GET/POST /prompts/jwt/prompts/summary/\nGET/POST /api/prompts/summary/\n\nGet summary statistics for prompts.\n\nReturns:\n    {\n        \"total_count\": 42\n    }\n\nPOST supports filtering via body (POST-for-filtering pattern).","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptsSummaryResponse"}}}}}},"put":{"operationId":"api-prompts-summary-update","summary":"Api Prompts Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prompts_api_prompts_summary_update_Response_200"}}}}}},"patch":{"operationId":"api-prompts-summary-partial-update","summary":"Api Prompts Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prompts_api_prompts_summary_partial_update_Response_200"}}}}}}},"/api/prompts/backups/":{"get":{"operationId":"api-prompts-backups-retrieve","summary":"Api Prompts Backups Retrieve","description":"List available backup snapshots for the caller's org.\n\nReturns prompt_id, date, size — no S3 implementation details exposed.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prompts_api_prompts_backups_retrieve_Response_200"}}}}}},"post":{"operationId":"api-prompts-backups-create","summary":"Api Prompts Backups Create","description":"Unified restore endpoint.\n\n- {prompt_id} alone → restore from trash (clear deleted_at),\n  or latest S3 backup if not in trash\n- {prompt_id, date} → restore from specific date's S3 backup\n\nThe restore reads its backup from, and writes into, a single org\nresolved server-side. Regular callers always get their own org; only\na verified superadmin may target another org via ``organization_id``\n(gated on the staff_write step-up for this write). The destructive\npre-restore deletion can therefore never reach an org the caller\nisn't authorized for.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prompts_api_prompts_backups_create_Response_200"}}}}}},"put":{"operationId":"api-prompts-backups-update","summary":"Api Prompts Backups Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prompts_api_prompts_backups_update_Response_200"}}}}}},"patch":{"operationId":"api-prompts-backups-partial-update","summary":"Api Prompts Backups Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prompts_api_prompts_backups_partial_update_Response_200"}}}}}}},"/clickhouse/prompts/{prompt_id}/metrics":{"get":{"operationId":"clickhouse-prompts-metrics-list","summary":"Clickhouse Prompts Metrics List","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCHRequestLogPromptVersionAggregationList"}}}}}}},"/prompts/":{"get":{"operationId":"list","summary":"List","description":"Unified view for prompts list/create operations.\nSupports both JWT (dashboard) and API key (public API) authentication.\n\nSuperadmins can create prompts in other orgs by passing organization_id\n(via SuperAdminMixin → OrganizationInjectionMixin.inject_target_organization).\nFor superadmin list access with cross-org visibility, use PromptsListView.\nFor superadmin detail access, use PromptView.","tags":["prompts"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicPromptListList"}}}}}},"post":{"operationId":"create","summary":"Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptDetailRequest"}}}}},"put":{"operationId":"update","summary":"Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptListRequest"}}}}},"patch":{"operationId":"partial-update","summary":"Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicPromptListRequest"}}}}}},"/prompts/{prompt_id}/":{"get":{"operationId":"retrieve","summary":"Retrieve","description":"Unified view for single prompt operations (retrieve/update/delete).\nSupports both JWT (dashboard) and API key (public API) authentication.\n\nSuperadmin: Can READ any prompt across all organizations via JWT.\n            Can WRITE across organizations via JWT with an active\n            staff_write:prompts (or broad staff_write) scope.\nRegular users: Can only access prompts in their organization.\n\nJWT auth uses pk lookup, API key auth uses prompt_id (partial match).","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptDetail"}}}}}},"post":{"operationId":"create-2","summary":"Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptDetailRequest"}}}}},"put":{"operationId":"update-2","summary":"Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptUpdateRequest"}}}}},"delete":{"operationId":"destroy","summary":"Destroy","description":"Unified view for single prompt operations (retrieve/update/delete).\nSupports both JWT (dashboard) and API key (public API) authentication.\n\nSuperadmin: Can READ any prompt across all organizations via JWT.\n            Can WRITE across organizations via JWT with an active\n            staff_write:prompts (or broad staff_write) scope.\nRegular users: Can only access prompts in their organization.\n\nJWT auth uses pk lookup, API key auth uses prompt_id (partial match).","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"partial-update-2","summary":"Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicPromptUpdateRequest"}}}}}},"/prompts/{prompt_id}/versions/":{"get":{"operationId":"versions-list","summary":"Versions List","description":"Unified view for prompt versions list/create operations.\nSupports both JWT (dashboard) and API key (public API) authentication.\n\nUses NestedResourceMixin for parent-aware access control:\n- READ child = READ parent → superadmin can view any\n- WRITE child = WRITE parent → requires org match (for JWT auth)\n\nJWT auth: uses prompt pk from URL kwargs, exact matching\nAPI key auth: uses prompt_id from URL kwargs, startswith matching","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicPromptVersionListList"}}}}}},"post":{"operationId":"versions-create","summary":"Versions Create","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionCreateRequest"}}}}},"put":{"operationId":"versions-update","summary":"Versions Update","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionListRequest"}}}}},"patch":{"operationId":"versions-partial-update","summary":"Versions Partial Update","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicPromptVersionListRequest"}}}}}},"/prompts/{prompt_id}/versions/{version}/":{"get":{"operationId":"versions-retrieve","summary":"Versions Retrieve","description":"Unified view for single prompt version operations (retrieve/update/delete).\nSupports both JWT (dashboard) and API key (public API) authentication.\n\nUses NestedResourceMixin for parent-aware access control:\n- READ child = READ parent → superadmin can view any\n- WRITE child = WRITE parent → requires org match (for JWT auth)\n\nJWT auth: uses pk lookup\nAPI key auth: uses prompt_id + version lookup","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionDetail"}}}}}},"post":{"operationId":"versions-create-2","summary":"Versions Create 2","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionDetailRequest"}}}}},"put":{"operationId":"versions-update-2","summary":"Versions Update 2","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionUpdateRequest"}}}}},"delete":{"operationId":"versions-destroy","summary":"Versions Destroy","description":"Unified view for single prompt version operations (retrieve/update/delete).\nSupports both JWT (dashboard) and API key (public API) authentication.\n\nUses NestedResourceMixin for parent-aware access control:\n- READ child = READ parent → superadmin can view any\n- WRITE child = WRITE parent → requires org match (for JWT auth)\n\nJWT auth: uses pk lookup\nAPI key auth: uses prompt_id + version lookup","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"versions-partial-update-2","summary":"Versions Partial Update 2","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["prompts"],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPromptVersionUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicPromptVersionUpdateRequest"}}}}}},"/prompts/get-last-edited-prompt":{"get":{"operationId":"get-last-edited-prompt-retrieve","summary":"Get Last Edited Prompt Retrieve","description":"JWT-only endpoint (no API key auth) for dashboard use.\nReturns the last edited prompt for the current user.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prompts_getLastEditedPromptRetrieve_Response_200"}}}}}}},"/prompts/jwt/JSON-schema-generation/":{"post":{"operationId":"jwt-json-schema-generation-create","summary":"Jwt Json Schema Generation Create","description":"JWT-only endpoint (no API key auth) for AI-powered JSON schema generation.\nRestricted to JWT authentication for security - generates JSON schemas for internal dashboard use.","tags":["prompts"],"parameters":[{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PromptsJwtJsonSchemaGenerationPostParametersFormat"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prompts_jwtJsonSchemaGenerationCreate_Response_200"}}}}}}},"/prompts/jwt/prompt-commit-generation/":{"post":{"operationId":"jwt-prompt-commit-generation-create","summary":"Jwt Prompt Commit Generation Create","description":"JWT-only endpoint (no API key auth) for AI-powered commit message generation.\nRestricted to JWT authentication for security - generates commit messages for internal dashboard use.","tags":["prompts"],"parameters":[{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PromptsJwtPromptCommitGenerationPostParametersFormat"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prompts_jwtPromptCommitGenerationCreate_Response_200"}}}}}}},"/prompts/jwt/prompt-generation/":{"post":{"operationId":"jwt-prompt-generation-create","summary":"Jwt Prompt Generation Create","description":"JWT-only endpoint (no API key auth) for AI-powered prompt generation.\nRestricted to JWT authentication for security - generates prompts for internal dashboard use.","tags":["prompts"],"parameters":[{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PromptsJwtPromptGenerationPostParametersFormat"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prompts_jwtPromptGenerationCreate_Response_200"}}}}}}},"/prompts/jwt/prompt-optimization/":{"post":{"operationId":"jwt-prompt-optimization-create","summary":"Jwt Prompt Optimization Create","description":"JWT-only endpoint (no API key auth) for AI-powered prompt optimization.\nRestricted to JWT authentication for security - generates optimized prompts for internal dashboard use.","tags":["prompts"],"parameters":[{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PromptsJwtPromptOptimizationPostParametersFormat"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prompts_jwtPromptOptimizationCreate_Response_200"}}}}}}},"/prompts/jwt/prompt-summary-generation/":{"post":{"operationId":"jwt-prompt-summary-generation-create","summary":"Jwt Prompt Summary Generation Create","description":"JWT-only endpoint (no API key auth) for AI-powered prompt summary generation.\nRestricted to JWT authentication for security - generates summaries for internal dashboard use.","tags":["prompts"],"parameters":[{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PromptsJwtPromptSummaryGenerationPostParametersFormat"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prompts_jwtPromptSummaryGenerationCreate_Response_200"}}}}}}},"/prompts/jwt/prompt-version/{id}/":{"get":{"operationId":"jwt-prompt-version-retrieve","summary":"Jwt Prompt Version Retrieve","description":"Unified view for single prompt version operations (retrieve/update/delete).\nSupports both JWT (dashboard) and API key (public API) authentication.\n\nUses NestedResourceMixin for parent-aware access control:\n- READ child = READ parent → superadmin can view any\n- WRITE child = WRITE parent → requires org match (for JWT auth)\n\nJWT auth: uses pk lookup\nAPI key auth: uses prompt_id + version lookup","tags":["prompts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionDetail"}}}}}},"post":{"operationId":"jwt-prompt-version-create","summary":"Jwt Prompt Version Create","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["prompts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionDetailRequest"}}}}},"put":{"operationId":"jwt-prompt-version-update","summary":"Jwt Prompt Version Update","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["prompts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionUpdateRequest"}}}}},"delete":{"operationId":"jwt-prompt-version-destroy","summary":"Jwt Prompt Version Destroy","description":"Unified view for single prompt version operations (retrieve/update/delete).\nSupports both JWT (dashboard) and API key (public API) authentication.\n\nUses NestedResourceMixin for parent-aware access control:\n- READ child = READ parent → superadmin can view any\n- WRITE child = WRITE parent → requires org match (for JWT auth)\n\nJWT auth: uses pk lookup\nAPI key auth: uses prompt_id + version lookup","tags":["prompts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"jwt-prompt-version-partial-update","summary":"Jwt Prompt Version Partial Update","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["prompts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPromptVersionUpdateRequest"}}}}}},"/prompts/jwt/prompt-versions/":{"get":{"operationId":"jwt-prompt-versions-list","summary":"Jwt Prompt Versions List","description":"Unified view for prompt versions list/create operations.\nSupports both JWT (dashboard) and API key (public API) authentication.\n\nUses NestedResourceMixin for parent-aware access control:\n- READ child = READ parent → superadmin can view any\n- WRITE child = WRITE parent → requires org match (for JWT auth)\n\nJWT auth: uses prompt pk from URL kwargs, exact matching\nAPI key auth: uses prompt_id from URL kwargs, startswith matching","tags":["prompts"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPromptVersionListList"}}}}}},"post":{"operationId":"jwt-prompt-versions-create","summary":"Jwt Prompt Versions Create","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionCreateRequest"}}}}},"put":{"operationId":"jwt-prompt-versions-update","summary":"Jwt Prompt Versions Update","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionListRequest"}}}}},"patch":{"operationId":"jwt-prompt-versions-partial-update","summary":"Jwt Prompt Versions Partial Update","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPromptVersionListRequest"}}}}}},"/prompts/jwt/prompt-versions/list/":{"get":{"operationId":"jwt-prompt-versions-list-list","summary":"Jwt Prompt Versions List List","description":"Unified view for prompt versions list/create operations.\nSupports both JWT (dashboard) and API key (public API) authentication.\n\nUses NestedResourceMixin for parent-aware access control:\n- READ child = READ parent → superadmin can view any\n- WRITE child = WRITE parent → requires org match (for JWT auth)\n\nJWT auth: uses prompt pk from URL kwargs, exact matching\nAPI key auth: uses prompt_id from URL kwargs, startswith matching","tags":["prompts"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPromptVersionListList"}}}}}},"post":{"operationId":"jwt-prompt-versions-list-create","summary":"Jwt Prompt Versions List Create","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionCreateRequest"}}}}},"put":{"operationId":"jwt-prompt-versions-list-update","summary":"Jwt Prompt Versions List Update","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionListRequest"}}}}},"patch":{"operationId":"jwt-prompt-versions-list-partial-update","summary":"Jwt Prompt Versions List Partial Update","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPromptVersionListRequest"}}}}}},"/prompts/jwt/prompt/{id}/":{"get":{"operationId":"jwt-prompt-retrieve","summary":"Jwt Prompt Retrieve","description":"Unified view for single prompt operations (retrieve/update/delete).\nSupports both JWT (dashboard) and API key (public API) authentication.\n\nSuperadmin: Can READ any prompt across all organizations via JWT.\n            Can WRITE across organizations via JWT with an active\n            staff_write:prompts (or broad staff_write) scope.\nRegular users: Can only access prompts in their organization.\n\nJWT auth uses pk lookup, API key auth uses prompt_id (partial match).","tags":["prompts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptDetail"}}}}}},"post":{"operationId":"jwt-prompt-create","summary":"Jwt Prompt Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["prompts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptDetailRequest"}}}}},"put":{"operationId":"jwt-prompt-update","summary":"Jwt Prompt Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["prompts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptUpdateRequest"}}}}},"delete":{"operationId":"jwt-prompt-destroy","summary":"Jwt Prompt Destroy","description":"Unified view for single prompt operations (retrieve/update/delete).\nSupports both JWT (dashboard) and API key (public API) authentication.\n\nSuperadmin: Can READ any prompt across all organizations via JWT.\n            Can WRITE across organizations via JWT with an active\n            staff_write:prompts (or broad staff_write) scope.\nRegular users: Can only access prompts in their organization.\n\nJWT auth uses pk lookup, API key auth uses prompt_id (partial match).","tags":["prompts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"jwt-prompt-partial-update","summary":"Jwt Prompt Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["prompts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPromptUpdateRequest"}}}}}},"/prompts/jwt/prompts/":{"get":{"operationId":"jwt-prompts-list","summary":"Jwt Prompts List","description":"Unified view for prompts list/create operations.\nSupports both JWT (dashboard) and API key (public API) authentication.\n\nSuperadmins can create prompts in other orgs by passing organization_id\n(via SuperAdminMixin → OrganizationInjectionMixin.inject_target_organization).\nFor superadmin list access with cross-org visibility, use PromptsListView.\nFor superadmin detail access, use PromptView.","tags":["prompts"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPromptListList"}}}}}},"post":{"operationId":"jwt-prompts-create","summary":"Jwt Prompts Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptCreation"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptCreationRequest"}}}}},"put":{"operationId":"jwt-prompts-update","summary":"Jwt Prompts Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptListRequest"}}}}},"patch":{"operationId":"jwt-prompts-partial-update","summary":"Jwt Prompts Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPromptListRequest"}}}}}},"/prompts/jwt/prompts/list/":{"get":{"operationId":"jwt-prompts-list-list","summary":"Jwt Prompts List List","description":"Unified view for prompts list operations with filtering.\n\nSuperadmin: Can see all prompts across all organizations.\nRegular users: Can only see prompts in their organization.","tags":["prompts"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"sort_by","in":"query","description":"Sort field, e.g. `-current_version__updated_at` or `-id`.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPromptListList"}}}}}},"post":{"operationId":"jwt-prompts-list-create","summary":"Jwt Prompts List Create","description":"POST delegates to GET — the body carries filters, not a new prompt.","tags":["prompts"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"sort_by","in":"query","description":"Sort field, e.g. `-current_version__updated_at` or `-id`.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPromptListList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptFilterRequestRequest"}}}}},"put":{"operationId":"jwt-prompts-list-update","summary":"Jwt Prompts List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptListRequest"}}}}},"patch":{"operationId":"jwt-prompts-list-partial-update","summary":"Jwt Prompts List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPromptListRequest"}}}}}},"/prompts/jwt/prompts/summary/":{"get":{"operationId":"jwt-prompts-summary-retrieve","summary":"Jwt Prompts Summary Retrieve","description":"GET/POST /prompts/jwt/prompts/summary/\nGET/POST /api/prompts/summary/\n\nGet summary statistics for prompts.\n\nReturns:\n    {\n        \"total_count\": 42\n    }\n\nPOST supports filtering via body (POST-for-filtering pattern).","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptsSummaryResponse"}}}}}},"post":{"operationId":"jwt-prompts-summary-create","summary":"Jwt Prompts Summary Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptsSummaryResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptFilterRequestRequest"}}}}},"put":{"operationId":"jwt-prompts-summary-update","summary":"Jwt Prompts Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prompts_jwtPromptsSummaryUpdate_Response_200"}}}}}},"patch":{"operationId":"jwt-prompts-summary-partial-update","summary":"Jwt Prompts Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["prompts"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prompts_jwtPromptsSummaryPartialUpdate_Response_200"}}}}}}},"/api/workflows/":{"get":{"operationId":"api-workflows-list","summary":"Api Workflows List","description":"List and create workflows.\n\nEach task in the ``tasks`` array may include an ``id`` field (string).\nIf omitted, the server assigns a UUID automatically before saving.\n\nPUBLIC (Respan-managed, organization NULL) workflows join list responses\nonly when the caller opts in via ``is_including_public_workflows``.\nCreating a public workflow requires a staff caller passing\n``organization_id: null`` (the DEV-9422 global-create path).","tags":["workflows"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedWorkflowListList"}}}}}},"post":{"operationId":"create-workflow","summary":"Create Workflow","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["workflows"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCreateRequest"}}}}}},"/api/workflows/list/":{"post":{"operationId":"filter-workflows","summary":"Filter Workflows","description":"List workflows with complex filtering via POST body.","tags":["workflows"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedWorkflowListList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowFilterRequestRequest"}}}}},"get":{"operationId":"api-workflows-list-list","summary":"Api Workflows List List","description":"List workflows with filtering support.\n\nGET  /api/workflows/list/  — paginated list with filters_data\nPOST /api/workflows/list/  — POST-for-filtering (not creation)","tags":["workflows"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"search","in":"query","description":"Free-text search over workflow name.","required":false,"schema":{"type":"string"}},{"name":"sort_by","in":"query","description":"Field to sort by, e.g. '-updated_at'.","required":false,"schema":{"type":"string"}},{"name":"trigger_event_type","in":"query","description":"Filter by trigger event type, e.g. 'eval_only'.","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","description":"Workflow type filter (automations, monitors, evaluators, reports).","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedWorkflowListList"}}}}}}},"/api/workflows/{workflow_id}/":{"get":{"operationId":"get-workflow","summary":"Get Workflow","description":"Get, update, or delete a workflow.\n\nDrafts-on-demand resolution:\n- GET returns the draft if one exists, else the latest committed version\n  (404 when the family doesn't exist at all).\n- PATCH edits the draft. When the family has no draft (committed-only),\n  PATCH returns 409 — clients must create a draft first via\n  POST /api/workflows/{workflow_id}/versions/.\n- DELETE removes every version in the family.\n\nCommitting a draft is a separate action at\nPOST /api/workflows/{workflow_id}/commits/.\n\nPUBLIC workflows resolve here by id on READS (toggle defaults on so by-id\nreads stay toggle-free); WRITES scope to own rows only, so a public family\n404s for non-staff instead of resolving into a mutation path. JWT writes\nare additionally gated by ``check_object_permissions`` in ``get_object``.","tags":["workflows"],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"is_exporting","in":"query","description":"Set to true to get a portable export of the workflow. Default: false.","required":false,"schema":{"type":"boolean"}},{"name":"is_including_secrets","in":"query","description":"Set to true to reveal webhook secret values. Default: false.","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRetrieveResponse"}}}}}},"patch":{"operationId":"update-workflow","summary":"Update Workflow","description":"Edit the workflow. Structural edits on committed-only families return 409.","tags":["workflows"],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedWorkflowUpdateRequest"}}}}},"delete":{"operationId":"delete-workflow","summary":"Delete Workflow","description":"Delete all versions in the workflow family.","tags":["workflows"],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/api/workflows/{workflow_id}/versions/":{"get":{"operationId":"list-workflow-versions","summary":"List Workflow Versions","description":"List versions for a workflow family, or create a new draft.\n\nGET  /api/workflows/{workflow_id}/versions/\n    List every version row (draft + committed history).\n\nPOST /api/workflows/{workflow_id}/versions/\n    Create a new editable draft. Pure CRUD — the client sends the\n    new row's content (name, tasks, description, etc.) and the\n    backend inserts it with ``is_read_only=False``. Nothing else\n    in the family is touched. Committing is a separate action at\n    POST /api/workflows/{workflow_id}/commits/.","tags":["workflows"],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedWorkflowListList"}}}}}},"post":{"operationId":"create-workflow-version","summary":"Create Workflow Version","description":"Create a new draft row from the client payload.\n\nPure CRUD: inserts one new row with ``is_read_only=False`` using\nthe content the client sends (``name``, ``tasks``, ``description``,\n``type``, ``trigger_event_type``, ``is_starred``). Does NOT clone\nfrom other rows and does NOT touch other rows.\n\nThe FE owns the \"draft dance\" — when the user wants to edit a\ncommitted workflow, the FE reads the current state locally and\nsends it here as the new draft's content.\n\nThe view forces identity/scope fields (``workflow_id`` from the\nURL, organization from the caller) so the client can't reparent\na row into another family or org.","tags":["workflows"],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCreateRequest"}}}}}},"/api/workflows/{workflow_id}/versions/{version}/":{"get":{"operationId":"get-workflow-version","summary":"Get Workflow Version","description":"Get or edit a specific workflow version.\n\nGET /api/workflows/{workflow_id}/versions/{version}/\nPATCH /api/workflows/{workflow_id}/versions/{version}/ (only if is_read_only=False)\n\nPUBLIC workflow versions are readable by every tenant; PATCH scopes to own\nrows only, so a public version 404s for non-staff instead of resolving\ninto a mutation path.","tags":["workflows"],"parameters":[{"name":"version","in":"path","required":true,"schema":{"type":"integer"}},{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetail"}}}}}},"patch":{"operationId":"update-workflow-version","summary":"Update Workflow Version","description":"Edit version — only allowed if is_read_only=False.","tags":["workflows"],"parameters":[{"name":"version","in":"path","required":true,"schema":{"type":"integer"}},{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedWorkflowUpdateRequest"}}}}}},"/api/workflows/{workflow_id}/commits/":{"post":{"operationId":"api-workflows-commits-create","summary":"Api Workflows Commits Create","description":"Commit the current draft (flip ``is_read_only`` True in place).","tags":["workflows"],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetail"}}}},"409":{"description":"No draft to commit. Create a draft via POST /versions/ first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCommitConflictError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCommitRequest"}}}}}},"/api/workflows/{workflow_id}/deployments/":{"post":{"operationId":"deploy-workflow","summary":"Deploy Workflow","description":"Deploy a committed workflow version. Sets is_enabled=True on the target version and False on all others in the family.","tags":["workflows"],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDeployResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDeployRequestRequest"}}}}},"delete":{"operationId":"undeploy-workflow","summary":"Undeploy Workflow","description":"Undeploy a workflow. Sets is_enabled=False on all versions in the family.","tags":["workflows"],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/api/workflows/{workflow_id}/validations/":{"post":{"operationId":"validate-workflow","summary":"Validate Workflow","description":"Validate a workflow's configuration and fire preview delivery sends.\n\nPOST /api/workflows/<workflow_id>/validations/\n\nValidates structure, per-task config, and upstream state references, then dispatches **real** preview notifications and webhooks so users can verify their delivery channels. Unresolved template variables render as the token {{placeholder}}. No aggregation runs; no logs are fetched.\n\nReturns:\n    status, validation, task_results, is_all_passed","tags":["workflows"],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowValidationResponse"}}}}}}},"/api/conditions/":{"get":{"operationId":"api-conditions-list","summary":"Api Conditions List","description":"REST API view for listing and creating automation conditions.\n\nThis view handles:\n- GET: List automation conditions with filtering and pagination\n- POST: Create new automation conditions or filter existing ones\n\nSuperadmin: Can LIST all conditions across all organizations.\nRegular users: Can only access conditions in their organization.\n\nAuthentication: JWT token or API Key\nPermissions: Automatic via JWTAndAPIKeyAuthenticationViewMixin\nPagination: LogPaginator","tags":["workflows"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAutomationConditionListList"}}}}}},"post":{"operationId":"api-conditions-create","summary":"Api Conditions Create","description":"Handle POST requests for both creation and filtering.\n\nDetermines whether the request is for creating a new condition\nor filtering existing conditions based on the presence of\ncreation-specific fields.\n\nArgs:\n    request: HTTP request object\n\nReturns:\n    Response: Either creation response or filtered list response","tags":["workflows"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionCreateRequest"}}}}},"put":{"operationId":"api-conditions-update","summary":"Api Conditions Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["workflows"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionListRequest"}}}}},"patch":{"operationId":"api-conditions-partial-update","summary":"Api Conditions Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["workflows"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedAutomationConditionListRequest"}}}}}},"/api/conditions/{condition_id}/":{"get":{"operationId":"api-conditions-retrieve","summary":"Api Conditions Retrieve","description":"REST API view for retrieving, updating, and deleting individual automation conditions.\n\nThis view handles:\n- GET: Retrieve a specific automation condition by condition_id\n- PUT/PATCH: Update an existing automation condition\n- DELETE: Delete an automation condition\n\nSuperadmin: Can access any condition across all organizations.\nRegular users: Can only access conditions in their organization.\n\nLookup field: id (condition_id in URL)\nAuthentication: JWT token or API Key\nPermissions: Automatic via JWTAndAPIKeyAuthenticationViewMixin","tags":["workflows"],"parameters":[{"name":"condition_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionDetail"}}}}}},"post":{"operationId":"api-conditions-create-2","summary":"Api Conditions Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["workflows"],"parameters":[{"name":"condition_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionDetailRequest"}}}}},"put":{"operationId":"api-conditions-update-2","summary":"Api Conditions Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["workflows"],"parameters":[{"name":"condition_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionUpdateRequest"}}}}},"delete":{"operationId":"api-conditions-destroy","summary":"Api Conditions Destroy","description":"REST API view for retrieving, updating, and deleting individual automation conditions.\n\nThis view handles:\n- GET: Retrieve a specific automation condition by condition_id\n- PUT/PATCH: Update an existing automation condition\n- DELETE: Delete an automation condition\n\nSuperadmin: Can access any condition across all organizations.\nRegular users: Can only access conditions in their organization.\n\nLookup field: id (condition_id in URL)\nAuthentication: JWT token or API Key\nPermissions: Automatic via JWTAndAPIKeyAuthenticationViewMixin","tags":["workflows"],"parameters":[{"name":"condition_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-conditions-partial-update-2","summary":"Api Conditions Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["workflows"],"parameters":[{"name":"condition_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedAutomationConditionUpdateRequest"}}}}}},"/api/workflows/{workflow_id}/versions/list/":{"get":{"operationId":"api-workflows-versions-list-list","summary":"Api Workflows Versions List List","description":"List versions for a workflow family, or create a new draft.\n\nGET  /api/workflows/{workflow_id}/versions/\n    List every version row (draft + committed history).\n\nPOST /api/workflows/{workflow_id}/versions/\n    Create a new editable draft. Pure CRUD — the client sends the\n    new row's content (name, tasks, description, etc.) and the\n    backend inserts it with ``is_read_only=False``. Nothing else\n    in the family is touched. Committing is a separate action at\n    POST /api/workflows/{workflow_id}/commits/.","tags":["workflows"],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedWorkflowListList"}}}}}},"post":{"operationId":"api-workflows-versions-list-create","summary":"Api Workflows Versions List Create","description":"Create a new draft row from the client payload.\n\nPure CRUD: inserts one new row with ``is_read_only=False`` using\nthe content the client sends (``name``, ``tasks``, ``description``,\n``type``, ``trigger_event_type``, ``is_starred``). Does NOT clone\nfrom other rows and does NOT touch other rows.\n\nThe FE owns the \"draft dance\" — when the user wants to edit a\ncommitted workflow, the FE reads the current state locally and\nsends it here as the new draft's content.\n\nThe view forces identity/scope fields (``workflow_id`` from the\nURL, organization from the caller) so the client can't reparent\na row into another family or org.","tags":["workflows"],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCreateRequest"}}}}}},"/api/workflows/summary/":{"get":{"operationId":"api-workflows-summary-retrieve","summary":"Api Workflows Summary Retrieve","description":"GET/POST /api/workflows/summary/\n\nReturns total count of workflows matching the supplied filters.\nPOST supports filtering via body (POST-for-filtering pattern).","tags":["workflows"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_api_workflows_summary_retrieve_Response_200"}}}}}},"post":{"operationId":"api-workflows-summary-filtered","summary":"Api Workflows Summary Filtered","description":"Total count of workflows matching the supplied filters.","tags":["workflows"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowSummaryResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowFilterRequestRequest"}}}}},"put":{"operationId":"api-workflows-summary-update","summary":"Api Workflows Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["workflows"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_api_workflows_summary_update_Response_200"}}}}}},"patch":{"operationId":"api-workflows-summary-partial-update","summary":"Api Workflows Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["workflows"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflows_api_workflows_summary_partial_update_Response_200"}}}}}}},"/api/datasets/":{"post":{"operationId":"create-dataset","summary":"Create Dataset","description":"Create or duplicate datasets\n\nEndpoint:\n    POST /api/datasets/     - Create a dataset (from logs, empty, or by duplicating an existing one)\n\nArgs (POST):\n    - name (string, required)\n    - description (string, optional)\n    - start_time (string, required, ISO 8601) — ignored if is_empty=true or source_dataset_id set\n    - end_time (string, required, ISO 8601) — ignored if is_empty=true or source_dataset_id set\n    - sampling (integer, optional, default 100) — percent of logs to add\n    - initial_log_filters (object, optional, default {})\n    - is_empty (boolean, optional, default false) — create empty dataset without adding logs\n    - source_dataset_id (string, optional) — duplicate an existing dataset. Copies all logs\n      asynchronously. When set, start_time/end_time/sampling/initial_log_filters are ignored.\n      Name defaults to \"{source_name} (copy)\" if not provided.\n\nReturns (POST 201):\n    {\n      \"id\": \"dataset_id\",\n      \"name\": \"...\",\n      \"type\": \"sampling\",\n      \"status\": \"initializing\",\n      ...\n    }\n\nNotes:\n    - Server sets organization and updated_by; type defaults to \"sampling\".\n    - If selected logs exceed plan limits, returns 400 with error message.\n    - Duplication fires `dataset_processing_complete` WS event when done (same as import).","tags":["datasets"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetCreateRequest"}}}}},"get":{"operationId":"api-datasets-list","summary":"Api Datasets List","description":"Create or duplicate datasets\n\nEndpoint:\n    POST /api/datasets/     - Create a dataset (from logs, empty, or by duplicating an existing one)\n\nArgs (POST):\n    - name (string, required)\n    - description (string, optional)\n    - start_time (string, required, ISO 8601) — ignored if is_empty=true or source_dataset_id set\n    - end_time (string, required, ISO 8601) — ignored if is_empty=true or source_dataset_id set\n    - sampling (integer, optional, default 100) — percent of logs to add\n    - initial_log_filters (object, optional, default {})\n    - is_empty (boolean, optional, default false) — create empty dataset without adding logs\n    - source_dataset_id (string, optional) — duplicate an existing dataset. Copies all logs\n      asynchronously. When set, start_time/end_time/sampling/initial_log_filters are ignored.\n      Name defaults to \"{source_name} (copy)\" if not provided.\n\nReturns (POST 201):\n    {\n      \"id\": \"dataset_id\",\n      \"name\": \"...\",\n      \"type\": \"sampling\",\n      \"status\": \"initializing\",\n      ...\n    }\n\nNotes:\n    - Server sets organization and updated_by; type defaults to \"sampling\".\n    - If selected logs exceed plan limits, returns 400 with error message.\n    - Duplication fires `dataset_processing_complete` WS event when done (same as import).","tags":["datasets"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDatasetListList"}}}}}}},"/api/datasets/list/":{"post":{"operationId":"list-datasets","summary":"List Datasets","description":"List datasets with complex filtering via POST body.","tags":["datasets"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDatasetListList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetFilterRequestRequest"}}}}},"get":{"operationId":"api-datasets-list-list","summary":"Api Datasets List List","description":"List datasets\n\nEndpoint:\n    GET /api/datasets/list/\n\nSuperadmin: Can see all datasets across all organizations.\nRegular users: Can only see datasets in their organization.\n\nReturns (200):\n    {\n      \"count\": 1,\n      \"next\": null,\n      \"previous\": null,\n      \"results\": [\n        {\n          \"id\": \"dataset_id\",\n          \"organization_id\": 123,\n          \"updated_by\": {\"first_name\": \"Ann\", \"last_name\": \"Lee\", \"email\": \"ann@example.com\"},\n          \"log_count\": 250,\n          \"name\": \"Support Conversations - July\",\n          \"log_ids\": [\"...\"],\n          \"description\": \"Sampled support chats for July\",\n          \"type\": \"sampling\",\n          \"status\": \"ready\",\n          \"created_at\": \"2025-07-26T00:00:00Z\",\n          \"updated_at\": \"2025-07-27T08:10:00Z\",\n          \"completed_annotation_count\": 0,\n          \"running_status\": \"pending\",\n          \"running_progress\": 0\n        }\n      ]\n    }","tags":["datasets"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDatasetListList"}}}}}},"put":{"operationId":"api-datasets-list-update","summary":"Api Datasets List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["datasets"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetListRequest"}}}}},"patch":{"operationId":"api-datasets-list-partial-update","summary":"Api Datasets List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["datasets"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedDatasetListRequest"}}}}}},"/api/datasets/{id}/":{"get":{"operationId":"retrieve-dataset","summary":"Retrieve Dataset","description":"Retrieve, update, and delete a dataset\n\nEndpoints:\n    GET /api/datasets/{dataset_id}/\n    PATCH /api/datasets/{dataset_id}/\n    DELETE /api/datasets/{dataset_id}/\n\nSuperadmin: Can READ any dataset across all organizations via JWT.\n            Cannot WRITE via JWT - must use API key for write operations.\nRegular users: Can only access datasets in their organization.\n\nDefense-in-depth:\n\nArgs (PATCH):\n    - name (Optional): string\n    - description (Optional): string\n\nReturns (GET 200):\n    {\n      \"id\": \"dataset_id\",\n      \"name\": \"Support Conversations - July\",\n      \"type\": \"sampling\",\n      \"description\": \"Sampled support chats for July\",\n      \"created_at\": \"2025-07-26T00:00:00Z\",\n      \"updated_at\": \"2025-07-27T08:10:00Z\",\n      \"organization\": 123,\n      \"initial_log_filters\": {\"status_code\": {\"operator\": \"eq\", \"value\": 200}},\n      \"unique_organization_ids\": [],\n      \"timestamps\": [],\n      \"log_count\": 250,\n      \"evaluator\": null,\n      \"status\": \"ready\",\n      \"running_status\": \"pending\",\n      \"running_progress\": 0,\n      \"running_at\": null,\n      \"completed_annotation_count\": 0\n    }\n\nReturns (PATCH 200): Same shape as GET with updated fields\nReturns (DELETE 204): No content\n\nDefense-in-depth: SuperAdminMixin provides queryset routing + object-level ownership.","tags":["datasets"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetDetail"}}}}}},"patch":{"operationId":"update-dataset","summary":"Update Dataset","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["datasets"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedDatasetDetailRequest"}}}}},"delete":{"operationId":"delete-dataset","summary":"Delete Dataset","description":"Retrieve, update, and delete a dataset\n\nEndpoints:\n    GET /api/datasets/{dataset_id}/\n    PATCH /api/datasets/{dataset_id}/\n    DELETE /api/datasets/{dataset_id}/\n\nSuperadmin: Can READ any dataset across all organizations via JWT.\n            Cannot WRITE via JWT - must use API key for write operations.\nRegular users: Can only access datasets in their organization.\n\nDefense-in-depth:\n\nArgs (PATCH):\n    - name (Optional): string\n    - description (Optional): string\n\nReturns (GET 200):\n    {\n      \"id\": \"dataset_id\",\n      \"name\": \"Support Conversations - July\",\n      \"type\": \"sampling\",\n      \"description\": \"Sampled support chats for July\",\n      \"created_at\": \"2025-07-26T00:00:00Z\",\n      \"updated_at\": \"2025-07-27T08:10:00Z\",\n      \"organization\": 123,\n      \"initial_log_filters\": {\"status_code\": {\"operator\": \"eq\", \"value\": 200}},\n      \"unique_organization_ids\": [],\n      \"timestamps\": [],\n      \"log_count\": 250,\n      \"evaluator\": null,\n      \"status\": \"ready\",\n      \"running_status\": \"pending\",\n      \"running_progress\": 0,\n      \"running_at\": null,\n      \"completed_annotation_count\": 0\n    }\n\nReturns (PATCH 200): Same shape as GET with updated fields\nReturns (DELETE 204): No content\n\nDefense-in-depth: SuperAdminMixin provides queryset routing + object-level ownership.","tags":["datasets"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"post":{"operationId":"api-datasets-create-2","summary":"Api Datasets Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["datasets"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetDetailRequest"}}}}},"put":{"operationId":"api-datasets-update","summary":"Api Datasets Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["datasets"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetDetailRequest"}}}}}},"/api/datasets/{dataset_id}/logs/":{"post":{"operationId":"create-dataset-log","summary":"Create Dataset Log","description":"Create a single dataset log from unified format data\n\nEndpoint:\n    POST /api/datasets/{dataset_id}/logs/ - Create individual dataset log\n\nArgs (POST body - unified format):\n    - input (any): The input data (messages, text, etc.)\n    - output (any): The output data (response, completion, etc.)\n    - metadata (object, optional): Additional metadata fields (model, log_type, etc.)\n    - metrics (object, optional): Metric fields (tokens, cost, latency, etc.)\n\nNote: model and log_type can be provided either as top-level fields or within metadata object\n\nReturns (POST 201):\n    { \"message\": \"Dataset log created successfully\", \"unique_id\": \"log-123...\" }","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogCreateResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogCreateRequestRequest"}}}}}},"/api/datasets/{dataset_id}/logs/list/":{"post":{"operationId":"list-dataset-logs","summary":"List Dataset Logs","description":"List dataset logs with complex filtering via POST body.","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCHDatasetLogListList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetFilterRequestRequest"}}}}},"get":{"operationId":"api-datasets-logs-list-list","summary":"Api Datasets Logs List List","description":"List dataset logs with filtering, pagination, and full-object retrieval.\n\nEndpoints:\n    GET /api/datasets/{dataset_id}/logs/list/ - List logs with pagination\n    POST /api/datasets/{dataset_id}/logs/list/ - List logs with complex filtering\n\nQuery Parameters (GET):\n    - page (integer, optional): Page number for pagination (default: 1)\n    - page_size (integer, optional): Number of results per page\n    - sort_by (string, optional): Field to order results by (default: unique_id)\n    - retrieval_mode (string, optional): \"async\" for background full-object loading\n\nRequest Body (POST):\n    - filters (object, optional): Complex filter criteria\n    - page (integer, optional): Page number\n    - page_size (integer, optional): Results per page\n\nResponse (200 OK):\n    - count (integer): Total number of logs matching filters\n    - next (string|null): URL for next page\n    - previous (string|null): URL for previous page\n    - results (array): Array of log objects\n    - filter_options (object): Available filter options\n\n## Under-the-hood optimizations:\n\n### 1. Async Full Object Preloading (retrieval_mode=\"async\")\n- When listing logs, the API returns immediately with shallow ClickHouse fields\n- A background Celery task (`preload_full_objects_task`) is triggered to:\n  a. Fetch full log objects from S3 storage (including input/output)\n  b. Write them to Redis cache with key: `request_log_full_object_{unique_id}`\n  c. Cache TTL: 300 seconds (5 minutes)\n- Subsequent detail view requests get instant cache hits\n- Callback: `evaluation.utils.store_dataset_log_full_objects_to_cache`\n\n### 2. Overlay Precedence for Updated Logs\n- When a log is updated, an overlay file is written to S3 with the new data\n- ClickHouse row is updated with `updated_storage_object_key` pointing to overlay\n- The preload task retrieves BOTH base index AND overlay keys\n- Deduplication: If a `unique_id` is found in BOTH, overlay takes precedence\n  (tracked via `ids_to_retrieve` set in `batch_retrieve_full_objects`)\n\n### 3. ArgMax Deduplication\n- Uses ClickHouse's argMax to get the latest version of each log\n- Deduplicates by `unique_id`, sorted by `updated_at` field\n- Ensures only the most recent version of each log is shown\n\n### 4. Storage Structure\n- Index files (.idx): `{\"unique_id1\": {object1}, \"unique_id2\": {object2}}`\n- Overlay files: `{object}` directly (single log, not wrapped)\n- Both are handled transparently in `batch_retrieve_full_objects`\n\n## Performance characteristics:\n- List response: ~100-200ms (ClickHouse query only, no S3)\n- Cache population: 1-5s background (depends on log count)\n- Detail view after list: ~10ms (Redis cache hit)","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCHDatasetLogListList"}}}}}},"put":{"operationId":"api-datasets-logs-list-update","summary":"Api Datasets Logs List Update","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetLogList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetLogListRequest"}}}}},"patch":{"operationId":"api-datasets-logs-list-partial-update","summary":"Api Datasets Logs List Partial Update","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetLogList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHDatasetLogListRequest"}}}}}},"/api/datasets/{dataset_id}/logs/{unique_id}/":{"get":{"operationId":"retrieve-dataset-log","summary":"Retrieve Dataset Log","description":"Retrieve, update, or delete a single dataset log.\n\nEndpoints:\n    GET /api/datasets/{dataset_id}/logs/{log_id}/ - Get complete log details\n    PATCH /api/datasets/{dataset_id}/logs/{log_id}/ - Update log content\n    PUT /api/datasets/{dataset_id}/logs/{log_id}/ - Replace log content\n    DELETE /api/datasets/{dataset_id}/logs/{log_id}/ - Remove log from dataset\n\nResponse (GET 200 OK):\n    Complete log object including full input/output text, metadata, metrics,\n    annotation status, evaluation scores, and all other log fields.\n\nRequest Body (PATCH/PUT):\n    Any log fields to update (input, output, metadata, etc.)\n\nResponse (PATCH/PUT 200 OK):\n    {\"message\": \"Log updated successfully\", \"unique_id\": \"log_id\"}\n\nResponse (DELETE 204 No Content):\n    Empty response body\n\nErrors:\n    - 401 Unauthorized — Missing/invalid authentication\n    - 404 Not Found — Log not found in dataset or dataset not found\n    - 400 Bad Request — Invalid update data","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetLog"}}}}}},"patch":{"operationId":"update-dataset-log","summary":"Update Dataset Log","description":"Retrieve, update, or delete a single dataset log.\n\nEndpoints:\n    GET /api/datasets/{dataset_id}/logs/{log_id}/ - Get complete log details\n    PATCH /api/datasets/{dataset_id}/logs/{log_id}/ - Update log content\n    PUT /api/datasets/{dataset_id}/logs/{log_id}/ - Replace log content\n    DELETE /api/datasets/{dataset_id}/logs/{log_id}/ - Remove log from dataset\n\nResponse (GET 200 OK):\n    Complete log object including full input/output text, metadata, metrics,\n    annotation status, evaluation scores, and all other log fields.\n\nRequest Body (PATCH/PUT):\n    Any log fields to update (input, output, metadata, etc.)\n\nResponse (PATCH/PUT 200 OK):\n    {\"message\": \"Log updated successfully\", \"unique_id\": \"log_id\"}\n\nResponse (DELETE 204 No Content):\n    Empty response body\n\nErrors:\n    - 401 Unauthorized — Missing/invalid authentication\n    - 404 Not Found — Log not found in dataset or dataset not found\n    - 400 Bad Request — Invalid update data","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetLog"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHDatasetLogRequest"}}}}},"delete":{"operationId":"delete-dataset-log","summary":"Delete Dataset Log","description":"Retrieve, update, or delete a single dataset log.\n\nEndpoints:\n    GET /api/datasets/{dataset_id}/logs/{log_id}/ - Get complete log details\n    PATCH /api/datasets/{dataset_id}/logs/{log_id}/ - Update log content\n    PUT /api/datasets/{dataset_id}/logs/{log_id}/ - Replace log content\n    DELETE /api/datasets/{dataset_id}/logs/{log_id}/ - Remove log from dataset\n\nResponse (GET 200 OK):\n    Complete log object including full input/output text, metadata, metrics,\n    annotation status, evaluation scores, and all other log fields.\n\nRequest Body (PATCH/PUT):\n    Any log fields to update (input, output, metadata, etc.)\n\nResponse (PATCH/PUT 200 OK):\n    {\"message\": \"Log updated successfully\", \"unique_id\": \"log_id\"}\n\nResponse (DELETE 204 No Content):\n    Empty response body\n\nErrors:\n    - 401 Unauthorized — Missing/invalid authentication\n    - 404 Not Found — Log not found in dataset or dataset not found\n    - 400 Bad Request — Invalid update data","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"put":{"operationId":"replace-dataset-log","summary":"Replace Dataset Log","description":"Retrieve, update, or delete a single dataset log.\n\nEndpoints:\n    GET /api/datasets/{dataset_id}/logs/{log_id}/ - Get complete log details\n    PATCH /api/datasets/{dataset_id}/logs/{log_id}/ - Update log content\n    PUT /api/datasets/{dataset_id}/logs/{log_id}/ - Replace log content\n    DELETE /api/datasets/{dataset_id}/logs/{log_id}/ - Remove log from dataset\n\nResponse (GET 200 OK):\n    Complete log object including full input/output text, metadata, metrics,\n    annotation status, evaluation scores, and all other log fields.\n\nRequest Body (PATCH/PUT):\n    Any log fields to update (input, output, metadata, etc.)\n\nResponse (PATCH/PUT 200 OK):\n    {\"message\": \"Log updated successfully\", \"unique_id\": \"log_id\"}\n\nResponse (DELETE 204 No Content):\n    Empty response body\n\nErrors:\n    - 401 Unauthorized — Missing/invalid authentication\n    - 404 Not Found — Log not found in dataset or dataset not found\n    - 400 Bad Request — Invalid update data","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetLog"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetLogRequest"}}}}}},"/api/datasets/{dataset_id}/logs/bulk/":{"post":{"operationId":"bulk-create-dataset-logs","summary":"Bulk Create Dataset Logs","description":"Bulk create dataset logs from array of unified format data\n\nEndpoint:\n    POST /api/datasets/{dataset_id}/logs/bulk/\n\nArgs (POST body):\n    - logs (array, required): List of log objects in unified format\n      Each log object contains:\n        - input (any): The input data (required) - can be any type (dict, list, string, etc.)\n        - output (any, optional): The output data - can be any type\n        - metadata (object, optional): Additional metadata fields (model, log_type, etc.)\n        - metrics (object, optional): Metric fields (tokens, cost, latency, etc.)\n\nExample Request (Recommended - Top-level expected_output):\n    ```json\n    {\n      \"logs\": [\n        {\n          \"input\": \"What is your return policy?\",\n          \"expected_output\": \"You can return within 30 days\",\n          \"metadata\": {\"category\": \"support\"}\n        },\n        {\n          \"input\": \"How do I reset my password?\",\n          \"expected_output\": \"Click Forgot Password on login page\",\n          \"metadata\": {\"category\": \"support\"}\n        }\n      ]\n    }\n    ```\n\nExample Request (Legacy - Nested expected_output, auto-extracted):\n    Frontend parses CSV where expected_output is nested in input:\n    ```json\n    {\n      \"logs\": [\n        {\n          \"input\": {\n            \"user_query\": \"What is your return policy?\",\n            \"expected_output\": \"You can return within 30 days\",\n            \"category\": \"support\"\n          }\n        }\n      ]\n    }\n    ```\n    Note: Nested expected_output is automatically extracted to top-level field.\n\nExample Request (Direct API usage with expected_output):\n    ```json\n    {\n      \"logs\": [\n        {\n          \"input\": \"What is AI?\",\n          \"expected_output\": \"AI is artificial intelligence\",\n          \"output\": \"\",\n          \"metadata\": {\"category\": \"qa\", \"model\": \"gpt-4\"}\n        },\n        {\n          \"input\": [{\"role\": \"user\", \"content\": \"Hello\"}],\n          \"expected_output\": \"A friendly greeting\",\n          \"output\": {\"role\": \"assistant\", \"content\": \"Hi there!\"},\n          \"metrics\": {\"tokens\": 10, \"cost\": 0.0001}\n        }\n      ]\n    }\n    ```\n\nField Descriptions:\n    - input: The input to be processed (can be string, dict, or array)\n    - expected_output: Expected/ground truth output for evaluation (optional)\n    - output: Actual output from LLM or system (populated during experiments)\n    - metadata: Additional context fields\n    - metrics: Performance metrics (tokens, cost, latency)\n\nReturns (POST 201):\n    ```json\n    {\n      \"success_count\": 95,\n      \"error_count\": 5,\n      \"errors\": [\n        {\"index\": 3, \"error\": \"Invalid input format\"},\n        {\"index\": 7, \"error\": \"Missing required field\"}\n      ]\n    }\n    ```\n\nNotes:\n    - For UI users: Frontend parses CSV and sends array in unified format\n    - For API users: Send JSON array directly, no CSV conversion needed\n    - Each row of CSV becomes an \"input\" object in the dataset log\n    - Plan limits are enforced (current dataset log count + new logs <= limit)\n    - Errors are returned for individual logs that fail, successful ones are still created","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogsBulkCreateResponse"}}}},"400":{"description":"Empty/invalid `logs`, plan limit exceeded, request body too large (>500 items), or all items failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogsBulkCreateBadRequest"}}}},"404":{"description":"Dataset not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogsBulkCreateNotFound"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogsBulkCreateRequestRequest"}}}}}},"/api/datasets/{dataset_id}/eval-reports/create/":{"post":{"operationId":"run-eval-on-dataset","summary":"Run Eval On Dataset","description":"Create a new dataset evaluation task.\n\nAccepts both `evaluator_ids` (preferred) and `evaluator_slugs` (deprecated alias).\n\nOptional: If experiment_id is provided, the experiment's evaluator_slugs\nwill be updated to include the new evaluators, making them appear as\ncolumns in the experiment UI.","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetTaskTrackerRunEvaluationCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetTaskTrackerRunEvaluationCreateRequest"}}}}},"get":{"operationId":"api-datasets-eval-reports-create-list","summary":"Api Datasets Eval Reports Create List","description":"View for creating new dataset evaluation tasks.\n\nArgs:\n    dataset_id: str, The ID of the dataset to run evaluation on\n    evaluator_ids: str[], The IDs of the evaluators to run (preferred)\n    evaluator_slugs: str[], Deprecated alias for evaluator_ids (backward compat)\n\nReturns:\n    GET: A list of created tasks\n    POST: The created eval task if successful, otherwise a dictionary of errors","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDatasetTaskTrackerRunEvalListList"}}}}}}},"/api/datasets/{dataset_id}/eval-reports/list/":{"get":{"operationId":"list-dataset-eval-runs","summary":"List Dataset Eval Runs","description":"View mixin that handles both JWT and API Key authentication.\n\nInherits from JWTAuthUtils:\n- is_jwt_auth(request): Post-auth check (reliable, uses DRF's successful_authenticator)\n- is_jwt_token_format(request): Pre-auth heuristic (used here to route authenticators)\n\nThis mixin uses is_jwt_token_format() (pre-auth) in get_authenticators() and get_permissions()\nbecause those methods run BEFORE authentication completes. For post-auth checks,\nuse is_jwt_auth() instead.","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicDatasetTaskTrackerRunEvalListList"}}}}}},"post":{"operationId":"api-datasets-eval-reports-list-create","summary":"Api Datasets Eval Reports List Create","description":"View mixin that handles both JWT and API Key authentication.\n\nInherits from JWTAuthUtils:\n- is_jwt_auth(request): Post-auth check (reliable, uses DRF's successful_authenticator)\n- is_jwt_token_format(request): Pre-auth heuristic (used here to route authenticators)\n\nThis mixin uses is_jwt_token_format() (pre-auth) in get_authenticators() and get_permissions()\nbecause those methods run BEFORE authentication completes. For post-auth checks,\nuse is_jwt_auth() instead.","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDatasetTaskTrackerRunEvalList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDatasetTaskTrackerRunEvalListRequest"}}}}}},"/api/datasets/{dataset_id}/logs/{log_unique_id}/status/":{"get":{"operationId":"api-datasets-logs-status-list","summary":"Api Datasets Logs Status List","description":"A mixin that provides version handling for API views.\n\nReads the X-Keywords-AI-Version header and sets self.version.\nDefault version is 0 if header is not present or invalid.","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"log_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatasetLogStatusCreate"}}}}}}},"post":{"operationId":"api-datasets-logs-status-create","summary":"Api Datasets Logs Status Create","description":"A mixin that provides version handling for API views.\n\nReads the X-Keywords-AI-Version header and sets self.version.\nDefault version is 0 if header is not present or invalid.","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"log_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogStatusCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogStatusCreateRequest"}}}}}},"/api/datasets/{dataset_id}/logs/import/":{"get":{"operationId":"api-datasets-logs-import-list","summary":"Api Datasets Logs Import List","description":"Import existing logs into dataset based on filter criteria\n\nEndpoints:\n    POST   /evaluations/datasets/{dataset_id}/logs/ - Import existing logs to dataset asynchronously (legacy)\n    POST   /api/datasets/{dataset_id}/logs/import/ - Import existing logs to dataset asynchronously\n    DELETE /api/datasets/{dataset_id}/logs/import/ - Remove logs from dataset asynchronously\n\nArgs (POST body):\n    - start_time (string, required, ISO 8601)\n    - end_time (string, required, ISO 8601)\n    - filters (object, optional; key name is \"filters\")\n    - sampling_percentage (integer, optional, default 100)\n\nReturns (POST 200):\n    { \"message\": \"Logs are being imported to dataset in the background\" }\n\nArgs (DELETE body):\n    - is_deleting_all_logs (boolean, required if filters not provided)\n    - filters (object, required unless is_deleting_all_logs = true)\n\nReturns (DELETE 200):\n    { \"message\": \"Logs are being removed from dataset in the background\" }\n\nAccess Control:\n    NestedResourceMixin handles superadmin-aware parent access:\n    - Superadmin + JWT + READ: Can view any dataset's logs\n    - Superadmin + JWT + WRITE: Blocked (can't import/delete logs in other orgs via JWT)\n    - Superadmin + API key: Can import/delete logs in any dataset\n    - Regular user: Can only access their org's datasets","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCHDatasetLogList"}}}}}},"post":{"operationId":"import-dataset-logs","summary":"Import Dataset Logs","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogsImportResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogsImportRequestRequest"}}}}},"put":{"operationId":"api-datasets-logs-import-update","summary":"Api Datasets Logs Import Update","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetLog"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetLogRequest"}}}}},"delete":{"operationId":"remove-dataset-logs","summary":"Remove Dataset Logs","description":"Import existing logs into dataset based on filter criteria\n\nEndpoints:\n    POST   /evaluations/datasets/{dataset_id}/logs/ - Import existing logs to dataset asynchronously (legacy)\n    POST   /api/datasets/{dataset_id}/logs/import/ - Import existing logs to dataset asynchronously\n    DELETE /api/datasets/{dataset_id}/logs/import/ - Remove logs from dataset asynchronously\n\nArgs (POST body):\n    - start_time (string, required, ISO 8601)\n    - end_time (string, required, ISO 8601)\n    - filters (object, optional; key name is \"filters\")\n    - sampling_percentage (integer, optional, default 100)\n\nReturns (POST 200):\n    { \"message\": \"Logs are being imported to dataset in the background\" }\n\nArgs (DELETE body):\n    - is_deleting_all_logs (boolean, required if filters not provided)\n    - filters (object, required unless is_deleting_all_logs = true)\n\nReturns (DELETE 200):\n    { \"message\": \"Logs are being removed from dataset in the background\" }\n\nAccess Control:\n    NestedResourceMixin handles superadmin-aware parent access:\n    - Superadmin + JWT + READ: Can view any dataset's logs\n    - Superadmin + JWT + WRITE: Blocked (can't import/delete logs in other orgs via JWT)\n    - Superadmin + API key: Can import/delete logs in any dataset\n    - Regular user: Can only access their org's datasets","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogsImportResponse"}}}}}},"patch":{"operationId":"api-datasets-logs-import-partial-update","summary":"Api Datasets Logs Import Partial Update","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetLog"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHDatasetLogRequest"}}}}}},"/api/datasets/{dataset_id}/logs/summary/":{"get":{"operationId":"api-datasets-logs-summary-retrieve","summary":"Api Datasets Logs Summary Retrieve","description":"Get summary statistics for dataset logs including score summaries\n\nEndpoint:\n    GET /api/datasets/{dataset_id}/logs/summary/\n    POST /api/datasets/{dataset_id}/logs/summary/ (for filtering)\n\nArgs (POST body, optional):\n    - filters (object, optional): Filter criteria to aggregate subset of logs\n\nReturns (200 OK):\n    ```json\n    {\n      \"number_of_requests\": 150,\n      \"total_cost\": 12.45,\n      \"total_tokens\": 50000,\n      \"total_prompt_tokens\": 30000,\n      \"total_completion_tokens\": 20000,\n      \"avg_latency\": 1.23,\n      \"avg_tps\": 45.2,\n      \"avg_ttft\": 0.8,\n      \"scores\": {\n        \"<evaluator_id>\": {\n          \"evaluator_id\": \"<uuid>\",\n          \"evaluator_slug\": \"quality_check\",\n          \"evaluator_name\": \"Quality Check\",\n          \"score_value_type\": \"numerical\",\n          \"avg_score\": 4.5,\n          \"true_count\": null,\n          \"false_count\": null\n        }\n      }\n    }\n    ```\n\nSmart Syncing:\n    When no filters are provided (or filters are empty), the endpoint will:\n    1. Count all logs in the dataset\n    2. Update dataset.log_count with the accurate count\n    3. Return the count\n\n    This ensures the dataset log_count stays accurate without requiring\n    separate sync operations.\n\nExamples:\n    Get total count (syncs to dataset):\n    ```\n    GET /api/datasets/{id}/logs/summary/\n    POST /api/datasets/{id}/logs/summary/\n    POST /api/datasets/{id}/logs/summary/ with {\"filters\": {}}\n    ```\n\n    Get filtered count (no sync):\n    ```\n    POST /api/datasets/{id}/logs/summary/\n    Body: {\"filters\": {\"status_code\": {\"operator\": \"eq\", \"value\": 200}}}\n    ```\n\nNote: Score summaries only include evaluators with score_value_type of\n'numerical', 'percentage', or 'boolean'.","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogsSummaryResponse"}}}}}},"post":{"operationId":"summarize-dataset-logs-filtered","summary":"Summarize Dataset Logs Filtered","description":"Get summary statistics for a filtered subset of dataset logs.","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogsSummaryResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetFilterRequestRequest"}}}}},"put":{"operationId":"api-datasets-logs-summary-update","summary":"Api Datasets Logs Summary Update","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Datasets_api_datasets_logs_summary_update_Response_200"}}}}}},"patch":{"operationId":"api-datasets-logs-summary-partial-update","summary":"Api Datasets Logs Summary Partial Update","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Datasets_api_datasets_logs_summary_partial_update_Response_200"}}}}}}},"/api/datasets/{dataset_id}/presence/":{"get":{"operationId":"api-datasets-presence-retrieve","summary":"Api Datasets Presence Retrieve","description":"Get all users currently viewing logs in this dataset from Redis cache.","tags":["datasets"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogPresenceResponse"}}}}}}},"/api/datasets/summary/":{"get":{"operationId":"api-datasets-summary-retrieve","summary":"Api Datasets Summary Retrieve","description":"GET/POST /api/datasets/summary/\n\nReturns total count of datasets matching the supplied filters.\nPOST supports filtering via body (POST-for-filtering pattern).","tags":["datasets"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetsSummaryResponse"}}}}}},"post":{"operationId":"api-datasets-summary-filtered","summary":"Api Datasets Summary Filtered","description":"Get total count of datasets with complex filtering via POST body.","tags":["datasets"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetsSummaryResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetFilterRequestRequest"}}}}},"put":{"operationId":"api-datasets-summary-update","summary":"Api Datasets Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["datasets"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetsSummaryResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetsSummaryResponseRequest"}}}}},"patch":{"operationId":"api-datasets-summary-partial-update","summary":"Api Datasets Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["datasets"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetsSummaryResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedDatasetsSummaryResponseRequest"}}}}}},"/api/testsets/":{"post":{"operationId":"create-testset","summary":"Create Testset","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["testsets"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetSheet"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetSheetRequest"}}}}},"get":{"operationId":"api-testsets-list","summary":"Api Testsets List","description":"Mixin that provides automatic organization injection and cross-org write protection.\n\nThis mixin handles ALL organization-related write behavior:\n- CREATE: Injects organization (user's org for JWT, target org for API key superadmin)\n- UPDATE/DELETE: Allows same-org writes; cross-org JWT writes require the\n  caller's scope-aware ``is_superadmin()`` (active staff write scope). API\n  key superadmin can write anywhere.\n\nThis is DATA SANITIZATION, not permission. Permission classes handle authentication\nand authorization (can they write at all?). This mixin handles where they write to.\n\nInherits from:\n- JWTAuthUtils: is_jwt_auth(), is_jwt_token_format()\n- PermissionUtils: is_read_operation(), is_write_operation(), is_same_org()\n- OrgScopeMixin: is_superadmin(), get_organization(), inject_*_organization()\n\nBehavior:\n    - post(): Calls inject_target_organization() for CREATE operations\n    - patch()/put(): Calls inject_user_organization() for UPDATE operations\n    - perform_update(): Allows cross-org UPDATE for JWT auth only with active staff write scope\n    - perform_destroy(): Allows cross-org DELETE for JWT auth only with active staff write scope\n\nUsage:\n    class MyView(OrganizationInjectionMixin, JWTAndAPIKeyAuthenticationViewMixin, ListCreateAPIView):\n        # All org injection and cross-org protection automatic!\n        pass\n\nNote: SuperAdminMixin inherits from this mixin, so views using SuperAdminMixin\nautomatically get these safe defaults.","tags":["experiments"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedTestsetSheetListList"}}}}}},"put":{"operationId":"api-testsets-update","summary":"Api Testsets Update","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["experiments"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetSheetList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetSheetListRequest"}}}}},"patch":{"operationId":"api-testsets-partial-update","summary":"Api Testsets Partial Update","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["experiments"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetSheetList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedTestsetSheetListRequest"}}}}}},"/api/testsets/list/":{"post":{"operationId":"list-testsets","summary":"List Testsets","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["testsets"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetSheetList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetSheetListRequest"}}}}},"get":{"operationId":"api-testsets-list-list","summary":"Api Testsets List List","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["experiments"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedTestsetSheetListList"}}}}}}},"/api/testsets/{testset_id}/":{"get":{"operationId":"retrieve-testset","summary":"Retrieve Testset","description":"Mixin that provides automatic organization injection and cross-org write protection.\n\nThis mixin handles ALL organization-related write behavior:\n- CREATE: Injects organization (user's org for JWT, target org for API key superadmin)\n- UPDATE/DELETE: Allows same-org writes; cross-org JWT writes require the\n  caller's scope-aware ``is_superadmin()`` (active staff write scope). API\n  key superadmin can write anywhere.\n\nThis is DATA SANITIZATION, not permission. Permission classes handle authentication\nand authorization (can they write at all?). This mixin handles where they write to.\n\nInherits from:\n- JWTAuthUtils: is_jwt_auth(), is_jwt_token_format()\n- PermissionUtils: is_read_operation(), is_write_operation(), is_same_org()\n- OrgScopeMixin: is_superadmin(), get_organization(), inject_*_organization()\n\nBehavior:\n    - post(): Calls inject_target_organization() for CREATE operations\n    - patch()/put(): Calls inject_user_organization() for UPDATE operations\n    - perform_update(): Allows cross-org UPDATE for JWT auth only with active staff write scope\n    - perform_destroy(): Allows cross-org DELETE for JWT auth only with active staff write scope\n\nUsage:\n    class MyView(OrganizationInjectionMixin, JWTAndAPIKeyAuthenticationViewMixin, ListCreateAPIView):\n        # All org injection and cross-org protection automatic!\n        pass\n\nNote: SuperAdminMixin inherits from this mixin, so views using SuperAdminMixin\nautomatically get these safe defaults.","tags":["testsets"],"parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicTestsetSheetDetail"}}}}}},"patch":{"operationId":"update-testset","summary":"Update Testset","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["testsets"],"parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicTestsetSheetUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicTestsetSheetUpdateRequest"}}}}},"delete":{"operationId":"delete-testset","summary":"Delete Testset","description":"Mixin that provides automatic organization injection and cross-org write protection.\n\nThis mixin handles ALL organization-related write behavior:\n- CREATE: Injects organization (user's org for JWT, target org for API key superadmin)\n- UPDATE/DELETE: Allows same-org writes; cross-org JWT writes require the\n  caller's scope-aware ``is_superadmin()`` (active staff write scope). API\n  key superadmin can write anywhere.\n\nThis is DATA SANITIZATION, not permission. Permission classes handle authentication\nand authorization (can they write at all?). This mixin handles where they write to.\n\nInherits from:\n- JWTAuthUtils: is_jwt_auth(), is_jwt_token_format()\n- PermissionUtils: is_read_operation(), is_write_operation(), is_same_org()\n- OrgScopeMixin: is_superadmin(), get_organization(), inject_*_organization()\n\nBehavior:\n    - post(): Calls inject_target_organization() for CREATE operations\n    - patch()/put(): Calls inject_user_organization() for UPDATE operations\n    - perform_update(): Allows cross-org UPDATE for JWT auth only with active staff write scope\n    - perform_destroy(): Allows cross-org DELETE for JWT auth only with active staff write scope\n\nUsage:\n    class MyView(OrganizationInjectionMixin, JWTAndAPIKeyAuthenticationViewMixin, ListCreateAPIView):\n        # All org injection and cross-org protection automatic!\n        pass\n\nNote: SuperAdminMixin inherits from this mixin, so views using SuperAdminMixin\nautomatically get these safe defaults.","tags":["testsets"],"parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"put":{"operationId":"replace-testset","summary":"Replace Testset","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["testsets"],"parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicTestsetSheetUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicTestsetSheetUpdateRequest"}}}}},"post":{"operationId":"api-testsets-create-3","summary":"Api Testsets Create 3","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["experiments"],"parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicTestsetSheetDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicTestsetSheetDetailRequest"}}}}}},"/api/testsets/{testset_id}/rows/":{"post":{"operationId":"create-testset-rows","summary":"Create Testset Rows","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["testsets"],"parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicTestsetRowCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicTestsetRowCreateRequest"}}}}},"get":{"operationId":"list-testset-rows","summary":"List Testset Rows","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["testsets"],"parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicTestsetRowListList"}}}}}},"delete":{"operationId":"delete-testset-rows","summary":"Delete Testset Rows","description":"Delete multiple testset rows by row indexes.\n\nArgs:\n    row_indexes: List[float] (list of row indexes to delete)","tags":["testsets"],"parameters":[{"name":"testset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/api/testsets/{testset_id}/rows/{row_index}/":{"patch":{"operationId":"update-testset-row","summary":"Update Testset Row","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["testsets"],"parameters":[{"name":"row_index","in":"path","required":true,"schema":{"type":"string"}},{"name":"testset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicTestsetRowUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicTestsetRowUpdateRequest"}}}}},"delete":{"operationId":"delete-testset-row","summary":"Delete Testset Row","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["testsets"],"parameters":[{"name":"row_index","in":"path","required":true,"schema":{"type":"string"}},{"name":"testset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"get":{"operationId":"retrieve-testset-row","summary":"Retrieve Testset Row","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["testsets"],"parameters":[{"name":"row_index","in":"path","required":true,"schema":{"type":"string"}},{"name":"testset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicTestsetRowDetail"}}}}}},"put":{"operationId":"replace-testset-row","summary":"Replace Testset Row","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["testsets"],"parameters":[{"name":"row_index","in":"path","required":true,"schema":{"type":"string"}},{"name":"testset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicTestsetRowUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicTestsetRowUpdateRequest"}}}}}},"/api/testsets/summary/":{"post":{"operationId":"get-filtered-testsets-summary","summary":"Get Filtered Testsets Summary","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["testsets"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Testsets_getFilteredTestsetsSummary_Response_200"}}}}}},"get":{"operationId":"api-testsets-summary-retrieve","summary":"Api Testsets Summary Retrieve","description":"GET/POST /api/testsets/summary/\nGET/POST /lab/testset-sheets/summary/\n\nGet summary statistics for testsets.\n\nReturns:\n    {\n        \"total_count\": 42\n    }\n\nPOST supports filtering via body (POST-for-filtering pattern).","tags":["experiments"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiments_api_testsets_summary_retrieve_Response_200"}}}}}},"put":{"operationId":"api-testsets-summary-update","summary":"Api Testsets Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["experiments"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiments_api_testsets_summary_update_Response_200"}}}}}},"patch":{"operationId":"api-testsets-summary-partial-update","summary":"Api Testsets Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["experiments"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiments_api_testsets_summary_partial_update_Response_200"}}}}}}},"/api/evaluators/":{"post":{"operationId":"create-evaluator","summary":"Create Evaluator","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["evaluators"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorCreateRequest"}}}}},"get":{"operationId":"api-evaluators-list","summary":"Api Evaluators List","description":"## Creating an Evaluator\n\n### LLM Evaluators\n\nFor LLM evaluators, the frontend should first fetch available evaluation forms from the\n`/eval-forms/` endpoint to get the template configuration, then fill in the form and submit.\n\n**Required fields:**\n- `name` (str): Display name for the evaluator\n- `evaluator_slug` (str): Unique identifier for the evaluator within the organization\n- `type` (str): llm, human_boolean, human_categorical, human_numerical, human_text\n- `configurations` (dict): Complete evaluation form configuration\n- `description` (str, optional): Description of what this evaluator does\n- `enabled` (bool, optional): Whether the evaluator is active (default: False)\n\n**Example request body for LLM evaluator:**\n```json\n{\n    \"name\": \"Output Length Checker\",\n    \"type\": \"llm\",\n    \"description\": \"Checks if the output meets character count requirements\",\n    \"enabled\": true,\n    \"configurations\": {\n        \"eval_class\": \"output_char_count\",\n        \"type\": \"function\",\n        \"note\": \"\",\n        \"display_name\": \"Output Character Count\",\n        \"description\": \"Evaluates the length of the output text\",\n        \"special_fields\": [],\n        \"required_fields\": [\n            {\n                \"name\": \"llm_output\",\n                \"display_name\": \"LLM Output\",\n                \"type\": \"textarea\",\n                \"description\": \"The output text to evaluate\",\n                \"required\": true,\n                \"default_value\": null,\n                \"placeholder\": \"\",\n                \"choices\": [],\n                \"value\": null\n            }\n        ],\n        \"inference_filters\": [],\n        \"allow_conditions\": true,\n        \"score_mapping\": {\n            \"primary_score\": \"output_char_count\",\n            \"secondary_score\": null,\n            \"tertiary_score\": null,\n            \"quaternary_score\": null\n        },\n        \"category\": \"custom\"\n    }\n}\n```\n\n### Human Annotation Evaluators\n\nFor human annotation evaluators, specify the type and provide choices for categorical evaluators.\n\n**Human Boolean Evaluator:**\n```json\n{\n    \"name\": \"Quality Check\",\n    \"evaluator_slug\": \"quality_check\",\n    \"type\": \"human_boolean\",\n    \"description\": \"Manual quality assessment\"\n}\n```\n\n**Human Categorical Evaluator:**\n```json\n{\n    \"name\": \"Sentiment Rating\",\n    \"evaluator_slug\": \"sentiment_rating\",\n    \"type\": \"human_categorical\",\n    \"description\": \"Manual sentiment classification\",\n    \"categorical_choices\": [\n        {\"name\": \"Positive\", \"value\": 1},\n        {\"name\": \"Neutral\", \"value\": 0},\n        {\"name\": \"Negative\", \"value\": -1}\n    ]\n}\n```\n\n**Human Numerical Evaluator:**\n```json\n{\n    \"name\": \"Quality Score\",\n    \"evaluator_slug\": \"quality_score\",\n    \"type\": \"human_numerical\",\n    \"description\": \"Rate quality from 1-10\"\n}\n```\n\n**Human Text Evaluator:**\n```json\n{\n    \"name\": \"Feedback Comments\",\n    \"evaluator_slug\": \"feedback_comments\",\n    \"type\": \"human_text\",\n    \"description\": \"Detailed feedback comments\"\n}\n```\n\n## Response\n\nReturns the created evaluator with all fields populated, including auto-generated fields like\n`id`, `created_at`, `updated_at`, and `evaluator_slug`.\n\n## Validation\n\n- For LLM evaluators: The `configurations` field is validated against the corresponding\n  evaluation form schema from `EVAL_FORMS_MAP`\n- For human categorical evaluators: `categorical_choices` must be a list of objects\n  with `name` and `value` fields\n- The `eval_class` in configurations must exist in the available evaluation forms\n\n## Notes\n\n- The `organization`, `created_by`, and `updated_by` fields are automatically set from\n  the authenticated user\n- Each evaluator gets a unique `evaluator_slug` within the organization\n- LLM evaluators require a valid `eval_class` that maps to an available evaluation function","tags":["evaluations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicEvaluatorListList"}}}}}},"put":{"operationId":"api-evaluators-update","summary":"Api Evaluators Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorCreateRequest"}}}}},"patch":{"operationId":"api-evaluators-partial-update","summary":"Api Evaluators Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicEvaluatorCreateRequest"}}}}}},"/api/evaluators/list/":{"post":{"operationId":"list-evaluators","summary":"List Evaluators","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["evaluators"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorListRequest"}}}}},"get":{"operationId":"api-evaluators-list-list","summary":"Api Evaluators List List","description":"List evaluators for an organization.\n\nSuperadmin: Can see all evaluators across all organizations.\nRegular users: Can only see evaluators in their organization, plus PUBLIC\n    (Respan-managed) evaluators when ``is_including_public_evaluators`` is\n    truthy. Public evaluators are hidden by default for back-compat.","tags":["evaluations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicEvaluatorListList"}}}}}},"put":{"operationId":"api-evaluators-list-update","summary":"Api Evaluators List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorListRequest"}}}}},"patch":{"operationId":"api-evaluators-list-partial-update","summary":"Api Evaluators List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicEvaluatorListRequest"}}}}}},"/api/evaluators/{evaluator_id}/":{"get":{"operationId":"retrieve-evaluator","summary":"Retrieve Evaluator","description":"Get, update, or delete an evaluator's draft version.\n\nGET /api/evaluators/{evaluator_id}/ - Get draft version (is_read_only=False)\nPATCH /api/evaluators/{evaluator_id}/ - Update draft version\nDELETE /api/evaluators/{evaluator_id}/ - Delete ALL versions\n\nSuperadmin: Can READ any evaluator across all organizations via JWT.\n            Cannot WRITE via JWT - must use API key for write operations.\nRegular users: Can only access evaluators in their organization.\n\nNOTE: Queryset filters by is_read_only=False, ensuring unique lookup per evaluator_id.\nThis allows DRF's standard get_object() to work without manual overrides.\nDelete removes ALL versions of the evaluator.\n\nDefense-in-depth:\n- SuperAdminMixin: Queryset routing + JWT write protection + object-level ownership","tags":["evaluators"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorDetail"}}}}}},"patch":{"operationId":"update-evaluator","summary":"Update Evaluator","description":"Update the draft version (queryset already filters is_read_only=False).","tags":["evaluators"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicEvaluatorUpdateRequest"}}}}},"delete":{"operationId":"delete-evaluator","summary":"Delete Evaluator","description":"Delete ALL versions of the evaluator.\n\nUses SuperAdminMixin's queryset routing for org filtering.\nCross-org JWT write protection is enforced automatically by ObjectOwnershipPermission\nin get_object() via check_object_permissions().","tags":["evaluators"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"put":{"operationId":"replace-evaluator","summary":"Replace Evaluator","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["evaluators"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorUpdateRequest"}}}}},"post":{"operationId":"api-evaluators-create-2","summary":"Api Evaluators Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorDetailRequest"}}}}}},"/api/evaluators/{evaluator_id}/run/":{"post":{"operationId":"run-evaluator","summary":"Run Evaluator","description":"Main entry point for test run evaluations.\nHandles four modes of operation:\n1. Evaluation from raw eval inputs & evaluator id (backward compatibility)\n2. Evaluation from log\n3. Evaluation from evaluator configuration form\n4. Evaluation from raw eval inputs & evaluator id (new public API mode)","tags":["evaluators"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluators_runEvaluator_Response_200"}}}}}}},"/api/evaluators/{evaluator_id}/versions/":{"get":{"operationId":"list-evaluator-versions","summary":"List Evaluator Versions","description":"List all versions or create new version (commit).\n\nGET /api/evaluators/{id}/versions/ - List all versions\nPOST /api/evaluators/{id}/versions/ - Commit (create new version)\n\nAccess control via NestedResourceMixin: org identity derived from parent evaluator.\nSuperadmin: Can LIST all versions across all organizations via JWT.\nRegular users: Can only access versions in their organization.","tags":["evaluators"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicEvaluatorVersionListList"}}}}}},"post":{"operationId":"create-evaluator-version","summary":"Create Evaluator Version","description":"Create a new version (commit). Org derived from parent evaluator.","tags":["evaluators"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCreateVersion"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCreateVersionRequest"}}}}},"put":{"operationId":"api-evaluators-versions-update","summary":"Api Evaluators Versions Update","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionListRequest"}}}}},"patch":{"operationId":"api-evaluators-versions-partial-update","summary":"Api Evaluators Versions Partial Update","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicEvaluatorVersionListRequest"}}}}}},"/api/evaluators/{evaluator_id}/versions/{version}/":{"get":{"operationId":"retrieve-evaluator-version","summary":"Retrieve Evaluator Version","description":"Get or edit a specific version by version number.\n\nGET /api/evaluators/{evaluator_id}/versions/{version}/ - Get specific version\nPATCH /api/evaluators/{evaluator_id}/versions/{version}/ - Edit (only if is_read_only=False)\n\nNOTE: DELETE is not allowed for specific versions. Delete the entire evaluator instead.\nVersions are immutable history - you can only add new versions, not remove old ones.\n\nAccess control via NestedResourceMixin: org identity derived from parent evaluator.\nSuperadmin: Can READ any version across all organizations via JWT.\nRegular users: Can only access versions in their organization.","tags":["evaluators"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionDetail"}}}}}},"put":{"operationId":"replace-evaluator-version","summary":"Replace Evaluator Version","description":"Full update - only allowed if is_read_only=False.","tags":["evaluators"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionDetailRequest"}}}}},"patch":{"operationId":"update-evaluator-version","summary":"Update Evaluator Version","description":"Edit version - only allowed if is_read_only=False.","tags":["evaluators"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicEvaluatorVersionDetailRequest"}}}}},"post":{"operationId":"api-evaluators-versions-create-2","summary":"Api Evaluators Versions Create 2","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionDetailRequest"}}}}}},"/api/evaluators/summary/":{"post":{"operationId":"get-filtered-evaluators-summary","summary":"Get Filtered Evaluators Summary","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["evaluators"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluators_getFilteredEvaluatorsSummary_Response_200"}}}}}},"get":{"operationId":"api-evaluators-summary-retrieve","summary":"Api Evaluators Summary Retrieve","description":"GET/POST /evaluations/evaluators/summary/\nGET/POST /api/evaluators/summary/\n\nGet summary statistics for evaluators.\n\nReturns:\n    {\n        \"total_count\": 15\n    }\n\nPOST supports filtering via body (POST-for-filtering pattern).","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluations_api_evaluators_summary_retrieve_Response_200"}}}}}},"put":{"operationId":"api-evaluators-summary-update","summary":"Api Evaluators Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluations_api_evaluators_summary_update_Response_200"}}}}}},"patch":{"operationId":"api-evaluators-summary-partial-update","summary":"Api Evaluators Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluations_api_evaluators_summary_partial_update_Response_200"}}}}}}},"/api/scores/":{"post":{"operationId":"create-score","summary":"Create Score","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["scores"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvalResultCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvalResultCreateRequest"}}}}},"get":{"operationId":"api-scores-list","summary":"Api Scores List","description":"Create view for evaluation results\n\nSynced to clickhouse automatically via evaluation.signals\n\nEndpoint:\n    /api/scores/\n\nArgs:\n    - evaluator_id: The ID of the Evaluator instance to associate with\n    - numerical_value: The numerical score of this result\n    - string_value: The string score of this result\n    - boolean_value: The boolean score of this result\n    - categorical_value (Optional): The categorical score values (list of strings)\n    - log_id (Optional): The ID of the CHLogV3 instance to associate with\n    - prompt_id (Optional): The ID of the Prompt instance to associate with\n    - prompt_version_number (Optional): The version number of the Prompt instance to associate with\n    - dataset_id (Optional): The ID of the Dataset instance to associate with\nReturn:\n    {\n        \"id\": \"xxxx\",\n        \"created_at\": \"2025-09-07T08:35:16.770817Z\",\n        \"type\": \"llm\",\n        \"environment\": \"test\",\n        \"numerical_value\": null,\n        \"string_value\": null,\n        \"boolean_value\": null,\n        \"categorical_value\": [],\n        \"is_passed\": false,\n        \"cost\": 0.0,\n        \"evaluator_id\": \"9b589384-574a-429c-8996-58419f514871\",\n        \"log_id\": \"some_log_id\",\n        \"dataset_id\": null\n    }","tags":["logs"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCHEvalResultListList"}}}}}},"put":{"operationId":"api-scores-update","summary":"Api Scores Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHEvalResultList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHEvalResultListRequest"}}}}},"patch":{"operationId":"api-scores-partial-update","summary":"Api Scores Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHEvalResultList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHEvalResultListRequest"}}}}}},"/api/scores/{id}/":{"get":{"operationId":"retrieve-score","summary":"Retrieve Score","description":"Operates on the Postgres-based EvalResult models for update and detail point retrieval\nSynced to clickhouse automatically via evaluation.signals","tags":["scores"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvalResultDetail"}}}}}},"patch":{"operationId":"update-score","summary":"Update Score","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["scores"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvalResultUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicEvalResultUpdateRequest"}}}}},"delete":{"operationId":"delete-score","summary":"Delete Score","description":"Operates on the Postgres-based EvalResult models for update and detail point retrieval\nSynced to clickhouse automatically via evaluation.signals","tags":["scores"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"put":{"operationId":"replace-score","summary":"Replace Score","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["scores"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvalResultDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvalResultDetailRequest"}}}}},"post":{"operationId":"api-scores-create-2","summary":"Api Scores Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["logs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvalResultDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvalResultDetailRequest"}}}}}},"/api/logs/{log_id}/scores/":{"post":{"operationId":"create-span-score","summary":"Create Span Score","description":"Create and list scores for a specific log\n\nEndpoints:\n    GET /api/logs/{log_id}/scores/ - List all scores for a log\n    POST /api/logs/{log_id}/scores/ - Create a new score for a log\n\nArgs (POST):\n    - evaluator_id (Optional): The ID of the Keywords AI evaluator to associate with\n    - evaluator_slug (Optional): The slug of a custom evaluator (required if evaluator_id not provided)\n    - numerical_value (Optional): The numerical score value\n    - string_value (Optional): The string score value\n    - boolean_value (Optional): The boolean score value\n    - categorical_value (Optional): The categorical score values (list of strings)\n\nReturns (POST):\n    {\n        \"id\": \"eval_result_unique_id\",\n        \"created_at\": \"2024-01-15T10:30:00Z\",\n        \"type\": \"llm\",\n        \"environment\": \"test\",\n        \"numerical_value\": 4.5,\n        \"string_value\": \"Good quality\",\n        \"boolean_value\": true,\n        \"categorical_value\": [\"excellent\"],\n        \"is_passed\": false,\n        \"cost\": 0.0,\n        \"evaluator_id\": null,\n        \"evaluator_slug\": \"custom_evaluator\",\n        \"log_id\": null,\n        \"dataset_id\": null\n    }\n\nReturns (GET):\n    {\n        \"count\": 2,\n        \"next\": null,\n        \"previous\": null,\n        \"results\": [\n            {\n                \"id\": \"eval_result_unique_id_1\",\n                \"created_at\": \"2024-01-15T10:30:00Z\",\n                \"type\": \"llm\",\n                \"environment\": \"test\",\n                \"numerical_value\": 4.5,\n                \"string_value\": \"Good quality\",\n                \"boolean_value\": true,\n                \"categorical_value\": [\"excellent\"],\n                \"is_passed\": false,\n                \"cost\": 0.0,\n                \"evaluator_id\": null,\n                \"evaluator_slug\": \"custom_evaluator\",\n                \"log_id\": \"log_unique_id\",\n                \"dataset_id\": null\n            }\n        ]\n    }","tags":["scores"],"parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLogScoreCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLogScoreCreateRequest"}}}}},"get":{"operationId":"list-span-scores","summary":"List Span Scores","description":"Create and list scores for a specific log\n\nEndpoints:\n    GET /api/logs/{log_id}/scores/ - List all scores for a log\n    POST /api/logs/{log_id}/scores/ - Create a new score for a log\n\nArgs (POST):\n    - evaluator_id (Optional): The ID of the Keywords AI evaluator to associate with\n    - evaluator_slug (Optional): The slug of a custom evaluator (required if evaluator_id not provided)\n    - numerical_value (Optional): The numerical score value\n    - string_value (Optional): The string score value\n    - boolean_value (Optional): The boolean score value\n    - categorical_value (Optional): The categorical score values (list of strings)\n\nReturns (POST):\n    {\n        \"id\": \"eval_result_unique_id\",\n        \"created_at\": \"2024-01-15T10:30:00Z\",\n        \"type\": \"llm\",\n        \"environment\": \"test\",\n        \"numerical_value\": 4.5,\n        \"string_value\": \"Good quality\",\n        \"boolean_value\": true,\n        \"categorical_value\": [\"excellent\"],\n        \"is_passed\": false,\n        \"cost\": 0.0,\n        \"evaluator_id\": null,\n        \"evaluator_slug\": \"custom_evaluator\",\n        \"log_id\": null,\n        \"dataset_id\": null\n    }\n\nReturns (GET):\n    {\n        \"count\": 2,\n        \"next\": null,\n        \"previous\": null,\n        \"results\": [\n            {\n                \"id\": \"eval_result_unique_id_1\",\n                \"created_at\": \"2024-01-15T10:30:00Z\",\n                \"type\": \"llm\",\n                \"environment\": \"test\",\n                \"numerical_value\": 4.5,\n                \"string_value\": \"Good quality\",\n                \"boolean_value\": true,\n                \"categorical_value\": [\"excellent\"],\n                \"is_passed\": false,\n                \"cost\": 0.0,\n                \"evaluator_id\": null,\n                \"evaluator_slug\": \"custom_evaluator\",\n                \"log_id\": \"log_unique_id\",\n                \"dataset_id\": null\n            }\n        ]\n    }","tags":["scores"],"parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicLogScoreListList"}}}}}}},"/api/logs/{log_id}/scores/{score_id}/":{"get":{"operationId":"retrieve-span-score","summary":"Retrieve Span Score","description":"Retrieve, update, and delete individual log scores\n\nEndpoints:\n    GET /api/logs/{log_id}/scores/{score_id}/ - Retrieve a specific score\n    PATCH /api/logs/{log_id}/scores/{score_id}/ - Update a specific score\n    DELETE /api/logs/{log_id}/scores/{score_id}/ - Delete a specific score\n\nArgs (PATCH):\n    - numerical_value (Optional): Updated numerical score value\n    - string_value (Optional): Updated string score value\n    - boolean_value (Optional): Updated boolean score value\n    - categorical_value (Optional): Updated categorical score values (list of strings)\n\nReturns (GET):\n    {\n        \"id\": \"eval_result_unique_id\",\n        \"created_at\": \"2024-01-15T10:30:00Z\",\n        \"type\": \"llm\",\n        \"environment\": \"test\",\n        \"numerical_value\": 4.5,\n        \"string_value\": \"Good quality\",\n        \"boolean_value\": true,\n        \"categorical_value\": [\"excellent\"],\n        \"is_passed\": false,\n        \"cost\": 0.0,\n        \"evaluator_id\": null,\n        \"evaluator_slug\": \"custom_evaluator\",\n        \"log_id\": \"log_unique_id\",\n        \"dataset_id\": null\n    }\n\nReturns (PATCH):\n    {\n        \"id\": \"eval_result_unique_id\",\n        \"created_at\": \"2024-01-15T10:30:00Z\",\n        \"type\": \"llm\",\n        \"environment\": \"test\",\n        \"numerical_value\": 4.8,\n        \"string_value\": \"Excellent quality\",\n        \"boolean_value\": true,\n        \"categorical_value\": [\"excellent\"],\n        \"is_passed\": false,\n        \"cost\": 0.0,\n        \"evaluator_id\": null,\n        \"evaluator_slug\": \"custom_evaluator\",\n        \"log_id\": \"log_unique_id\",\n        \"dataset_id\": null\n    }","tags":["scores"],"parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"score_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLogScoreDetail"}}}}}},"patch":{"operationId":"update-span-score","summary":"Update Span Score","description":"Retrieve, update, and delete individual log scores\n\nEndpoints:\n    GET /api/logs/{log_id}/scores/{score_id}/ - Retrieve a specific score\n    PATCH /api/logs/{log_id}/scores/{score_id}/ - Update a specific score\n    DELETE /api/logs/{log_id}/scores/{score_id}/ - Delete a specific score\n\nArgs (PATCH):\n    - numerical_value (Optional): Updated numerical score value\n    - string_value (Optional): Updated string score value\n    - boolean_value (Optional): Updated boolean score value\n    - categorical_value (Optional): Updated categorical score values (list of strings)\n\nReturns (GET):\n    {\n        \"id\": \"eval_result_unique_id\",\n        \"created_at\": \"2024-01-15T10:30:00Z\",\n        \"type\": \"llm\",\n        \"environment\": \"test\",\n        \"numerical_value\": 4.5,\n        \"string_value\": \"Good quality\",\n        \"boolean_value\": true,\n        \"categorical_value\": [\"excellent\"],\n        \"is_passed\": false,\n        \"cost\": 0.0,\n        \"evaluator_id\": null,\n        \"evaluator_slug\": \"custom_evaluator\",\n        \"log_id\": \"log_unique_id\",\n        \"dataset_id\": null\n    }\n\nReturns (PATCH):\n    {\n        \"id\": \"eval_result_unique_id\",\n        \"created_at\": \"2024-01-15T10:30:00Z\",\n        \"type\": \"llm\",\n        \"environment\": \"test\",\n        \"numerical_value\": 4.8,\n        \"string_value\": \"Excellent quality\",\n        \"boolean_value\": true,\n        \"categorical_value\": [\"excellent\"],\n        \"is_passed\": false,\n        \"cost\": 0.0,\n        \"evaluator_id\": null,\n        \"evaluator_slug\": \"custom_evaluator\",\n        \"log_id\": \"log_unique_id\",\n        \"dataset_id\": null\n    }","tags":["scores"],"parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"score_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLogScoreUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicLogScoreUpdateRequest"}}}}},"delete":{"operationId":"delete-span-score","summary":"Delete Span Score","description":"Retrieve, update, and delete individual log scores\n\nEndpoints:\n    GET /api/logs/{log_id}/scores/{score_id}/ - Retrieve a specific score\n    PATCH /api/logs/{log_id}/scores/{score_id}/ - Update a specific score\n    DELETE /api/logs/{log_id}/scores/{score_id}/ - Delete a specific score\n\nArgs (PATCH):\n    - numerical_value (Optional): Updated numerical score value\n    - string_value (Optional): Updated string score value\n    - boolean_value (Optional): Updated boolean score value\n    - categorical_value (Optional): Updated categorical score values (list of strings)\n\nReturns (GET):\n    {\n        \"id\": \"eval_result_unique_id\",\n        \"created_at\": \"2024-01-15T10:30:00Z\",\n        \"type\": \"llm\",\n        \"environment\": \"test\",\n        \"numerical_value\": 4.5,\n        \"string_value\": \"Good quality\",\n        \"boolean_value\": true,\n        \"categorical_value\": [\"excellent\"],\n        \"is_passed\": false,\n        \"cost\": 0.0,\n        \"evaluator_id\": null,\n        \"evaluator_slug\": \"custom_evaluator\",\n        \"log_id\": \"log_unique_id\",\n        \"dataset_id\": null\n    }\n\nReturns (PATCH):\n    {\n        \"id\": \"eval_result_unique_id\",\n        \"created_at\": \"2024-01-15T10:30:00Z\",\n        \"type\": \"llm\",\n        \"environment\": \"test\",\n        \"numerical_value\": 4.8,\n        \"string_value\": \"Excellent quality\",\n        \"boolean_value\": true,\n        \"categorical_value\": [\"excellent\"],\n        \"is_passed\": false,\n        \"cost\": 0.0,\n        \"evaluator_id\": null,\n        \"evaluator_slug\": \"custom_evaluator\",\n        \"log_id\": \"log_unique_id\",\n        \"dataset_id\": null\n    }","tags":["scores"],"parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"score_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"put":{"operationId":"replace-span-score","summary":"Replace Span Score","description":"Retrieve, update, and delete individual log scores\n\nEndpoints:\n    GET /api/logs/{log_id}/scores/{score_id}/ - Retrieve a specific score\n    PATCH /api/logs/{log_id}/scores/{score_id}/ - Update a specific score\n    DELETE /api/logs/{log_id}/scores/{score_id}/ - Delete a specific score\n\nArgs (PATCH):\n    - numerical_value (Optional): Updated numerical score value\n    - string_value (Optional): Updated string score value\n    - boolean_value (Optional): Updated boolean score value\n    - categorical_value (Optional): Updated categorical score values (list of strings)\n\nReturns (GET):\n    {\n        \"id\": \"eval_result_unique_id\",\n        \"created_at\": \"2024-01-15T10:30:00Z\",\n        \"type\": \"llm\",\n        \"environment\": \"test\",\n        \"numerical_value\": 4.5,\n        \"string_value\": \"Good quality\",\n        \"boolean_value\": true,\n        \"categorical_value\": [\"excellent\"],\n        \"is_passed\": false,\n        \"cost\": 0.0,\n        \"evaluator_id\": null,\n        \"evaluator_slug\": \"custom_evaluator\",\n        \"log_id\": \"log_unique_id\",\n        \"dataset_id\": null\n    }\n\nReturns (PATCH):\n    {\n        \"id\": \"eval_result_unique_id\",\n        \"created_at\": \"2024-01-15T10:30:00Z\",\n        \"type\": \"llm\",\n        \"environment\": \"test\",\n        \"numerical_value\": 4.8,\n        \"string_value\": \"Excellent quality\",\n        \"boolean_value\": true,\n        \"categorical_value\": [\"excellent\"],\n        \"is_passed\": false,\n        \"cost\": 0.0,\n        \"evaluator_id\": null,\n        \"evaluator_slug\": \"custom_evaluator\",\n        \"log_id\": \"log_unique_id\",\n        \"dataset_id\": null\n    }","tags":["scores"],"parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"score_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLogScoreDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLogScoreDetailRequest"}}}}}},"/api/scores/list/":{"post":{"operationId":"filter-scores","summary":"Filter Scores","description":"Handle POST requests the same as GET for filtering.","tags":["scores"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHEvalResultList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHEvalResultListRequest"}}}}},"get":{"operationId":"api-scores-list-list","summary":"Api Scores List List","description":"Backward compatible ClickHouse-based evaluation results list view","tags":["logs"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicCHEvalResultListList"}}}}}},"put":{"operationId":"api-scores-list-update","summary":"Api Scores List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHEvalResultList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHEvalResultListRequest"}}}}},"patch":{"operationId":"api-scores-list-partial-update","summary":"Api Scores List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHEvalResultList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicCHEvalResultListRequest"}}}}}},"/api/v2/experiments/":{"post":{"operationId":"create-experiment","summary":"Create Experiment","description":"Create an experiment. Two equally-supported modes, distinguished\nby the payload shape:\n\n1. **Draft mode** — client sends just ``name`` (plus optional\n   description). Row lands in ``status=draft`` and stays there\n   until the client fills in the rest via PATCH and triggers\n   execution via ``POST /api/v2/experiments/{id}/runs/``.\n\n2. **Create-and-run mode** — client sends ``dataset`` + a\n   non-empty ``workflow`` (plus evaluators, config, etc.). After\n   the row is created we dispatch the Celery workflow task\n   directly, matching the pattern in\n   ``dataset/views.py::DatasetsView.post()``. Dispatch failures\n   leave the row with ``status=failed`` (via\n   ``dispatch_experiment_run``), so the client can re-run in\n   place; the failure is also reflected in the HTTP response.\n\nBody mutations inline per convention (no helper methods):\n\n- ``created_by`` injected from ``request.user``. Organization fields\n  are injected automatically by ``SuperAdminMixin.post()`` via\n  ``inject_target_organization``.\n- Alias/default transforms (experiment_id → id, dataset_id →\n  dataset, default id + name) live in\n  ``ExperimentV2CreateSerializer`` per serializer conventions.","tags":["experiments"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2Create"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2CreateRequest"}}}}},"get":{"operationId":"api-v-2-experiments-list","summary":"Api V 2 Experiments List","description":"GET: List experiments\nPOST: Create and run an experiment workflow execution.\n\n**Design Philosophy:**\nDataset Log → [Arbitrary Workflow Tasks] → Run Eval Steps → Scores for Comparison\n\n- Workflow tasks can be arbitrary (any combination, end with whatever)\n- `evaluator_ids` field specifies which evaluators produce scores (preferred)\n- `evaluator_slugs` is a deprecated alias for `evaluator_ids` (backward compat)\n- Workflow step type `eval` is canonical; legacy `evaluator` is still accepted on input\n- Multiple evaluators can run for comprehensive comparison (e.g., quality, safety, cost)\n\nThis endpoint processes a dataset through a sequence of workflow tasks and generates\ntraces for experiment tracking.\n\n**Request Body:**\n```json\n{\n    \"dataset_id\": \"dataset-123\",\n    \"workflow\": [\n        {\n            \"type\": \"prompt\",\n            \"config\": {\n                \"prompt_id\": \"my-prompt-slug\"\n            }\n        },\n        {\n            \"type\": \"completion\",\n            \"config\": {\n                \"model\": \"gpt-4\",\n                \"temperature\": 0.7,\n                \"max_tokens\": 1000,\n                \"top_p\": 1.0,\n                \"frequency_penalty\": 0,\n                \"presence_penalty\": 0\n            }\n        }\n    ],\n    \"evaluator_ids\": [\"abc123-evaluator-uuid\", \"def456-evaluator-uuid\"],\n    \"experiment_id\": \"exp-run-456\",\n    \"name\": \"My Experiment\",\n    \"description\": \"Testing GPT-4 with my prompt\",\n    \"span_workflow_name\": \"My Experiment\",\n    \"enable_tracing\": true\n}\n```\n\n**Response:**\n```json\n{\n    \"task_id\": \"celery-task-id\",\n    \"task_tracker_id\": \"tracker-id\",\n    \"status\": \"pending\",\n    \"message\": \"Workflow execution task started\",\n    \"experiment_id\": \"exp-run-456\"\n}\n```\n\n**Workflow Types & Configurations:**\n\n**Key Fields:**\n- `workflow`: Array of workflow tasks (can be any combination)\n- `evaluator_ids`: Array of evaluator IDs (optional) - runs after workflow tasks complete; omit or pass `[]` to produce outputs with no scores\n- `evaluator_slugs`: Deprecated alias for `evaluator_ids` (still accepted)\n\n**Example Configurations:**\n- workflow: `[prompt, completion]` + evaluator_ids: `[\"abc123\"]` ✓\n- workflow: `[completion]` + evaluator_ids: `[\"abc123\", \"def456\"]` ✓\n- workflow: `[]` + evaluator_ids: `[\"abc123\"]` ✗ (workflow is required)\n- workflow: `[prompt, completion]` + evaluator_ids: `[]` ✓ (runs the workflow, produces outputs with no scores)\n\n1. **Prompt Workflow** (`type: \"prompt\"`):\n   - Variables are dynamically filled from dataset entries (don't pass in config)\n   - Config fields:\n     - `prompt_id`: Prompt identifier (required)\n   - Input: Dataset entry fields (mapped to prompt variables)\n   - Output: Rendered messages array\n\n2. **Completion Workflow** (`type: \"completion\"`):\n   - Uses LLM configuration fields (temperature, max_tokens, etc.)\n   - Messages come from previous workflow step or dataset input field\n   - Config fields (all optional):\n     - `model`: Model identifier (e.g., \"gpt-4\", \"claude-3-opus\")\n     - `temperature`: Sampling temperature (0-2)\n     - `max_tokens`: Maximum completion tokens\n     - `top_p`: Nucleus sampling parameter\n     - `frequency_penalty`: Frequency penalty (-2 to 2)\n     - `presence_penalty`: Presence penalty (-2 to 2)\n     - `stop`: Stop sequences (string or array)\n     - `n`: Number of completions to generate\n     - `stream`: Enable streaming (not recommended for experiments)\n     - `response_format`: Response format (e.g., {\"type\": \"json_object\"})\n     - `tools`: Function calling tools array\n     - `tool_choice`: Tool choice strategy\n     - `reasoning_effort`: Reasoning effort for o1 models\n   - Input: Messages array (from \"input\" field in unified log format)\n   - Output: Response message object (stored in \"output\" field)\n\n3. **Eval Workflow** (`type: \"eval\"`):\n   - Runs an evaluator on the unified log format (can be in workflow or via evaluator_slugs)\n   - Produces scores for experiment comparison\n   - Config fields:\n     - `evaluator_slug`: Evaluator identifier (required)\n   - Input: Unified log format with input/output/metrics/metadata\n   - Output: Evaluation result with score\n\n**Note:** Eval steps can be in workflow OR specified via `evaluator_slugs` field (recommended).\nThe `evaluator_slugs` field at experiment level ensures all specified evaluators run after workflow tasks complete.\n\n4. **Condition Workflow** (`type: \"condition\"`):\n   - Evaluates condition policies (future implementation)\n   - Config fields: TBD\n\n5. **Duplicate Workflow** (`type: \"duplicate\"`):\n   - Passes through dataset entry's input/output as-is (no LLM inference)\n   - Useful for batch evaluation on existing production data\n   - Config fields (all optional):\n     - `name`: Display name for the workflow span\n   - Input: Dataset entry's input field\n   - Output: Dataset entry's output field (unchanged)\n   - Evaluators then run on this duplicated data\n\n**Authentication:**\n- Supports both JWT (internal) and API Key (public) authentication","tags":["experiments"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedExperimentV2ListList"}}}}}},"put":{"operationId":"api-v-2-experiments-update","summary":"Api V 2 Experiments Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["experiments"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2List"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2ListRequest"}}}}},"patch":{"operationId":"api-v-2-experiments-partial-update","summary":"Api V 2 Experiments Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["experiments"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2List"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedExperimentV2ListRequest"}}}}}},"/api/v2/experiments/list/":{"post":{"operationId":"list-experiments","summary":"List Experiments","description":"POST method for filtered listing (same as GET).","tags":["experiments"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2List"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2ListRequest"}}}}},"get":{"operationId":"api-v-2-experiments-list-list","summary":"Api V 2 Experiments List List","description":"GET: List experiments with filters\nPOST: List experiments with filters (same as GET, but accepts filter payload in body)\n\nSpecial endpoint for filtered listing. The main endpoint `/experiments/`\nhandles GET (list) + POST (create) operations.\n\n**Authentication:**\n- Supports both JWT (internal) and API Key (public) authentication","tags":["experiments"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedExperimentV2ListList"}}}}}},"put":{"operationId":"api-v-2-experiments-list-update","summary":"Api V 2 Experiments List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["experiments"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2List"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2ListRequest"}}}}},"patch":{"operationId":"api-v-2-experiments-list-partial-update","summary":"Api V 2 Experiments List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["experiments"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2List"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedExperimentV2ListRequest"}}}}}},"/api/v2/experiments/{experiment_id}/":{"get":{"operationId":"retrieve-experiment","summary":"Retrieve Experiment","description":"RUD: Retrieve, Update, Delete single experiment.\n\nGET /evaluations/experiments/<id>/\nPATCH /evaluations/experiments/<id>/   — edit the definition (dataset,\n    workflow, evaluators, config). Blocked while a run is in flight\n    so the in-flight run can trust its dispatched definition.\n    Trigger execution via POST /runs/, not PATCH.\nDELETE /evaluations/experiments/<id>/","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2"}}}}}},"delete":{"operationId":"delete-experiment","summary":"Delete Experiment","description":"RUD: Retrieve, Update, Delete single experiment.\n\nGET /evaluations/experiments/<id>/\nPATCH /evaluations/experiments/<id>/   — edit the definition (dataset,\n    workflow, evaluators, config). Blocked while a run is in flight\n    so the in-flight run can trust its dispatched definition.\n    Trigger execution via POST /runs/, not PATCH.\nDELETE /evaluations/experiments/<id>/","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"post":{"operationId":"api-v-2-experiments-create-2","summary":"Api V 2 Experiments Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2Request"}}}}},"put":{"operationId":"replace-experiment","summary":"Replace Experiment","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2Update"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2UpdateRequest"}}}}},"patch":{"operationId":"update-experiment","summary":"Update Experiment","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2Update"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedExperimentV2UpdateRequest"}}}}}},"/api/v2/experiments/{experiment_id}/logs/list/":{"post":{"operationId":"list-experiment-spans","summary":"List Experiment Spans","description":"Handle POST requests the same as GET for filtering.","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetTraceList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetTraceListRequest"}}}}},"get":{"operationId":"api-v-2-experiments-logs-list-list","summary":"Api V 2 Experiments Logs List List","description":"List experiment traces (root spans) using optimized CTE-based aggregation.\n\nGET/POST /evaluations/experiments/<experiment_id>/logs/\n\nQuery params:\n- page: Page number\n- page_size: Page size (default 100)\n- sort_by: Sort field (e.g., \"-cost\", \"-start_time\", \"name\")\n- start_time: Filter start time\n- end_time: Filter end time\n- detail: Include span tree (1 or True)\n- export: Set to 1 or True to export results to CSV/Excel\n\nPOST body (optional):\n- filters: Advanced filter payload for complex filtering (including comparison_key filters)\n\nUses ExperimentTracesQueryBuilder for optimized querying:\n1. Filter by experiment_id + org first (reduces rows 99.9%)\n2. Aggregate into traces (GROUP BY trace_unique_id)\n3. Join with root spans for details\n4. Apply final filters and sort\n\nUses SpanTreeSerializerContextMixin to automatically handle:\n- Span tree inclusion based on ?detail=1\n- Storage enrichment based on authentication type (JWT vs API key)\n- Dynamic serializer configuration\n\nUses ExportingMixin to handle:\n- CSV/Excel export functionality via ?export=1\n- Async export processing with email notifications","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCHDatasetTraceListList"}}}}}},"put":{"operationId":"api-v-2-experiments-logs-list-update","summary":"Api V 2 Experiments Logs List Update","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetTraceList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetTraceListRequest"}}}}},"patch":{"operationId":"api-v-2-experiments-logs-list-partial-update","summary":"Api V 2 Experiments Logs List Partial Update","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetTraceList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHDatasetTraceListRequest"}}}}}},"/api/v2/experiments/{experiment_id}/logs/{log_id}/":{"get":{"operationId":"retrieve-experiment-span","summary":"Retrieve Experiment Span","description":"Retrieve single experiment trace with full span tree, or submit workflow result.\n\nGET /evaluations/experiments/<experiment_id>/logs/<trace_unique_id>/\nReturns:\n- Trace-level aggregated metrics (cost, tokens, duration, etc.)\n- Full hierarchical span tree with all children\n- Enriched with storage (input/output) for API key authentication\n- Complete scores (LLM evaluator + human annotation) with evaluator metadata\n\nPATCH /evaluations/experiments/<experiment_id>/logs/<trace_unique_id>/\nBody: {\"input\": {...}, \"output\": {...}, \"metrics\": {...}, \"metadata\": {...}}\nPurpose: Submit wait-task workflow result via resume mechanism\n- Uses get_full_object_by_unique_id for cached retrieval (performance optimized)\n- Supports both JWT and API key authentication\n- Partial updates with existing data merging\n- Creates workflow spans in unified format with proper trace hierarchy\n- Triggers evaluators if specified in experiment configuration\n- Input/output can be any JSON type (dict, list, string, number, boolean)\n\nNote: The URL parameter is called 'log_id' but it should be the trace_unique_id.\nThis returns a full TRACE (aggregated) with span tree, not a single log/span.\nThe 'id' field in the list endpoint exposes trace_unique_id for use in detail/PATCH operations.\n\nUses SpanTreeSerializerContextMixin to automatically handle:\n- Span tree inclusion (always enabled for detail view)\n- Storage enrichment based on authentication type (JWT vs API key)\n- Dynamic serializer configuration\n\nUses DataEnrichmentMixin to enrich scores with:\n- Human annotation scores from Postgres EvalResult\n- Evaluator metadata (name, slug, score_value_type)\n- All score types (numerical, boolean, string, categorical, json)","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"log_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetTraceDetail"}}}}}},"patch":{"operationId":"update-experiment-span","summary":"Update Experiment Span","description":"Update experiment trace with customer-provided data.\n\nCustomer uploads the same format they see in the list endpoint:\n{\n    \"id\": \"551ba4023fc646b4859993a31665bff2\",\n    \"input\": \"[{\"role\": \"system\", \"content\": \"you are a helpful...\",\n    \"output\": \"{\"message\": \"Workflow result...\",\n    \"name\": \"updated_experiment_trace\",\n    ... any other fields they want to update\n}\n\nPATCH workflow:\n1. Get trace_unique_id from URL (same as 'id' in list endpoint)\n2. Retrieve existing object using cached get_full_object_by_unique_id\n3. Update fields provided by customer\n4. Re-insert updated object\n5. Return updated trace in same format as GET endpoint\n\nResponse: Updated trace in same format as GET/list endpoints","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"log_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetTraceDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHDatasetTraceDetailRequest"}}}}},"post":{"operationId":"api-v-2-experiments-logs-create","summary":"Api V 2 Experiments Logs Create","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"log_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetTraceDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetTraceDetailRequest"}}}}},"put":{"operationId":"api-v-2-experiments-logs-update","summary":"Api V 2 Experiments Logs Update","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"log_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetTraceDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetTraceDetailRequest"}}}}}},"/api/experiments/{experiment_id}/columns/":{"post":{"operationId":"api-experiments-columns-create","summary":"Api Experiments Columns Create","description":"Args:\n    columns: List[ExperimentColumnType]","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiments_api_experiments_columns_create_Response_200"}}}}}},"delete":{"operationId":"api-experiments-columns-destroy","summary":"Api Experiments Columns Destroy","description":"Args:\n    columns: List[str] (list of column ids)","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-experiments-columns-partial-update","summary":"Api Experiments Columns Partial Update","description":"Args:\n    columns: List[ExperimentColumnType]","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiments_api_experiments_columns_partial_update_Response_200"}}}}}}},"/api/experiments/{experiment_id}/rows/":{"post":{"operationId":"api-experiments-rows-create","summary":"Api Experiments Rows Create","description":"Args:\n    rows: List[{\"input\": Dict[str, Any]}]","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiments_api_experiments_rows_create_Response_200"}}}}}},"delete":{"operationId":"api-experiments-rows-destroy","summary":"Api Experiments Rows Destroy","description":"Args:\n    rows: list[str] (list of row ids)","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-experiments-rows-partial-update","summary":"Api Experiments Rows Partial Update","description":"Args:\n    rows: List[{\"id\": str, \"input\": Dict[str, Any]}]","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiments_api_experiments_rows_partial_update_Response_200"}}}}}}},"/api/experiments/{experiment_id}/run/":{"post":{"operationId":"api-experiments-run-create","summary":"Api Experiments Run Create","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiments_api_experiments_run_create_Response_200"}}}}}}},"/api/experiments/{experiment_id}/run-evals/":{"post":{"operationId":"api-experiments-run-evals-create","summary":"Api Experiments Run Evals Create","description":"Args:\n    evaluator_slugs: List[str]","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiments_api_experiments_run_evals_create_Response_200"}}}}}}},"/api/experiments/{id}/":{"get":{"operationId":"api-experiments-retrieve","summary":"Api Experiments Retrieve","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["experiments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentDetail"}}}}}},"put":{"operationId":"api-experiments-update","summary":"Api Experiments Update","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["experiments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentDetailRequest"}}}}},"delete":{"operationId":"api-experiments-destroy","summary":"Api Experiments Destroy","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["experiments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-experiments-partial-update","summary":"Api Experiments Partial Update","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["experiments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicExperimentUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicExperimentUpdateRequest"}}}}}},"/api/experiments/create/":{"get":{"operationId":"api-experiments-create-list","summary":"Api Experiments Create List","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["experiments"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedExperimentBaseList"}}}}}},"post":{"operationId":"api-experiments-create-create","summary":"Api Experiments Create Create","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["experiments"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentDetailRequest"}}}}}},"/api/experiments/list/":{"get":{"operationId":"api-experiments-list-list","summary":"Api Experiments List List","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["experiments"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedExperimentBaseList"}}}}}},"post":{"operationId":"api-experiments-list-create","summary":"Api Experiments List Create","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["experiments"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentBase"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentBaseRequest"}}}}}},"/api/experiments/summary/":{"get":{"operationId":"api-experiments-summary-retrieve","summary":"Api Experiments Summary Retrieve","description":"GET/POST /api/experiments/summary/\n\nGet summary statistics for experiments.\n\nReturns:\n    {\n        \"total_count\": 42\n    }\n\nPOST supports filtering via body (POST-for-filtering pattern).","tags":["experiments"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentSummaryResponse"}}}}}},"post":{"operationId":"api-experiments-summary-create","summary":"Api Experiments Summary Create","description":"GET/POST /api/experiments/summary/\n\nGet summary statistics for experiments.\n\nReturns:\n    {\n        \"total_count\": 42\n    }\n\nPOST supports filtering via body (POST-for-filtering pattern).","tags":["experiments"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentSummaryResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentSummaryResponseRequest"}}}}}},"/api/testsets/{id}/":{"get":{"operationId":"api-testsets-retrieve","summary":"Api Testsets Retrieve","description":"Mixin that provides automatic organization injection and cross-org write protection.\n\nThis mixin handles ALL organization-related write behavior:\n- CREATE: Injects organization (user's org for JWT, target org for API key superadmin)\n- UPDATE/DELETE: Allows same-org writes; cross-org JWT writes require the\n  caller's scope-aware ``is_superadmin()`` (active staff write scope). API\n  key superadmin can write anywhere.\n\nThis is DATA SANITIZATION, not permission. Permission classes handle authentication\nand authorization (can they write at all?). This mixin handles where they write to.\n\nInherits from:\n- JWTAuthUtils: is_jwt_auth(), is_jwt_token_format()\n- PermissionUtils: is_read_operation(), is_write_operation(), is_same_org()\n- OrgScopeMixin: is_superadmin(), get_organization(), inject_*_organization()\n\nBehavior:\n    - post(): Calls inject_target_organization() for CREATE operations\n    - patch()/put(): Calls inject_user_organization() for UPDATE operations\n    - perform_update(): Allows cross-org UPDATE for JWT auth only with active staff write scope\n    - perform_destroy(): Allows cross-org DELETE for JWT auth only with active staff write scope\n\nUsage:\n    class MyView(OrganizationInjectionMixin, JWTAndAPIKeyAuthenticationViewMixin, ListCreateAPIView):\n        # All org injection and cross-org protection automatic!\n        pass\n\nNote: SuperAdminMixin inherits from this mixin, so views using SuperAdminMixin\nautomatically get these safe defaults.","tags":["experiments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetSheet"}}}}}},"post":{"operationId":"api-testsets-create-2","summary":"Api Testsets Create 2","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["experiments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetSheet"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetSheetRequest"}}}}},"put":{"operationId":"api-testsets-update-2","summary":"Api Testsets Update 2","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["experiments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetSheet"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetSheetRequest"}}}}},"delete":{"operationId":"api-testsets-destroy","summary":"Api Testsets Destroy","description":"Mixin that provides automatic organization injection and cross-org write protection.\n\nThis mixin handles ALL organization-related write behavior:\n- CREATE: Injects organization (user's org for JWT, target org for API key superadmin)\n- UPDATE/DELETE: Allows same-org writes; cross-org JWT writes require the\n  caller's scope-aware ``is_superadmin()`` (active staff write scope). API\n  key superadmin can write anywhere.\n\nThis is DATA SANITIZATION, not permission. Permission classes handle authentication\nand authorization (can they write at all?). This mixin handles where they write to.\n\nInherits from:\n- JWTAuthUtils: is_jwt_auth(), is_jwt_token_format()\n- PermissionUtils: is_read_operation(), is_write_operation(), is_same_org()\n- OrgScopeMixin: is_superadmin(), get_organization(), inject_*_organization()\n\nBehavior:\n    - post(): Calls inject_target_organization() for CREATE operations\n    - patch()/put(): Calls inject_user_organization() for UPDATE operations\n    - perform_update(): Allows cross-org UPDATE for JWT auth only with active staff write scope\n    - perform_destroy(): Allows cross-org DELETE for JWT auth only with active staff write scope\n\nUsage:\n    class MyView(OrganizationInjectionMixin, JWTAndAPIKeyAuthenticationViewMixin, ListCreateAPIView):\n        # All org injection and cross-org protection automatic!\n        pass\n\nNote: SuperAdminMixin inherits from this mixin, so views using SuperAdminMixin\nautomatically get these safe defaults.","tags":["experiments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-testsets-partial-update-2","summary":"Api Testsets Partial Update 2","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["experiments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetSheet"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedTestsetSheetRequest"}}}}}},"/api/testsets/{testset_sheet_id}/rows/":{"get":{"operationId":"api-testsets-rows-retrieve-2","summary":"Api Testsets Rows Retrieve 2","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["experiments"],"parameters":[{"name":"testset_sheet_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRow"}}}}}},"post":{"operationId":"api-testsets-rows-create-2","summary":"Api Testsets Rows Create 2","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["experiments"],"parameters":[{"name":"testset_sheet_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRow"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRowRequest"}}}}},"delete":{"operationId":"api-testsets-rows-destroy-3","summary":"Api Testsets Rows Destroy 3","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["experiments"],"parameters":[{"name":"testset_sheet_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-testsets-rows-partial-update-2","summary":"Api Testsets Rows Partial Update 2","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["experiments"],"parameters":[{"name":"testset_sheet_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestsetRow"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedTestsetRowRequest"}}}}}},"/api/testsets/{testset_sheet_id}/rows/reorder/":{"post":{"operationId":"api-testsets-rows-reorder-create","summary":"Api Testsets Rows Reorder Create","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["experiments"],"parameters":[{"name":"testset_sheet_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiments_api_testsets_rows_reorder_create_Response_200"}}}}}}},"/api/v2/experiments/{experiment_id}/histogram/":{"get":{"operationId":"api-v-2-experiments-histogram-retrieve","summary":"Api V 2 Experiments Histogram Retrieve","description":"Delegate GET to list() for consistency with dashboard views.","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiments_api_v2_experiments_histogram_retrieve_Response_200"}}}}}},"post":{"operationId":"filter-experiment-score-histogram","summary":"Filter Experiment Score Histogram","description":"Delegate POST to list() for consistency with dashboard views.","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiments_filterExperimentScoreHistogram_Response_201"}}}}}},"put":{"operationId":"api-v-2-experiments-histogram-update","summary":"Api V 2 Experiments Histogram Update","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiments_api_v2_experiments_histogram_update_Response_200"}}}}}},"patch":{"operationId":"api-v-2-experiments-histogram-partial-update","summary":"Api V 2 Experiments Histogram Partial Update","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiments_api_v2_experiments_histogram_partial_update_Response_200"}}}}}}},"/api/v2/experiments/{experiment_id}/logs/summary/":{"get":{"operationId":"api-v-2-experiments-logs-summary-retrieve","summary":"Api V 2 Experiments Logs Summary Retrieve","description":"Handle GET requests for summary.","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiments_api_v2_experiments_logs_summary_retrieve_Response_200"}}}}}},"post":{"operationId":"filter-experiment-spans-summary","summary":"Filter Experiment Spans Summary","description":"Handle POST requests for filtering (same as GET).","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiments_filterExperimentSpansSummary_Response_200"}}}}}},"put":{"operationId":"api-v-2-experiments-logs-summary-update","summary":"Api V 2 Experiments Logs Summary Update","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiments_api_v2_experiments_logs_summary_update_Response_200"}}}}}},"patch":{"operationId":"api-v-2-experiments-logs-summary-partial-update","summary":"Api V 2 Experiments Logs Summary Partial Update","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiments_api_v2_experiments_logs_summary_partial_update_Response_200"}}}}}}},"/api/v2/experiments/{experiment_id}/runs/":{"post":{"operationId":"api-v-2-experiments-runs-create","summary":"Api V 2 Experiments Runs Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiments_api_v2_experiments_runs_create_Response_200"}}}}}},"put":{"operationId":"api-v-2-experiments-runs-update","summary":"Api V 2 Experiments Runs Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiments_api_v2_experiments_runs_update_Response_200"}}}}}},"patch":{"operationId":"api-v-2-experiments-runs-partial-update","summary":"Api V 2 Experiments Runs Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["experiments"],"parameters":[{"name":"experiment_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiments_api_v2_experiments_runs_partial_update_Response_200"}}}}}}},"/api/v2/experiments/summary/":{"get":{"operationId":"api-v-2-experiments-summary-retrieve","summary":"Api V 2 Experiments Summary Retrieve","description":"GET/POST /api/v2/experiments/summary/\n\nGet summary statistics for experiments.\n\nReturns:\n    {\n        \"total_count\": 10\n    }\n\nPOST supports filtering via body (POST-for-filtering pattern).","tags":["experiments"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2SummaryResponse"}}}}}},"post":{"operationId":"filter-experiments-summary","summary":"Filter Experiments Summary","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["experiments"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2SummaryResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2SummaryResponseRequest"}}}}},"put":{"operationId":"api-v-2-experiments-summary-update","summary":"Api V 2 Experiments Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["experiments"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2SummaryResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2SummaryResponseRequest"}}}}},"patch":{"operationId":"api-v-2-experiments-summary-partial-update","summary":"Api V 2 Experiments Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["experiments"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentV2SummaryResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedExperimentV2SummaryResponseRequest"}}}}}},"/api/models/summary/":{"post":{"operationId":"filter-models-summary","summary":"Filter Models Summary","description":"POST for filtering - delegate to GET (BE conventions).","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Models_filterModelsSummary_Response_200"}}}}}},"get":{"operationId":"api-models-summary-retrieve","summary":"Api Models Summary Retrieve","description":"GET/POST /api/models/summary/        (Public API — **auth optional**)\nGET/POST /api/llm_models/models/summary/ (Platform)\n\nSummary counts for LLM models. **Auth is optional** — same model as\n``ModelsListView``:\n\n- **Unauthenticated** → counts over managed/global models only\n  (``organization=null``). Rate-limited per client IP.\n- **API key / JWT** → counts include the caller's custom models too.\n\nRead-only: only GET (and POST-as-filter, delegating to GET). No write path.\n\nReturns:\n    {\n        \"summary\": {\n            \"total_count\": 150,\n            \"global_count\": 120,\n            \"custom_count\": 30\n        }\n    }","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Models_api_models_summary_retrieve_Response_200"}}}}}}},"/api/models/list/":{"post":{"operationId":"filter-models","summary":"Filter Models","description":"POST for filtering - delegate to GET (BE conventions).","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelListRequest"}}}}},"get":{"operationId":"api-models-list-list","summary":"Api Models List List","description":"GET/POST /api/models/list/        (Public API)\nGET/POST /api/llm_models/models/list/  (Platform)\n\nList models. **Authentication is optional** (OpenRouter-style catalog) — the\nSAME endpoint serves both public and authenticated callers:\n\n- **Unauthenticated** → managed/shared models only (``organization=None``).\n  Rate-limited per client IP.\n- **API key / JWT** → managed models PLUS the caller's own custom models.\n\nRead-only: there is no create/write path (``ListAPIView``); ``post()`` only\ndelegates to ``get()`` to support POST-body filtering (BE conventions). Both\nauth modes fully support filtering.\n\nOptionally enriches each model with cross-org performance metrics (opt-in via\n``is_including_metrics``) over an absolute UTC ``[start_time, end_time)`` window\nread at ``time_tick`` grain (dashboard convention). Each model gets a ``metrics``\nobject: average_tps / average_ttft / average_latency (OpenRouter-style\naverages), uptime_percent, number_of_requests, cost, the prompt/completion/\ncache token sums, and cache_hit_percentage. Sourced from the cross-org\n``get_public_breakdown_metrics`` reader (clickhouse/tasks.py). The metrics are\ncross-org aggregates, so they're identical regardless of auth.\n\nFiltering:\n    Use standard filter syntax: { \"filters\": { \"affiliation_category\": { \"value\": [\"CUSTOM\"] } } }\n    See boilerplates/keywordsai/feature_docs/shared/filters_api_reference.md","tags":["models"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicModelListList"}}}}}}},"/api/models/public/":{"get":{"operationId":"list-models","summary":"List Models","tags":["models"],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Models_listModels_Response_200"}}}}}}},"/api/models/":{"post":{"operationId":"create-custom-model","summary":"Create Custom Model","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelListRequest"}}}}},"get":{"operationId":"api-models-list","summary":"Api Models List","description":"GET/POST /api/llm_models/models/  (platform - shows global + custom)\nGET/POST /api/llm-models/custom-models/  (public API - shows ONLY custom)\n\nUnified endpoint for models.\n\nGET:  List models\n      - Platform: global + org's custom (same for superadmin - no cross-org listing)\n      - Public (custom-models path): ONLY org's custom models\n      Filter with standard syntax: { \"filters\": { \"affiliation_category\": { \"value\": [\"CUSTOM\"] } } }\n\nPOST:\n    - Without 'model_name' in body: Filter/list models (backward compatible)\n    - With 'model_name' in body: Create model\n        - organization_id=null + superadmin: Create global model\n        - Otherwise: Create custom model for target org (superadmin can specify organization_id)\n\nNote: Uses SuperAdminMixin for consistency, but queryset is intentionally the same\nfor both regular users and superadmins (global + org's custom pattern).","tags":["models"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicModelListList"}}}}}},"put":{"operationId":"api-models-update","summary":"Api Models Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelListRequest"}}}}},"patch":{"operationId":"api-models-partial-update","summary":"Api Models Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicModelListRequest"}}}}}},"/api/models/{model_name}/":{"get":{"operationId":"retrieve-custom-model","summary":"Retrieve Custom Model","description":"GET/PATCH/DELETE /llm_models/model/<pk>/  (platform - uses pk)\nGET/PATCH/DELETE /api/models/<path:model_name>/  (public API - uses model_name)\n\nUnified endpoint for any model (global or custom).\n\nLookup field determined by URL kwargs:\n    - If 'pk' in kwargs: Uses pk lookup\n    - If 'model_name' in kwargs: Uses model_name lookup\n\nGET:    Retrieve model (public for global, org auth for custom)\nPATCH:  Update model (admin for global, org owner for custom)\nDELETE: Delete model (admin for global, org owner for custom)\n\nPermission logic:\n    - Global model (organization_id is None): Admin required for write\n    - Custom model (organization_id is set): Org ownership required for write","tags":["models"],"parameters":[{"name":"model_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelDetail"}}}}}},"patch":{"operationId":"update-custom-model","summary":"Update Custom Model","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["models"],"parameters":[{"name":"model_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicModelUpdateRequest"}}}}},"delete":{"operationId":"delete-custom-model","summary":"Delete Custom Model","description":"GET/PATCH/DELETE /llm_models/model/<pk>/  (platform - uses pk)\nGET/PATCH/DELETE /api/models/<path:model_name>/  (public API - uses model_name)\n\nUnified endpoint for any model (global or custom).\n\nLookup field determined by URL kwargs:\n    - If 'pk' in kwargs: Uses pk lookup\n    - If 'model_name' in kwargs: Uses model_name lookup\n\nGET:    Retrieve model (public for global, org auth for custom)\nPATCH:  Update model (admin for global, org owner for custom)\nDELETE: Delete model (admin for global, org owner for custom)\n\nPermission logic:\n    - Global model (organization_id is None): Admin required for write\n    - Custom model (organization_id is set): Org ownership required for write","tags":["models"],"parameters":[{"name":"model_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"post":{"operationId":"api-models-create-2","summary":"Api Models Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["models"],"parameters":[{"name":"model_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModelDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModelDetailRequest"}}}}},"put":{"operationId":"replace-custom-model","summary":"Replace Custom Model","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["models"],"parameters":[{"name":"model_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelUpdateRequest"}}}}}},"/api/providers/":{"get":{"operationId":"list-custom-providers","summary":"List Custom Providers","description":"Create and list custom LLM providers for an organization\n\nSupports both internal (JWT) and public (API key) authentication.\n- Internal API: Returns all fields\n- Public API: Hides internal fields (litellm_provider_id, is_managed, moderation)\n\nSuperadmin access:\n    Superadmins can access ALL custom providers across all organizations.\n    Regular users can only access their own organization's providers.\n\nEndpoint:\n    GET/POST /llm_models/custom_providers/\n    GET/POST /api/llm-models/custom-providers/\n\nArgs (POST):\n    - provider_id (Required): Unique identifier for the custom provider\n    - provider_name (Required): Human-readable name for the provider\n    - litellm_provider_id (Optional): Base provider ID for LiteLLM compatibility (e.g., \"openai\", \"anthropic\")\n    - moderation (Optional): Moderation setting (\"filtered\", \"unfiltered\")\n    - extra_kwargs (Optional): Additional provider-specific configuration (all credentials live here)\n        * api_key: Provider API key\n        * base_url: Custom base URL for the provider's API\n        * temperature: Default temperature setting\n        * max_tokens: Default max tokens setting\n        * timeout: Request timeout in seconds\n\nReturns (POST):\n    {\n        \"id\": 123,\n        \"provider_id\": \"my-custom-openai\",\n        \"provider_name\": \"My Custom OpenAI Provider\",\n        \"litellm_provider_id\": \"openai\",\n        \"moderation\": \"filtered\",\n        \"extra_kwargs\": {\n            \"api_key\": \"sk-custom-key-123\",\n            \"base_url\": \"https://api.my-custom-provider.com/v1\",\n            \"temperature\": 0.7,\n            \"max_tokens\": 4096\n        },\n        \"organization\": 456,\n        \"created_at\": \"2024-01-15T10:30:00Z\"\n    }\n\nReturns (GET):\n    [\n        {\n            \"id\": 123,\n            \"provider_id\": \"my-custom-openai\",\n            \"provider_name\": \"My Custom OpenAI Provider\",\n            \"litellm_provider_id\": \"openai\",\n            ...\n        }\n    ]","tags":["models"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicCustomProviderListList"}}}}}},"post":{"operationId":"create-custom-provider","summary":"Create Custom Provider","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderCreateRequest"}}}}},"put":{"operationId":"api-providers-update","summary":"Api Providers Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderListRequest"}}}}},"patch":{"operationId":"api-providers-partial-update","summary":"Api Providers Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicCustomProviderListRequest"}}}}}},"/api/providers/{provider_id}/":{"get":{"operationId":"retrieve-custom-provider","summary":"Retrieve Custom Provider","description":"Retrieve, update, and delete individual custom LLM providers\n\nSupports both internal (JWT) and public (API key) authentication.\n- Internal API: Returns all fields\n- Public API: Hides internal fields (litellm_provider_id, is_managed, moderation)\n\nAccess control (layered):\n    1. SuperAdminMixin: Routes queryset (superadmins see all, users see own org)\n       + auto-registers ObjectOwnershipPermission for object-level ownership checks\n    2. Server-side org assignment: Prevents cross-org writes via request body\n\nEndpoints:\n    Platform (JWT auth, uses numeric pk):\n        GET /llm_models/custom_providers/{pk}/ - Retrieve a specific custom provider\n        PATCH /llm_models/custom_providers/{pk}/ - Update a specific custom provider\n        DELETE /llm_models/custom_providers/{pk}/ - Delete a specific custom provider\n    Public API (API key auth, uses provider_id string):\n        GET /api/providers/{provider_id}/ - Retrieve a specific custom provider\n        PATCH /api/providers/{provider_id}/ - Update a specific custom provider\n        DELETE /api/providers/{provider_id}/ - Delete a specific custom provider\n\nArgs (PATCH):\n    - provider_name (Optional): Updated provider name\n    - litellm_provider_id (Optional): Updated base provider ID\n    - moderation (Optional): Updated moderation setting\n    - extra_kwargs (Optional): Updated additional configuration (all credentials live here)\n        * api_key: Updated provider API key\n        * base_url: Updated custom base URL for the provider's API\n        * temperature: Updated default temperature setting\n        * max_tokens: Updated default max tokens setting\n        * timeout: Updated request timeout in seconds\n\nReturns (GET):\n    {\n        \"id\": 123,\n        \"provider_id\": \"my-custom-openai\",\n        \"provider_name\": \"My Custom OpenAI Provider\",\n        \"litellm_provider_id\": \"openai\",\n        \"moderation\": \"filtered\",\n        \"extra_kwargs\": {\n            \"api_key\": \"sk-custom-key-123\",\n            \"base_url\": \"https://api.my-custom-provider.com/v1\",\n            \"temperature\": 0.7,\n            \"max_tokens\": 4096\n        },\n        \"organization\": 456,\n        \"created_at\": \"2024-01-15T10:30:00Z\",\n        \"updated_at\": \"2024-01-15T11:00:00Z\"\n    }\n\nReturns (PATCH):\n    {\n        \"id\": 123,\n        \"provider_id\": \"my-custom-openai\",\n        \"provider_name\": \"My Updated Custom OpenAI Provider\",\n        \"extra_kwargs\": {\n            \"api_key\": \"sk-updated-key-456\",\n            \"base_url\": \"https://api.my-updated-provider.com/v1\",\n            \"temperature\": 0.8,\n            \"max_tokens\": 8192\n        },\n        ...\n    }","tags":["models"],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderDetail"}}}}}},"patch":{"operationId":"update-custom-provider","summary":"Update Custom Provider","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["models"],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicCustomProviderUpdateRequest"}}}}},"delete":{"operationId":"delete-custom-provider","summary":"Delete Custom Provider","description":"Retrieve, update, and delete individual custom LLM providers\n\nSupports both internal (JWT) and public (API key) authentication.\n- Internal API: Returns all fields\n- Public API: Hides internal fields (litellm_provider_id, is_managed, moderation)\n\nAccess control (layered):\n    1. SuperAdminMixin: Routes queryset (superadmins see all, users see own org)\n       + auto-registers ObjectOwnershipPermission for object-level ownership checks\n    2. Server-side org assignment: Prevents cross-org writes via request body\n\nEndpoints:\n    Platform (JWT auth, uses numeric pk):\n        GET /llm_models/custom_providers/{pk}/ - Retrieve a specific custom provider\n        PATCH /llm_models/custom_providers/{pk}/ - Update a specific custom provider\n        DELETE /llm_models/custom_providers/{pk}/ - Delete a specific custom provider\n    Public API (API key auth, uses provider_id string):\n        GET /api/providers/{provider_id}/ - Retrieve a specific custom provider\n        PATCH /api/providers/{provider_id}/ - Update a specific custom provider\n        DELETE /api/providers/{provider_id}/ - Delete a specific custom provider\n\nArgs (PATCH):\n    - provider_name (Optional): Updated provider name\n    - litellm_provider_id (Optional): Updated base provider ID\n    - moderation (Optional): Updated moderation setting\n    - extra_kwargs (Optional): Updated additional configuration (all credentials live here)\n        * api_key: Updated provider API key\n        * base_url: Updated custom base URL for the provider's API\n        * temperature: Updated default temperature setting\n        * max_tokens: Updated default max tokens setting\n        * timeout: Updated request timeout in seconds\n\nReturns (GET):\n    {\n        \"id\": 123,\n        \"provider_id\": \"my-custom-openai\",\n        \"provider_name\": \"My Custom OpenAI Provider\",\n        \"litellm_provider_id\": \"openai\",\n        \"moderation\": \"filtered\",\n        \"extra_kwargs\": {\n            \"api_key\": \"sk-custom-key-123\",\n            \"base_url\": \"https://api.my-custom-provider.com/v1\",\n            \"temperature\": 0.7,\n            \"max_tokens\": 4096\n        },\n        \"organization\": 456,\n        \"created_at\": \"2024-01-15T10:30:00Z\",\n        \"updated_at\": \"2024-01-15T11:00:00Z\"\n    }\n\nReturns (PATCH):\n    {\n        \"id\": 123,\n        \"provider_id\": \"my-custom-openai\",\n        \"provider_name\": \"My Updated Custom OpenAI Provider\",\n        \"extra_kwargs\": {\n            \"api_key\": \"sk-updated-key-456\",\n            \"base_url\": \"https://api.my-updated-provider.com/v1\",\n            \"temperature\": 0.8,\n            \"max_tokens\": 8192\n        },\n        ...\n    }","tags":["models"],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"post":{"operationId":"api-providers-create-2","summary":"Api Providers Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["models"],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderDetailRequest"}}}}},"put":{"operationId":"replace-custom-provider","summary":"Replace Custom Provider","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["models"],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderUpdateRequest"}}}}}},"/api/models/{model_name}/status/":{"get":{"operationId":"api-models-status-retrieve","summary":"Api Models Status Retrieve","description":"GET/POST /api/models/<model_name>/status/        (Public API — **auth optional**)\nGET/POST /api/llm_models/models/<model_name>/status/ (Platform)\n\nPer-model status resource for the exact logged model string in the URL path,\nover an absolute UTC ``[start_time, end_time)`` range, bucketed by\n``time_tick`` (minute / hour / day).\nReturns four things (see ``ModelStatusResponseSerializer``):\n  - ``data`` — per-provider uptime time series (per-attempt grain). Scoped to\n    ``provider_id`` when that filter is supplied, else cross-provider.\n  - ``respan_uptime`` — request-grain \"via Respan\" uptime time series: one\n    verdict per client call (UP if ANY retry/fallback attempt succeeded), so\n    it reflects failover and sits at/above the per-provider line. Omitted for\n    provider-filtered requests because it is inherently cross-provider.\n  - ``metrics_series`` — per-bucket performance metrics over the window (tps,\n    ttft, latency, cache-hit %, + admin-only counts/cost), so the other\n    metrics can be plotted over time just like uptime. Scoped to\n    ``provider_id`` when that filter is supplied, else cross-provider.\n  - ``status`` — scalar model-wide summary over the window (uptime %, tps,\n    ttft, latency, cache-hit %, catalog input list price). Omitted when a\n    ``provider_id`` filter is supplied (it is cross-provider).\n\nRedaction: public/regular callers get only normalized rates/percentages plus\nthe catalog list price; staff/superadmins additionally get volume scalars\n(request/down counts, total cost) — those are withheld from the public so\ncompetitors can't infer platform traffic/revenue from counts × price.\n\nThe model is the URL path segment (``<path:model_name>``) so provider-prefixed\nidentifiers (e.g. ``vertex_ai/gemini-1.5-pro``) survive routing; the filters\n(``provider_id``, ``time_tick``, range) stay query/body params.","tags":["models"],"parameters":[{"name":"model_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"end_time","in":"query","required":true,"schema":{"type":"string"}},{"name":"provider_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"start_time","in":"query","required":true,"schema":{"type":"string"}},{"name":"time_tick","in":"query","description":"* `minute` - minute\n* `hour` - hour\n* `day` - day","required":false,"schema":{"$ref":"#/components/schemas/ApiModelsModelNameStatusGetParametersTimeTick"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelStatusResponse"}}}}}},"post":{"operationId":"api-models-status-create","summary":"Api Models Status Create","description":"POST for filtering - delegate to GET (BE conventions).","tags":["models"],"parameters":[{"name":"model_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelStatusResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelStatusRequestRequest"}}}}}},"/api/provider-integrations/":{"get":{"operationId":"api-provider-integrations-list","summary":"Api Provider Integrations List","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LLMProviderIntegration"}}}}}}},"post":{"operationId":"api-provider-integrations-create","summary":"Api Provider Integrations Create","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMProviderIntegration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMProviderIntegrationRequest"}}}}}},"/llm_models/custom_providers/":{"get":{"operationId":"llm-models-custom-providers-list","summary":"Llm Models Custom Providers List","description":"Create and list custom LLM providers for an organization\n\nSupports both internal (JWT) and public (API key) authentication.\n- Internal API: Returns all fields\n- Public API: Hides internal fields (litellm_provider_id, is_managed, moderation)\n\nSuperadmin access:\n    Superadmins can access ALL custom providers across all organizations.\n    Regular users can only access their own organization's providers.\n\nEndpoint:\n    GET/POST /llm_models/custom_providers/\n    GET/POST /api/llm-models/custom-providers/\n\nArgs (POST):\n    - provider_id (Required): Unique identifier for the custom provider\n    - provider_name (Required): Human-readable name for the provider\n    - litellm_provider_id (Optional): Base provider ID for LiteLLM compatibility (e.g., \"openai\", \"anthropic\")\n    - moderation (Optional): Moderation setting (\"filtered\", \"unfiltered\")\n    - extra_kwargs (Optional): Additional provider-specific configuration (all credentials live here)\n        * api_key: Provider API key\n        * base_url: Custom base URL for the provider's API\n        * temperature: Default temperature setting\n        * max_tokens: Default max tokens setting\n        * timeout: Request timeout in seconds\n\nReturns (POST):\n    {\n        \"id\": 123,\n        \"provider_id\": \"my-custom-openai\",\n        \"provider_name\": \"My Custom OpenAI Provider\",\n        \"litellm_provider_id\": \"openai\",\n        \"moderation\": \"filtered\",\n        \"extra_kwargs\": {\n            \"api_key\": \"sk-custom-key-123\",\n            \"base_url\": \"https://api.my-custom-provider.com/v1\",\n            \"temperature\": 0.7,\n            \"max_tokens\": 4096\n        },\n        \"organization\": 456,\n        \"created_at\": \"2024-01-15T10:30:00Z\"\n    }\n\nReturns (GET):\n    [\n        {\n            \"id\": 123,\n            \"provider_id\": \"my-custom-openai\",\n            \"provider_name\": \"My Custom OpenAI Provider\",\n            \"litellm_provider_id\": \"openai\",\n            ...\n        }\n    ]","tags":["models"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicCustomProviderListList"}}}}}},"post":{"operationId":"llm-models-custom-providers-create","summary":"Llm Models Custom Providers Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderCreateRequest"}}}}},"put":{"operationId":"llm-models-custom-providers-update","summary":"Llm Models Custom Providers Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderListRequest"}}}}},"patch":{"operationId":"llm-models-custom-providers-partial-update","summary":"Llm Models Custom Providers Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicCustomProviderListRequest"}}}}}},"/llm_models/custom_providers/{id}/":{"get":{"operationId":"llm-models-custom-providers-retrieve","summary":"Llm Models Custom Providers Retrieve","description":"Retrieve, update, and delete individual custom LLM providers\n\nSupports both internal (JWT) and public (API key) authentication.\n- Internal API: Returns all fields\n- Public API: Hides internal fields (litellm_provider_id, is_managed, moderation)\n\nAccess control (layered):\n    1. SuperAdminMixin: Routes queryset (superadmins see all, users see own org)\n       + auto-registers ObjectOwnershipPermission for object-level ownership checks\n    2. Server-side org assignment: Prevents cross-org writes via request body\n\nEndpoints:\n    Platform (JWT auth, uses numeric pk):\n        GET /llm_models/custom_providers/{pk}/ - Retrieve a specific custom provider\n        PATCH /llm_models/custom_providers/{pk}/ - Update a specific custom provider\n        DELETE /llm_models/custom_providers/{pk}/ - Delete a specific custom provider\n    Public API (API key auth, uses provider_id string):\n        GET /api/providers/{provider_id}/ - Retrieve a specific custom provider\n        PATCH /api/providers/{provider_id}/ - Update a specific custom provider\n        DELETE /api/providers/{provider_id}/ - Delete a specific custom provider\n\nArgs (PATCH):\n    - provider_name (Optional): Updated provider name\n    - litellm_provider_id (Optional): Updated base provider ID\n    - moderation (Optional): Updated moderation setting\n    - extra_kwargs (Optional): Updated additional configuration (all credentials live here)\n        * api_key: Updated provider API key\n        * base_url: Updated custom base URL for the provider's API\n        * temperature: Updated default temperature setting\n        * max_tokens: Updated default max tokens setting\n        * timeout: Updated request timeout in seconds\n\nReturns (GET):\n    {\n        \"id\": 123,\n        \"provider_id\": \"my-custom-openai\",\n        \"provider_name\": \"My Custom OpenAI Provider\",\n        \"litellm_provider_id\": \"openai\",\n        \"moderation\": \"filtered\",\n        \"extra_kwargs\": {\n            \"api_key\": \"sk-custom-key-123\",\n            \"base_url\": \"https://api.my-custom-provider.com/v1\",\n            \"temperature\": 0.7,\n            \"max_tokens\": 4096\n        },\n        \"organization\": 456,\n        \"created_at\": \"2024-01-15T10:30:00Z\",\n        \"updated_at\": \"2024-01-15T11:00:00Z\"\n    }\n\nReturns (PATCH):\n    {\n        \"id\": 123,\n        \"provider_id\": \"my-custom-openai\",\n        \"provider_name\": \"My Updated Custom OpenAI Provider\",\n        \"extra_kwargs\": {\n            \"api_key\": \"sk-updated-key-456\",\n            \"base_url\": \"https://api.my-updated-provider.com/v1\",\n            \"temperature\": 0.8,\n            \"max_tokens\": 8192\n        },\n        ...\n    }","tags":["models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderDetail"}}}}}},"post":{"operationId":"llm-models-custom-providers-create-2","summary":"Llm Models Custom Providers Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderDetailRequest"}}}}},"put":{"operationId":"llm-models-custom-providers-update-2","summary":"Llm Models Custom Providers Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderUpdateRequest"}}}}},"delete":{"operationId":"llm-models-custom-providers-destroy","summary":"Llm Models Custom Providers Destroy","description":"Retrieve, update, and delete individual custom LLM providers\n\nSupports both internal (JWT) and public (API key) authentication.\n- Internal API: Returns all fields\n- Public API: Hides internal fields (litellm_provider_id, is_managed, moderation)\n\nAccess control (layered):\n    1. SuperAdminMixin: Routes queryset (superadmins see all, users see own org)\n       + auto-registers ObjectOwnershipPermission for object-level ownership checks\n    2. Server-side org assignment: Prevents cross-org writes via request body\n\nEndpoints:\n    Platform (JWT auth, uses numeric pk):\n        GET /llm_models/custom_providers/{pk}/ - Retrieve a specific custom provider\n        PATCH /llm_models/custom_providers/{pk}/ - Update a specific custom provider\n        DELETE /llm_models/custom_providers/{pk}/ - Delete a specific custom provider\n    Public API (API key auth, uses provider_id string):\n        GET /api/providers/{provider_id}/ - Retrieve a specific custom provider\n        PATCH /api/providers/{provider_id}/ - Update a specific custom provider\n        DELETE /api/providers/{provider_id}/ - Delete a specific custom provider\n\nArgs (PATCH):\n    - provider_name (Optional): Updated provider name\n    - litellm_provider_id (Optional): Updated base provider ID\n    - moderation (Optional): Updated moderation setting\n    - extra_kwargs (Optional): Updated additional configuration (all credentials live here)\n        * api_key: Updated provider API key\n        * base_url: Updated custom base URL for the provider's API\n        * temperature: Updated default temperature setting\n        * max_tokens: Updated default max tokens setting\n        * timeout: Updated request timeout in seconds\n\nReturns (GET):\n    {\n        \"id\": 123,\n        \"provider_id\": \"my-custom-openai\",\n        \"provider_name\": \"My Custom OpenAI Provider\",\n        \"litellm_provider_id\": \"openai\",\n        \"moderation\": \"filtered\",\n        \"extra_kwargs\": {\n            \"api_key\": \"sk-custom-key-123\",\n            \"base_url\": \"https://api.my-custom-provider.com/v1\",\n            \"temperature\": 0.7,\n            \"max_tokens\": 4096\n        },\n        \"organization\": 456,\n        \"created_at\": \"2024-01-15T10:30:00Z\",\n        \"updated_at\": \"2024-01-15T11:00:00Z\"\n    }\n\nReturns (PATCH):\n    {\n        \"id\": 123,\n        \"provider_id\": \"my-custom-openai\",\n        \"provider_name\": \"My Updated Custom OpenAI Provider\",\n        \"extra_kwargs\": {\n            \"api_key\": \"sk-updated-key-456\",\n            \"base_url\": \"https://api.my-updated-provider.com/v1\",\n            \"temperature\": 0.8,\n            \"max_tokens\": 8192\n        },\n        ...\n    }","tags":["models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"llm-models-custom-providers-partial-update-2","summary":"Llm Models Custom Providers Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCustomProviderUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicCustomProviderUpdateRequest"}}}}}},"/llm_models/foundation_model/{model_name}/":{"get":{"operationId":"llm-models-foundation-model-retrieve-2","summary":"Llm Models Foundation Model Retrieve 2","description":"Foundation model detail by model_name. Auth optional — API key OR JWT\nparsed if present, anonymous allowed. Serializer filters variants by org\nwhen authenticated. See ``FoundationModelView`` for why the optional mixin\nreplaces the bare JWT authenticator (it 401'd valid API-key callers).","tags":["models"],"parameters":[{"name":"model_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMFoundationModelDetail"}}}}}}},"/llm_models/foundation_model/{id}/":{"get":{"operationId":"llm-models-foundation-model-retrieve","summary":"Llm Models Foundation Model Retrieve","description":"Foundation model detail by PK. Auth optional — API key OR JWT parsed if\npresent, anonymous allowed. Serializer filters variants by org when\nauthenticated.\n\nUses ``OptionalJWTAndAPIKeyAuthenticationViewMixin`` (not bare\n``authentication_classes=[KeywordsAIJWTAuthentication]``): SimpleJWT raises\n``InvalidToken`` (401) on any present-but-non-JWT bearer — i.e. an API key —\nso the bare config 401'd legitimate API-key callers despite ``AllowAny``.\nThe mixin accepts API key OR JWT and treats unparseable creds as anonymous,\nand IP-rate-limits anonymous callers via ``TokenBucketThrottle``.","tags":["models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMFoundationModelDetail"}}}}}}},"/llm_models/foundation_models/":{"get":{"operationId":"llm-models-foundation-models-list","summary":"Llm Models Foundation Models List","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LLMFoundationModel"}}}}}}},"post":{"operationId":"llm-models-foundation-models-create","summary":"Llm Models Foundation Models Create","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMFoundationModel"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMFoundationModelRequest"}}}}}},"/llm_models/foundation_models/list/":{"get":{"operationId":"llm-models-foundation-models-list-list","summary":"Llm Models Foundation Models List List","description":"View mixin that handles both JWT and API Key authentication.\n\nInherits from JWTAuthUtils:\n- is_jwt_auth(request): Post-auth check (reliable, uses DRF's successful_authenticator)\n- is_jwt_token_format(request): Pre-auth heuristic (used here to route authenticators)\n\nThis mixin uses is_jwt_token_format() (pre-auth) in get_authenticators() and get_permissions()\nbecause those methods run BEFORE authentication completes. For post-auth checks,\nuse is_jwt_auth() instead.","tags":["models"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedLLMFoundationModelList"}}}}}}},"/llm_models/model/{id}/":{"get":{"operationId":"llm-models-model-retrieve","summary":"Llm Models Model Retrieve","description":"GET/PATCH/DELETE /llm_models/model/<pk>/  (platform - uses pk)\nGET/PATCH/DELETE /api/models/<path:model_name>/  (public API - uses model_name)\n\nUnified endpoint for any model (global or custom).\n\nLookup field determined by URL kwargs:\n    - If 'pk' in kwargs: Uses pk lookup\n    - If 'model_name' in kwargs: Uses model_name lookup\n\nGET:    Retrieve model (public for global, org auth for custom)\nPATCH:  Update model (admin for global, org owner for custom)\nDELETE: Delete model (admin for global, org owner for custom)\n\nPermission logic:\n    - Global model (organization_id is None): Admin required for write\n    - Custom model (organization_id is set): Org ownership required for write","tags":["models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelDetail"}}}}}},"post":{"operationId":"llm-models-model-create","summary":"Llm Models Model Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModelDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModelDetailRequest"}}}}},"put":{"operationId":"llm-models-model-update","summary":"Llm Models Model Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelUpdateRequest"}}}}},"delete":{"operationId":"llm-models-model-destroy","summary":"Llm Models Model Destroy","description":"GET/PATCH/DELETE /llm_models/model/<pk>/  (platform - uses pk)\nGET/PATCH/DELETE /api/models/<path:model_name>/  (public API - uses model_name)\n\nUnified endpoint for any model (global or custom).\n\nLookup field determined by URL kwargs:\n    - If 'pk' in kwargs: Uses pk lookup\n    - If 'model_name' in kwargs: Uses model_name lookup\n\nGET:    Retrieve model (public for global, org auth for custom)\nPATCH:  Update model (admin for global, org owner for custom)\nDELETE: Delete model (admin for global, org owner for custom)\n\nPermission logic:\n    - Global model (organization_id is None): Admin required for write\n    - Custom model (organization_id is set): Org ownership required for write","tags":["models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"llm-models-model-partial-update","summary":"Llm Models Model Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicModelUpdateRequest"}}}}}},"/llm_models/models/":{"get":{"operationId":"llm-models-models-list","summary":"Llm Models Models List","description":"GET/POST /api/llm_models/models/  (platform - shows global + custom)\nGET/POST /api/llm-models/custom-models/  (public API - shows ONLY custom)\n\nUnified endpoint for models.\n\nGET:  List models\n      - Platform: global + org's custom (same for superadmin - no cross-org listing)\n      - Public (custom-models path): ONLY org's custom models\n      Filter with standard syntax: { \"filters\": { \"affiliation_category\": { \"value\": [\"CUSTOM\"] } } }\n\nPOST:\n    - Without 'model_name' in body: Filter/list models (backward compatible)\n    - With 'model_name' in body: Create model\n        - organization_id=null + superadmin: Create global model\n        - Otherwise: Create custom model for target org (superadmin can specify organization_id)\n\nNote: Uses SuperAdminMixin for consistency, but queryset is intentionally the same\nfor both regular users and superadmins (global + org's custom pattern).","tags":["models"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicModelListList"}}}}}},"post":{"operationId":"llm-models-models-create","summary":"Llm Models Models Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelListRequest"}}}}},"put":{"operationId":"llm-models-models-update","summary":"Llm Models Models Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelListRequest"}}}}},"patch":{"operationId":"llm-models-models-partial-update","summary":"Llm Models Models Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicModelListRequest"}}}}}},"/llm_models/models/{model_name}/status/":{"get":{"operationId":"llm-models-models-status-retrieve","summary":"Llm Models Models Status Retrieve","description":"GET/POST /api/models/<model_name>/status/        (Public API — **auth optional**)\nGET/POST /api/llm_models/models/<model_name>/status/ (Platform)\n\nPer-model status resource for the exact logged model string in the URL path,\nover an absolute UTC ``[start_time, end_time)`` range, bucketed by\n``time_tick`` (minute / hour / day).\nReturns four things (see ``ModelStatusResponseSerializer``):\n  - ``data`` — per-provider uptime time series (per-attempt grain). Scoped to\n    ``provider_id`` when that filter is supplied, else cross-provider.\n  - ``respan_uptime`` — request-grain \"via Respan\" uptime time series: one\n    verdict per client call (UP if ANY retry/fallback attempt succeeded), so\n    it reflects failover and sits at/above the per-provider line. Omitted for\n    provider-filtered requests because it is inherently cross-provider.\n  - ``metrics_series`` — per-bucket performance metrics over the window (tps,\n    ttft, latency, cache-hit %, + admin-only counts/cost), so the other\n    metrics can be plotted over time just like uptime. Scoped to\n    ``provider_id`` when that filter is supplied, else cross-provider.\n  - ``status`` — scalar model-wide summary over the window (uptime %, tps,\n    ttft, latency, cache-hit %, catalog input list price). Omitted when a\n    ``provider_id`` filter is supplied (it is cross-provider).\n\nRedaction: public/regular callers get only normalized rates/percentages plus\nthe catalog list price; staff/superadmins additionally get volume scalars\n(request/down counts, total cost) — those are withheld from the public so\ncompetitors can't infer platform traffic/revenue from counts × price.\n\nThe model is the URL path segment (``<path:model_name>``) so provider-prefixed\nidentifiers (e.g. ``vertex_ai/gemini-1.5-pro``) survive routing; the filters\n(``provider_id``, ``time_tick``, range) stay query/body params.","tags":["models"],"parameters":[{"name":"model_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"end_time","in":"query","required":true,"schema":{"type":"string"}},{"name":"provider_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"start_time","in":"query","required":true,"schema":{"type":"string"}},{"name":"time_tick","in":"query","description":"* `minute` - minute\n* `hour` - hour\n* `day` - day","required":false,"schema":{"$ref":"#/components/schemas/LlmModelsModelsModelNameStatusGetParametersTimeTick"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelStatusResponse"}}}}}},"post":{"operationId":"llm-models-models-status-create","summary":"Llm Models Models Status Create","description":"POST for filtering - delegate to GET (BE conventions).","tags":["models"],"parameters":[{"name":"model_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelStatusResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelStatusRequestRequest"}}}}}},"/llm_models/models/list/":{"get":{"operationId":"llm-models-models-list-list","summary":"Llm Models Models List List","description":"GET/POST /api/models/list/        (Public API)\nGET/POST /api/llm_models/models/list/  (Platform)\n\nList models. **Authentication is optional** (OpenRouter-style catalog) — the\nSAME endpoint serves both public and authenticated callers:\n\n- **Unauthenticated** → managed/shared models only (``organization=None``).\n  Rate-limited per client IP.\n- **API key / JWT** → managed models PLUS the caller's own custom models.\n\nRead-only: there is no create/write path (``ListAPIView``); ``post()`` only\ndelegates to ``get()`` to support POST-body filtering (BE conventions). Both\nauth modes fully support filtering.\n\nOptionally enriches each model with cross-org performance metrics (opt-in via\n``is_including_metrics``) over an absolute UTC ``[start_time, end_time)`` window\nread at ``time_tick`` grain (dashboard convention). Each model gets a ``metrics``\nobject: average_tps / average_ttft / average_latency (OpenRouter-style\naverages), uptime_percent, number_of_requests, cost, the prompt/completion/\ncache token sums, and cache_hit_percentage. Sourced from the cross-org\n``get_public_breakdown_metrics`` reader (clickhouse/tasks.py). The metrics are\ncross-org aggregates, so they're identical regardless of auth.\n\nFiltering:\n    Use standard filter syntax: { \"filters\": { \"affiliation_category\": { \"value\": [\"CUSTOM\"] } } }\n    See boilerplates/keywordsai/feature_docs/shared/filters_api_reference.md","tags":["models"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicModelListList"}}}}}},"post":{"operationId":"llm-models-models-list-create","summary":"Llm Models Models List Create","description":"POST for filtering - delegate to GET (BE conventions).","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelListRequest"}}}}}},"/llm_models/models/summary/":{"get":{"operationId":"llm-models-models-summary-retrieve","summary":"Llm Models Models Summary Retrieve","description":"GET/POST /api/models/summary/        (Public API — **auth optional**)\nGET/POST /api/llm_models/models/summary/ (Platform)\n\nSummary counts for LLM models. **Auth is optional** — same model as\n``ModelsListView``:\n\n- **Unauthenticated** → counts over managed/global models only\n  (``organization=null``). Rate-limited per client IP.\n- **API key / JWT** → counts include the caller's custom models too.\n\nRead-only: only GET (and POST-as-filter, delegating to GET). No write path.\n\nReturns:\n    {\n        \"summary\": {\n            \"total_count\": 150,\n            \"global_count\": 120,\n            \"custom_count\": 30\n        }\n    }","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Models_llm_models_models_summary_retrieve_Response_200"}}}}}},"post":{"operationId":"llm-models-models-summary-create","summary":"Llm Models Models Summary Create","description":"POST for filtering - delegate to GET (BE conventions).","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Models_llm_models_models_summary_create_Response_200"}}}}}}},"/llm_models/provider/{id}/":{"get":{"operationId":"llm-models-provider-retrieve","summary":"Llm Models Provider Retrieve","description":"Global provider detail. Returns providers with organization=None only.","tags":["models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMProvider"}}}}}},"put":{"operationId":"llm-models-provider-update","summary":"Llm Models Provider Update","description":"Global provider detail. Returns providers with organization=None only.","tags":["models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMProvider"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMProviderRequest"}}}}},"delete":{"operationId":"llm-models-provider-destroy","summary":"Llm Models Provider Destroy","description":"Global provider detail. Returns providers with organization=None only.","tags":["models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"llm-models-provider-partial-update","summary":"Llm Models Provider Partial Update","description":"Global provider detail. Returns providers with organization=None only.","tags":["models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMProvider"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedLLMProviderRequest"}}}}}},"/llm_models/provider_integrations/":{"get":{"operationId":"llm-models-provider-integrations-list","summary":"Llm Models Provider Integrations List","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LLMProviderIntegration"}}}}}}},"post":{"operationId":"llm-models-provider-integrations-create","summary":"Llm Models Provider Integrations Create","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMProviderIntegration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMProviderIntegrationRequest"}}}}}},"/llm_models/providers/":{"get":{"operationId":"llm-models-providers-list","summary":"Llm Models Providers List","description":"Global providers list. Returns providers with organization=None only.","tags":["models"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedLLMProviderList"}}}}}},"post":{"operationId":"llm-models-providers-create","summary":"Llm Models Providers Create","description":"Global providers list. Returns providers with organization=None only.","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMProvider"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMProviderRequest"}}}}}},"/llm_models/validate_api_key/":{"post":{"operationId":"llm-models-validate-api-key-create","summary":"Llm Models Validate Api Key Create","description":"Validate API credentials. Supports both JWT and API key auth.","tags":["models"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Models_llm_models_validate_api_key_create_Response_200"}}}}}}},"/api/files/":{"post":{"operationId":"upload-file","summary":"Upload File","description":"Upload a file to the provider.\n\nRequired fields:\n- file: The file to upload (multipart/form-data)\n- purpose: The purpose of the file (e.g., \"batch\", \"assistants\")\n- provider_id: The provider to upload to (e.g., \"openai\", \"parasail\")","tags":["openAiBatch"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAI Batch_uploadFile_Response_200"}}}}}},"get":{"operationId":"list-files","summary":"List Files","description":"Retrieve file info from the provider.\n\nGET /api/files/ - List all files\nGET /api/files/{file_id}/ - Get file metadata\nGET /api/files/{file_id}/content/ - Get file content","tags":["openAiBatch"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAI Batch_listFiles_Response_200"}}}}}},"delete":{"operationId":"api-files-destroy","summary":"Api Files Destroy","description":"Delete a file from the provider.","tags":["exports"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/api/files/{file_id}/":{"get":{"operationId":"retrieve-file","summary":"Retrieve File","description":"Retrieve file info from the provider.\n\nGET /api/files/ - List all files\nGET /api/files/{file_id}/ - Get file metadata\nGET /api/files/{file_id}/content/ - Get file content","tags":["openAiBatch"],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAI Batch_retrieveFile_Response_200"}}}}}},"delete":{"operationId":"delete-file","summary":"Delete File","description":"Delete a file from the provider.","tags":["openAiBatch"],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"post":{"operationId":"api-files-create-2","summary":"Api Files Create 2","description":"Upload a file to the provider.\n\nRequired fields:\n- file: The file to upload (multipart/form-data)\n- purpose: The purpose of the file (e.g., \"batch\", \"assistants\")\n- provider_id: The provider to upload to (e.g., \"openai\", \"parasail\")","tags":["exports"],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Exports_api_files_create_2_Response_200"}}}}}}},"/api/files/{file_id}/content/":{"get":{"operationId":"retrieve-file-content","summary":"Retrieve File Content","description":"Retrieve file info from the provider.\n\nGET /api/files/ - List all files\nGET /api/files/{file_id}/ - Get file metadata\nGET /api/files/{file_id}/content/ - Get file content","tags":["openAiBatch"],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAI Batch_retrieveFileContent_Response_200"}}}}}},"post":{"operationId":"api-files-content-create","summary":"Api Files Content Create","description":"Upload a file to the provider.\n\nRequired fields:\n- file: The file to upload (multipart/form-data)\n- purpose: The purpose of the file (e.g., \"batch\", \"assistants\")\n- provider_id: The provider to upload to (e.g., \"openai\", \"parasail\")","tags":["exports"],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Exports_api_files_content_create_Response_200"}}}}}},"delete":{"operationId":"api-files-content-destroy","summary":"Api Files Content Destroy","description":"Delete a file from the provider.","tags":["exports"],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/api/v1/batches":{"post":{"operationId":"create-batch","summary":"Create Batch","description":"Handle POST requests (create batch or cancel batch).\n\nThin view: BatchAPIProxy owns the whole pipeline — preprocessing (built-in\n``_preprocess``), key-usage + billing enforcement, generation, and the\ngateway error policy. raw_payload is captured before the proxy mutates\n``request.data`` during preprocessing.","tags":["openAiBatch"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAI Batch_createBatch_Response_200"}}}}}},"get":{"operationId":"api-v-1-batches-retrieve","summary":"Api V 1 Batches Retrieve","description":"Handle GET requests (retrieve batch or list batches).","tags":["proxy"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proxy_api_v1_batches_retrieve_Response_200"}}}}}}},"/api/v1/batches/{batch_id}":{"get":{"operationId":"retrieve-batch","summary":"Retrieve Batch","description":"Handle GET requests (retrieve batch or list batches).","tags":["openAiBatch"],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAI Batch_retrieveBatch_Response_200"}}}}}},"post":{"operationId":"api-v-1-batches-create-2","summary":"Api V 1 Batches Create 2","description":"Handle POST requests (create batch or cancel batch).\n\nThin view: BatchAPIProxy owns the whole pipeline — preprocessing (built-in\n``_preprocess``), key-usage + billing enforcement, generation, and the\ngateway error policy. raw_payload is captured before the proxy mutates\n``request.data`` during preprocessing.","tags":["proxy"],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proxy_api_v1_batches_create_2_Response_200"}}}}}}},"/api/v1/batches/{batch_id}/cancel":{"post":{"operationId":"cancel-batch","summary":"Cancel Batch","description":"Handle POST requests (create batch or cancel batch).\n\nThin view: BatchAPIProxy owns the whole pipeline — preprocessing (built-in\n``_preprocess``), key-usage + billing enforcement, generation, and the\ngateway error policy. raw_payload is captured before the proxy mutates\n``request.data`` during preprocessing.","tags":["openAiBatch"],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAI Batch_cancelBatch_Response_200"}}}}}},"get":{"operationId":"api-v-1-batches-cancel-retrieve","summary":"Api V 1 Batches Cancel Retrieve","description":"Handle GET requests (retrieve batch or list batches).","tags":["proxy"],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proxy_api_v1_batches_cancel_retrieve_Response_200"}}}}}}},"/api/v1/batches/list/":{"post":{"operationId":"filter-batch-jobs","summary":"Filter Batch Jobs","description":"POST for filtering (not creation) - delegate to GET.","tags":["openAiBatch"],"parameters":[{"name":"Authorization","in":"header","description":"Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchJobList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchJobListRequest"}}}}},"get":{"operationId":"api-v-1-batches-list-list","summary":"Api V 1 Batches List List","description":"GET with filtering support.","tags":["proxy"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedBatchJobListList"}}}}}}},"/api/v1/batches/summary/":{"post":{"operationId":"filter-batch-jobs-summary","summary":"Filter Batch Jobs Summary","description":"POST for filtering - delegate to GET.","tags":["openAiBatch"],"parameters":[{"name":"Authorization","in":"header","description":"Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAI Batch_filterBatchJobsSummary_Response_200"}}}}}},"get":{"operationId":"api-v-1-batches-summary-retrieve","summary":"Api V 1 Batches Summary Retrieve","description":"GET/POST /api/v1/batches/summary/ — Keywords AI extension for aggregated statistics\n\nThis endpoint provides aggregated statistics across ALL providers (not in OAI spec).\n\nReturns aggregated cost, request counts, status breakdowns.\nPOST supports filtering (same as list view).","tags":["proxy"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proxy_api_v1_batches_summary_retrieve_Response_200"}}}}}}},"/api/embeddings":{"post":{"operationId":"create-embeddings","summary":"Create Embeddings","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["multimodal"],"parameters":[{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ApiEmbeddingsPostParametersFormat"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Multimodal_createEmbeddings_Response_200"}}}}}}},"/api/audio/transcriptions":{"post":{"operationId":"speech-to-text","summary":"Speech To Text","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["multimodal"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Multimodal_speechToText_Response_200"}}}}}}},"/api/audio/speech":{"post":{"operationId":"text-to-speech","summary":"Text To Speech","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["multimodal"],"parameters":[{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ApiAudioSpeechPostParametersFormat"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Multimodal_textToSpeech_Response_200"}}}}}}},"/api/assemblyai/v2/transcript/{transcript_id}":{"get":{"operationId":"retrieve-assemblyai-transcript","summary":"Retrieve Assemblyai Transcript","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["multimodal"],"parameters":[{"name":"transcript_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Multimodal_retrieveAssemblyaiTranscript_Response_200"}}}}}},"post":{"operationId":"api-assemblyai-v-2-transcript-create-2","summary":"Api Assemblyai V 2 Transcript Create 2","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["proxy"],"parameters":[{"name":"transcript_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proxy_api_assemblyai_v2_transcript_create_2_Response_200"}}}}}}},"/api/temporary-keys/":{"post":{"operationId":"create-api-key","summary":"Create Api Key","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["temporaryApiKeys"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKey"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationKeyRequest"}}}}},"get":{"operationId":"list-api-keys","summary":"List Api Keys","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["temporaryApiKeys"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedOrganizationKeyReadList"}}}}}}},"/api/credit-transactions/list/":{"get":{"operationId":"list-credit-transactions","summary":"List Credit Transactions","description":"GET /api/credit-transactions/list/\nPOST /api/credit-transactions/list/ (POST-for-Filtering)\nList credit transactions with optional filtering\n\nThis is the primary endpoint for listing transactions.\nSupports both GET (simple list) and POST (filtered list) operations.\n\nPermissions:\n    - Regular users: Can view their own org's transactions\n    - Superadmin: Can view all transactions (with org filter via query params)\n\nQuery params (superadmin only):\n    - org: Organization UUID to filter by\n\nNOTE: CLICKHOUSE-ONLY STRATEGY - Queries ClickHouse directly instead of PostgreSQL","tags":["creditTransactions"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCreditTransactionListList"}}}}}},"post":{"operationId":"api-credit-transactions-list-create","summary":"Api Credit Transactions List Create","description":"POST-for-Filtering pattern: POST delegates to GET for filtered listing.\nThis is NOT for creating transactions (use CreditTransactionsView for that).","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransactionList"}}}}}},"put":{"operationId":"api-credit-transactions-list-update","summary":"Api Credit Transactions List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransactionList"}}}}}},"patch":{"operationId":"api-credit-transactions-list-partial-update","summary":"Api Credit Transactions List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransactionList"}}}}}}},"/api/credit-transactions/{id}/":{"get":{"operationId":"retrieve-credit-transaction","summary":"Retrieve Credit Transaction","description":"GET /api/credit-transactions/<id>/\nRetrieve a single credit transaction by ID\n\nArgs:\n    - id (str): The transaction ID (primary key)\n\nResponse:\n    - Full credit transaction details\n    - Excludes 'usage' transactions (users shouldn't access these directly)\n\nPermissions:\n    - Regular users: Can view their own org's transactions\n    - Superadmin: Can view any transaction\n\nNOTE: CLICKHOUSE-ONLY STRATEGY - Queries ClickHouse directly instead of PostgreSQL","tags":["creditTransactions"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransactionDetail"}}}}}},"post":{"operationId":"api-credit-transactions-create","summary":"Api Credit Transactions Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["billing"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransactionDetail"}}}}}},"put":{"operationId":"api-credit-transactions-update","summary":"Api Credit Transactions Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["billing"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransactionDetail"}}}}}},"patch":{"operationId":"api-credit-transactions-partial-update","summary":"Api Credit Transactions Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["billing"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransactionDetail"}}}}}}},"/api/dashboard/llm-metrics/":{"post":{"operationId":"list-llm-metrics","summary":"List Llm Metrics","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"get":{"operationId":"api-dashboard-llm-metrics-list","summary":"Api Dashboard Llm Metrics List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}}}},"put":{"operationId":"api-dashboard-llm-metrics-update","summary":"Api Dashboard Llm Metrics Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"patch":{"operationId":"api-dashboard-llm-metrics-partial-update","summary":"Api Dashboard Llm Metrics Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedClickHouseRequestLogAggregatedRequest"}}}}}},"/api/dashboard/llm-metrics/summary/":{"post":{"operationId":"get-llm-metrics-summary","summary":"Get Llm Metrics Summary","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"get":{"operationId":"api-dashboard-llm-metrics-summary-list","summary":"Api Dashboard Llm Metrics Summary List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}}}},"put":{"operationId":"api-dashboard-llm-metrics-summary-update","summary":"Api Dashboard Llm Metrics Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"patch":{"operationId":"api-dashboard-llm-metrics-summary-partial-update","summary":"Api Dashboard Llm Metrics Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedClickHouseRequestLogAggregatedRequest"}}}}}},"/api/dashboard/quantiles/":{"post":{"operationId":"list-quantiles","summary":"List Quantiles","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHQuantiles"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHQuantilesRequest"}}}}},"get":{"operationId":"api-dashboard-quantiles-list","summary":"Api Dashboard Quantiles List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CHQuantiles"}}}}}}},"put":{"operationId":"api-dashboard-quantiles-update","summary":"Api Dashboard Quantiles Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHQuantiles"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHQuantilesRequest"}}}}},"patch":{"operationId":"api-dashboard-quantiles-partial-update","summary":"Api Dashboard Quantiles Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHQuantiles"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHQuantilesRequest"}}}}}},"/api/dashboard/quantiles/summary/":{"post":{"operationId":"get-quantiles-summary","summary":"Get Quantiles Summary","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHQuantiles"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHQuantilesRequest"}}}}},"get":{"operationId":"api-dashboard-quantiles-summary-list","summary":"Api Dashboard Quantiles Summary List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CHQuantiles"}}}}}}},"put":{"operationId":"api-dashboard-quantiles-summary-update","summary":"Api Dashboard Quantiles Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHQuantiles"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHQuantilesRequest"}}}}},"patch":{"operationId":"api-dashboard-quantiles-summary-partial-update","summary":"Api Dashboard Quantiles Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHQuantiles"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHQuantilesRequest"}}}}}},"/api/dashboard/time-series/breakdown/":{"post":{"operationId":"list-metrics-breakdown","summary":"List Metrics Breakdown","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"get":{"operationId":"api-dashboard-time-series-breakdown-list","summary":"Api Dashboard Time Series Breakdown List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}}}},"put":{"operationId":"api-dashboard-time-series-breakdown-update","summary":"Api Dashboard Time Series Breakdown Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"patch":{"operationId":"api-dashboard-time-series-breakdown-partial-update","summary":"Api Dashboard Time Series Breakdown Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedClickHouseRequestLogAggregatedRequest"}}}}}},"/api/dashboard/users/":{"post":{"operationId":"list-active-users","summary":"List Active Users","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_listActiveUsers_Response_201"}}}}}},"get":{"operationId":"api-dashboard-users-retrieve","summary":"Api Dashboard Users Retrieve","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_api_dashboard_users_retrieve_Response_200"}}}}}},"put":{"operationId":"api-dashboard-users-update","summary":"Api Dashboard Users Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_api_dashboard_users_update_Response_200"}}}}}},"patch":{"operationId":"api-dashboard-users-partial-update","summary":"Api Dashboard Users Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_api_dashboard_users_partial_update_Response_200"}}}}}}},"/api/dashboard/total-users/":{"post":{"operationId":"get-total-users","summary":"Get Total Users","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_getTotalUsers_Response_201"}}}}}},"get":{"operationId":"api-dashboard-total-users-retrieve","summary":"Api Dashboard Total Users Retrieve","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_api_dashboard_total_users_retrieve_Response_200"}}}}}},"put":{"operationId":"api-dashboard-total-users-update","summary":"Api Dashboard Total Users Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_api_dashboard_total_users_update_Response_200"}}}}}},"patch":{"operationId":"api-dashboard-total-users-partial-update","summary":"Api Dashboard Total Users Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_api_dashboard_total_users_partial_update_Response_200"}}}}}}},"/api/dashboard/cache-hit-metrics/":{"post":{"operationId":"list-cache-hit-metrics","summary":"List Cache Hit Metrics","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"get":{"operationId":"api-dashboard-cache-hit-metrics-list","summary":"Api Dashboard Cache Hit Metrics List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}}}},"put":{"operationId":"api-dashboard-cache-hit-metrics-update","summary":"Api Dashboard Cache Hit Metrics Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"patch":{"operationId":"api-dashboard-cache-hit-metrics-partial-update","summary":"Api Dashboard Cache Hit Metrics Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedClickHouseRequestLogAggregatedRequest"}}}}}},"/api/dashboard/cache-hit-metrics/summary/":{"post":{"operationId":"get-cache-hit-metrics-summary","summary":"Get Cache Hit Metrics Summary","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"get":{"operationId":"api-dashboard-cache-hit-metrics-summary-list","summary":"Api Dashboard Cache Hit Metrics Summary List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}}}},"put":{"operationId":"api-dashboard-cache-hit-metrics-summary-update","summary":"Api Dashboard Cache Hit Metrics Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"patch":{"operationId":"api-dashboard-cache-hit-metrics-summary-partial-update","summary":"Api Dashboard Cache Hit Metrics Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedClickHouseRequestLogAggregatedRequest"}}}}}},"/api/dashboard/cache-hit-metrics/total-summary/":{"post":{"operationId":"get-lifetime-cache-hit-totals","summary":"Get Lifetime Cache Hit Totals","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"get":{"operationId":"api-dashboard-cache-hit-metrics-total-summary-list","summary":"Api Dashboard Cache Hit Metrics Total Summary List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}}}},"put":{"operationId":"api-dashboard-cache-hit-metrics-total-summary-update","summary":"Api Dashboard Cache Hit Metrics Total Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"patch":{"operationId":"api-dashboard-cache-hit-metrics-total-summary-partial-update","summary":"Api Dashboard Cache Hit Metrics Total Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedClickHouseRequestLogAggregatedRequest"}}}}}},"/api/dashboard/eval-results/":{"post":{"operationId":"list-eval-results","summary":"List Eval Results","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"get":{"operationId":"api-dashboard-eval-results-list","summary":"Api Dashboard Eval Results List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}}}},"put":{"operationId":"api-dashboard-eval-results-update","summary":"Api Dashboard Eval Results Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"patch":{"operationId":"api-dashboard-eval-results-partial-update","summary":"Api Dashboard Eval Results Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedClickHouseRequestLogAggregatedRequest"}}}}}},"/api/dashboard/eval-results/summary/":{"post":{"operationId":"get-eval-results-summary","summary":"Get Eval Results Summary","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"get":{"operationId":"api-dashboard-eval-results-summary-list","summary":"Api Dashboard Eval Results Summary List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}}}},"put":{"operationId":"api-dashboard-eval-results-summary-update","summary":"Api Dashboard Eval Results Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"patch":{"operationId":"api-dashboard-eval-results-summary-partial-update","summary":"Api Dashboard Eval Results Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedClickHouseRequestLogAggregatedRequest"}}}}}},"/api/dashboard/storage-volume/":{"get":{"operationId":"list-storage-volume","summary":"List Storage Volume","description":"GET/POST dashboard/storage-volume/ -- daily S3 storage volume time series.\n\nArgs (query params): summary_type, date, timezone_offset\nResponse: {\"data\": [{date_group, total_bytes, object_count, ...}]}","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}}}},"post":{"operationId":"api-dashboard-storage-volume-create","summary":"Api Dashboard Storage Volume Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"put":{"operationId":"api-dashboard-storage-volume-update","summary":"Api Dashboard Storage Volume Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"patch":{"operationId":"api-dashboard-storage-volume-partial-update","summary":"Api Dashboard Storage Volume Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedClickHouseRequestLogAggregatedRequest"}}}}}},"/api/dashboard/storage-volume/summary/":{"get":{"operationId":"get-storage-volume-summary","summary":"Get Storage Volume Summary","description":"GET/POST dashboard/storage-volume/summary/ -- latest S3 storage snapshot.\n\nArgs (query params): summary_type, date, timezone_offset\nResponse: {\"summary\": {total_bytes, object_count, standard_bytes, ...}}","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}}}},"post":{"operationId":"api-dashboard-storage-volume-summary-create","summary":"Api Dashboard Storage Volume Summary Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"put":{"operationId":"api-dashboard-storage-volume-summary-update","summary":"Api Dashboard Storage Volume Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"patch":{"operationId":"api-dashboard-storage-volume-summary-partial-update","summary":"Api Dashboard Storage Volume Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedClickHouseRequestLogAggregatedRequest"}}}}}},"/api/platform-stats/":{"get":{"operationId":"get-platform-stats","summary":"Get Platform Stats","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["dashboard"],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_getPlatformStats_Response_200"}}}}}}},"/api/customers/graph":{"get":{"operationId":"api-customers-graph-list","summary":"Api Customers Graph List","description":"Legacy admin customer graph.\n\nThis graph counts direct customers from `ch_organization`. It does not count\n`CustomerUser` rows, which represent end users of our customers.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerUserGraph"}}}}}}},"post":{"operationId":"api-customers-graph-create","summary":"Api Customers Graph Create","description":"Legacy admin customer graph.\n\nThis graph counts direct customers from `ch_organization`. It does not count\n`CustomerUser` rows, which represent end users of our customers.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserGraph"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUserGraphRequest"}}}}}},"/api/dashboard/breakdown/":{"get":{"operationId":"api-dashboard-breakdown-retrieve","summary":"Api Dashboard Breakdown Retrieve","description":"GET/POST dashboard/breakdown/?breakdown_by=<dimension> -- top-N breakdown\nof LLM metrics grouped by one dimension.\n\nSingle parameterized replacement for the legacy per-dimension\ndashboard/top-<x>/ endpoints (top-keys, top-models, top-providers,\ntop-prompts, top-deployments, top-users), which were retired once the FE\nmoved to ?breakdown_by=<dimension> (respan-frontend #2409). See\nBE_conventions/urls.md \"Dashboard breakdown (parameterized exception)\".\n\nArgs (query params): breakdown_by, sort_by, summary_type, date,\n    timezone_offset, is_test, all_envs\nArgs (POST body): filters\nResponse: {<sort_by_metric>: [{<dimension>, name, <metric_value>, ...}]}","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_api_dashboard_breakdown_retrieve_Response_200"}}}}}},"post":{"operationId":"api-dashboard-breakdown-create","summary":"Api Dashboard Breakdown Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_api_dashboard_breakdown_create_Response_201"}}}}}},"put":{"operationId":"api-dashboard-breakdown-update","summary":"Api Dashboard Breakdown Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_api_dashboard_breakdown_update_Response_200"}}}}}},"patch":{"operationId":"api-dashboard-breakdown-partial-update","summary":"Api Dashboard Breakdown Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_api_dashboard_breakdown_partial_update_Response_200"}}}}}}},"/api/dashboards/":{"get":{"operationId":"api-dashboards-list","summary":"Api Dashboards List","description":"GET/POST /api/dashboards/ — List and create dashboards.","tags":["dashboard"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDashboardListList"}}}}}},"post":{"operationId":"api-dashboards-create","summary":"Api Dashboards Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardCreateRequest"}}}}},"put":{"operationId":"api-dashboards-update","summary":"Api Dashboards Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardList"}}}}}},"patch":{"operationId":"api-dashboards-partial-update","summary":"Api Dashboards Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardList"}}}}}}},"/api/dashboards/{dashboard_id}/":{"get":{"operationId":"api-dashboards-retrieve","summary":"Api Dashboards Retrieve","description":"GET/PATCH/DELETE /api/dashboards/{dashboard_id}/ — Retrieve, update, hard-delete.","tags":["dashboard"],"parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardDetail"}}}}}},"post":{"operationId":"api-dashboards-create-2","summary":"Api Dashboards Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardDetail"}}}}}},"put":{"operationId":"api-dashboards-update-2","summary":"Api Dashboards Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardUpdateRequest"}}}}},"delete":{"operationId":"api-dashboards-destroy","summary":"Api Dashboards Destroy","description":"GET/PATCH/DELETE /api/dashboards/{dashboard_id}/ — Retrieve, update, hard-delete.","tags":["dashboard"],"parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-dashboards-partial-update-2","summary":"Api Dashboards Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedDashboardUpdateRequest"}}}}}},"/clickhouse/dashboard/breakdown/":{"get":{"operationId":"clickhouse-dashboard-breakdown-retrieve","summary":"Clickhouse Dashboard Breakdown Retrieve","description":"GET/POST dashboard/breakdown/?breakdown_by=<dimension> -- top-N breakdown\nof LLM metrics grouped by one dimension.\n\nSingle parameterized replacement for the legacy per-dimension\ndashboard/top-<x>/ endpoints (top-keys, top-models, top-providers,\ntop-prompts, top-deployments, top-users), which were retired once the FE\nmoved to ?breakdown_by=<dimension> (respan-frontend #2409). See\nBE_conventions/urls.md \"Dashboard breakdown (parameterized exception)\".\n\nArgs (query params): breakdown_by, sort_by, summary_type, date,\n    timezone_offset, is_test, all_envs\nArgs (POST body): filters\nResponse: {<sort_by_metric>: [{<dimension>, name, <metric_value>, ...}]}","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_clickhouse_dashboard_breakdown_retrieve_Response_200"}}}}}},"post":{"operationId":"clickhouse-dashboard-breakdown-create","summary":"Clickhouse Dashboard Breakdown Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_clickhouse_dashboard_breakdown_create_Response_201"}}}}}},"put":{"operationId":"clickhouse-dashboard-breakdown-update","summary":"Clickhouse Dashboard Breakdown Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_clickhouse_dashboard_breakdown_update_Response_200"}}}}}},"patch":{"operationId":"clickhouse-dashboard-breakdown-partial-update","summary":"Clickhouse Dashboard Breakdown Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_clickhouse_dashboard_breakdown_partial_update_Response_200"}}}}}}},"/clickhouse/dashboard/cache-hit-metrics/":{"get":{"operationId":"clickhouse-dashboard-cache-hit-metrics-list","summary":"Clickhouse Dashboard Cache Hit Metrics List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}}}},"post":{"operationId":"clickhouse-dashboard-cache-hit-metrics-create","summary":"Clickhouse Dashboard Cache Hit Metrics Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"put":{"operationId":"clickhouse-dashboard-cache-hit-metrics-update","summary":"Clickhouse Dashboard Cache Hit Metrics Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"patch":{"operationId":"clickhouse-dashboard-cache-hit-metrics-partial-update","summary":"Clickhouse Dashboard Cache Hit Metrics Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedClickHouseRequestLogAggregatedRequest"}}}}}},"/clickhouse/dashboard/cache-hit-metrics/summary/":{"get":{"operationId":"clickhouse-dashboard-cache-hit-metrics-summary-list","summary":"Clickhouse Dashboard Cache Hit Metrics Summary List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}}}},"post":{"operationId":"clickhouse-dashboard-cache-hit-metrics-summary-create","summary":"Clickhouse Dashboard Cache Hit Metrics Summary Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"put":{"operationId":"clickhouse-dashboard-cache-hit-metrics-summary-update","summary":"Clickhouse Dashboard Cache Hit Metrics Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"patch":{"operationId":"clickhouse-dashboard-cache-hit-metrics-summary-partial-update","summary":"Clickhouse Dashboard Cache Hit Metrics Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedClickHouseRequestLogAggregatedRequest"}}}}}},"/clickhouse/dashboard/cache-hit-metrics/total-summary/":{"get":{"operationId":"clickhouse-dashboard-cache-hit-metrics-total-summary-list","summary":"Clickhouse Dashboard Cache Hit Metrics Total Summary List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}}}},"post":{"operationId":"clickhouse-dashboard-cache-hit-metrics-total-summary-create","summary":"Clickhouse Dashboard Cache Hit Metrics Total Summary Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"put":{"operationId":"clickhouse-dashboard-cache-hit-metrics-total-summary-update","summary":"Clickhouse Dashboard Cache Hit Metrics Total Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"patch":{"operationId":"clickhouse-dashboard-cache-hit-metrics-total-summary-partial-update","summary":"Clickhouse Dashboard Cache Hit Metrics Total Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedClickHouseRequestLogAggregatedRequest"}}}}}},"/clickhouse/dashboard/eval-results/":{"get":{"operationId":"clickhouse-dashboard-eval-results-list","summary":"Clickhouse Dashboard Eval Results List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}}}},"post":{"operationId":"clickhouse-dashboard-eval-results-create","summary":"Clickhouse Dashboard Eval Results Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"put":{"operationId":"clickhouse-dashboard-eval-results-update","summary":"Clickhouse Dashboard Eval Results Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"patch":{"operationId":"clickhouse-dashboard-eval-results-partial-update","summary":"Clickhouse Dashboard Eval Results Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedClickHouseRequestLogAggregatedRequest"}}}}}},"/clickhouse/dashboard/eval-results/summary/":{"get":{"operationId":"clickhouse-dashboard-eval-results-summary-list","summary":"Clickhouse Dashboard Eval Results Summary List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}}}},"post":{"operationId":"clickhouse-dashboard-eval-results-summary-create","summary":"Clickhouse Dashboard Eval Results Summary Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"put":{"operationId":"clickhouse-dashboard-eval-results-summary-update","summary":"Clickhouse Dashboard Eval Results Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"patch":{"operationId":"clickhouse-dashboard-eval-results-summary-partial-update","summary":"Clickhouse Dashboard Eval Results Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedClickHouseRequestLogAggregatedRequest"}}}}}},"/clickhouse/dashboard/llm-metrics/":{"get":{"operationId":"clickhouse-dashboard-llm-metrics-list","summary":"Clickhouse Dashboard Llm Metrics List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}}}},"post":{"operationId":"clickhouse-dashboard-llm-metrics-create","summary":"Clickhouse Dashboard Llm Metrics Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"put":{"operationId":"clickhouse-dashboard-llm-metrics-update","summary":"Clickhouse Dashboard Llm Metrics Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"patch":{"operationId":"clickhouse-dashboard-llm-metrics-partial-update","summary":"Clickhouse Dashboard Llm Metrics Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedClickHouseRequestLogAggregatedRequest"}}}}}},"/clickhouse/dashboard/llm-metrics/summary/":{"get":{"operationId":"clickhouse-dashboard-llm-metrics-summary-list","summary":"Clickhouse Dashboard Llm Metrics Summary List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}}}},"post":{"operationId":"clickhouse-dashboard-llm-metrics-summary-create","summary":"Clickhouse Dashboard Llm Metrics Summary Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"put":{"operationId":"clickhouse-dashboard-llm-metrics-summary-update","summary":"Clickhouse Dashboard Llm Metrics Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"patch":{"operationId":"clickhouse-dashboard-llm-metrics-summary-partial-update","summary":"Clickhouse Dashboard Llm Metrics Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedClickHouseRequestLogAggregatedRequest"}}}}}},"/clickhouse/dashboard/quantiles/":{"get":{"operationId":"clickhouse-dashboard-quantiles-list","summary":"Clickhouse Dashboard Quantiles List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CHQuantiles"}}}}}}},"post":{"operationId":"clickhouse-dashboard-quantiles-create","summary":"Clickhouse Dashboard Quantiles Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHQuantiles"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHQuantilesRequest"}}}}},"put":{"operationId":"clickhouse-dashboard-quantiles-update","summary":"Clickhouse Dashboard Quantiles Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHQuantiles"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHQuantilesRequest"}}}}},"patch":{"operationId":"clickhouse-dashboard-quantiles-partial-update","summary":"Clickhouse Dashboard Quantiles Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHQuantiles"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHQuantilesRequest"}}}}}},"/clickhouse/dashboard/quantiles/summary/":{"get":{"operationId":"clickhouse-dashboard-quantiles-summary-list","summary":"Clickhouse Dashboard Quantiles Summary List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CHQuantiles"}}}}}}},"post":{"operationId":"clickhouse-dashboard-quantiles-summary-create","summary":"Clickhouse Dashboard Quantiles Summary Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHQuantiles"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHQuantilesRequest"}}}}},"put":{"operationId":"clickhouse-dashboard-quantiles-summary-update","summary":"Clickhouse Dashboard Quantiles Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHQuantiles"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHQuantilesRequest"}}}}},"patch":{"operationId":"clickhouse-dashboard-quantiles-summary-partial-update","summary":"Clickhouse Dashboard Quantiles Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHQuantiles"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHQuantilesRequest"}}}}}},"/clickhouse/dashboard/storage-volume/":{"get":{"operationId":"clickhouse-dashboard-storage-volume-list","summary":"Clickhouse Dashboard Storage Volume List","description":"GET/POST dashboard/storage-volume/ -- daily S3 storage volume time series.\n\nArgs (query params): summary_type, date, timezone_offset\nResponse: {\"data\": [{date_group, total_bytes, object_count, ...}]}","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}}}},"post":{"operationId":"clickhouse-dashboard-storage-volume-create","summary":"Clickhouse Dashboard Storage Volume Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"put":{"operationId":"clickhouse-dashboard-storage-volume-update","summary":"Clickhouse Dashboard Storage Volume Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"patch":{"operationId":"clickhouse-dashboard-storage-volume-partial-update","summary":"Clickhouse Dashboard Storage Volume Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedClickHouseRequestLogAggregatedRequest"}}}}}},"/clickhouse/dashboard/storage-volume/summary/":{"get":{"operationId":"clickhouse-dashboard-storage-volume-summary-list","summary":"Clickhouse Dashboard Storage Volume Summary List","description":"GET/POST dashboard/storage-volume/summary/ -- latest S3 storage snapshot.\n\nArgs (query params): summary_type, date, timezone_offset\nResponse: {\"summary\": {total_bytes, object_count, standard_bytes, ...}}","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}}}},"post":{"operationId":"clickhouse-dashboard-storage-volume-summary-create","summary":"Clickhouse Dashboard Storage Volume Summary Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"put":{"operationId":"clickhouse-dashboard-storage-volume-summary-update","summary":"Clickhouse Dashboard Storage Volume Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"patch":{"operationId":"clickhouse-dashboard-storage-volume-summary-partial-update","summary":"Clickhouse Dashboard Storage Volume Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedClickHouseRequestLogAggregatedRequest"}}}}}},"/clickhouse/dashboard/time-series/breakdown/":{"get":{"operationId":"clickhouse-dashboard-time-series-breakdown-list","summary":"Clickhouse Dashboard Time Series Breakdown List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}}}},"post":{"operationId":"clickhouse-dashboard-time-series-breakdown-create","summary":"Clickhouse Dashboard Time Series Breakdown Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"put":{"operationId":"clickhouse-dashboard-time-series-breakdown-update","summary":"Clickhouse Dashboard Time Series Breakdown Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregatedRequest"}}}}},"patch":{"operationId":"clickhouse-dashboard-time-series-breakdown-partial-update","summary":"Clickhouse Dashboard Time Series Breakdown Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedClickHouseRequestLogAggregatedRequest"}}}}}},"/clickhouse/dashboard/total-users/":{"get":{"operationId":"clickhouse-dashboard-total-users-retrieve","summary":"Clickhouse Dashboard Total Users Retrieve","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_clickhouse_dashboard_total_users_retrieve_Response_200"}}}}}},"post":{"operationId":"clickhouse-dashboard-total-users-create","summary":"Clickhouse Dashboard Total Users Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_clickhouse_dashboard_total_users_create_Response_201"}}}}}},"put":{"operationId":"clickhouse-dashboard-total-users-update","summary":"Clickhouse Dashboard Total Users Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_clickhouse_dashboard_total_users_update_Response_200"}}}}}},"patch":{"operationId":"clickhouse-dashboard-total-users-partial-update","summary":"Clickhouse Dashboard Total Users Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_clickhouse_dashboard_total_users_partial_update_Response_200"}}}}}}},"/clickhouse/dashboard/users/":{"get":{"operationId":"clickhouse-dashboard-users-retrieve","summary":"Clickhouse Dashboard Users Retrieve","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_clickhouse_dashboard_users_retrieve_Response_200"}}}}}},"post":{"operationId":"clickhouse-dashboard-users-create","summary":"Clickhouse Dashboard Users Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_clickhouse_dashboard_users_create_Response_201"}}}}}},"put":{"operationId":"clickhouse-dashboard-users-update","summary":"Clickhouse Dashboard Users Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_clickhouse_dashboard_users_update_Response_200"}}}}}},"patch":{"operationId":"clickhouse-dashboard-users-partial-update","summary":"Clickhouse Dashboard Users Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["dashboard"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard_clickhouse_dashboard_users_partial_update_Response_200"}}}}}}},"/":{"get":{"operationId":"root-retrieve","summary":"Liveness Check","description":"Basic liveness check - just returns 200 if the process is alive.\nThis should be fast and not check external dependencies.","tags":["health"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health_root_retrieve_Response_200"}}}}}}},"/api/health-check/":{"get":{"operationId":"api-health-check","summary":"Api Health Check","tags":["health"],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health_apiHealthCheck_Response_200"}}}}}}},"/health/":{"get":{"operationId":"retrieve","summary":"Retrieve","description":"Basic liveness check - just returns 200 if the process is alive.\nThis should be fast and not check external dependencies.","tags":["health"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health_retrieve_Response_200"}}}}}}},"/health/deep":{"get":{"operationId":"deep-retrieve","summary":"Deep Retrieve","description":"Structured per-component health (CH, Celery, Pulsar, Redbeat, Redis, PG).","tags":["health"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health_deepRetrieve_Response_200"}}}}}}},"/ready":{"get":{"operationId":"ready-retrieve","summary":"Ready Retrieve","tags":["health"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health_ready_retrieve_Response_200"}}}}}}},"/agents/chat/":{"post":{"operationId":"chat-create","summary":"Chat Create","description":"Create a turn within an agent chat session (streams SSE response).\n\nPOST /agents/sessions/<session_id>/turns/\nPOST /agents/chat/\n\nRequest body (JSON):\n    input (list, required): Full conversation messages.\n        Last message must have role ``user``.\n        Messages may include ``file_ids`` (list[str]) to attach files\n        uploaded via POST /agents/files/.\n    timezone (str, optional): IANA timezone, defaults to ``UTC``.\n    conversation (str, optional): Conversation ID for persistence.\n    parent_message_id (str, optional): Message ID to parent this\n        turn under in the conversation tree.\n\nResponse: Server-Sent Events stream.","tags":["agents"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_chatCreate_Response_200"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnRequestRequest"}}}}}},"/agents/conversations/":{"get":{"operationId":"conversations-list","summary":"Conversations List","description":"List and create agent conversations.\n\nGET  /agents/conversations/ — list conversations for the org\nPOST /agents/conversations/ — create a new conversation","tags":["agents"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedConversationListList"}}}}}},"post":{"operationId":"conversations-create","summary":"Conversations Create","description":"Create a new agent conversation.\n\nPOST /agents/conversations/\n\nCreates a new conversation for the authenticated user's organization.","tags":["agents"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCreateRequestRequest"}}}}}},"/agents/conversations/{id}/":{"get":{"operationId":"conversations-retrieve","summary":"Conversations Retrieve","description":"Retrieve, update, or delete a single conversation.\n\nGET    /agents/conversations/<pk>/ — conversation + message tree\nPATCH  /agents/conversations/<pk>/ — update title\nDELETE /agents/conversations/<pk>/ — hard delete (CASCADE removes messages)\n\nGET query params:\n    branch_tip (str, optional): Message ID to walk from when\n        reconstructing the active branch. If omitted, defaults to\n        the most recent message. Messages not on the active branch\n        are returned in ``orphaned_messages``.","tags":["agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationDetail"}}}}}},"put":{"operationId":"conversations-update","summary":"Conversations Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationUpdateRequest"}}}}},"delete":{"operationId":"conversations-destroy","summary":"Conversations Destroy","description":"Retrieve, update, or delete a single conversation.\n\nGET    /agents/conversations/<pk>/ — conversation + message tree\nPATCH  /agents/conversations/<pk>/ — update title\nDELETE /agents/conversations/<pk>/ — hard delete (CASCADE removes messages)\n\nGET query params:\n    branch_tip (str, optional): Message ID to walk from when\n        reconstructing the active branch. If omitted, defaults to\n        the most recent message. Messages not on the active branch\n        are returned in ``orphaned_messages``.","tags":["agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"conversations-partial-update","summary":"Conversations Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedConversationUpdateRequest"}}}}}},"/agents/conversations/list/":{"get":{"operationId":"conversations-list-list","summary":"Conversations List List","description":"GET/POST /agents/conversations/list/ — List conversations with filtering.\n\nPOST-for-filtering pattern: POST accepts filter payload, delegates to GET.\nSupports: pagination (page, page_size), sorting (sort_by), filtering.","tags":["agents"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedConversationListList"}}}}}},"post":{"operationId":"conversations-list-create","summary":"Conversations List Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["agents"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationList"}}}}}},"put":{"operationId":"conversations-list-update","summary":"Conversations List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["agents"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationList"}}}}}},"patch":{"operationId":"conversations-list-partial-update","summary":"Conversations List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["agents"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationList"}}}}}}},"/agents/files/":{"post":{"operationId":"files-create","summary":"Files Create","description":"Upload a file for agent chat. Returns a file_id to reference in chat messages.","tags":["agents"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentFileUploadResponse"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}}},"put":{"operationId":"files-update","summary":"Files Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["agents"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentFileUploadResponse"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file_id":{"type":"string"},"filename":{"type":"string"},"content_type":{"type":"string"},"size_bytes":{"type":"integer"},"kind":{"type":"string"}},"required":["file_id","filename","content_type","size_bytes","kind"]}}}}},"patch":{"operationId":"files-partial-update","summary":"Files Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["agents"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentFileUploadResponse"}}}}},"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file_id":{"type":"string"},"filename":{"type":"string"},"content_type":{"type":"string"},"size_bytes":{"type":"integer"},"kind":{"type":"string"}}}}}}}},"/agents/files/{file_id}/":{"post":{"operationId":"files-create-2","summary":"Files Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["agents"],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_filesCreate2_Response_200"}}}}}},"put":{"operationId":"files-update-2","summary":"Files Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["agents"],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_filesUpdate2_Response_200"}}}}}},"delete":{"operationId":"files-destroy","summary":"Files Destroy","description":"Delete an uploaded agent file.\n\nDELETE /agents/files/<file_id>/\n\nOrg-scoped via SuperAdminMixin — regular users can only delete their\nown files; superadmins can delete any file.","tags":["agents"],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"files-partial-update-2","summary":"Files Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["agents"],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_filesPartialUpdate2_Response_200"}}}}}}},"/agents/sessions/":{"post":{"operationId":"sessions-create","summary":"Sessions Create","description":"Create a turn within an agent chat session (streams SSE response).\n\nPOST /agents/sessions/<session_id>/turns/\nPOST /agents/chat/\n\nRequest body (JSON):\n    input (list, required): Full conversation messages.\n        Last message must have role ``user``.\n        Messages may include ``file_ids`` (list[str]) to attach files\n        uploaded via POST /agents/files/.\n    timezone (str, optional): IANA timezone, defaults to ``UTC``.\n    conversation (str, optional): Conversation ID for persistence.\n    parent_message_id (str, optional): Message ID to parent this\n        turn under in the conversation tree.\n\nResponse: Server-Sent Events stream.","tags":["agents"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_sessionsCreate_Response_200"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnRequestRequest"}}}}}},"/agents/sessions/{session_id}/turns/":{"post":{"operationId":"sessions-turns-create","summary":"Sessions Turns Create","description":"Create a turn within an agent chat session (streams SSE response).\n\nPOST /agents/sessions/<session_id>/turns/\nPOST /agents/chat/\n\nRequest body (JSON):\n    input (list, required): Full conversation messages.\n        Last message must have role ``user``.\n        Messages may include ``file_ids`` (list[str]) to attach files\n        uploaded via POST /agents/files/.\n    timezone (str, optional): IANA timezone, defaults to ``UTC``.\n    conversation (str, optional): Conversation ID for persistence.\n    parent_message_id (str, optional): Message ID to parent this\n        turn under in the conversation tree.\n\nResponse: Server-Sent Events stream.","tags":["agents"],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_sessionsTurnsCreate_Response_200"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnRequestRequest"}}}}}},"/agents/skills/":{"get":{"operationId":"skills-list","summary":"Skills List","description":"GET/POST /agents/skills/ — List and create saved agent skills.","tags":["agents"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAgentSkillListList"}}}}}},"post":{"operationId":"skills-create","summary":"Skills Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["agents"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSkillCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSkillCreateRequest"}}}}}},"/agents/skills/{id}/":{"get":{"operationId":"skills-retrieve","summary":"Skills Retrieve","description":"GET/PATCH/DELETE /agents/skills/{id}/ — Retrieve, update, delete a skill.","tags":["agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSkillDetail"}}}}}},"put":{"operationId":"skills-update","summary":"Skills Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSkillUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSkillUpdateRequest"}}}}},"delete":{"operationId":"skills-destroy","summary":"Skills Destroy","description":"GET/PATCH/DELETE /agents/skills/{id}/ — Retrieve, update, delete a skill.","tags":["agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"skills-partial-update","summary":"Skills Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["agents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSkillUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedAgentSkillUpdateRequest"}}}}}},"/agents/skills/list/":{"get":{"operationId":"skills-list-list","summary":"Skills List List","description":"GET/POST /agents/skills/list/ — List saved agent skills with filtering.\n\nPOST-for-filtering pattern: POST accepts filter payload, delegates to GET.\nSupports: pagination (page, page_size), sorting (sort_by), filtering.","tags":["agents"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAgentSkillListList"}}}}}},"post":{"operationId":"skills-list-filtered","summary":"Skills List Filtered","description":"List saved agent skills with complex filtering via POST body.","tags":["agents"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAgentSkillListList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSkillFilterRequestRequest"}}}}}},"/agents/v2/sessions/":{"post":{"operationId":"v-2-sessions-create","summary":"V 2 Sessions Create","description":"V2 agent chat — single loop with two-tier tool loading.\n\nPOST /agents/v2/sessions/                      (auto-generates session_id)\nPOST /agents/v2/sessions/<session_id>/turns/   (explicit session_id)\n\nRequest body: same as v1 (input, timezone, conversation,\nparent_message_id, model).\nResponse: Server-Sent Events stream.\n\nDifferences from v1:\n- Single loop instead of multi-agent graph\n- Two-tier tool loading (~20 core, ~70 deferred via tool_search)","tags":["agents"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_v2SessionsCreate_Response_200"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnRequestRequest"}}}}}},"/agents/v2/sessions/{session_id}/turns/":{"post":{"operationId":"v-2-sessions-turns-create","summary":"V 2 Sessions Turns Create","description":"V2 agent chat — single loop with two-tier tool loading.\n\nPOST /agents/v2/sessions/                      (auto-generates session_id)\nPOST /agents/v2/sessions/<session_id>/turns/   (explicit session_id)\n\nRequest body: same as v1 (input, timezone, conversation,\nparent_message_id, model).\nResponse: Server-Sent Events stream.\n\nDifferences from v1:\n- Single loop instead of multi-agent graph\n- Two-tier tool loading (~20 core, ~70 deferred via tool_search)","tags":["agents"],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agents_v2SessionsTurnsCreate_Response_200"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnRequestRequest"}}}}}},"/api/admin/staff-groups/":{"get":{"operationId":"api-admin-staff-groups-list","summary":"Api Admin Staff Groups List","description":"``GET / POST /api/admin/staff-groups/``","tags":["platformApi"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedStaffGroupList"}}}}}},"post":{"operationId":"api-admin-staff-groups-create","summary":"Api Admin Staff Groups Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffGroup"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffGroupRequest"}}}}},"put":{"operationId":"api-admin-staff-groups-update","summary":"Api Admin Staff Groups Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffGroup"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffGroupRequest"}}}}},"patch":{"operationId":"api-admin-staff-groups-partial-update","summary":"Api Admin Staff Groups Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffGroup"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedStaffGroupRequest"}}}}}},"/api/admin/staff-groups/{name}/":{"get":{"operationId":"api-admin-staff-groups-retrieve","summary":"Api Admin Staff Groups Retrieve","description":"``GET / PATCH / DELETE /api/admin/staff-groups/<name>/``\n\nDELETE soft-disables the group (sets ``revoked_at`` + actor email).\nAll members lose authority atomically per the resolver's group-\nrevoked check.","tags":["platformApi"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffGroup"}}}}}},"delete":{"operationId":"api-admin-staff-groups-destroy","summary":"Api Admin Staff Groups Destroy","description":"``GET / PATCH / DELETE /api/admin/staff-groups/<name>/``\n\nDELETE soft-disables the group (sets ``revoked_at`` + actor email).\nAll members lose authority atomically per the resolver's group-\nrevoked check.","tags":["platformApi"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-admin-staff-groups-partial-update-2","summary":"Api Admin Staff Groups Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffGroup"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedStaffGroupRequest"}}}}}},"/api/admin/staff-groups/{name}/memberships/":{"post":{"operationId":"api-admin-staff-groups-memberships-create","summary":"Api Admin Staff Groups Memberships Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffGroupMembershipCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffGroupMembershipCreateRequest"}}}}}},"/api/admin/staff-groups/{name}/memberships/{email}/":{"delete":{"operationId":"api-admin-staff-groups-memberships-destroy","summary":"Api Admin Staff Groups Memberships Destroy","description":"``DELETE /api/admin/staff-groups/<name>/memberships/<email>/`` — soft\nrevoke a single user's membership in the group. Idempotent.","tags":["platformApi"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/api/admin/staff-groups/{name}/memberships/list/":{"get":{"operationId":"api-admin-staff-groups-memberships-list-list","summary":"Api Admin Staff Groups Memberships List List","description":"``GET / POST /api/admin/staff-groups/<name>/memberships/list/``\n\nDedicated ``<Model>sListView`` per the ``BE_conventions/views.md``\npattern — sophisticated listing lives at the ``/list/`` sub-path\nwhile the parent ``/memberships/`` URL handles CRUD verbs only.\n\nGET — paginated list of memberships in the group, newest grants\nfirst. Always includes soft-revoked rows alongside active ones so\nthe FE detail page renders the full audit history; clients\ndistinguish via the ``revoked_at`` / ``revoked_by_email`` fields\non each row.\n\nPOST — follows the project-wide POST-for-filtering pattern\n(see ``views.md`` §\"POST-for-Filtering\"). Body is the filter\npayload; the handler delegates to GET so the response shape and\nenrichment behavior match exactly.","tags":["platformApi"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedStaffMembershipReadList"}}}}}},"post":{"operationId":"api-admin-staff-groups-memberships-list-create","summary":"Api Admin Staff Groups Memberships List Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffMembershipRead"}}}}}},"put":{"operationId":"api-admin-staff-groups-memberships-list-update","summary":"Api Admin Staff Groups Memberships List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["platformApi"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffMembershipRead"}}}}}},"patch":{"operationId":"api-admin-staff-groups-memberships-list-partial-update","summary":"Api Admin Staff Groups Memberships List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffMembershipRead"}}}}}}},"/api/byoc/deployment/":{"get":{"operationId":"api-byoc-deployment-retrieve","summary":"Api Byoc Deployment Retrieve","description":"Register / view the calling org's BYOC data plane (org member).\n\nPOST registers the data plane (or updates its URL). A service token is issued\non first registration, or when ``rotate_token`` is set — and returned\n**once**; only its hash is stored.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataPlaneDeployment"}}}},"404":{"description":"No data plane registered for the calling org.","content":{"application/json":{"schema":{"description":"Any type"}}}}}},"post":{"operationId":"api-byoc-deployment-create","summary":"Api Byoc Deployment Create","description":"Register / view the calling org's BYOC data plane (org member).\n\nPOST registers the data plane (or updates its URL). A service token is issued\non first registration, or when ``rotate_token`` is set — and returned\n**once**; only its hash is stored.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataPlaneRegistrationResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataPlaneRegistrationRequest"}}}}}},"/api/byoc/heartbeat/":{"post":{"operationId":"api-byoc-heartbeat-create","summary":"Api Byoc Heartbeat Create","description":"Data-plane heartbeat — authenticated by the deployment service token.\n\nAuthenticated by ``X-Respan-Deployment-Token`` (not a user JWT), so it has no\nJWT auth/permission classes; ``resolve_deployment_by_token`` is the gate.","tags":["platformApi"],"parameters":[{"name":"X-Respan-Deployment-Token","in":"header","description":"BYOC data-plane deployment service token (issued at registration; not a user JWT)","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatResponse"}}}},"401":{"description":"Invalid or missing deployment service token.","content":{"application/json":{"schema":{"description":"Any type"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatRequestRequest"}}}}}},"/api/foundation-models/{model_name}/":{"get":{"operationId":"api-foundation-models-retrieve-2","summary":"Api Foundation Models Retrieve 2","description":"Foundation model detail by model_name. Auth optional — API key OR JWT\nparsed if present, anonymous allowed. Serializer filters variants by org\nwhen authenticated. See ``FoundationModelView`` for why the optional mixin\nreplaces the bare JWT authenticator (it 401'd valid API-key callers).","tags":["platformApi"],"parameters":[{"name":"model_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMFoundationModelDetail"}}}}}}},"/api/foundation-models/{id}/":{"get":{"operationId":"api-foundation-models-retrieve","summary":"Api Foundation Models Retrieve","description":"Foundation model detail by PK. Auth optional — API key OR JWT parsed if\npresent, anonymous allowed. Serializer filters variants by org when\nauthenticated.\n\nUses ``OptionalJWTAndAPIKeyAuthenticationViewMixin`` (not bare\n``authentication_classes=[KeywordsAIJWTAuthentication]``): SimpleJWT raises\n``InvalidToken`` (401) on any present-but-non-JWT bearer — i.e. an API key —\nso the bare config 401'd legitimate API-key callers despite ``AllowAny``.\nThe mixin accepts API key OR JWT and treats unparseable creds as anonymous,\nand IP-rate-limits anonymous callers via ``TokenBucketThrottle``.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMFoundationModelDetail"}}}}}}},"/api/internal/span-behaviors/custom-heads/":{"get":{"operationId":"api-internal-span-behaviors-custom-heads-retrieve","summary":"Api Internal Span Behaviors Custom Heads Retrieve","description":"GET /api/internal/span-behaviors/custom-heads/ — live fitted heads for the\nstateless classifier replicas.\n\nReturns every custom behavior with a fitted head across all orgs (the\nclassifier serves all orgs from one registry), replacing the old direct\nPostgres poll. Service-token auth only — no customer JWT / API key.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_internal_span_behaviors_custom_heads_retrieve_Response_200"}}}}}}},"/api/license/":{"get":{"operationId":"api-license-retrieve","summary":"Api License Retrieve","description":"Return the resolved self-hosted license status.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_license_retrieve_Response_200"}}}}}}},"/api/limit-policies/":{"get":{"operationId":"api-limit-policies-list","summary":"Api Limit Policies List","description":"GET/POST /api/limit-policies/\n\nStandard CRUD. GET returns a PG-only paginated list (no live\ncounters); POST creates. Heavy live-state enrichment lives on\n``/api/limit-policies/list/``.","tags":["platformApi"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedLimitPolicyListList"}}}}}},"post":{"operationId":"api-limit-policies-create","summary":"Api Limit Policies Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitPolicyDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitPolicyCreateRequest"}}}}},"put":{"operationId":"api-limit-policies-update","summary":"Api Limit Policies Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitPolicyList"}}}}}},"patch":{"operationId":"api-limit-policies-partial-update","summary":"Api Limit Policies Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitPolicyList"}}}}}}},"/api/limit-policies/{id}/":{"get":{"operationId":"api-limit-policies-retrieve","summary":"Api Limit Policies Retrieve","description":"GET/PATCH/DELETE /api/limit-policies/<id>/\n\nDetail is PG-only. Live counters live on the ``/list/`` route\n(dashboard context). The detail view is for editing config.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitPolicyDetail"}}}}}},"post":{"operationId":"api-limit-policies-create-2","summary":"Api Limit Policies Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitPolicyDetail"}}}}}},"put":{"operationId":"api-limit-policies-update-2","summary":"Api Limit Policies Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitPolicyDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitPolicyUpdateRequest"}}}}},"delete":{"operationId":"api-limit-policies-destroy","summary":"Api Limit Policies Destroy","description":"GET/PATCH/DELETE /api/limit-policies/<id>/\n\nDetail is PG-only. Live counters live on the ``/list/`` route\n(dashboard context). The detail view is for editing config.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-limit-policies-partial-update-2","summary":"Api Limit Policies Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitPolicyDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedLimitPolicyUpdateRequest"}}}}}},"/api/limit-policies/list/":{"get":{"operationId":"api-limit-policies-list-list","summary":"Api Limit Policies List List","description":"Live dashboard list. One row per active LimitPolicy with the current-window counter read from Redis — the same value ``apply_limits`` evaluates decisions against. Source: PG ``LimitPolicy.objects.filter(is_active=True)`` + pipelined ``HGET counter`` over ``limit:fw:<meter_id>`` in one RTT.","tags":["platformApi"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedLimitPolicyStateRowList"}}}}}},"post":{"operationId":"api-limit-policies-list-filtered","summary":"Api Limit Policies List Filtered","description":"POST-for-filtering variant of the live list. Same shape as the GET response; the body carries the filter payload for cases where query params are too large / unwieldy.","tags":["platformApi"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedLimitPolicyStateRowList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitPolicyFilterRequestRequest"}}}}},"put":{"operationId":"api-limit-policies-list-update","summary":"Api Limit Policies List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitPolicyId"}}}}}},"patch":{"operationId":"api-limit-policies-list-partial-update","summary":"Api Limit Policies List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitPolicyId"}}}}}}},"/api/limit-policies/summary/":{"get":{"operationId":"api-limit-policies-summary-retrieve","summary":"Api Limit Policies Summary Retrieve","description":"Total LimitPolicy row count for the caller's org, honoring the same filter payload as ``/list/``.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitPolicySummaryResponse"}}}}}},"post":{"operationId":"api-limit-policies-summary-filtered","summary":"Api Limit Policies Summary Filtered","description":"POST-for-filtering variant of the summary count.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitPolicySummaryResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitPolicyFilterRequestRequest"}}}}},"put":{"operationId":"api-limit-policies-summary-update","summary":"Api Limit Policies Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_limit_policies_summary_update_Response_200"}}}}}},"patch":{"operationId":"api-limit-policies-summary-partial-update","summary":"Api Limit Policies Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_limit_policies_summary_partial_update_Response_200"}}}}}}},"/api/llm-presets/":{"get":{"operationId":"api-llm-presets-list","summary":"Api Llm Presets List","description":"GET/POST /api/llm-presets/ — List and create LLM presets.\n\nPresets store LLMConfigMixin-compatible request configuration in\nmodel_config (model, temperature, top_p, tools, tool_choice, etc.)\nplus template variable values. Reusable across Playground,\nExperiments, and Prompt testing.\n\nGET: Returns all presets for the current org.\nPOST: Creates a new preset.","tags":["platformApi"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedLLMPresetListList"}}}}}},"post":{"operationId":"api-llm-presets-create","summary":"Api Llm Presets Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMPresetCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMPresetCreateRequest"}}}}},"put":{"operationId":"api-llm-presets-update","summary":"Api Llm Presets Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMPresetList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMPresetListRequest"}}}}},"patch":{"operationId":"api-llm-presets-partial-update","summary":"Api Llm Presets Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMPresetList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedLLMPresetListRequest"}}}}}},"/api/llm-presets/{id}/":{"get":{"operationId":"api-llm-presets-retrieve","summary":"Api Llm Presets Retrieve","description":"GET/PATCH/DELETE /api/llm-presets/{id}/ — Retrieve, update, delete a preset.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMPresetDetail"}}}}}},"post":{"operationId":"api-llm-presets-create-2","summary":"Api Llm Presets Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMPresetDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMPresetDetailRequest"}}}}},"put":{"operationId":"api-llm-presets-update-2","summary":"Api Llm Presets Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMPresetUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMPresetUpdateRequest"}}}}},"delete":{"operationId":"api-llm-presets-destroy","summary":"Api Llm Presets Destroy","description":"GET/PATCH/DELETE /api/llm-presets/{id}/ — Retrieve, update, delete a preset.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-llm-presets-partial-update-2","summary":"Api Llm Presets Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMPresetUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedLLMPresetUpdateRequest"}}}}}},"/api/points-transactions/":{"post":{"operationId":"api-points-transactions-create","summary":"Api Points Transactions Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PointsTransactionCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PointsTransactionCreateRequest"}}}}},"put":{"operationId":"api-points-transactions-update","summary":"Api Points Transactions Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PointsTransactionCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PointsTransactionCreateRequest"}}}}},"patch":{"operationId":"api-points-transactions-partial-update","summary":"Api Points Transactions Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PointsTransactionCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPointsTransactionCreateRequest"}}}}}},"/api/points-transactions/{id}/":{"get":{"operationId":"api-points-transactions-retrieve","summary":"Api Points Transactions Retrieve","description":"GET /api/points-transactions/<id>/\nRetrieve a single Respan Points transaction by ID, scoped to the caller's\nown organization.\n\nOwn-org only — including superadmins (no ``get_superadmin_queryset``\noverride). A row belonging to another org is not visible (404), enforced by\n``ProjectScopedQuerysetMixin``.\n\nNOTE: CLICKHOUSE-ONLY — reads ``ch_billing_event`` points-class rows.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PointsTransactionDetail"}}}}}},"post":{"operationId":"api-points-transactions-create-2","summary":"Api Points Transactions Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PointsTransactionDetail"}}}}}},"put":{"operationId":"api-points-transactions-update-2","summary":"Api Points Transactions Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PointsTransactionDetail"}}}}}},"patch":{"operationId":"api-points-transactions-partial-update-2","summary":"Api Points Transactions Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PointsTransactionDetail"}}}}}}},"/api/points-transactions/list/":{"get":{"operationId":"api-points-transactions-list-list","summary":"Api Points Transactions List List","description":"GET /api/points-transactions/list/\nPOST /api/points-transactions/list/ (POST-for-Filtering)\nList Respan Points transactions for the caller's own organization.\n\nOwn-org only — including superadmins. Reads are scoped by\n``ProjectScopedQuerysetMixin`` to the request org's\n``unique_organization_id``; there is NO superadmin ``?org=`` cross-org\noverride (dropped to eliminate the cross-tenant leak / unknown-org bug\nclass). Cross-org points administration goes through the CREATE endpoint,\nwhich still resolves a target org via ``get_target_organization()``.\n\nNOTE: CLICKHOUSE-ONLY — reads ``ch_billing_event`` points-class rows.","tags":["platformApi"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPointsTransactionListList"}}}}}},"post":{"operationId":"api-points-transactions-list-create","summary":"Api Points Transactions List Create","description":"POST-for-Filtering: delegate to the standard GET (not a create).","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PointsTransactionList"}}}}}},"put":{"operationId":"api-points-transactions-list-update","summary":"Api Points Transactions List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PointsTransactionList"}}}}}},"patch":{"operationId":"api-points-transactions-list-partial-update","summary":"Api Points Transactions List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PointsTransactionList"}}}}}}},"/api/points-transactions/summary/":{"get":{"operationId":"api-points-transactions-summary-retrieve","summary":"Api Points Transactions Summary Retrieve","description":"GET /api/points-transactions/summary/\nGet the caller's own organization's Respan Points balance + USD book value\n(mirrors ``/api/credit-transactions/summary/``).\n\nOwn-org only — including superadmins. There is NO ``?org=`` cross-org\noverride (dropped to eliminate the cross-tenant leak / unknown-org bug\nclass). The org is resolved via ``ProjectScopedQuerysetMixin``'s\n``get_request_project_id()``; an unresolvable own org FAILS CLOSED to a\nzero-balance 200 (consistent with the list endpoint's empty result), NOT a\n404.\n\nResponse:\n    {\n      \"unique_organization_id\": \"...\",\n      \"points_balance\": 1200.0,\n      \"usd_book_value\": 12.0,\n      \"last_points_event_at\": \"...\"  # null when the org has no points\n    }","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_points_transactions_summary_retrieve_Response_200"}}}}}},"post":{"operationId":"api-points-transactions-summary-create","summary":"Api Points Transactions Summary Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_points_transactions_summary_create_Response_200"}}}}}},"put":{"operationId":"api-points-transactions-summary-update","summary":"Api Points Transactions Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_points_transactions_summary_update_Response_200"}}}}}},"patch":{"operationId":"api-points-transactions-summary-partial-update","summary":"Api Points Transactions Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_points_transactions_summary_partial_update_Response_200"}}}}}}},"/api/projects/list/":{"get":{"operationId":"api-projects-list-list","summary":"Api Projects List List","description":"GET/POST /api/projects/list/\n\nFlat, paginated list of ALL the caller's projects (orgs/teams) across every\nworkspace they belong to. The \"flatten, all\" counterpart to the nested,\nworkspace-scoped ``/api/workspaces/<id>/projects/list/``. POST is the\nfiltering/search verb (POST-for-Filtering convention; the ``/list/`` suffix\nmakes the permission stack treat POST as a read).\n\nJWT-only (no API-key auth): this is a user-centric switcher endpoint — \"my\nprojects across my memberships\" — like ``auth/teams/`` and\n``CompanyOrganizationsView``. It is NOT an org-scoped resource, so it must\nnot be reachable by an org-scoped API key (which would otherwise leak every\nmembership on the underlying user account).\n\nEach row carries its ``company_organization`` (workspace) so the FE can\ngroup a flat list by workspace from one call.","tags":["platformApi"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedProjectListList"}}}}}},"post":{"operationId":"api-projects-list-create","summary":"Api Projects List Create","description":"POST for filtering — delegate to GET (same paginated response).","tags":["platformApi"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedProjectListList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectListRequest"}}}}}},"/api/pulses/behaviors/":{"post":{"operationId":"api-pulses-behaviors-create","summary":"Api Pulses Behaviors Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_pulses_behaviors_create_Response_201"}}}}}}},"/api/pulses/behaviors/custom/":{"get":{"operationId":"api-pulses-behaviors-custom-list","summary":"Api Pulses Behaviors Custom List","description":"GET/POST /api/custom-behaviors/ — list and create few-shot custom behaviors.","tags":["platformApi"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCustomBehaviorListList"}}}}}},"post":{"operationId":"api-pulses-behaviors-custom-create","summary":"Api Pulses Behaviors Custom Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBehaviorCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBehaviorCreateRequest"}}}}},"put":{"operationId":"api-pulses-behaviors-custom-update","summary":"Api Pulses Behaviors Custom Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBehaviorList"}}}}}},"patch":{"operationId":"api-pulses-behaviors-custom-partial-update","summary":"Api Pulses Behaviors Custom Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBehaviorList"}}}}}}},"/api/pulses/behaviors/custom/{id}/":{"get":{"operationId":"api-pulses-behaviors-custom-retrieve","summary":"Api Pulses Behaviors Custom Retrieve","description":"GET/PATCH/DELETE /api/pulses/behaviors/custom/{id}/ — retrieve/update/delete.\n\nPATCH edits polarity/description metadata and/or persisted draft examples.\n``name`` is immutable (delete + recreate). PUT → 405.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBehaviorDetail"}}}}}},"delete":{"operationId":"api-pulses-behaviors-custom-destroy","summary":"Api Pulses Behaviors Custom Destroy","description":"GET/PATCH/DELETE /api/pulses/behaviors/custom/{id}/ — retrieve/update/delete.\n\nPATCH edits polarity/description metadata and/or persisted draft examples.\n``name`` is immutable (delete + recreate). PUT → 405.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-pulses-behaviors-custom-partial-update-2","summary":"Api Pulses Behaviors Custom Partial Update 2","description":"Update custom behavior metadata or persisted draft examples. Changing classifier inputs sets the behavior to DRAFT; PATCH does not enqueue training. Submit or retry fitting with POST /api/pulses/behaviors/custom/{id}/training/. `name` is immutable.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBehaviorUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCustomBehaviorUpdateRequest"}}}}}},"/api/pulses/behaviors/custom/{id}/augment/":{"post":{"operationId":"pulses-custom-behavior-augment","summary":"Pulses Custom Behavior Augment","description":"Force-regenerate LLM-augmented training examples and refit. Returns 202; fresh counts appear on the detail endpoint when the job finishes.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBehaviorAugmentResponse"}}}}}}},"/api/pulses/behaviors/custom/{id}/flag-span/":{"get":{"operationId":"pulses-custom-behavior-feedback-list","summary":"Pulses Custom Behavior Feedback List","description":"List a custom behavior's flagged-verdict feedback rows.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCustomBehaviorFeedbackList"}}}}}},"post":{"operationId":"pulses-custom-behavior-flag-span","summary":"Pulses Custom Behavior Flag Span","description":"Flag a custom behavior's span verdict as wrong. Body: {\"unique_id\": str}. Idempotent per (behavior, span): re-flagging returns the existing row.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBehaviorFeedbackCreateResponse"}}}}}},"delete":{"operationId":"pulses-custom-behavior-unflag-span","summary":"Pulses Custom Behavior Unflag Span","description":"Un-flag a span (mis-click reversal). Body/query: {\"unique_id\": str}. Removes the corrective example and refits. Idempotent.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_pulses_custom_behavior_unflag_span_Response_202"}}}},"404":{"description":"No response body","content":{"application/json":{"schema":{"description":"Any type"}}}}}}},"/api/pulses/behaviors/custom/{id}/training/":{"post":{"operationId":"pulses-custom-behavior-training","summary":"Pulses Custom Behavior Training","description":"Validate persisted examples and enqueue training. Returns 202 when the job is accepted.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBehaviorDetail"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBehaviorTrainingValidationErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomBehaviorTrainingConflictResponse"}}}}}}},"/api/pulses/behaviors/grouped/":{"post":{"operationId":"api-pulses-behaviors-grouped-create","summary":"Api Pulses Behaviors Grouped Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_pulses_behaviors_grouped_create_Response_201"}}}}}}},"/api/pulses/behaviors/logs/":{"post":{"operationId":"api-pulses-behaviors-logs-create","summary":"Api Pulses Behaviors Logs Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_pulses_behaviors_logs_create_Response_201"}}}}}}},"/api/pulses/behaviors/timeseries/":{"post":{"operationId":"api-pulses-behaviors-timeseries-create","summary":"Api Pulses Behaviors Timeseries Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_pulses_behaviors_timeseries_create_Response_201"}}}}}}},"/api/pulses/errors/":{"post":{"operationId":"api-pulses-errors-create","summary":"Api Pulses Errors Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_pulses_errors_create_Response_201"}}}}}}},"/api/pulses/errors/{fingerprint}/":{"post":{"operationId":"api-pulses-errors-create-2","summary":"Api Pulses Errors Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"fingerprint","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_pulses_errors_create_2_Response_201"}}}}}}},"/api/pulses/errors/{fingerprint}/resolution/":{"post":{"operationId":"api-pulses-errors-resolution-create","summary":"Api Pulses Errors Resolution Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"fingerprint","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_pulses_errors_resolution_create_Response_201"}}}}}}},"/api/pulses/errors/grouped/":{"post":{"operationId":"api-pulses-errors-grouped-create","summary":"Api Pulses Errors Grouped Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_pulses_errors_grouped_create_Response_201"}}}}}}},"/api/pulses/errors/timeseries/":{"post":{"operationId":"api-pulses-errors-timeseries-create","summary":"Api Pulses Errors Timeseries Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_pulses_errors_timeseries_create_Response_201"}}}}}}},"/api/response-format-presets/":{"get":{"operationId":"api-response-format-presets-list","summary":"Api Response Format Presets List","description":"GET/POST /api/response-format-presets/ — list and create presets.\n\nResponse-format presets intentionally form a separate resource from\n``LLMPreset``. LLM presets snapshot the complete model setup, including\nmodel, tools, and variable values; storing schemas there would couple a\nreusable response format to unrelated execution settings and risk applying\nthose settings when a schema is loaded.\n\nThis endpoint instead provides a project-shared schema library. Loading a\npreset only returns content for the client to copy into its draft editor;\nit does not mutate a prompt or create a live link to the preset. Clients\ncan POST an edited draft as a new preset, leaving the source unchanged.","tags":["platformApi"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseFormatPresetListList"}}}}}},"post":{"operationId":"api-response-format-presets-create","summary":"Api Response Format Presets Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseFormatPresetCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseFormatPresetCreateRequest"}}}}}},"/api/response-format-presets/{id}/":{"get":{"operationId":"api-response-format-presets-retrieve","summary":"Api Response Format Presets Retrieve","description":"GET/PATCH/DELETE /api/response-format-presets/{id}/ — preset CRUD.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseFormatPresetDetail"}}}}}},"delete":{"operationId":"api-response-format-presets-destroy","summary":"Api Response Format Presets Destroy","description":"GET/PATCH/DELETE /api/response-format-presets/{id}/ — preset CRUD.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-response-format-presets-partial-update","summary":"Api Response Format Presets Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseFormatPresetUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedResponseFormatPresetUpdateRequest"}}}}}},"/api/tag-assignments/{feature_type}/objects/{object_id}/list/":{"get":{"operationId":"api-tag-assignments-objects-list-list","summary":"Api Tag Assignments Objects List List","description":"List tag objects assigned to a specific feature.\n\nEndpoints:\n    GET /api/tag-assignments/{feature_type}/objects/{object_id}/list/\n\nInput (GET):\n    - feature_type (path): One of ResourceTypeChoices (e.g. \"monitors\", \"evaluators\", \"prompts\", \"logs\", \"datasets\", \"experiments\", \"testsets\", \"models\")\n    - object_id (path): ID of the feature object to list tags for\n\nReturns (200 OK):\n    Paginated list of GenericTag-like rows for the specified feature object, newest first.\n\nExample Request:\n    GET /api/tag-assignments/monitors/objects/monitor_123/list/\n\nExample Response:\n    {\n        \"count\": 1,\n        \"next\": null,\n        \"previous\": null,\n        \"results\": [\n            {\n                \"generic_tag_id\": \"3ac3c0f0-3b5b-4b3f-8d9b-1e2f3a4b5c6d\",\n                \"generic_tag_name\": \"Priority\",\n                \"generic_tag_color\": \"#4F46E5\",\n                \"generic_tag_created_at\": \"2025-09-11T09:43:55.858321Z\",\n                \"generic_tag_updated_at\": \"2025-09-11T09:43:55.858331Z\",\n                \"generic_tag_organization_id\": 2\n            }\n        ]\n    }","tags":["platformApi"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedTagManagerList"}}}}}},"post":{"operationId":"api-tag-assignments-objects-list-create","summary":"Api Tag Assignments Objects List Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagManager"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagManagerRequest"}}}}},"put":{"operationId":"api-tag-assignments-objects-list-update","summary":"Api Tag Assignments Objects List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["platformApi"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagManager"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagManagerRequest"}}}}},"patch":{"operationId":"api-tag-assignments-objects-list-partial-update","summary":"Api Tag Assignments Objects List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagManager"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedTagManagerRequest"}}}}}},"/api/tag-assignments/{feature_type}/tags/{tag_id}/objects/{object_id}/":{"post":{"operationId":"api-tag-assignments-tags-objects-create","summary":"Api Tag Assignments Tags Objects Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagManager"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagManagerRequest"}}}}},"put":{"operationId":"api-tag-assignments-tags-objects-update","summary":"Api Tag Assignments Tags Objects Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["platformApi"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagManager"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagManagerRequest"}}}}},"delete":{"operationId":"api-tag-assignments-tags-objects-destroy","summary":"Api Tag Assignments Tags Objects Destroy","description":"Create or delete a tag assignment.\n\nEndpoints:\n    POST /api/tag-assignments/{feature_type}/tags/{tag_id}/objects/{object_id}/\n    DELETE /api/tag-assignments/{feature_type}/tags/{tag_id}/objects/{object_id}/\n\nInput (POST/DELETE):\n    - feature_type (path): One of ResourceTypeChoices\n    - tag_id (path): GenericTag.id to assign/remove\n    - object_id (path): Target feature object id\n    - Body (POST): {} (all params from path; organization is auto-set)\n\nReturns:\n    - POST: 201 Created with TagManager object\n    - DELETE: 204 No Content on success, 404 if assignment not found","tags":["platformApi"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-tag-assignments-tags-objects-partial-update","summary":"Api Tag Assignments Tags Objects Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagManager"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedTagManagerRequest"}}}}}},"/api/tags/":{"get":{"operationId":"api-tags-list","summary":"Api Tags List","description":"List all generic tags for the organization, or create a new generic tag.\n\nEndpoints:\n    GET /api/tags/\n    POST /api/tags/\n\nInput (GET):\n    - None (uses authenticated user's organization)\n\nInput (POST):\n    - name (string, required)\n    - color (string, optional; hex code), defaults to \"#000000\"\n\nExample Request (POST):\n    {\n        \"name\": \"Priority\",\n        \"color\": \"#4F46E5\"\n    }\n\nExample Response (201 Created):\n    {\n        \"id\": \"3ac3c0f0-3b5b-4b3f-8d9b-1e2f3a4b5c6d\",\n        \"name\": \"Priority\",\n        \"color\": \"#4F46E5\",\n        \"description\": \"\",\n        \"organization\": 2,\n        \"created_at\": \"2025-09-11T09:43:55.858321Z\",\n        \"updated_at\": \"2025-09-11T09:43:55.858331Z\",\n        \"usage\": []\n    }","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GenericTag"}}}}}}},"post":{"operationId":"api-tags-create","summary":"Api Tags Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTag"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTagRequest"}}}}},"put":{"operationId":"api-tags-update","summary":"Api Tags Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTag"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTagRequest"}}}}},"patch":{"operationId":"api-tags-partial-update","summary":"Api Tags Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTag"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedGenericTagRequest"}}}}}},"/api/tags/{id}/":{"get":{"operationId":"api-tags-retrieve","summary":"Api Tags Retrieve","description":"Retrieve, update, or delete a specific generic tag.\n\nEndpoints:\n    GET /api/tags/{id}/\n    PATCH /api/tags/{id}/\n    DELETE /api/tags/{id}/\n\nInput (PATCH):\n    - name (string, optional)\n    - color (string, optional)\n\nExample Response (GET):\n    {\n        \"id\": \"3ac3c0f0-3b5b-4b3f-8d9b-1e2f3a4b5c6d\",\n        \"name\": \"Priority\",\n        \"color\": \"#4F46E5\",\n        \"organization\": 2,\n        \"created_at\": \"2025-09-11T09:43:55.858321Z\",\n        \"updated_at\": \"2025-09-11T09:43:55.858331Z\"\n    }","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTag"}}}}}},"post":{"operationId":"api-tags-create-2","summary":"Api Tags Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTag"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTagRequest"}}}}},"put":{"operationId":"api-tags-update-2","summary":"Api Tags Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTag"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTagRequest"}}}}},"delete":{"operationId":"api-tags-destroy","summary":"Api Tags Destroy","description":"Retrieve, update, or delete a specific generic tag.\n\nEndpoints:\n    GET /api/tags/{id}/\n    PATCH /api/tags/{id}/\n    DELETE /api/tags/{id}/\n\nInput (PATCH):\n    - name (string, optional)\n    - color (string, optional)\n\nExample Response (GET):\n    {\n        \"id\": \"3ac3c0f0-3b5b-4b3f-8d9b-1e2f3a4b5c6d\",\n        \"name\": \"Priority\",\n        \"color\": \"#4F46E5\",\n        \"organization\": 2,\n        \"created_at\": \"2025-09-11T09:43:55.858321Z\",\n        \"updated_at\": \"2025-09-11T09:43:55.858331Z\"\n    }","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-tags-partial-update-2","summary":"Api Tags Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericTag"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedGenericTagRequest"}}}}}},"/api/usage-breakdowns/list/":{"get":{"operationId":"api-usage-breakdowns-list-retrieve","summary":"Api Usage Breakdowns List Retrieve","description":"GET /api/usage-breakdowns/list/\n\nUsage cost and request breakdown by dimension. The breakdown_by param\nselects the grouping dimension (provider_id, model, deployment_name,\nor feature). Defaults to current billing period.\n\nWhen breakdown_by=feature, returns logging vs proxy cost split.\nAll other values query ClickHouse aggregations.\n\nQuery params: breakdown_by, sort_by, start_time, end_time, org (superadmin).\nResponse: { breakdown_by, breakdown_items, summary, billing_periods, start_time, end_time }","tags":["platformApi"],"parameters":[{"name":"breakdown_by","in":"query","description":"* `provider_id` - Provider\n* `model` - Model\n* `deployment_name` - Deployment\n* `feature` - Feature","required":false,"schema":{"$ref":"#/components/schemas/ApiUsageBreakdownsListGetParametersBreakdownBy"}},{"name":"end_time","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"sort_by","in":"query","description":"* `number_of_requests` - Number of Requests\n* `total_cost` - Total Cost","required":false,"schema":{"$ref":"#/components/schemas/ApiUsageBreakdownsListGetParametersSortBy"}},{"name":"start_time","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageBreakdownResponse"}}}}}},"post":{"operationId":"api-usage-breakdowns-list-create","summary":"Api Usage Breakdowns List Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_usage_breakdowns_list_create_Response_200"}}}}}},"put":{"operationId":"api-usage-breakdowns-list-update","summary":"Api Usage Breakdowns List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_usage_breakdowns_list_update_Response_200"}}}}}},"patch":{"operationId":"api-usage-breakdowns-list-partial-update","summary":"Api Usage Breakdowns List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_usage_breakdowns_list_partial_update_Response_200"}}}}}}},"/api/validate-api-key/":{"post":{"operationId":"api-validate-api-key-create","summary":"Api Validate Api Key Create","description":"Validate API credentials. Supports both JWT and API key auth.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_validate_api_key_create_Response_200"}}}}}}},"/api/workflow-runs/":{"post":{"operationId":"api-workflow-runs-create","summary":"Api Workflow Runs Create","description":"Execute a workflow manually. Returns the completed result or a paused run id for workflows with async (human) steps.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunExecutionResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunCreateRequest"}}}}},"put":{"operationId":"api-workflow-runs-update","summary":"Api Workflow Runs Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_workflow_runs_update_Response_200"}}}}}},"patch":{"operationId":"api-workflow-runs-partial-update","summary":"Api Workflow Runs Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_workflow_runs_partial_update_Response_200"}}}}}}},"/api/workflow-runs/{run_id}/":{"get":{"operationId":"api-workflow-runs-retrieve","summary":"Api Workflow Runs Retrieve","description":"WorkflowRun resource (retrieve, update, delete).\n\nGET    /api/workflow-runs/{run_id}/  — retrieve run details\nPATCH  /api/workflow-runs/{run_id}/  — resume or cancel a paused run\nDELETE /api/workflow-runs/{run_id}/  — delete run","tags":["platformApi"],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunRead"}}}}}},"delete":{"operationId":"api-workflow-runs-destroy","summary":"Api Workflow Runs Destroy","description":"WorkflowRun resource (retrieve, update, delete).\n\nGET    /api/workflow-runs/{run_id}/  — retrieve run details\nPATCH  /api/workflow-runs/{run_id}/  — resume or cancel a paused run\nDELETE /api/workflow-runs/{run_id}/  — delete run","tags":["platformApi"],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-workflow-runs-partial-update-2","summary":"Api Workflow Runs Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunRead"}}}}}}},"/api/workflow-runs/bulk/":{"post":{"operationId":"api-workflow-runs-bulk-create","summary":"Api Workflow Runs Bulk Create","description":"Bulk dispatch workflow runs from log references. Returns immediately with dispatch counts (async).","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunBulkResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunBulkCreateRequest"}}}}},"put":{"operationId":"api-workflow-runs-bulk-update","summary":"Api Workflow Runs Bulk Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_workflow_runs_bulk_update_Response_200"}}}}}},"patch":{"operationId":"api-workflow-runs-bulk-partial-update","summary":"Api Workflow Runs Bulk Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["platformApi"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform API_api_workflow_runs_bulk_partial_update_Response_200"}}}}}}},"/api/workspaces/{unique_company_organization_id}/projects/list/":{"get":{"operationId":"api-workspaces-projects-list-list","summary":"Api Workspaces Projects List List","description":"GET/POST /api/workspaces/<id>/projects/list/\n\nNested, workspace-scoped list of projects (orgs/teams) under one workspace —\nthe \"nested, scoped\" counterpart to the flat ``/api/projects/list/``. The\n``/list/`` suffix marks this as the pure list+search endpoint (POST filters,\nit does not create). Access is scoped via the same membership rule as the\nrest of the suite (:func:`accessible_workspaces_q`): a regular user can only\nenumerate projects of a workspace they can access (404 otherwise, so a\nworkspace's existence is not disclosed).\n\nJWT-only (no API-key auth): scoping is by the authenticated *user's*\nmembership, so an org-scoped API key must not reach it.","tags":["platformApi"],"parameters":[{"name":"unique_company_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedProjectListList"}}}}}},"post":{"operationId":"api-workspaces-projects-list-create","summary":"Api Workspaces Projects List Create","description":"POST for filtering — delegate to GET (same paginated response).","tags":["platformApi"],"parameters":[{"name":"unique_company_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedProjectListList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectListRequest"}}}}}},"/api/workspaces/list/":{"get":{"operationId":"api-workspaces-list-list","summary":"Api Workspaces List List","description":"GET/POST /api/workspaces/list/\n\nPaginated, searchable list of the caller's workspaces (company orgs).\n\"workspace\" is the product term for ``CompanyOrganization``. POST is the\nfiltering/search verb (POST-for-Filtering convention; the ``/list/`` suffix\nmakes the permission stack treat POST as a read — no extra opt-in needed).\n\nJWT-only (no API-key auth): user-centric switcher endpoint (\"my\nworkspaces\"), like ``CompanyOrganizationsView``. An org-scoped API key must\nnot enumerate every workspace on the underlying user account.","tags":["platformApi"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedWorkspaceListList"}}}}}},"post":{"operationId":"api-workspaces-list-create","summary":"Api Workspaces List Create","description":"POST for filtering — delegate to GET (same paginated response).","tags":["platformApi"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedWorkspaceListList"}}}}}}},"/api/activities/{feature_type}/list/":{"get":{"operationId":"api-activities-feature-list","summary":"Api Activities Feature List","description":"Cross-object activity list for a feature_type.","tags":["activities"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedActivityListList"}}}}}}},"/api/activities/{feature_type}/objects/{object_id}/":{"post":{"operationId":"api-activities-objects-create","summary":"Api Activities Objects Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["activities"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityCreateRequest"}}}}}},"/api/activities/{feature_type}/objects/{object_id}/{id}/":{"get":{"operationId":"api-activities-objects-retrieve","summary":"Api Activities Objects Retrieve","description":"Retrieve, update, or delete a single activity.\n\nGET    /api/activities/<feature_type>/objects/<object_id>/<pk>/\nPATCH  /api/activities/<feature_type>/objects/<object_id>/<pk>/ — Edit comment message.\nDELETE /api/activities/<feature_type>/objects/<object_id>/<pk>/ — Delete comment.\n\nOnly comment activities can be modified or deleted.","tags":["activities"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Activities_api_activities_objects_retrieve_Response_200"}}}}}},"post":{"operationId":"api-activities-objects-create-2","summary":"Api Activities Objects Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["activities"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Activities_api_activities_objects_create_2_Response_200"}}}}}},"put":{"operationId":"api-activities-objects-update","summary":"Api Activities Objects Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["activities"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityUpdateRequest"}}}}},"delete":{"operationId":"api-activities-objects-destroy","summary":"Api Activities Objects Destroy","description":"Retrieve, update, or delete a single activity.\n\nGET    /api/activities/<feature_type>/objects/<object_id>/<pk>/\nPATCH  /api/activities/<feature_type>/objects/<object_id>/<pk>/ — Edit comment message.\nDELETE /api/activities/<feature_type>/objects/<object_id>/<pk>/ — Delete comment.\n\nOnly comment activities can be modified or deleted.","tags":["activities"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-activities-objects-partial-update","summary":"Api Activities Objects Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["activities"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedActivityUpdateRequest"}}}}}},"/api/activities/{feature_type}/objects/{object_id}/list/":{"get":{"operationId":"api-activities-objects-list-retrieve","summary":"Api Activities Objects List Retrieve","description":"List activities for a resource.\n\nGET  /api/activities/<feature_type>/objects/<object_id>/list/\nPOST /api/activities/<feature_type>/objects/<object_id>/list/ — POST-for-filtering.","tags":["activities"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Activities_api_activities_objects_list_retrieve_Response_200"}}}}}},"post":{"operationId":"api-activities-list-filtered","summary":"Api Activities List Filtered","description":"List activities with complex filtering via POST body.","tags":["activities"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedActivityListList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityFilterRequestRequest"}}}}}},"/api/activities/{feature_type}/objects/{object_id}/summary/":{"get":{"operationId":"api-activities-objects-summary-retrieve","summary":"Api Activities Objects Summary Retrieve","description":"Count activities for a resource.\n\nGET /api/activities/<feature_type>/objects/<object_id>/summary/\nReturns: { total_count }","tags":["activities"],"parameters":[{"name":"feature_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"object_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivitySummaryResponse"}}}}}}},"/api/activities/list/":{"get":{"operationId":"api-activities-org-list","summary":"Api Activities Org List","description":"Org-wide activity stream across all feature types the caller can read, newest first. Optional ?feature_type= restricts to one kind.","tags":["activities"],"parameters":[{"name":"feature_type","in":"query","description":"Restrict the stream to one resource kind. Unknown values return 400; a kind the caller cannot read returns 403.","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedActivityListList"}}}}}}},"/api/activities/object-interactions/":{"get":{"operationId":"api-activities-object-interactions","summary":"Api Activities Object Interactions","description":"The requesting user's object-interaction aggregates (sortable, paged). One row per object the caller has opened, with interaction_count, last_interaction_at, and the display name. Dashboard (JWT) identity only — API-key requests receive an empty page. Also accepts the standard dashboard time-window params (start_time / end_time / date / summary_type / timezone_offset; default last 30 days).","tags":["activities"],"parameters":[{"name":"date","in":"query","description":"Anchor date (ISO 8601) for the summary_type window.","required":false,"schema":{"type":"string","format":"date"}},{"name":"end_time","in":"query","description":"Window end (ISO 8601).","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"feature_type","in":"query","description":"Restrict to one resource kind (e.g. datasets, prompts). Omitted returns a mixed cross-feature list. Unknown values return 400.","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"sort_by","in":"query","description":"Sort key, '-'-prefixed for descending. Default is recency (-last_interaction_at); -interaction_count serves a most-visited view. Unknown values fall back to the default.","required":false,"schema":{"$ref":"#/components/schemas/ApiActivitiesObjectInteractionsGetParametersSortBy"}},{"name":"start_time","in":"query","description":"Window start (ISO 8601). Overrides the summary_type/date window.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"summary_type","in":"query","description":"Named window preset resolved relative to `date` (default: all).","required":false,"schema":{"type":"string"}},{"name":"timezone_offset","in":"query","description":"Hours of UTC-minus-local offset used to resolve day boundaries.","required":false,"schema":{"type":"number","format":"double"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedObjectInteractionList"}}}}}},"post":{"operationId":"api-activities-object-interactions-filtered","summary":"Api Activities Object Interactions Filtered","description":"List object-interaction aggregates with complex filtering via POST body (POST-for-filtering — NOT a create). Scalar params stay in the query string exactly as on GET; the response is identical to the equivalent GET.","tags":["activities"],"parameters":[{"name":"date","in":"query","description":"Anchor date (ISO 8601) for the summary_type window.","required":false,"schema":{"type":"string","format":"date"}},{"name":"end_time","in":"query","description":"Window end (ISO 8601).","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"feature_type","in":"query","description":"Restrict to one resource kind (e.g. datasets, prompts). Omitted returns a mixed cross-feature list. Unknown values return 400.","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"sort_by","in":"query","description":"Sort key, '-'-prefixed for descending. Default is recency (-last_interaction_at); -interaction_count serves a most-visited view. Unknown values fall back to the default.","required":false,"schema":{"$ref":"#/components/schemas/ApiActivitiesObjectInteractionsPostParametersSortBy"}},{"name":"start_time","in":"query","description":"Window start (ISO 8601). Overrides the summary_type/date window.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"summary_type","in":"query","description":"Named window preset resolved relative to `date` (default: all).","required":false,"schema":{"type":"string"}},{"name":"timezone_offset","in":"query","description":"Hours of UTC-minus-local offset used to resolve day boundaries.","required":false,"schema":{"type":"number","format":"double"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedObjectInteractionList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityFilterRequestRequest"}}}}}},"/api/annotation-items/":{"get":{"operationId":"api-annotation-items-list","summary":"Api Annotation Items List","description":"GET /api/annotation-items/\n\nSimple listing for basic CRUD operations.\nReturns lightweight list of items without pagination.\n\nPermission: Requires annotation_items:read (admin only)\n\nUse cases:\n- Quick item lookups\n- Basic CRUD list view (C from CRUD done via /bulk/)\n- For paginated + filtered view, use /list/\n- For annotation work, use /queue/","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AnnotationItemList"}}}}}}},"post":{"operationId":"api-annotation-items-create","summary":"Api Annotation Items Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationItemList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationItemListRequest"}}}}},"put":{"operationId":"api-annotation-items-update","summary":"Api Annotation Items Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationItemList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationItemListRequest"}}}}},"patch":{"operationId":"api-annotation-items-partial-update","summary":"Api Annotation Items Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationItemList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedAnnotationItemListRequest"}}}}}},"/api/annotation-items/{id}/":{"get":{"operationId":"api-annotation-items-retrieve","summary":"Api Annotation Items Retrieve","description":"GET/PATCH/DELETE /api/annotation-items/{id}/\n\nRetrieve, update, or delete a specific annotation item (RUD from CRUD).\n\nPermission (via ObjectOwnershipMixin config in SuperAdminMixin):\n- Worker (assignee): Can GET/PATCH their OWN assigned items (status only)\n- Org Admin: Can GET/PATCH/DELETE any item in org (can re-assign)\n- Superadmin: Can access all items across all orgs\n\nGET: Returns full item details with all fields\nPATCH:\n  - Worker: Update status, completed_at\n  - Admin: Also update assignee_id (re-assign)\nDELETE: Delete item (admin only via ownership check)","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationItemDetail"}}}}}},"post":{"operationId":"api-annotation-items-create-2","summary":"Api Annotation Items Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationItemDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationItemDetailRequest"}}}}},"put":{"operationId":"api-annotation-items-update-2","summary":"Api Annotation Items Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationItemDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationItemDetailRequest"}}}}},"delete":{"operationId":"api-annotation-items-destroy","summary":"Api Annotation Items Destroy","description":"GET/PATCH/DELETE /api/annotation-items/{id}/\n\nRetrieve, update, or delete a specific annotation item (RUD from CRUD).\n\nPermission (via ObjectOwnershipMixin config in SuperAdminMixin):\n- Worker (assignee): Can GET/PATCH their OWN assigned items (status only)\n- Org Admin: Can GET/PATCH/DELETE any item in org (can re-assign)\n- Superadmin: Can access all items across all orgs\n\nGET: Returns full item details with all fields\nPATCH:\n  - Worker: Update status, completed_at\n  - Admin: Also update assignee_id (re-assign)\nDELETE: Delete item (admin only via ownership check)","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-annotation-items-partial-update-2","summary":"Api Annotation Items Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluations_api_annotation_items_partial_update_2_Response_200"}}}}}}},"/api/annotation-items/bulk/":{"post":{"operationId":"api-annotation-items-bulk-create","summary":"Api Annotation Items Bulk Create","description":"POST /api/annotation-items/bulk/\n\nBulk create annotation items (assign logs to workers).\nSupports both \"by-reference\" and \"by-direct-payload\" methods.\n\nPermission: Requires annotation_items:create (admin only)\n\nEvents: `annotation_item_assigned` dispatched via signals (see annotation/signals.py)\n\nRequest Body:\n{\n  \"assignee_id\": \"user_123\",\n  \"source_items\": [\n    {\"source_type\": \"logs\", \"log_id\": \"log_1\"},\n    {\"source_type\": \"logs\", \"log_id\": \"log_2\", \"full_object\": {...}}\n  ]\n}\n\nResponse (201) — canonical BulkOperationResponse envelope with the\npre-foundation custom fields (`created_count`, `items`) carried as\nextras via Pydantic ``extra=\"allow\"``:\n{\n  \"success_count\": 2,\n  \"error_count\": 0,\n  \"errors\": [],\n  \"created_count\": 2,\n  \"items\": [...]\n}","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluations_api_annotation_items_bulk_create_Response_200"}}}}}}},"/api/annotation-items/list/":{"get":{"operationId":"api-annotation-items-list-list","summary":"Api Annotation Items List List","description":"GET/POST /api/annotation-items/list/\n\nAdmin/Manager view: Team progress tracking with pagination and filtering.\nSophisticated listing endpoint for management dashboard (L from CRUDL).\n\nPermission: Requires annotation_items:read (admin/manager only)\n\nFeatures:\n- Pagination (cursor-based)\n- Filtering (source_type, status, etc.)\n- Accepts filters via URL params OR POST body\n\nUse cases:\n- Management dashboard\n- Track team progress\n- Filter by status, source_type\n- View who's assigned to what\n\nQuery Parameters (GET):\n- page, page_size: Pagination\n- source_type: Filter by source type\n- status: Filter by status\n\nRequest Body (POST):\n{\n  \"filters\": {\n    \"source_type\": {\"operator\": \"in\", \"value\": [\"logs\", \"threads\"]},\n    \"status\": {\"operator\": \"\", \"value\": \"pending\"}\n  }\n}\n\nResponse:\n{\n  \"count\": 150,\n  \"next\": \"...\",\n  \"previous\": \"...\",\n  \"results\": [\n    {\n      \"id\": \"item_1\",\n      \"assignee\": {\"email\": \"worker@co.com\"},\n      \"status\": \"pending\",\n      \"source_type\": \"logs\",\n      \"created_at\": \"...\"\n    }\n  ],\n  \"filters_data\": {...}\n}","tags":["evaluations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAnnotationItemListList"}}}}}},"post":{"operationId":"api-annotation-items-list-create","summary":"Api Annotation Items List Create","description":"Handle POST requests (for filtering) by delegating to GET.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationItemList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationItemListRequest"}}}}},"put":{"operationId":"api-annotation-items-list-update","summary":"Api Annotation Items List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationItemList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationItemListRequest"}}}}},"patch":{"operationId":"api-annotation-items-list-partial-update","summary":"Api Annotation Items List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationItemList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedAnnotationItemListRequest"}}}}}},"/api/annotation-items/queue/":{"get":{"operationId":"api-annotation-items-queue-list","summary":"Api Annotation Items Queue List","description":"GET/POST /api/annotation-items/queue/\n\nWorker queue view: MY assigned items for focused annotation work.\nUsed by everyone (including admins) when doing annotation work.\n\nPermission: No permission required (self-filtering to assignee=current_user)\n\nFeatures:\n- Prefetch FULL objects for instant navigation\n- Privacy: Only see OWN scores\n- Optional filtering (source_type, status)\n- Pagination support (page, page_size query params)\n\nUse cases:\n- Workers see their work queue\n- Admins see their queue when annotating\n- Focused view - only MY items\n\nQuery Parameters (GET):\n- page: Page number (default: 1)\n- page_size: Items per page (default: 100, max: 1000)\n- source_type: Filter by source type (optional)\n- status: Filter by status (optional)\n\nRequest Body (POST):\n{\n  \"filters\": {\n    \"source_type\": {\"operator\": \"\", \"value\": \"logs\"},\n    \"status\": {\"operator\": \"\", \"value\": \"pending\"}\n  }\n}\n\nResponse (paginated):\n{\n  \"count\": 5,\n  \"next\": \"/api/annotation-items/queue/?page=2\",\n  \"previous\": null,\n  \"results\": [\n    {\n      \"id\": \"item_1\",\n      \"status\": \"pending\",\n      \"full_object\": {...},\n      \"scores\": [...]\n    }\n  ]\n}","tags":["evaluations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAnnotationItemQueueList"}}}}}},"post":{"operationId":"api-annotation-items-queue-create","summary":"Api Annotation Items Queue Create","description":"Handle POST requests (for filtering) by delegating to GET.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationItemQueue"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationItemQueueRequest"}}}}}},"/api/annotation-items/queue/list/":{"get":{"operationId":"api-annotation-items-queue-list-list","summary":"Api Annotation Items Queue List List","description":"GET/POST /api/annotation-items/queue/list/\n\nWorker queue list view with filter options metadata.\nSame as /queue/ but includes filters_data in response for FE filter UI.\n\nPermission: No permission required (self-filtering to assignee=current_user)\n\nFeatures:\n- Everything from /queue/ (pagination, filtering, enrichment)\n- Plus: filters_data in response (FilterOptionsMixin)\n- Accepts filters via URL params OR POST body\n\nResponse (paginated):\n{\n  \"count\": 5,\n  \"next\": \"/api/annotation-items/queue/list/?page=2\",\n  \"previous\": null,\n  \"results\": [...],\n  \"filters_data\": {...}\n}","tags":["evaluations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAnnotationItemQueueList"}}}}}},"post":{"operationId":"api-annotation-items-queue-list-create","summary":"Api Annotation Items Queue List Create","description":"Handle POST requests (for filtering) by delegating to GET.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationItemQueue"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationItemQueueRequest"}}}}}},"/api/annotation-items/queue/summary/":{"get":{"operationId":"api-annotation-items-queue-summary-retrieve","summary":"Api Annotation Items Queue Summary Retrieve","description":"Get summary statistics for current user's queue only.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluations_api_annotation_items_queue_summary_retrieve_Response_200"}}}}}}},"/api/annotation-items/summary/":{"get":{"operationId":"api-annotation-items-summary-retrieve","summary":"Api Annotation Items Summary Retrieve","description":"Get summary statistics for annotation items.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluations_api_annotation_items_summary_retrieve_Response_200"}}}}}},"post":{"operationId":"api-annotation-items-summary-create","summary":"Api Annotation Items Summary Create","description":"POST for filtering - delegate to GET","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluations_api_annotation_items_summary_create_Response_200"}}}}}},"put":{"operationId":"api-annotation-items-summary-update","summary":"Api Annotation Items Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluations_api_annotation_items_summary_update_Response_200"}}}}}},"patch":{"operationId":"api-annotation-items-summary-partial-update","summary":"Api Annotation Items Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluations_api_annotation_items_summary_partial_update_Response_200"}}}}}}},"/api/evaluators/{evaluator_id}/versions/list/":{"get":{"operationId":"api-evaluators-versions-list-list","summary":"Api Evaluators Versions List List","description":"List all versions or create new version (commit).\n\nGET /api/evaluators/{id}/versions/ - List all versions\nPOST /api/evaluators/{id}/versions/ - Commit (create new version)\n\nAccess control via NestedResourceMixin: org identity derived from parent evaluator.\nSuperadmin: Can LIST all versions across all organizations via JWT.\nRegular users: Can only access versions in their organization.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicEvaluatorVersionListList"}}}}}},"post":{"operationId":"api-evaluators-versions-list-create","summary":"Api Evaluators Versions List Create","description":"Create a new version (commit). Org derived from parent evaluator.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCreateVersion"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCreateVersionRequest"}}}}},"put":{"operationId":"api-evaluators-versions-list-update","summary":"Api Evaluators Versions List Update","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionListRequest"}}}}},"patch":{"operationId":"api-evaluators-versions-list-partial-update","summary":"Api Evaluators Versions List Partial Update","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicEvaluatorVersionListRequest"}}}}}},"/clickhouse/dataset-tasks/{task_tracker_id}/eval-result-aggs":{"get":{"operationId":"clickhouse-dataset-tasks-eval-result-aggs-list","summary":"Clickhouse Dataset Tasks Eval Result Aggs List","description":"View mixin that handles both JWT and API Key authentication.\n\nInherits from JWTAuthUtils:\n- is_jwt_auth(request): Post-auth check (reliable, uses DRF's successful_authenticator)\n- is_jwt_token_format(request): Pre-auth heuristic (used here to route authenticators)\n\nThis mixin uses is_jwt_token_format() (pre-auth) in get_authenticators() and get_permissions()\nbecause those methods run BEFORE authentication completes. For post-auth checks,\nuse is_jwt_auth() instead.","tags":["evaluations"],"parameters":[{"name":"task_tracker_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicDatasetTaskTrackerRunEvalListList"}}}}}},"post":{"operationId":"clickhouse-dataset-tasks-eval-result-aggs-create","summary":"Clickhouse Dataset Tasks Eval Result Aggs Create","description":"View mixin that handles both JWT and API Key authentication.\n\nInherits from JWTAuthUtils:\n- is_jwt_auth(request): Post-auth check (reliable, uses DRF's successful_authenticator)\n- is_jwt_token_format(request): Pre-auth heuristic (used here to route authenticators)\n\nThis mixin uses is_jwt_token_format() (pre-auth) in get_authenticators() and get_permissions()\nbecause those methods run BEFORE authentication completes. For post-auth checks,\nuse is_jwt_auth() instead.","tags":["evaluations"],"parameters":[{"name":"task_tracker_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDatasetTaskTrackerRunEvalList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDatasetTaskTrackerRunEvalListRequest"}}}}}},"/clickhouse/eval-result-aggs":{"get":{"operationId":"clickhouse-eval-result-aggs-list","summary":"Clickhouse Eval Result Aggs List","description":"View mixin that handles both JWT and API Key authentication.\n\nInherits from JWTAuthUtils:\n- is_jwt_auth(request): Post-auth check (reliable, uses DRF's successful_authenticator)\n- is_jwt_token_format(request): Pre-auth heuristic (used here to route authenticators)\n\nThis mixin uses is_jwt_token_format() (pre-auth) in get_authenticators() and get_permissions()\nbecause those methods run BEFORE authentication completes. For post-auth checks,\nuse is_jwt_auth() instead.","tags":["evaluations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicDatasetTaskTrackerRunEvalListList"}}}}}},"post":{"operationId":"clickhouse-eval-result-aggs-create","summary":"Clickhouse Eval Result Aggs Create","description":"View mixin that handles both JWT and API Key authentication.\n\nInherits from JWTAuthUtils:\n- is_jwt_auth(request): Post-auth check (reliable, uses DRF's successful_authenticator)\n- is_jwt_token_format(request): Pre-auth heuristic (used here to route authenticators)\n\nThis mixin uses is_jwt_token_format() (pre-auth) in get_authenticators() and get_permissions()\nbecause those methods run BEFORE authentication completes. For post-auth checks,\nuse is_jwt_auth() instead.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDatasetTaskTrackerRunEvalList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDatasetTaskTrackerRunEvalListRequest"}}}}}},"/clickhouse/eval-results/":{"get":{"operationId":"clickhouse-eval-results-list","summary":"Clickhouse Eval Results List","description":"Backward compatible ClickHouse-based evaluation results list view","tags":["evaluations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicCHEvalResultListList"}}}}}},"post":{"operationId":"clickhouse-eval-results-create","summary":"Clickhouse Eval Results Create","description":"Handle POST requests the same as GET for filtering.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHEvalResultList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHEvalResultListRequest"}}}}},"put":{"operationId":"clickhouse-eval-results-update","summary":"Clickhouse Eval Results Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHEvalResultList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHEvalResultListRequest"}}}}},"patch":{"operationId":"clickhouse-eval-results-partial-update","summary":"Clickhouse Eval Results Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHEvalResultList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicCHEvalResultListRequest"}}}}}},"/clickhouse/eval-results/{id}/":{"get":{"operationId":"clickhouse-eval-results-retrieve","summary":"Clickhouse Eval Results Retrieve","description":"Operates on the Postgres-based EvalResult models for update and detail point retrieval\nSynced to clickhouse automatically via evaluation.signals","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvalResultDetail"}}}}}},"post":{"operationId":"clickhouse-eval-results-create-2","summary":"Clickhouse Eval Results Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvalResultDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvalResultDetailRequest"}}}}},"put":{"operationId":"clickhouse-eval-results-update-2","summary":"Clickhouse Eval Results Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvalResultDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvalResultDetailRequest"}}}}},"delete":{"operationId":"clickhouse-eval-results-destroy","summary":"Clickhouse Eval Results Destroy","description":"Operates on the Postgres-based EvalResult models for update and detail point retrieval\nSynced to clickhouse automatically via evaluation.signals","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"clickhouse-eval-results-partial-update-2","summary":"Clickhouse Eval Results Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvalResultUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicEvalResultUpdateRequest"}}}}}},"/clickhouse/eval-results/summary/":{"get":{"operationId":"clickhouse-eval-results-summary-retrieve","summary":"Clickhouse Eval Results Summary Retrieve","description":"Summary view for evaluation results.\n\nReturns aggregated counts and score summaries grouped by evaluator.\n\nGET/POST /clickhouse/eval-results/summary/\n\nResponse:\n{\n    \"summary\": {\n        \"number_of_results\": 1250\n    },\n    \"scores\": {\n        \"evaluator-id-1\": {\n            \"evaluator_id\": \"evaluator-id-1\",\n            \"evaluator_slug\": \"quality_v1\",\n            \"evaluator_name\": \"Response Quality\",\n            \"score_value_type\": \"numerical\",\n            \"avg_score\": 4.2,\n            \"true_count\": null,\n            \"false_count\": null\n        }\n    }\n}","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHEvalResultList"}}}}}},"post":{"operationId":"clickhouse-eval-results-summary-create","summary":"Clickhouse Eval Results Summary Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHEvalResultList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHEvalResultListRequest"}}}}},"put":{"operationId":"clickhouse-eval-results-summary-update","summary":"Clickhouse Eval Results Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHEvalResultList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHEvalResultListRequest"}}}}},"patch":{"operationId":"clickhouse-eval-results-summary-partial-update","summary":"Clickhouse Eval Results Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHEvalResultList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHEvalResultListRequest"}}}}}},"/clickhouse/eval-sets/{dataset_id}/eval-result-aggs":{"get":{"operationId":"clickhouse-eval-sets-eval-result-aggs-list","summary":"Clickhouse Eval Sets Eval Result Aggs List","description":"View mixin that handles both JWT and API Key authentication.\n\nInherits from JWTAuthUtils:\n- is_jwt_auth(request): Post-auth check (reliable, uses DRF's successful_authenticator)\n- is_jwt_token_format(request): Pre-auth heuristic (used here to route authenticators)\n\nThis mixin uses is_jwt_token_format() (pre-auth) in get_authenticators() and get_permissions()\nbecause those methods run BEFORE authentication completes. For post-auth checks,\nuse is_jwt_auth() instead.","tags":["evaluations"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicDatasetTaskTrackerRunEvalListList"}}}}}},"post":{"operationId":"clickhouse-eval-sets-eval-result-aggs-create","summary":"Clickhouse Eval Sets Eval Result Aggs Create","description":"View mixin that handles both JWT and API Key authentication.\n\nInherits from JWTAuthUtils:\n- is_jwt_auth(request): Post-auth check (reliable, uses DRF's successful_authenticator)\n- is_jwt_token_format(request): Pre-auth heuristic (used here to route authenticators)\n\nThis mixin uses is_jwt_token_format() (pre-auth) in get_authenticators() and get_permissions()\nbecause those methods run BEFORE authentication completes. For post-auth checks,\nuse is_jwt_auth() instead.","tags":["evaluations"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDatasetTaskTrackerRunEvalList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDatasetTaskTrackerRunEvalListRequest"}}}}}},"/evaluations/":{"get":{"operationId":"list","summary":"List","description":"## Creating an Evaluator\n\n### LLM Evaluators\n\nFor LLM evaluators, the frontend should first fetch available evaluation forms from the\n`/eval-forms/` endpoint to get the template configuration, then fill in the form and submit.\n\n**Required fields:**\n- `name` (str): Display name for the evaluator\n- `evaluator_slug` (str): Unique identifier for the evaluator within the organization\n- `type` (str): llm, human_boolean, human_categorical, human_numerical, human_text\n- `configurations` (dict): Complete evaluation form configuration\n- `description` (str, optional): Description of what this evaluator does\n- `enabled` (bool, optional): Whether the evaluator is active (default: False)\n\n**Example request body for LLM evaluator:**\n```json\n{\n    \"name\": \"Output Length Checker\",\n    \"type\": \"llm\",\n    \"description\": \"Checks if the output meets character count requirements\",\n    \"enabled\": true,\n    \"configurations\": {\n        \"eval_class\": \"output_char_count\",\n        \"type\": \"function\",\n        \"note\": \"\",\n        \"display_name\": \"Output Character Count\",\n        \"description\": \"Evaluates the length of the output text\",\n        \"special_fields\": [],\n        \"required_fields\": [\n            {\n                \"name\": \"llm_output\",\n                \"display_name\": \"LLM Output\",\n                \"type\": \"textarea\",\n                \"description\": \"The output text to evaluate\",\n                \"required\": true,\n                \"default_value\": null,\n                \"placeholder\": \"\",\n                \"choices\": [],\n                \"value\": null\n            }\n        ],\n        \"inference_filters\": [],\n        \"allow_conditions\": true,\n        \"score_mapping\": {\n            \"primary_score\": \"output_char_count\",\n            \"secondary_score\": null,\n            \"tertiary_score\": null,\n            \"quaternary_score\": null\n        },\n        \"category\": \"custom\"\n    }\n}\n```\n\n### Human Annotation Evaluators\n\nFor human annotation evaluators, specify the type and provide choices for categorical evaluators.\n\n**Human Boolean Evaluator:**\n```json\n{\n    \"name\": \"Quality Check\",\n    \"evaluator_slug\": \"quality_check\",\n    \"type\": \"human_boolean\",\n    \"description\": \"Manual quality assessment\"\n}\n```\n\n**Human Categorical Evaluator:**\n```json\n{\n    \"name\": \"Sentiment Rating\",\n    \"evaluator_slug\": \"sentiment_rating\",\n    \"type\": \"human_categorical\",\n    \"description\": \"Manual sentiment classification\",\n    \"categorical_choices\": [\n        {\"name\": \"Positive\", \"value\": 1},\n        {\"name\": \"Neutral\", \"value\": 0},\n        {\"name\": \"Negative\", \"value\": -1}\n    ]\n}\n```\n\n**Human Numerical Evaluator:**\n```json\n{\n    \"name\": \"Quality Score\",\n    \"evaluator_slug\": \"quality_score\",\n    \"type\": \"human_numerical\",\n    \"description\": \"Rate quality from 1-10\"\n}\n```\n\n**Human Text Evaluator:**\n```json\n{\n    \"name\": \"Feedback Comments\",\n    \"evaluator_slug\": \"feedback_comments\",\n    \"type\": \"human_text\",\n    \"description\": \"Detailed feedback comments\"\n}\n```\n\n## Response\n\nReturns the created evaluator with all fields populated, including auto-generated fields like\n`id`, `created_at`, `updated_at`, and `evaluator_slug`.\n\n## Validation\n\n- For LLM evaluators: The `configurations` field is validated against the corresponding\n  evaluation form schema from `EVAL_FORMS_MAP`\n- For human categorical evaluators: `categorical_choices` must be a list of objects\n  with `name` and `value` fields\n- The `eval_class` in configurations must exist in the available evaluation forms\n\n## Notes\n\n- The `organization`, `created_by`, and `updated_by` fields are automatically set from\n  the authenticated user\n- Each evaluator gets a unique `evaluator_slug` within the organization\n- LLM evaluators require a valid `eval_class` that maps to an available evaluation function","tags":["evaluations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicEvaluatorListList"}}}}}},"post":{"operationId":"create","summary":"Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorCreateRequest"}}}}},"put":{"operationId":"update","summary":"Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorCreateRequest"}}}}},"patch":{"operationId":"partial-update","summary":"Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicEvaluatorCreateRequest"}}}}}},"/evaluations/{evaluator_id}/":{"get":{"operationId":"retrieve","summary":"Retrieve","description":"Get, update, or delete an evaluator's draft version.\n\nGET /api/evaluators/{evaluator_id}/ - Get draft version (is_read_only=False)\nPATCH /api/evaluators/{evaluator_id}/ - Update draft version\nDELETE /api/evaluators/{evaluator_id}/ - Delete ALL versions\n\nSuperadmin: Can READ any evaluator across all organizations via JWT.\n            Cannot WRITE via JWT - must use API key for write operations.\nRegular users: Can only access evaluators in their organization.\n\nNOTE: Queryset filters by is_read_only=False, ensuring unique lookup per evaluator_id.\nThis allows DRF's standard get_object() to work without manual overrides.\nDelete removes ALL versions of the evaluator.\n\nDefense-in-depth:\n- SuperAdminMixin: Queryset routing + JWT write protection + object-level ownership","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorDetail"}}}}}},"post":{"operationId":"create-2","summary":"Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorDetailRequest"}}}}},"put":{"operationId":"update-2","summary":"Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorUpdateRequest"}}}}},"delete":{"operationId":"destroy","summary":"Destroy","description":"Delete ALL versions of the evaluator.\n\nUses SuperAdminMixin's queryset routing for org filtering.\nCross-org JWT write protection is enforced automatically by ObjectOwnershipPermission\nin get_object() via check_object_permissions().","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"partial-update-2","summary":"Partial Update 2","description":"Update the draft version (queryset already filters is_read_only=False).","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicEvaluatorUpdateRequest"}}}}}},"/evaluations/annotations/":{"get":{"operationId":"annotations-list","summary":"Annotations List","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["evaluations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAnnotationList"}}}}}},"post":{"operationId":"annotations-create","summary":"Annotations Create","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Annotation"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationRequest"}}}}}},"/evaluations/annotations/{id}/":{"get":{"operationId":"annotations-retrieve","summary":"Annotations Retrieve","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Annotation"}}}}}},"put":{"operationId":"annotations-update","summary":"Annotations Update","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Annotation"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationRequest"}}}}},"delete":{"operationId":"annotations-destroy","summary":"Annotations Destroy","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"annotations-partial-update","summary":"Annotations Partial Update","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Annotation"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedAnnotationRequest"}}}}}},"/evaluations/annotations/in-log/{log_id}/":{"get":{"operationId":"annotations-in-log-list","summary":"Annotations In Log List","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["evaluations"],"parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAnnotationList"}}}}}},"post":{"operationId":"annotations-in-log-create","summary":"Annotations In Log Create","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["evaluations"],"parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Annotation"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationRequest"}}}}}},"/evaluations/annotations/in-testset-row/{testset_row_id}/":{"get":{"operationId":"annotations-in-testset-row-list","summary":"Annotations In Testset Row List","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["evaluations"],"parameters":[{"name":"testset_row_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAnnotationList"}}}}}},"post":{"operationId":"annotations-in-testset-row-create","summary":"Annotations In Testset Row Create","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["evaluations"],"parameters":[{"name":"testset_row_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Annotation"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationRequest"}}}}}},"/evaluations/dataset-evaluation-tasks/":{"get":{"operationId":"dataset-evaluation-tasks-list","summary":"Dataset Evaluation Tasks List","description":"View for creating new dataset evaluation tasks.\n\nArgs:\n    dataset_id: str, The ID of the dataset to run evaluation on\n    evaluator_ids: str[], The IDs of the evaluators to run (preferred)\n    evaluator_slugs: str[], Deprecated alias for evaluator_ids (backward compat)\n\nReturns:\n    GET: A list of created tasks\n    POST: The created eval task if successful, otherwise a dictionary of errors","tags":["evaluations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDatasetTaskTrackerRunEvalListList"}}}}}},"post":{"operationId":"dataset-evaluation-tasks-create","summary":"Dataset Evaluation Tasks Create","description":"Create a new dataset evaluation task.\n\nAccepts both `evaluator_ids` (preferred) and `evaluator_slugs` (deprecated alias).\n\nOptional: If experiment_id is provided, the experiment's evaluator_slugs\nwill be updated to include the new evaluators, making them appear as\ncolumns in the experiment UI.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetTaskTrackerRunEvaluationCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetTaskTrackerRunEvaluationCreateRequest"}}}}}},"/evaluations/dataset-evaluation-tasks/{id}/":{"get":{"operationId":"dataset-evaluation-tasks-retrieve","summary":"Dataset Evaluation Tasks Retrieve","description":"Detail view for individual dataset evaluation tasks.\nSimilar to EvalSetDetailView but for dataset evaluation tasks.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetTaskTrackerRunEvaluationDetail"}}}}}},"put":{"operationId":"dataset-evaluation-tasks-update","summary":"Dataset Evaluation Tasks Update","description":"Detail view for individual dataset evaluation tasks.\nSimilar to EvalSetDetailView but for dataset evaluation tasks.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetTaskTrackerRunEvaluationDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetTaskTrackerRunEvaluationDetailRequest"}}}}},"delete":{"operationId":"dataset-evaluation-tasks-destroy","summary":"Dataset Evaluation Tasks Destroy","description":"Cancel/delete dataset evaluation task.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"dataset-evaluation-tasks-partial-update","summary":"Dataset Evaluation Tasks Partial Update","description":"Update dataset evaluation task metadata.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetTaskTrackerRunEvaluationDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedDatasetTaskTrackerRunEvaluationDetailRequest"}}}}}},"/evaluations/dataset-evaluation-tasks/list/":{"get":{"operationId":"dataset-evaluation-tasks-list-list","summary":"Dataset Evaluation Tasks List List","description":"List view for dataset evaluation tasks with complex filtering support.\nSimilar to EvalSetsListView but for dataset evaluation tasks.","tags":["evaluations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDatasetTaskTrackerRunEvalListList"}}}}}},"post":{"operationId":"dataset-evaluation-tasks-list-create","summary":"Dataset Evaluation Tasks List Create","description":"Handle POST requests for complex filtering.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetTaskTrackerRunEvalList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetTaskTrackerRunEvalListRequest"}}}}}},"/evaluations/dataset-run-logs-tasks/":{"get":{"operationId":"dataset-run-logs-tasks-list","summary":"Dataset Run Logs Tasks List","description":"View for creating new dataset run logs tasks.\nSimilar to EvalSetsView but for dataset run logs tasks.","tags":["evaluations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDatasetTaskTrackerRunLogsListList"}}}}}},"post":{"operationId":"dataset-run-logs-tasks-create","summary":"Dataset Run Logs Tasks Create","description":"Create a new dataset run logs task.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetTaskTrackerRunLogsCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetTaskTrackerRunLogsCreateRequest"}}}}}},"/evaluations/dataset-run-logs-tasks/{id}/":{"get":{"operationId":"dataset-run-logs-tasks-retrieve","summary":"Dataset Run Logs Tasks Retrieve","description":"Detail view for individual dataset run logs tasks.\nSimilar to EvalSetDetailView but for dataset run logs tasks.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetTaskTrackerRunLogsDetail"}}}}}},"put":{"operationId":"dataset-run-logs-tasks-update","summary":"Dataset Run Logs Tasks Update","description":"Detail view for individual dataset run logs tasks.\nSimilar to EvalSetDetailView but for dataset run logs tasks.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetTaskTrackerRunLogsDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetTaskTrackerRunLogsDetailRequest"}}}}},"delete":{"operationId":"dataset-run-logs-tasks-destroy","summary":"Dataset Run Logs Tasks Destroy","description":"Cancel/delete dataset run logs task.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"dataset-run-logs-tasks-partial-update","summary":"Dataset Run Logs Tasks Partial Update","description":"Update dataset run logs task metadata.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetTaskTrackerRunLogsDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedDatasetTaskTrackerRunLogsDetailRequest"}}}}}},"/evaluations/dataset-run-logs-tasks/list/":{"get":{"operationId":"dataset-run-logs-tasks-list-list","summary":"Dataset Run Logs Tasks List List","description":"List view for dataset LLM inference tasks with complex filtering support.\nSimilar to EvalSetsListView but for dataset LLM inference tasks.","tags":["evaluations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDatasetTaskTrackerRunLogsListList"}}}}}},"post":{"operationId":"dataset-run-logs-tasks-list-create","summary":"Dataset Run Logs Tasks List Create","description":"Handle POST requests for complex filtering.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetTaskTrackerRunLogsList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetTaskTrackerRunLogsListRequest"}}}}}},"/evaluations/datasets/{dataset_id}/logs/":{"get":{"operationId":"datasets-logs-list","summary":"Datasets Logs List","description":"Import existing logs into dataset based on filter criteria\n\nEndpoints:\n    POST   /evaluations/datasets/{dataset_id}/logs/ - Import existing logs to dataset asynchronously (legacy)\n    POST   /api/datasets/{dataset_id}/logs/import/ - Import existing logs to dataset asynchronously\n    DELETE /api/datasets/{dataset_id}/logs/import/ - Remove logs from dataset asynchronously\n\nArgs (POST body):\n    - start_time (string, required, ISO 8601)\n    - end_time (string, required, ISO 8601)\n    - filters (object, optional; key name is \"filters\")\n    - sampling_percentage (integer, optional, default 100)\n\nReturns (POST 200):\n    { \"message\": \"Logs are being imported to dataset in the background\" }\n\nArgs (DELETE body):\n    - is_deleting_all_logs (boolean, required if filters not provided)\n    - filters (object, required unless is_deleting_all_logs = true)\n\nReturns (DELETE 200):\n    { \"message\": \"Logs are being removed from dataset in the background\" }\n\nAccess Control:\n    NestedResourceMixin handles superadmin-aware parent access:\n    - Superadmin + JWT + READ: Can view any dataset's logs\n    - Superadmin + JWT + WRITE: Blocked (can't import/delete logs in other orgs via JWT)\n    - Superadmin + API key: Can import/delete logs in any dataset\n    - Regular user: Can only access their org's datasets","tags":["evaluations"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCHDatasetLogList"}}}}}},"post":{"operationId":"datasets-logs-create","summary":"Datasets Logs Create","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["evaluations"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogsImportResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogsImportRequestRequest"}}}}},"put":{"operationId":"datasets-logs-update","summary":"Datasets Logs Update","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["evaluations"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetLog"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetLogRequest"}}}}},"delete":{"operationId":"datasets-logs-destroy","summary":"Datasets Logs Destroy","description":"Import existing logs into dataset based on filter criteria\n\nEndpoints:\n    POST   /evaluations/datasets/{dataset_id}/logs/ - Import existing logs to dataset asynchronously (legacy)\n    POST   /api/datasets/{dataset_id}/logs/import/ - Import existing logs to dataset asynchronously\n    DELETE /api/datasets/{dataset_id}/logs/import/ - Remove logs from dataset asynchronously\n\nArgs (POST body):\n    - start_time (string, required, ISO 8601)\n    - end_time (string, required, ISO 8601)\n    - filters (object, optional; key name is \"filters\")\n    - sampling_percentage (integer, optional, default 100)\n\nReturns (POST 200):\n    { \"message\": \"Logs are being imported to dataset in the background\" }\n\nArgs (DELETE body):\n    - is_deleting_all_logs (boolean, required if filters not provided)\n    - filters (object, required unless is_deleting_all_logs = true)\n\nReturns (DELETE 200):\n    { \"message\": \"Logs are being removed from dataset in the background\" }\n\nAccess Control:\n    NestedResourceMixin handles superadmin-aware parent access:\n    - Superadmin + JWT + READ: Can view any dataset's logs\n    - Superadmin + JWT + WRITE: Blocked (can't import/delete logs in other orgs via JWT)\n    - Superadmin + API key: Can import/delete logs in any dataset\n    - Regular user: Can only access their org's datasets","tags":["evaluations"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogsImportResponse"}}}}}},"patch":{"operationId":"datasets-logs-partial-update","summary":"Datasets Logs Partial Update","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["evaluations"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHDatasetLog"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHDatasetLogRequest"}}}}}},"/evaluations/datasets/{dataset_id}/presence/":{"get":{"operationId":"datasets-presence-retrieve","summary":"Datasets Presence Retrieve","description":"Get all users currently viewing logs in this dataset from Redis cache.","tags":["evaluations"],"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogPresenceResponse"}}}}}}},"/evaluations/eval-sets/{eval_set_id}/logs/{log_unique_id}/status/":{"get":{"operationId":"eval-sets-logs-status-list","summary":"Eval Sets Logs Status List","description":"A mixin that provides version handling for API views.\n\nReads the X-Keywords-AI-Version header and sets self.version.\nDefault version is 0 if header is not present or invalid.","tags":["evaluations"],"parameters":[{"name":"eval_set_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"log_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatasetLogStatusCreate"}}}}}}},"post":{"operationId":"eval-sets-logs-status-create","summary":"Eval Sets Logs Status Create","description":"A mixin that provides version handling for API views.\n\nReads the X-Keywords-AI-Version header and sets self.version.\nDefault version is 0 if header is not present or invalid.","tags":["evaluations"],"parameters":[{"name":"eval_set_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"log_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogStatusCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogStatusCreateRequest"}}}}}},"/evaluations/eval-sets/{id}/":{"get":{"operationId":"eval-sets-retrieve","summary":"Eval Sets Retrieve","description":"Retrieve, update, and delete a dataset\n\nEndpoints:\n    GET /api/datasets/{dataset_id}/\n    PATCH /api/datasets/{dataset_id}/\n    DELETE /api/datasets/{dataset_id}/\n\nSuperadmin: Can READ any dataset across all organizations via JWT.\n            Cannot WRITE via JWT - must use API key for write operations.\nRegular users: Can only access datasets in their organization.\n\nDefense-in-depth:\n\nArgs (PATCH):\n    - name (Optional): string\n    - description (Optional): string\n\nReturns (GET 200):\n    {\n      \"id\": \"dataset_id\",\n      \"name\": \"Support Conversations - July\",\n      \"type\": \"sampling\",\n      \"description\": \"Sampled support chats for July\",\n      \"created_at\": \"2025-07-26T00:00:00Z\",\n      \"updated_at\": \"2025-07-27T08:10:00Z\",\n      \"organization\": 123,\n      \"initial_log_filters\": {\"status_code\": {\"operator\": \"eq\", \"value\": 200}},\n      \"unique_organization_ids\": [],\n      \"timestamps\": [],\n      \"log_count\": 250,\n      \"evaluator\": null,\n      \"status\": \"ready\",\n      \"running_status\": \"pending\",\n      \"running_progress\": 0,\n      \"running_at\": null,\n      \"completed_annotation_count\": 0\n    }\n\nReturns (PATCH 200): Same shape as GET with updated fields\nReturns (DELETE 204): No content\n\nDefense-in-depth: SuperAdminMixin provides queryset routing + object-level ownership.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetDetail"}}}}}},"post":{"operationId":"eval-sets-create","summary":"Eval Sets Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetDetailRequest"}}}}},"put":{"operationId":"eval-sets-update","summary":"Eval Sets Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetDetailRequest"}}}}},"delete":{"operationId":"eval-sets-destroy","summary":"Eval Sets Destroy","description":"Retrieve, update, and delete a dataset\n\nEndpoints:\n    GET /api/datasets/{dataset_id}/\n    PATCH /api/datasets/{dataset_id}/\n    DELETE /api/datasets/{dataset_id}/\n\nSuperadmin: Can READ any dataset across all organizations via JWT.\n            Cannot WRITE via JWT - must use API key for write operations.\nRegular users: Can only access datasets in their organization.\n\nDefense-in-depth:\n\nArgs (PATCH):\n    - name (Optional): string\n    - description (Optional): string\n\nReturns (GET 200):\n    {\n      \"id\": \"dataset_id\",\n      \"name\": \"Support Conversations - July\",\n      \"type\": \"sampling\",\n      \"description\": \"Sampled support chats for July\",\n      \"created_at\": \"2025-07-26T00:00:00Z\",\n      \"updated_at\": \"2025-07-27T08:10:00Z\",\n      \"organization\": 123,\n      \"initial_log_filters\": {\"status_code\": {\"operator\": \"eq\", \"value\": 200}},\n      \"unique_organization_ids\": [],\n      \"timestamps\": [],\n      \"log_count\": 250,\n      \"evaluator\": null,\n      \"status\": \"ready\",\n      \"running_status\": \"pending\",\n      \"running_progress\": 0,\n      \"running_at\": null,\n      \"completed_annotation_count\": 0\n    }\n\nReturns (PATCH 200): Same shape as GET with updated fields\nReturns (DELETE 204): No content\n\nDefense-in-depth: SuperAdminMixin provides queryset routing + object-level ownership.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"eval-sets-partial-update","summary":"Eval Sets Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedDatasetDetailRequest"}}}}}},"/evaluations/eval-sets/list/":{"get":{"operationId":"eval-sets-list-list","summary":"Eval Sets List List","description":"List datasets\n\nEndpoint:\n    GET /api/datasets/list/\n\nSuperadmin: Can see all datasets across all organizations.\nRegular users: Can only see datasets in their organization.\n\nReturns (200):\n    {\n      \"count\": 1,\n      \"next\": null,\n      \"previous\": null,\n      \"results\": [\n        {\n          \"id\": \"dataset_id\",\n          \"organization_id\": 123,\n          \"updated_by\": {\"first_name\": \"Ann\", \"last_name\": \"Lee\", \"email\": \"ann@example.com\"},\n          \"log_count\": 250,\n          \"name\": \"Support Conversations - July\",\n          \"log_ids\": [\"...\"],\n          \"description\": \"Sampled support chats for July\",\n          \"type\": \"sampling\",\n          \"status\": \"ready\",\n          \"created_at\": \"2025-07-26T00:00:00Z\",\n          \"updated_at\": \"2025-07-27T08:10:00Z\",\n          \"completed_annotation_count\": 0,\n          \"running_status\": \"pending\",\n          \"running_progress\": 0\n        }\n      ]\n    }","tags":["evaluations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDatasetListList"}}}}}},"post":{"operationId":"api-datasets-list-filtered-2","summary":"Api Datasets List Filtered 2","description":"List datasets with complex filtering via POST body.","tags":["evaluations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDatasetListList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetFilterRequestRequest"}}}}},"put":{"operationId":"eval-sets-list-update","summary":"Eval Sets List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetListRequest"}}}}},"patch":{"operationId":"eval-sets-list-partial-update","summary":"Eval Sets List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedDatasetListRequest"}}}}}},"/evaluations/evaluators/{evaluator_id}/versions/":{"get":{"operationId":"evaluators-versions-list","summary":"Evaluators Versions List","description":"List all versions or create new version (commit).\n\nGET /api/evaluators/{id}/versions/ - List all versions\nPOST /api/evaluators/{id}/versions/ - Commit (create new version)\n\nAccess control via NestedResourceMixin: org identity derived from parent evaluator.\nSuperadmin: Can LIST all versions across all organizations via JWT.\nRegular users: Can only access versions in their organization.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicEvaluatorVersionListList"}}}}}},"post":{"operationId":"evaluators-versions-create","summary":"Evaluators Versions Create","description":"Create a new version (commit). Org derived from parent evaluator.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCreateVersion"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCreateVersionRequest"}}}}},"put":{"operationId":"evaluators-versions-update","summary":"Evaluators Versions Update","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionListRequest"}}}}},"patch":{"operationId":"evaluators-versions-partial-update","summary":"Evaluators Versions Partial Update","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicEvaluatorVersionListRequest"}}}}}},"/evaluations/evaluators/{evaluator_id}/versions/{version}/":{"get":{"operationId":"evaluators-versions-retrieve","summary":"Evaluators Versions Retrieve","description":"Get or edit a specific version by version number.\n\nGET /api/evaluators/{evaluator_id}/versions/{version}/ - Get specific version\nPATCH /api/evaluators/{evaluator_id}/versions/{version}/ - Edit (only if is_read_only=False)\n\nNOTE: DELETE is not allowed for specific versions. Delete the entire evaluator instead.\nVersions are immutable history - you can only add new versions, not remove old ones.\n\nAccess control via NestedResourceMixin: org identity derived from parent evaluator.\nSuperadmin: Can READ any version across all organizations via JWT.\nRegular users: Can only access versions in their organization.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionDetail"}}}}}},"post":{"operationId":"evaluators-versions-create-2","summary":"Evaluators Versions Create 2","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionDetailRequest"}}}}},"put":{"operationId":"evaluators-versions-update-2","summary":"Evaluators Versions Update 2","description":"Full update - only allowed if is_read_only=False.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionDetailRequest"}}}}},"patch":{"operationId":"evaluators-versions-partial-update-2","summary":"Evaluators Versions Partial Update 2","description":"Edit version - only allowed if is_read_only=False.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicEvaluatorVersionDetailRequest"}}}}}},"/evaluations/evaluators/{evaluator_id}/versions/list/":{"get":{"operationId":"evaluators-versions-list-list","summary":"Evaluators Versions List List","description":"List all versions or create new version (commit).\n\nGET /api/evaluators/{id}/versions/ - List all versions\nPOST /api/evaluators/{id}/versions/ - Commit (create new version)\n\nAccess control via NestedResourceMixin: org identity derived from parent evaluator.\nSuperadmin: Can LIST all versions across all organizations via JWT.\nRegular users: Can only access versions in their organization.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicEvaluatorVersionListList"}}}}}},"post":{"operationId":"evaluators-versions-list-create","summary":"Evaluators Versions List Create","description":"Create a new version (commit). Org derived from parent evaluator.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCreateVersion"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorCreateVersionRequest"}}}}},"put":{"operationId":"evaluators-versions-list-update","summary":"Evaluators Versions List Update","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionListRequest"}}}}},"patch":{"operationId":"evaluators-versions-list-partial-update","summary":"Evaluators Versions List Partial Update","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorVersionList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicEvaluatorVersionListRequest"}}}}}},"/evaluations/evaluators/summary/":{"get":{"operationId":"evaluators-summary-retrieve","summary":"Evaluators Summary Retrieve","description":"GET/POST /evaluations/evaluators/summary/\nGET/POST /api/evaluators/summary/\n\nGet summary statistics for evaluators.\n\nReturns:\n    {\n        \"total_count\": 15\n    }\n\nPOST supports filtering via body (POST-for-filtering pattern).","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluations_evaluatorsSummaryRetrieve_Response_200"}}}}}},"post":{"operationId":"evaluators-summary-create","summary":"Evaluators Summary Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluations_evaluatorsSummaryCreate_Response_200"}}}}}},"put":{"operationId":"evaluators-summary-update","summary":"Evaluators Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluations_evaluatorsSummaryUpdate_Response_200"}}}}}},"patch":{"operationId":"evaluators-summary-partial-update","summary":"Evaluators Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluations_evaluatorsSummaryPartialUpdate_Response_200"}}}}}}},"/evaluations/evaluators/tags/":{"get":{"operationId":"evaluators-tags-list","summary":"Evaluators Tags List","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["evaluations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedEvaluatorTagList"}}}}}},"post":{"operationId":"evaluators-tags-create","summary":"Evaluators Tags Create","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorTag"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorTagRequest"}}}}}},"/evaluations/evaluators/tags/{id}/":{"get":{"operationId":"evaluators-tags-retrieve","summary":"Evaluators Tags Retrieve","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorTag"}}}}}},"put":{"operationId":"evaluators-tags-update","summary":"Evaluators Tags Update","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorTag"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorTagRequest"}}}}},"delete":{"operationId":"evaluators-tags-destroy","summary":"Evaluators Tags Destroy","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"evaluators-tags-partial-update","summary":"Evaluators Tags Partial Update","description":"Mixin for views that need method-level permission enforcement.\n\nSupports two approaches for defining permissions:\n\n1. Auto-generation (Recommended - DRY):\n    Set permission_resource to auto-generate CRUD permissions based on HTTP methods:\n\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        permission_resource = Resources.LOG\n        # Auto-generates:\n        # GET -> log:read\n        # PATCH -> log:update\n        # DELETE -> log:delete\n\n    Override specific methods via permission_map (always use constants):\n    class MyView(PermissionMapMixin, ...):\n        permission_resource = Resources.LOG\n        permission_map: PermissionMap = {\n            \"GET\": None,  # Override: no permission required for GET\n            \"POST\": make_permission(Resources.LOG, CRUDActions.READ),  # POST acts as read\n        }\n\n2. Explicit mapping (for non-CRUD or complex cases - always use constants):\n    class MyView(PermissionMapMixin, JWTAndAPIKeyAuthenticationViewMixin, APIView):\n        permission_map: PermissionMap = {\n            \"GET\": make_permission(Features.PROXY, Actions.ACCESS),\n            \"POST\": make_permission(Features.PLAYGROUND, Actions.ACCESS),\n        }\n\n3. Dynamic logic (most flexible):\n    def get_required_permission(self, method: str) -> str | None:\n        if self.kwargs.get('public'):\n            return None\n        return \"dataset:read\"\n\nNotes:\n- permission_map acts as an override when permission_resource is set\n- If neither is defined, no permission check is performed (backward compatible)\n- HasJWTPermission automatically enforces permissions when defined","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorTag"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedEvaluatorTagRequest"}}}}}},"/evaluations/list/":{"get":{"operationId":"list-list","summary":"List List","description":"List evaluators for an organization.\n\nSuperadmin: Can see all evaluators across all organizations.\nRegular users: Can only see evaluators in their organization, plus PUBLIC\n    (Respan-managed) evaluators when ``is_including_public_evaluators`` is\n    truthy. Public evaluators are hidden by default for back-compat.","tags":["evaluations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicEvaluatorListList"}}}}}},"post":{"operationId":"list-create","summary":"List Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorListRequest"}}}}},"put":{"operationId":"list-update","summary":"List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorListRequest"}}}}},"patch":{"operationId":"list-partial-update","summary":"List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEvaluatorList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicEvaluatorListRequest"}}}}}},"/evaluations/results/{id}/":{"get":{"operationId":"results-retrieve","summary":"Results Retrieve","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalResultDetail"}}}}}},"post":{"operationId":"results-create","summary":"Results Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalResultDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalResultDetailRequest"}}}}},"put":{"operationId":"results-update","summary":"Results Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalResultDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalResultDetailRequest"}}}}},"delete":{"operationId":"results-destroy","summary":"Results Destroy","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"results-partial-update","summary":"Results Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["evaluations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalResultDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedEvalResultDetailRequest"}}}}}},"/evaluations/results/related-to-log/{log_id}/":{"get":{"operationId":"results-related-to-log-list","summary":"Results Related To Log List","description":"Listing all the evaluators along with the results under them within a log\n\nArgs:\n    URL args:\n        - log_id: The ID of the log to get the evaluators and results for\n    Query params:\n        - evaluator_type: The type of the evaluator to get the results for\n        - timestamp: The timestamp of the log to get the evaluators and results for\n        - unique_organization_id: The unique organization ID of the log to get the evaluators and results for\n    POST params:\n        - evaluation_id: The ID of the evaluation to create the result for\n        - evaluator_slug: The slug of the evaluator to create the result for\n        - log_unique_id: The unique ID of the log to create the result for\n        - eval_result_unique_id: The unique ID of the result to create\n        - score_mapping: The score mapping of the result\n        - primary_score: The primary score of the result","tags":["evaluations"],"parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedEvalWithResultsList"}}}}}},"post":{"operationId":"results-related-to-log-create","summary":"Results Related To Log Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["evaluations"],"parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalResultCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalResultCreateRequest"}}}}},"put":{"operationId":"results-related-to-log-update","summary":"Results Related To Log Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["evaluations"],"parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalWithResults"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalWithResultsRequest"}}}}},"patch":{"operationId":"results-related-to-log-partial-update","summary":"Results Related To Log Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["evaluations"],"parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalWithResults"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedEvalWithResultsRequest"}}}}}},"/evaluations/test-run/":{"post":{"operationId":"test-run-create","summary":"Test Run Create","description":"Main entry point for test run evaluations.\nHandles four modes of operation:\n1. Evaluation from raw eval inputs & evaluator id (backward compatibility)\n2. Evaluation from log\n3. Evaluation from evaluator configuration form\n4. Evaluation from raw eval inputs & evaluator id (new public API mode)","tags":["evaluations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluations_testRunCreate_Response_200"}}}}}}},"/evaluations/test-run/{log_id}/{evaluator_id}/":{"post":{"operationId":"test-run-create-2","summary":"Test Run Create 2","description":"Main entry point for test run evaluations.\nHandles four modes of operation:\n1. Evaluation from raw eval inputs & evaluator id (backward compatibility)\n2. Evaluation from log\n3. Evaluation from evaluator configuration form\n4. Evaluation from raw eval inputs & evaluator id (new public API mode)","tags":["evaluations"],"parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"log_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluations_testRunCreate2_Response_200"}}}}}}},"/api/anthropic/passthrough/v1/messages":{"post":{"operationId":"api-anthropic-passthrough-v-1-messages-create","summary":"Api Anthropic Passthrough V 1 Messages Create","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["proxy"],"parameters":[{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ApiAnthropicPassthroughV1MessagesPostParametersFormat"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proxy_api_anthropic_passthrough_v1_messages_create_Response_200"}}}}}}},"/api/anthropic/v1/messages":{"post":{"operationId":"api-anthropic-v-1-messages-create","summary":"Api Anthropic V 1 Messages Create","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["proxy"],"parameters":[{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ApiAnthropicV1MessagesPostParametersFormat"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proxy_api_anthropic_v1_messages_create_Response_200"}}}}}}},"/api/assemblyai/v2/transcript":{"get":{"operationId":"api-assemblyai-v-2-transcript-retrieve","summary":"Api Assemblyai V 2 Transcript Retrieve","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["proxy"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proxy_api_assemblyai_v2_transcript_retrieve_Response_200"}}}}}},"post":{"operationId":"api-assemblyai-v-2-transcript-create","summary":"Api Assemblyai V 2 Transcript Create","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["proxy"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proxy_api_assemblyai_v2_transcript_create_Response_200"}}}}}}},"/api/chat/completions/v1":{"post":{"operationId":"api-chat-completions-v-1-create","summary":"Api Chat Completions V 1 Create","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["proxy"],"parameters":[{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ApiChatCompletionsV1PostParametersFormat"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proxy_api_chat_completions_v1_create_Response_200"}}}}}}},"/api/generate/":{"post":{"operationId":"api-generate-create","summary":"Api Generate Create","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["proxy"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proxy_api_generate_create_Response_200"}}}}}}},"/api/google/{sdk_type}/v1beta/models/{model_name}:{render_format}":{"post":{"operationId":"api-google-v-1-beta-models-create","summary":"Api Google V 1 Beta Models Create","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["proxy"],"parameters":[{"name":"model_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"render_format","in":"path","required":true,"schema":{"type":"string"}},{"name":"sdk_type","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ApiGoogleSdkTypeV1BetaModelsModelNameRenderFormatPostParametersFormat"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proxy_api_google_v1beta_models_:_create_Response_200"}}}}}}},"/api/google/models/{model_name}:{render_format}":{"post":{"operationId":"api-google-models-create","summary":"Api Google Models Create","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["proxy"],"parameters":[{"name":"model_name","in":"path","required":true,"schema":{"type":"string"}},{"name":"render_format","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ApiGoogleModelsModelNameRenderFormatPostParametersFormat"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proxy_api_google_models_:_create_Response_200"}}}}}}},"/api/playground/ask/":{"post":{"operationId":"api-playground-ask-create","summary":"Api Playground Ask Create","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["proxy"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proxy_api_playground_ask_create_Response_200"}}}}}}},"/api/playground/chat/completions":{"post":{"operationId":"api-playground-chat-completions-create","summary":"Api Playground Chat Completions Create","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["proxy"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proxy_api_playground_chat_completions_create_Response_200"}}}}}}},"/api/v1/chat/completions":{"post":{"operationId":"api-v-1-chat-completions-create","summary":"Api V 1 Chat Completions Create","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["proxy"],"parameters":[{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ApiV1ChatCompletionsPostParametersFormat"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proxy_api_v1_chat_completions_create_Response_200"}}}}}}},"/chat/completions":{"post":{"operationId":"chat-completions-create","summary":"Chat Completions Create","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["proxy"],"parameters":[{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ChatCompletionsPostParametersFormat"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proxy_chat_completions_create_Response_200"}}}}}}},"/api/cache/{id}/":{"get":{"operationId":"retrieve-cached-response","summary":"Retrieve Cached Response","description":"GET/PATCH/DELETE /api/caches/<cache_key>/ — Retrieve, update, delete by cache_key.\nGET/PATCH/DELETE /api/cache/<id>/ — Legacy alias, lookup by integer PK (JWT only).\nGET/PATCH/DELETE /api/cache/key/<cache_key>/ — Legacy alias, lookup by cache_key.\n\nJWT auth uses pk lookup when an integer id is supplied; otherwise (and for\nAPI key auth) lookup is by cache_key_by_org_uuid.","tags":["caches"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseDetail"}}}}}},"post":{"operationId":"api-cache-create","summary":"Api Cache Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["logs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseDetailRequest"}}}}},"put":{"operationId":"api-cache-update","summary":"Api Cache Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseDetailRequest"}}}}},"delete":{"operationId":"api-cache-destroy","summary":"Api Cache Destroy","description":"GET/PATCH/DELETE /api/caches/<cache_key>/ — Retrieve, update, delete by cache_key.\nGET/PATCH/DELETE /api/cache/<id>/ — Legacy alias, lookup by integer PK (JWT only).\nGET/PATCH/DELETE /api/cache/key/<cache_key>/ — Legacy alias, lookup by cache_key.\n\nJWT auth uses pk lookup when an integer id is supplied; otherwise (and for\nAPI key auth) lookup is by cache_key_by_org_uuid.","tags":["logs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-cache-partial-update","summary":"Api Cache Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicCachedResponseDetailRequest"}}}}}},"/api/caches/":{"post":{"operationId":"filter-cached-responses","summary":"Filter Cached Responses","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["caches"],"parameters":[{"name":"Authorization","in":"header","description":"Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseListRequest"}}}}},"delete":{"operationId":"delete-cached-responses","summary":"Delete Cached Responses","description":"DEPRECATED: Batch delete via DELETE /api/caches/ with {\"ids\": [...]}.\nUse DELETE /api/caches/bulk/ instead. Kept for backward compatibility.\nJWT only — integer IDs are internal and not exposed via API key.","tags":["caches"],"parameters":[{"name":"Authorization","in":"header","description":"Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"get":{"operationId":"api-caches-list","summary":"Api Caches List","description":"GET/POST /api/caches/ — List cached responses (POST is for filtering, not creation).","tags":["logs"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicCachedResponseListList"}}}}}},"put":{"operationId":"api-caches-update","summary":"Api Caches Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseListRequest"}}}}},"patch":{"operationId":"api-caches-partial-update","summary":"Api Caches Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicCachedResponseListRequest"}}}}}},"/api/caches/bulk/":{"delete":{"operationId":"bulk-delete-cached-responses","summary":"Bulk Delete Cached Responses","description":"DELETE /api/caches/bulk/ — Bulk delete cached responses.\n\nRequest body (exactly one of):\n    {\"ids\": [1, 2, 3]}         — JWT only (internal integer PKs)\n    {\"cache_keys\": [\"k1\",\"k2\"]} — by cache_key_by_org_uuid\n    {\"all\": true}              — deletes all cached responses for the org","tags":["caches"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/api/caches/summary/":{"post":{"operationId":"get-filtered-cached-responses-summary","summary":"Get Filtered Cached Responses Summary","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["caches"],"parameters":[{"name":"Authorization","in":"header","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Caches_getFilteredCachedResponsesSummary_Response_200"}}}}}},"get":{"operationId":"api-caches-summary-retrieve","summary":"Api Caches Summary Retrieve","description":"GET/POST /api/caches/summary/ — Summary statistics for cached responses.\nPOST supports filtering via body (POST-for-filtering pattern).","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_api_caches_summary_retrieve_Response_200"}}}}}},"put":{"operationId":"api-caches-summary-update","summary":"Api Caches Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_api_caches_summary_update_Response_200"}}}}}},"patch":{"operationId":"api-caches-summary-partial-update","summary":"Api Caches Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_api_caches_summary_partial_update_Response_200"}}}}}}},"/api/cache/key/{cache_key}/":{"get":{"operationId":"api-cache-key-retrieve","summary":"Api Cache Key Retrieve","description":"GET/PATCH/DELETE /api/caches/<cache_key>/ — Retrieve, update, delete by cache_key.\nGET/PATCH/DELETE /api/cache/<id>/ — Legacy alias, lookup by integer PK (JWT only).\nGET/PATCH/DELETE /api/cache/key/<cache_key>/ — Legacy alias, lookup by cache_key.\n\nJWT auth uses pk lookup when an integer id is supplied; otherwise (and for\nAPI key auth) lookup is by cache_key_by_org_uuid.","tags":["logs"],"parameters":[{"name":"cache_key","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseDetail"}}}}}},"post":{"operationId":"api-cache-key-create","summary":"Api Cache Key Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["logs"],"parameters":[{"name":"cache_key","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseDetailRequest"}}}}},"put":{"operationId":"api-cache-key-update","summary":"Api Cache Key Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"cache_key","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseDetailRequest"}}}}},"delete":{"operationId":"api-cache-key-destroy","summary":"Api Cache Key Destroy","description":"GET/PATCH/DELETE /api/caches/<cache_key>/ — Retrieve, update, delete by cache_key.\nGET/PATCH/DELETE /api/cache/<id>/ — Legacy alias, lookup by integer PK (JWT only).\nGET/PATCH/DELETE /api/cache/key/<cache_key>/ — Legacy alias, lookup by cache_key.\n\nJWT auth uses pk lookup when an integer id is supplied; otherwise (and for\nAPI key auth) lookup is by cache_key_by_org_uuid.","tags":["logs"],"parameters":[{"name":"cache_key","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-cache-key-partial-update","summary":"Api Cache Key Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"cache_key","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicCachedResponseDetailRequest"}}}}}},"/api/caches/{cache_key}/":{"get":{"operationId":"api-caches-retrieve","summary":"Api Caches Retrieve","description":"GET/PATCH/DELETE /api/caches/<cache_key>/ — Retrieve, update, delete by cache_key.\nGET/PATCH/DELETE /api/cache/<id>/ — Legacy alias, lookup by integer PK (JWT only).\nGET/PATCH/DELETE /api/cache/key/<cache_key>/ — Legacy alias, lookup by cache_key.\n\nJWT auth uses pk lookup when an integer id is supplied; otherwise (and for\nAPI key auth) lookup is by cache_key_by_org_uuid.","tags":["logs"],"parameters":[{"name":"cache_key","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseDetail"}}}}}},"post":{"operationId":"api-caches-create-2","summary":"Api Caches Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["logs"],"parameters":[{"name":"cache_key","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseDetailRequest"}}}}},"put":{"operationId":"api-caches-update-2","summary":"Api Caches Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"cache_key","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseDetailRequest"}}}}},"delete":{"operationId":"api-caches-destroy-2","summary":"Api Caches Destroy 2","description":"GET/PATCH/DELETE /api/caches/<cache_key>/ — Retrieve, update, delete by cache_key.\nGET/PATCH/DELETE /api/cache/<id>/ — Legacy alias, lookup by integer PK (JWT only).\nGET/PATCH/DELETE /api/cache/key/<cache_key>/ — Legacy alias, lookup by cache_key.\n\nJWT auth uses pk lookup when an integer id is supplied; otherwise (and for\nAPI key auth) lookup is by cache_key_by_org_uuid.","tags":["logs"],"parameters":[{"name":"cache_key","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-caches-partial-update-2","summary":"Api Caches Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"cache_key","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicCachedResponseDetailRequest"}}}}}},"/api/caches/list/":{"get":{"operationId":"api-caches-list-list","summary":"Api Caches List List","description":"GET/POST /api/caches/ — List cached responses (POST is for filtering, not creation).","tags":["logs"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicCachedResponseListList"}}}}}},"post":{"operationId":"api-caches-list-create","summary":"Api Caches List Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseListRequest"}}}}},"put":{"operationId":"api-caches-list-update","summary":"Api Caches List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseListRequest"}}}}},"delete":{"operationId":"api-caches-list-destroy","summary":"Api Caches List Destroy","description":"DEPRECATED: Batch delete via DELETE /api/caches/ with {\"ids\": [...]}.\nUse DELETE /api/caches/bulk/ instead. Kept for backward compatibility.\nJWT only — integer IDs are internal and not exposed via API key.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-caches-list-partial-update","summary":"Api Caches List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCachedResponseList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicCachedResponseListRequest"}}}}}},"/api/clickhouse/request-logs/":{"get":{"operationId":"api-clickhouse-request-logs-list","summary":"Api Clickhouse Request Logs List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["logs"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicCHLogV2DetailList"}}}}}},"post":{"operationId":"api-clickhouse-request-logs-create","summary":"Api Clickhouse Request Logs Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHLogV2Detail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHLogV2DetailRequest"}}}}},"put":{"operationId":"api-clickhouse-request-logs-update","summary":"Api Clickhouse Request Logs Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHLogV2Detail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHLogV2DetailRequest"}}}}},"patch":{"operationId":"api-clickhouse-request-logs-partial-update","summary":"Api Clickhouse Request Logs Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHLogV2Detail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicCHLogV2DetailRequest"}}}}}},"/api/log_thread/{thread_identifier}/":{"get":{"operationId":"api-log-thread-retrieve","summary":"Api Log Thread Retrieve","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["logs"],"parameters":[{"name":"thread_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadDetail"}}}}}},"post":{"operationId":"api-log-thread-create","summary":"Api Log Thread Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["logs"],"parameters":[{"name":"thread_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadDetailRequest"}}}}},"put":{"operationId":"api-log-thread-update","summary":"Api Log Thread Update","description":"Update a thread (placeholder for future implementation).","tags":["logs"],"parameters":[{"name":"thread_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadDetailRequest"}}}}},"delete":{"operationId":"api-log-thread-destroy","summary":"Api Log Thread Destroy","description":"Delete a thread (placeholder for future implementation).","tags":["logs"],"parameters":[{"name":"thread_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-log-thread-partial-update","summary":"Api Log Thread Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"thread_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHThreadDetailRequest"}}}}}},"/api/openai/v1/traces/ingest":{"post":{"operationId":"api-openai-v-1-traces-ingest-create","summary":"Api Openai V 1 Traces Ingest Create","description":"Process Vercel traces.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_api_openai_v1_traces_ingest_create_Response_200"}}}}}}},"/api/request-logs/create/":{"get":{"operationId":"api-request-logs-create-list","summary":"Api Request Logs Create List","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["logs"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedRequestLogCreateList"}}}}}},"post":{"operationId":"api-request-logs-create-create","summary":"Api Request Logs Create Create","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogCreateRequest"}}}}}},"/api/request-logs/groups/":{"get":{"operationId":"request-logs-groups-list","summary":"List request-log groups","description":"Paginated list of request-log groups: one row per distinct group key with its aggregated metrics. `group_by=trace|thread` rolls spans up into trace/thread entities (span_count, root-span i/o, error_count) via the entity views; all other values are flat breakdown dimensions sharing the dashboard-breakdown routing.","tags":["logs"],"parameters":[{"name":"end_time","in":"query","required":false,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}},{"name":"group_by","in":"query","description":"Dimension to group by (default 'model').","required":false,"schema":{"$ref":"#/components/schemas/ApiRequestLogsGroupsGetParametersGroupBy"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string"}},{"name":"start_time","in":"query","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedClickHouseRequestLogAggregatedList"}}}}}},"post":{"operationId":"request-logs-groups-filter","summary":"List request-log groups (POST filter)","description":"Same as GET; the POST body carries a `filters` payload (POST-for-filtering — POST delegates to GET).","tags":["logs"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedClickHouseRequestLogAggregatedList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHRequestLogModelBreakdownRequest"}}}}},"put":{"operationId":"api-request-logs-groups-update","summary":"Api Request Logs Groups Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHRequestLogModelBreakdown"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHRequestLogModelBreakdownRequest"}}}}},"patch":{"operationId":"api-request-logs-groups-partial-update","summary":"Api Request Logs Groups Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHRequestLogModelBreakdown"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHRequestLogModelBreakdownRequest"}}}}}},"/api/request-logs/render-with-variables/":{"post":{"operationId":"api-request-logs-render-with-variables-create","summary":"Api Request Logs Render With Variables Create","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_api_request_logs_render_with_variables_create_Response_200"}}}}}}},"/api/traces/bulk-delete/":{"post":{"operationId":"api-traces-bulk-delete-create","summary":"Api Traces Bulk Delete Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_api_traces_bulk_delete_create_Response_200"}}}}}},"put":{"operationId":"api-traces-bulk-delete-update","summary":"Api Traces Bulk Delete Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_api_traces_bulk_delete_update_Response_200"}}}}}},"patch":{"operationId":"api-traces-bulk-delete-partial-update","summary":"Api Traces Bulk Delete Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_api_traces_bulk_delete_partial_update_Response_200"}}}}}}},"/api/update-cache-archive-duration/":{"patch":{"operationId":"api-update-cache-archive-duration-partial-update","summary":"Api Update Cache Archive Duration Partial Update","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_api_update_cache_archive_duration_partial_update_Response_200"}}}}}}},"/api/v1/metrics":{"post":{"operationId":"api-v-1-metrics-create","summary":"Api V 1 Metrics Create","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_api_v1_metrics_create_Response_200"}}}}}}},"/api/v1/traces":{"post":{"operationId":"api-v-1-traces-create","summary":"Api V 1 Traces Create","description":"Centralized respan_params initialization and backward-compat layer.\n\nThis mixin is the SINGLE initialization point for ``respan_params``.\nIt runs ``_initialize_respan_params()`` BEFORE ``super().initial()`` so\nthat by the time the throttle runs, ``respan_params`` is a fully resolved\ndict.  Downstream code (throttle, preprocessing, view handler) only\n**enriches** the existing dict — they never need to create it.\n\nInitialization order::\n\n    _initialize_respan_params()   ← legacy rename + header parse + metadata\n        ↓\n    super().initial()             ← throttle ENRICHES the existing dict\n        ↓\n    view handler                  ← billing, security strip, etc.\n\nResponsibilities consolidated here (previously scattered across 4 callsites):\n1. Legacy header rename  (X-Data-Keywordsai-Params → X-Data-Respan-Params)\n2. Parse X-Data-Respan-Params header  (base64 → dict)\n3. Legacy body rename  (keywordsai_params → respan_params)\n4. Form data handling  (JSON string → dict)\n5. Metadata nesting  (passthrough endpoints — Anthropic, Google, etc.)\n6. Merge: {**header_params, **body_params}  (body wins on field conflict)\n7. Add request_url_path from request.META['PATH_INFO']\n8. Guarantee request.data[RESPAN_PARAMS_KEY] is always a dict\n\nSafe for protobuf endpoints: body adaptation is skipped when request.data\nis not a dict; header adaptation always runs.\n\nUsage::\n\n    class MyChatView(AdaptRespanParamsMixin, APIView):\n        ...","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_api_v1_traces_create_Response_200"}}}}}}},"/clickhouse/log-annotations/{log_unique_id}/":{"get":{"operationId":"clickhouse-log-annotations-retrieve","summary":"Clickhouse Log Annotations Retrieve","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["logs"],"parameters":[{"name":"log_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogAnnotation"}}}}}},"put":{"operationId":"clickhouse-log-annotations-update","summary":"Clickhouse Log Annotations Update","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["logs"],"parameters":[{"name":"log_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogAnnotation"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogAnnotationRequest"}}}}},"delete":{"operationId":"clickhouse-log-annotations-destroy","summary":"Clickhouse Log Annotations Destroy","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["logs"],"parameters":[{"name":"log_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"clickhouse-log-annotations-partial-update","summary":"Clickhouse Log Annotations Partial Update","description":"For ClickHouse ReplacingMergeTree tables, we cannot UPDATE key columns.\nInstead, we INSERT a new row with the same key fields, and ClickHouse\nwill handle deduplication automatically.","tags":["logs"],"parameters":[{"name":"log_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogAnnotation"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHLogAnnotationRequest"}}}}}},"/clickhouse/request-logs/":{"get":{"operationId":"clickhouse-request-logs-list","summary":"Clickhouse Request Logs List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["logs"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPublicCHLogV2DetailList"}}}}}},"post":{"operationId":"clickhouse-request-logs-create","summary":"Clickhouse Request Logs Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHLogV2Detail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHLogV2DetailRequest"}}}}},"put":{"operationId":"clickhouse-request-logs-update","summary":"Clickhouse Request Logs Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHLogV2Detail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHLogV2DetailRequest"}}}}},"patch":{"operationId":"clickhouse-request-logs-partial-update","summary":"Clickhouse Request Logs Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCHLogV2Detail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPublicCHLogV2DetailRequest"}}}}}},"/clickhouse/request-logs/{unique_id}/":{"get":{"operationId":"clickhouse-request-logs-retrieve","summary":"Clickhouse Request Logs Retrieve","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["logs"],"parameters":[{"name":"unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2Detail"}}}}}},"post":{"operationId":"clickhouse-request-logs-create-2","summary":"Clickhouse Request Logs Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["logs"],"parameters":[{"name":"unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2Detail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2DetailRequest"}}}}},"put":{"operationId":"clickhouse-request-logs-update-2","summary":"Clickhouse Request Logs Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2Detail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2DetailRequest"}}}}},"patch":{"operationId":"clickhouse-request-logs-partial-update-2","summary":"Clickhouse Request Logs Partial Update 2","description":"Update mutable fields via lightweight UPDATE (CH 25.7+).","tags":["logs"],"parameters":[{"name":"unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2Detail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHLogV2DetailRequest"}}}}}},"/clickhouse/request-logs/groups/":{"get":{"operationId":"request-logs-groups-list-2","summary":"List request-log groups","description":"Paginated list of request-log groups: one row per distinct group key with its aggregated metrics. `group_by=trace|thread` rolls spans up into trace/thread entities (span_count, root-span i/o, error_count) via the entity views; all other values are flat breakdown dimensions sharing the dashboard-breakdown routing.","tags":["logs"],"parameters":[{"name":"end_time","in":"query","required":false,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string"}},{"name":"group_by","in":"query","description":"Dimension to group by (default 'model').","required":false,"schema":{"$ref":"#/components/schemas/ClickhouseRequestLogsGroupsGetParametersGroupBy"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string"}},{"name":"start_time","in":"query","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedClickHouseRequestLogAggregatedList"}}}}}},"post":{"operationId":"request-logs-groups-filter-2","summary":"List request-log groups (POST filter)","description":"Same as GET; the POST body carries a `filters` payload (POST-for-filtering — POST delegates to GET).","tags":["logs"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedClickHouseRequestLogAggregatedList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHRequestLogModelBreakdownRequest"}}}}},"put":{"operationId":"clickhouse-request-logs-groups-update","summary":"Clickhouse Request Logs Groups Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHRequestLogModelBreakdown"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHRequestLogModelBreakdownRequest"}}}}},"patch":{"operationId":"clickhouse-request-logs-groups-partial-update","summary":"Clickhouse Request Logs Groups Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHRequestLogModelBreakdown"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHRequestLogModelBreakdownRequest"}}}}}},"/clickhouse/request-logs/summary/":{"get":{"operationId":"clickhouse-request-logs-summary-retrieve","summary":"Clickhouse Request Logs Summary Retrieve","description":"Get logs summary. Uses MV when no filters, raw logs otherwise.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2List"}}}}}},"post":{"operationId":"clickhouse-request-logs-summary-create","summary":"Clickhouse Request Logs Summary Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2List"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2ListRequest"}}}}},"put":{"operationId":"clickhouse-request-logs-summary-update","summary":"Clickhouse Request Logs Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2List"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2ListRequest"}}}}},"patch":{"operationId":"clickhouse-request-logs-summary-partial-update","summary":"Clickhouse Request Logs Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHLogV2List"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHLogV2ListRequest"}}}}}},"/clickhouse/threads/":{"get":{"operationId":"clickhouse-threads-list","summary":"Clickhouse Threads List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["logs"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCHThreadListList"}}}}}},"post":{"operationId":"clickhouse-threads-create","summary":"Clickhouse Threads Create","description":"Handle POST requests the same as GET for filtering.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadListRequest"}}}}},"put":{"operationId":"clickhouse-threads-update","summary":"Clickhouse Threads Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadListRequest"}}}}},"patch":{"operationId":"clickhouse-threads-partial-update","summary":"Clickhouse Threads Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHThreadListRequest"}}}}}},"/clickhouse/threads/{thread_identifier}/":{"get":{"operationId":"clickhouse-threads-retrieve","summary":"Clickhouse Threads Retrieve","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["logs"],"parameters":[{"name":"thread_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadDetail"}}}}}},"post":{"operationId":"clickhouse-threads-create-2","summary":"Clickhouse Threads Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["logs"],"parameters":[{"name":"thread_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadDetailRequest"}}}}},"put":{"operationId":"clickhouse-threads-update-2","summary":"Clickhouse Threads Update 2","description":"Update a thread (placeholder for future implementation).","tags":["logs"],"parameters":[{"name":"thread_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadDetailRequest"}}}}},"delete":{"operationId":"clickhouse-threads-destroy","summary":"Clickhouse Threads Destroy","description":"Delete a thread (placeholder for future implementation).","tags":["logs"],"parameters":[{"name":"thread_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"clickhouse-threads-partial-update-2","summary":"Clickhouse Threads Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"thread_identifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHThreadDetailRequest"}}}}}},"/clickhouse/threads/list/":{"get":{"operationId":"clickhouse-threads-list-list","summary":"Clickhouse Threads List List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["logs"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCHThreadListList"}}}}}},"post":{"operationId":"clickhouse-threads-list-create","summary":"Clickhouse Threads List Create","description":"Handle POST requests the same as GET for filtering.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadListRequest"}}}}},"put":{"operationId":"clickhouse-threads-list-update","summary":"Clickhouse Threads List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadListRequest"}}}}},"patch":{"operationId":"clickhouse-threads-list-partial-update","summary":"Clickhouse Threads List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHThreadList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHThreadListRequest"}}}}}},"/clickhouse/threads/summary/":{"get":{"operationId":"clickhouse-threads-summary-retrieve","summary":"Clickhouse Threads Summary Retrieve","description":"Get summary statistics for threads.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_clickhouse_threads_summary_retrieve_Response_200"}}}}}},"post":{"operationId":"clickhouse-threads-summary-create","summary":"Clickhouse Threads Summary Create","description":"Handle POST requests the same as GET for filtering.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_clickhouse_threads_summary_create_Response_200"}}}}}},"put":{"operationId":"clickhouse-threads-summary-update","summary":"Clickhouse Threads Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_clickhouse_threads_summary_update_Response_200"}}}}}},"patch":{"operationId":"clickhouse-threads-summary-partial-update","summary":"Clickhouse Threads Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_clickhouse_threads_summary_partial_update_Response_200"}}}}}}},"/clickhouse/traces/":{"get":{"operationId":"clickhouse-traces-list","summary":"Clickhouse Traces List","description":"Get traces.","tags":["logs"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCHTraceListList"}}}}}},"post":{"operationId":"clickhouse-traces-create","summary":"Clickhouse Traces Create","description":"Handle POST requests the same as GET for filtering.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHTraceList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHTraceListRequest"}}}}},"put":{"operationId":"clickhouse-traces-update","summary":"Clickhouse Traces Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHTraceList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHTraceListRequest"}}}}},"patch":{"operationId":"clickhouse-traces-partial-update","summary":"Clickhouse Traces Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHTraceList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHTraceListRequest"}}}}}},"/clickhouse/traces/{trace_unique_id}/":{"get":{"operationId":"clickhouse-traces-retrieve","summary":"Clickhouse Traces Retrieve","description":"Retrieve a single trace by trace_unique_id.\n\nPublic path (unique_organization_id in kwargs): checks ch_trace_metadata.is_public.\nAuthenticated path: gets org from auth context.","tags":["logs"],"parameters":[{"name":"trace_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_clickhouse_traces_retrieve_Response_200"}}}}}},"post":{"operationId":"clickhouse-traces-create-2","summary":"Clickhouse Traces Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["logs"],"parameters":[{"name":"trace_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_clickhouse_traces_create_2_Response_200"}}}}}},"put":{"operationId":"clickhouse-traces-update-2","summary":"Clickhouse Traces Update 2","description":"Update a trace (placeholder for future implementation).","tags":["logs"],"parameters":[{"name":"trace_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_clickhouse_traces_update_2_Response_200"}}}}}},"delete":{"operationId":"clickhouse-traces-destroy","summary":"Clickhouse Traces Destroy","description":"Delete a single trace by trace_unique_id.\nDeletes from CHLogV3 (raw spans) and CHTraceAggregation.\nParses start_time/end_time from query params for CH ORDER BY key efficiency.","tags":["logs"],"parameters":[{"name":"trace_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"clickhouse-traces-partial-update-2","summary":"Clickhouse Traces Partial Update 2","description":"Toggle is_public on a trace via ch_trace_metadata upsert.\n\nReplacingMergeTree — INSERT with newer updated_at supersedes old row.\nPK hit on (org_id, trace_unique_id).","tags":["logs"],"parameters":[{"name":"trace_unique_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_clickhouse_traces_partial_update_2_Response_200"}}}}}}},"/clickhouse/traces/list/":{"get":{"operationId":"clickhouse-traces-list-list","summary":"Clickhouse Traces List List","description":"Get traces.","tags":["logs"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCHTraceListList"}}}}}},"post":{"operationId":"clickhouse-traces-list-create","summary":"Clickhouse Traces List Create","description":"Handle POST requests the same as GET for filtering.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHTraceList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHTraceListRequest"}}}}},"put":{"operationId":"clickhouse-traces-list-update","summary":"Clickhouse Traces List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHTraceList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHTraceListRequest"}}}}},"patch":{"operationId":"clickhouse-traces-list-partial-update","summary":"Clickhouse Traces List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CHTraceList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCHTraceListRequest"}}}}}},"/clickhouse/traces/summary/":{"get":{"operationId":"clickhouse-traces-summary-retrieve","summary":"Clickhouse Traces Summary Retrieve","description":"Get summary statistics for traces.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_clickhouse_traces_summary_retrieve_Response_200"}}}}}},"post":{"operationId":"clickhouse-traces-summary-create","summary":"Clickhouse Traces Summary Create","description":"Handle POST requests the same as GET for filtering.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_clickhouse_traces_summary_create_Response_200"}}}}}},"put":{"operationId":"clickhouse-traces-summary-update","summary":"Clickhouse Traces Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_clickhouse_traces_summary_update_Response_200"}}}}}},"patch":{"operationId":"clickhouse-traces-summary-partial-update","summary":"Clickhouse Traces Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["logs"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Logs_clickhouse_traces_summary_partial_update_Response_200"}}}}}}},"/api/credit-transactions/summary/":{"get":{"operationId":"api-credit-transactions-summary-retrieve","summary":"Api Credit Transactions Summary Retrieve","description":"GET /api/credit-transactions/summary/\nGET /payment/credit-transactions/summary/\nGet credit balance summary for the organization.\n\nQuery params (basic mode):\n    None - returns current credit balance\n\nQuery params (audit mode - superadmin only):\n    - org: Organization UUID (required)\n    - start_time: Start time (ISO 8601, required)\n    - end_time: End time (ISO 8601, required)\n\nResponse (basic mode):\n    {\n      \"current_credit_balance\": 150.50\n    }\n\nResponse (audit mode):\n    {\n        \"organization_uuid\": \"...\",\n        \"period_start\": \"...\",\n        \"period_end\": \"...\",\n        \"log_cost\": {...},\n        \"credit_transactions\": {...},\n        \"analysis\": {...}\n    }\n\nPermissions:\n    - Basic mode: Any authenticated user can view their org's balance\n    - Audit mode: Superadmin only","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditBalanceSummary"}}}}}},"post":{"operationId":"api-credit-transactions-summary-create","summary":"Api Credit Transactions Summary Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_api_credit_transactions_summary_create_Response_200"}}}}}},"put":{"operationId":"api-credit-transactions-summary-update","summary":"Api Credit Transactions Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_api_credit_transactions_summary_update_Response_200"}}}}}},"patch":{"operationId":"api-credit-transactions-summary-partial-update","summary":"Api Credit Transactions Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_api_credit_transactions_summary_partial_update_Response_200"}}}}}}},"/payment/cancel-subscription/":{"post":{"operationId":"payment-cancel-subscription-create","summary":"Payment Cancel Subscription Create","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}}}},"/payment/create-payment-session/":{"post":{"operationId":"payment-create-payment-session-create","summary":"Payment Create Payment Session Create","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentSessionResponse"}}}}}}},"/payment/credit-transactions/":{"post":{"operationId":"payment-credit-transactions-create","summary":"Payment Credit Transactions Create","description":"Create credit transaction with superadmin check.\n\nCLICKHOUSE-ONLY STRATEGY: Insert directly to ClickHouse instead of PostgreSQL.","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransactionCreate"}}}}}},"put":{"operationId":"payment-credit-transactions-update","summary":"Payment Credit Transactions Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransactionCreate"}}}}}},"patch":{"operationId":"payment-credit-transactions-partial-update","summary":"Payment Credit Transactions Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransactionCreate"}}}}}}},"/payment/credit-transactions/{id}/":{"get":{"operationId":"payment-credit-transactions-retrieve","summary":"Payment Credit Transactions Retrieve","description":"GET /api/credit-transactions/<id>/\nRetrieve a single credit transaction by ID\n\nArgs:\n    - id (str): The transaction ID (primary key)\n\nResponse:\n    - Full credit transaction details\n    - Excludes 'usage' transactions (users shouldn't access these directly)\n\nPermissions:\n    - Regular users: Can view their own org's transactions\n    - Superadmin: Can view any transaction\n\nNOTE: CLICKHOUSE-ONLY STRATEGY - Queries ClickHouse directly instead of PostgreSQL","tags":["billing"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransactionDetail"}}}}}},"post":{"operationId":"payment-credit-transactions-create-2","summary":"Payment Credit Transactions Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["billing"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransactionDetail"}}}}}},"put":{"operationId":"payment-credit-transactions-update-2","summary":"Payment Credit Transactions Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["billing"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransactionDetail"}}}}}},"patch":{"operationId":"payment-credit-transactions-partial-update-2","summary":"Payment Credit Transactions Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["billing"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransactionDetail"}}}}}}},"/payment/credit-transactions/list/":{"get":{"operationId":"payment-credit-transactions-list-list","summary":"Payment Credit Transactions List List","description":"GET /api/credit-transactions/list/\nPOST /api/credit-transactions/list/ (POST-for-Filtering)\nList credit transactions with optional filtering\n\nThis is the primary endpoint for listing transactions.\nSupports both GET (simple list) and POST (filtered list) operations.\n\nPermissions:\n    - Regular users: Can view their own org's transactions\n    - Superadmin: Can view all transactions (with org filter via query params)\n\nQuery params (superadmin only):\n    - org: Organization UUID to filter by\n\nNOTE: CLICKHOUSE-ONLY STRATEGY - Queries ClickHouse directly instead of PostgreSQL","tags":["billing"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCreditTransactionListList"}}}}}},"post":{"operationId":"payment-credit-transactions-list-create","summary":"Payment Credit Transactions List Create","description":"POST-for-Filtering pattern: POST delegates to GET for filtered listing.\nThis is NOT for creating transactions (use CreditTransactionsView for that).","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransactionList"}}}}}},"put":{"operationId":"payment-credit-transactions-list-update","summary":"Payment Credit Transactions List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransactionList"}}}}}},"patch":{"operationId":"payment-credit-transactions-list-partial-update","summary":"Payment Credit Transactions List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransactionList"}}}}}}},"/payment/credit-transactions/summary/":{"get":{"operationId":"payment-credit-transactions-summary-retrieve","summary":"Payment Credit Transactions Summary Retrieve","description":"GET /api/credit-transactions/summary/\nGET /payment/credit-transactions/summary/\nGet credit balance summary for the organization.\n\nQuery params (basic mode):\n    None - returns current credit balance\n\nQuery params (audit mode - superadmin only):\n    - org: Organization UUID (required)\n    - start_time: Start time (ISO 8601, required)\n    - end_time: End time (ISO 8601, required)\n\nResponse (basic mode):\n    {\n      \"current_credit_balance\": 150.50\n    }\n\nResponse (audit mode):\n    {\n        \"organization_uuid\": \"...\",\n        \"period_start\": \"...\",\n        \"period_end\": \"...\",\n        \"log_cost\": {...},\n        \"credit_transactions\": {...},\n        \"analysis\": {...}\n    }\n\nPermissions:\n    - Basic mode: Any authenticated user can view their org's balance\n    - Audit mode: Superadmin only","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditBalanceSummary"}}}}}},"post":{"operationId":"payment-credit-transactions-summary-create","summary":"Payment Credit Transactions Summary Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_payment_credit_transactions_summary_create_Response_200"}}}}}},"put":{"operationId":"payment-credit-transactions-summary-update","summary":"Payment Credit Transactions Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_payment_credit_transactions_summary_update_Response_200"}}}}}},"patch":{"operationId":"payment-credit-transactions-summary-partial-update","summary":"Payment Credit Transactions Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_payment_credit_transactions_summary_partial_update_Response_200"}}}}}}},"/payment/organization-subscriptions/":{"get":{"operationId":"payment-organization-subscriptions-list","summary":"Payment Organization Subscriptions List","description":"List and create organization subscriptions.\n\nSuperadmin: Can LIST all subscriptions across all organizations.\nRegular admin: Can only access their organization's subscriptions.","tags":["billing"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedOrganizationSubscriptionDetailList"}}}}}},"post":{"operationId":"payment-organization-subscriptions-create","summary":"Payment Organization Subscriptions Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSubscriptionDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSubscriptionDetailRequest"}}}}},"put":{"operationId":"payment-organization-subscriptions-update","summary":"Payment Organization Subscriptions Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSubscriptionDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSubscriptionDetailRequest"}}}}},"patch":{"operationId":"payment-organization-subscriptions-partial-update","summary":"Payment Organization Subscriptions Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSubscriptionDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedOrganizationSubscriptionDetailRequest"}}}}}},"/payment/organization-subscriptions/{unique_organization_id}/":{"get":{"operationId":"payment-organization-subscriptions-retrieve","summary":"Payment Organization Subscriptions Retrieve","description":"Retrieve, update, or delete a specific organization subscription.\n\nSuperadmin: Can access any subscription across all organizations.\nRegular admin: Can only access their organization's subscription.","tags":["billing"],"parameters":[{"name":"unique_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSubscriptionDetail"}}}}}},"post":{"operationId":"payment-organization-subscriptions-create-2","summary":"Payment Organization Subscriptions Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["billing"],"parameters":[{"name":"unique_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSubscriptionDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSubscriptionDetailRequest"}}}}},"put":{"operationId":"payment-organization-subscriptions-update-2","summary":"Payment Organization Subscriptions Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["billing"],"parameters":[{"name":"unique_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSubscriptionDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSubscriptionDetailRequest"}}}}},"delete":{"operationId":"payment-organization-subscriptions-destroy","summary":"Payment Organization Subscriptions Destroy","description":"Retrieve, update, or delete a specific organization subscription.\n\nSuperadmin: Can access any subscription across all organizations.\nRegular admin: Can only access their organization's subscription.","tags":["billing"],"parameters":[{"name":"unique_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"payment-organization-subscriptions-partial-update-2","summary":"Payment Organization Subscriptions Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["billing"],"parameters":[{"name":"unique_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSubscriptionDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedOrganizationSubscriptionDetailRequest"}}}}}},"/payment/paid-bills":{"get":{"operationId":"payment-paid-bills-retrieve","summary":"Payment Paid Bills Retrieve","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaidBillsResponse"}}}}}}},"/payment/payment-methods/":{"get":{"operationId":"payment-payment-methods-retrieve","summary":"Payment Payment Methods Retrieve","description":"GET — List all payment methods for the organization.","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodsListResponse"}}}}}}},"/payment/payment-methods/{pm_id}/":{"delete":{"operationId":"payment-payment-methods-destroy","summary":"Payment Payment Methods Destroy","description":"PATCH  — Update a payment method (set as default).\nDELETE — Detach a payment method.","tags":["billing"],"parameters":[{"name":"pm_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"payment-payment-methods-partial-update","summary":"Payment Payment Methods Partial Update","description":"PATCH  — Update a payment method (set as default).\nDELETE — Detach a payment method.","tags":["billing"],"parameters":[{"name":"pm_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultPaymentMethodResponse"}}}}}}},"/payment/usage-breakdown/":{"get":{"operationId":"payment-usage-breakdown-retrieve","summary":"Payment Usage Breakdown Retrieve","description":"GET /payment/usage-breakdown/\n\nCost and request breakdown by a chosen dimension (provider, model,\ndeployment, or feature). Available dimensions are defined in\npayment.usage_breakdown.BREAKDOWN_DIMENSIONS.\n\nQuery params: breakdown_by, sort_by, start_time, end_time.\nResponse: { breakdown_by, breakdown_items, summary, billing_periods, start_time, end_time }","tags":["billing"],"parameters":[{"name":"breakdown_by","in":"query","description":"* `provider_id` - Provider\n* `model` - Model\n* `deployment_name` - Deployment\n* `feature` - Feature","required":false,"schema":{"$ref":"#/components/schemas/PaymentUsageBreakdownGetParametersBreakdownBy"}},{"name":"end_time","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"sort_by","in":"query","description":"* `number_of_requests` - Number of Requests\n* `total_cost` - Total Cost","required":false,"schema":{"$ref":"#/components/schemas/PaymentUsageBreakdownGetParametersSortBy"}},{"name":"start_time","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageBreakdownResponse"}}}}}}},"/payment/usage-breakdown-by-feature/":{"get":{"operationId":"payment-usage-breakdown-by-feature-retrieve","summary":"Payment Usage Breakdown By Feature Retrieve","description":"GET /payment/usage-breakdown-by-feature/\n\nCost split between logging usage and LLM proxy usage.\nDefaults to current billing period when start_time/end_time omitted.\n\nQuery params: start_time, end_time.\nResponse: { data, billing_periods, start_time, end_time }","tags":["billing"],"parameters":[{"name":"end_time","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"start_time","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageBreakdownByFeatureResponse"}}}}}}},"/payment/webhooks/":{"post":{"operationId":"payment-webhooks-create","summary":"Payment Webhooks Create","description":"Handle Stripe webhook events.\n\nSignature enforcement is **opt-in** via ``settings.STRIPE_WEBHOOK_SECRET``\nso we can roll the code out as a no-op and flip enforcement on\nlater by setting the secret in ASM + reloading the server.\n\n- Strict mode (secret set): the ``Stripe-Signature`` HMAC is\n  verified against the configured secret. Missing header, bad\n  signature, or malformed payload all reject with 400 before any\n  handler runs. This closes the unauthenticated-credit-injection\n  vector.\n- Lenient mode (secret unset/empty): bit-for-bit identical to\n  the pre-fix behavior (``stripe.Event.construct_from(request.data,\n  stripe.api_key)``). Logs a warning + tags the dogfood span with\n  ``enforcement_mode=lenient`` so traces make the vulnerability\n  visible. This is the deploy-day default.\n\nDogfood tracing: every request tags\n``stripe.webhook.enforcement_mode`` (strict|lenient) and every\nfailure branch tags ``stripe.webhook.failure_reason`` so incident\nresponders can triage in the trace UI without code-diving.","tags":["billing"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing_payment_webhooks_create_Response_200"}}}}}}},"/api/export-jobs/":{"get":{"operationId":"api-export-jobs-list","summary":"Api Export Jobs List","description":"List and create export jobs.\n\nSuperadmin: Can LIST all export jobs across all organizations.\nRegular users: Can only access export jobs in their organization.","tags":["exports"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedExportJobListList"}}}}}},"post":{"operationId":"api-export-jobs-create","summary":"Api Export Jobs Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["exports"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobDetailRequest"}}}}},"put":{"operationId":"api-export-jobs-update","summary":"Api Export Jobs Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["exports"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobDetailRequest"}}}}},"patch":{"operationId":"api-export-jobs-partial-update","summary":"Api Export Jobs Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["exports"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedExportJobDetailRequest"}}}}}},"/api/export-jobs/{export_job_id}/chunks":{"get":{"operationId":"api-export-jobs-chunks-retrieve","summary":"Api Export Jobs Chunks Retrieve","description":"View mixin that handles both JWT and API Key authentication.\n\nInherits from JWTAuthUtils:\n- is_jwt_auth(request): Post-auth check (reliable, uses DRF's successful_authenticator)\n- is_jwt_token_format(request): Pre-auth heuristic (used here to route authenticators)\n\nThis mixin uses is_jwt_token_format() (pre-auth) in get_authenticators() and get_permissions()\nbecause those methods run BEFORE authentication completes. For post-auth checks,\nuse is_jwt_auth() instead.","tags":["exports"],"parameters":[{"name":"export_job_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Exports_api_export_jobs_chunks_retrieve_Response_200"}}}}}}},"/api/export-jobs/{export_job_id}/download/":{"get":{"operationId":"api-export-jobs-download-retrieve","summary":"Api Export Jobs Download Retrieve","description":"Download a specific bundle from an export directory.\n\nArgs:\n    export_job_id: ID of the export job\n    bundle_number: Bundle number to download (default: 1)","tags":["exports"],"parameters":[{"name":"export_job_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Exports_api_export_jobs_download_retrieve_Response_200"}}}}}}},"/api/export-jobs/{export_job_id}/download/{bundle_number}/":{"get":{"operationId":"api-export-jobs-download-retrieve-2","summary":"Api Export Jobs Download Retrieve 2","description":"Download a specific bundle from an export directory.\n\nArgs:\n    export_job_id: ID of the export job\n    bundle_number: Bundle number to download (default: 1)","tags":["exports"],"parameters":[{"name":"bundle_number","in":"path","required":true,"schema":{"type":"integer"}},{"name":"export_job_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Exports_api_export_jobs_download_retrieve_2_Response_200"}}}}}}},"/api/export-jobs/{id}/":{"get":{"operationId":"api-export-jobs-retrieve","summary":"Api Export Jobs Retrieve","description":"Retrieve, update, or delete an export job.\n\nPATCH with ``{\"status\": \"paused\"}`` pauses an in-progress job.\nPATCH with ``{\"status\": \"pending\"}`` resumes a paused job.\nTransition validation lives in the serializer; side effects in signals.\n\nSuperadmin: Can access any export job across all organizations.\nRegular users: Can only access export jobs in their organization.","tags":["exports"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobDetail"}}}}}},"post":{"operationId":"api-export-jobs-create-2","summary":"Api Export Jobs Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["exports"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobDetailRequest"}}}}},"put":{"operationId":"api-export-jobs-update-2","summary":"Api Export Jobs Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["exports"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobDetailRequest"}}}}},"delete":{"operationId":"api-export-jobs-destroy","summary":"Api Export Jobs Destroy","description":"Retrieve, update, or delete an export job.\n\nPATCH with ``{\"status\": \"paused\"}`` pauses an in-progress job.\nPATCH with ``{\"status\": \"pending\"}`` resumes a paused job.\nTransition validation lives in the serializer; side effects in signals.\n\nSuperadmin: Can access any export job across all organizations.\nRegular users: Can only access export jobs in their organization.","tags":["exports"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-export-jobs-partial-update-2","summary":"Api Export Jobs Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["exports"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedExportJobDetailRequest"}}}}}},"/api/export-jobs/list/":{"get":{"operationId":"api-export-jobs-list-list","summary":"Api Export Jobs List List","description":"List and create export jobs.\n\nSuperadmin: Can LIST all export jobs across all organizations.\nRegular users: Can only access export jobs in their organization.","tags":["exports"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedExportJobListList"}}}}}},"post":{"operationId":"api-export-jobs-list-create","summary":"Api Export Jobs List Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["exports"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobDetailRequest"}}}}},"put":{"operationId":"api-export-jobs-list-update","summary":"Api Export Jobs List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["exports"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobDetailRequest"}}}}},"patch":{"operationId":"api-export-jobs-list-partial-update","summary":"Api Export Jobs List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["exports"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedExportJobDetailRequest"}}}}}},"/api/export-jobs/summary/":{"get":{"operationId":"api-export-jobs-summary-retrieve","summary":"Api Export Jobs Summary Retrieve","description":"Summary endpoint for export jobs.\nReturns aggregate statistics about export jobs.\n\nSupports filtering via POST body to get summary of filtered results.\n\nSuperadmin: Summarizes all export jobs across all organizations.\nRegular users: Summarizes only their organization's export jobs.","tags":["exports"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobList"}}}}}},"post":{"operationId":"api-export-jobs-summary-create","summary":"Api Export Jobs Summary Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["exports"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobListRequest"}}}}},"put":{"operationId":"api-export-jobs-summary-update","summary":"Api Export Jobs Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["exports"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobListRequest"}}}}},"patch":{"operationId":"api-export-jobs-summary-partial-update","summary":"Api Export Jobs Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["exports"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedExportJobListRequest"}}}}}},"/api/filters/":{"get":{"operationId":"api-filters-retrieve","summary":"Api Filters Retrieve","description":"Get available filter configurations for a page view.","tags":["filters"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ApiFiltersGetResponsesContentApplicationJsonSchema"}}}}}}},"post":{"operationId":"api-filters-create","summary":"Api Filters Create","tags":["filters"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Filters_api_filters_create_Response_200"}}}}}}},"/api/saved-filter/{id}/":{"get":{"operationId":"api-saved-filter-retrieve","summary":"Api Saved Filter Retrieve","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["filters"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterDetail"}}}}}},"put":{"operationId":"api-saved-filter-update","summary":"Api Saved Filter Update","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["filters"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterUpdateRequest"}}}}},"delete":{"operationId":"api-saved-filter-destroy","summary":"Api Saved Filter Destroy","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["filters"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-saved-filter-partial-update","summary":"Api Saved Filter Partial Update","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["filters"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedSavedFilterUpdateRequest"}}}}}},"/api/saved-filters/":{"get":{"operationId":"api-saved-filters-list","summary":"Api Saved Filters List","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["filters"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedSavedFilterListList"}}}}}},"post":{"operationId":"api-saved-filters-create","summary":"Api Saved Filters Create","description":"Stamp server-controlled fields at save time — never by mutating\n``request.data``.\n\nDRF's contract: ``post()`` → ``create()`` → ``serializer.is_valid()`` →\n``perform_create(serializer)`` → ``serializer.save(**kwargs)``. Server values\nbelong in that final ``save(**kwargs)`` — they override ``validated_data``,\nnever pass through client validation, and don't need to be *writable*\nserializer fields. The matching serializer field becomes ``read_only=True``\n(or is dropped from ``fields``), shrinking — not widening — the\nmass-assignment surface, and the immutable-``QueryDict`` (multipart) failure\nmode of the old ``request.data[...] =`` pattern disappears.\n\nDeclare the fields to stamp as ``field -> fn(view) -> value`` maps::\n\n    class ExperimentV2sView(ServerStampedFieldsMixin, ...):\n        create_stamped_fields = {\"created_by\": stamp_request_user_id}\n    # + serializer: created_by = ...(read_only=True)\n\nFK columns: when the stamped value is an ``int`` and the field names a\nrelation on the serializer's ``Meta.model``, the kwarg is rewritten to\n``<field>_id`` so ``Model.objects.create`` accepts it (a raw ``int`` on the\nFK attribute itself would raise). Non-relation fields (``scorer`` = email)\nand instance values pass through unchanged.\n\nCooperative composition: subclasses that need to stamp *additional* server\nvalues (e.g. ``OrganizationInjectionMixin`` stamping org/project) override\n``get_create_save_kwargs`` / ``get_update_save_kwargs`` and merge onto\n``super()`` — yielding exactly ONE ``serializer.save()`` per request (calling\n``save()`` twice would re-run create/update side effects).","tags":["filters"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterCreateRequest"}}}}}},"/api/saved-filters/list/":{"get":{"operationId":"api-saved-filters-list-list","summary":"Api Saved Filters List List","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["filters"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedSavedFilterListList"}}}}}},"post":{"operationId":"api-saved-filters-list-create","summary":"Api Saved Filters List Create","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["filters"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFilterListRequest"}}}}}},"/api/saved-filters/summary/":{"get":{"operationId":"api-saved-filters-summary-retrieve","summary":"Api Saved Filters Summary Retrieve","description":"GET/POST /api/saved-filters/summary/\n\nGet summary statistics for saved filters (views).\n\nReturns:\n    {\n        \"total_count\": 12\n    }\n\nPOST supports filtering via body (POST-for-filtering pattern).","tags":["filters"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFiltersSummaryResponse"}}}}}},"post":{"operationId":"api-saved-filters-summary-create","summary":"Api Saved Filters Summary Create","description":"GET/POST /api/saved-filters/summary/\n\nGet summary statistics for saved filters (views).\n\nReturns:\n    {\n        \"total_count\": 12\n    }\n\nPOST supports filtering via body (POST-for-filtering pattern).","tags":["filters"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFiltersSummaryResponse"}}}}}}},"/api/integrations/":{"get":{"operationId":"api-integrations-list","summary":"Api Integrations List","description":"GET/POST /vendor_integration/integrations/\n\nList and create integrations.\nSupports both JWT (platform UI) and API key authentication.\nSuperadmins see all integrations; regular users see only customer-visible ones.","tags":["integrations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedIntegrationList"}}}}}},"post":{"operationId":"api-integrations-create","summary":"Api Integrations Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationRequest"}}}}},"put":{"operationId":"api-integrations-update","summary":"Api Integrations Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationRequest"}}}}},"patch":{"operationId":"api-integrations-partial-update","summary":"Api Integrations Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedIntegrationRequest"}}}}}},"/api/integrations/{id}/":{"get":{"operationId":"api-integrations-retrieve","summary":"Api Integrations Retrieve","description":"GET/PATCH/DELETE /vendor_integration/integrations/{id}/\n\nRetrieve, update, or delete a single integration.\nSupports both JWT (platform UI) and API key authentication.\nSuperadmins can access all integrations; regular users only customer-visible ones.","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}}},"post":{"operationId":"api-integrations-create-2","summary":"Api Integrations Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationRequest"}}}}},"put":{"operationId":"api-integrations-update-2","summary":"Api Integrations Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationRequest"}}}}},"delete":{"operationId":"api-integrations-destroy","summary":"Api Integrations Destroy","description":"GET/PATCH/DELETE /vendor_integration/integrations/{id}/\n\nRetrieve, update, or delete a single integration.\nSupports both JWT (platform UI) and API key authentication.\nSuperadmins can access all integrations; regular users only customer-visible ones.","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-integrations-partial-update-2","summary":"Api Integrations Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedIntegrationRequest"}}}}}},"/api/integrations/{id}/test/":{"post":{"operationId":"api-integrations-test-create","summary":"Api Integrations Test Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integrations_api_integrations_test_create_Response_200"}}}}}},"put":{"operationId":"api-integrations-test-update","summary":"Api Integrations Test Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integrations_api_integrations_test_update_Response_200"}}}}}},"patch":{"operationId":"api-integrations-test-partial-update","summary":"Api Integrations Test Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integrations_api_integrations_test_partial_update_Response_200"}}}}}}},"/api/integrations/list/":{"get":{"operationId":"api-integrations-list-list","summary":"Api Integrations List List","description":"GET/POST /vendor_integration/integrations/list/\nGET/POST /api/integrations/list/\n\nPaginated, filtered listing of integrations.\nSupports both JWT (platform UI) and API key authentication.\n\nPOST is used for filtering (same as GET but allows filter body).\n\nQuery Parameters:\n    - page (int): Page number (default: 1)\n    - page_size (int): Items per page (default: 20, max: 100)\n    - sort_by (str): Field to sort by (default: -id)\n\nFilters (superadmins see additional filters):\n    - provider: Filter by provider ID\n    - is_active: Filter active/inactive\n    - organization: (admin only) Filter by organization\n    - is_managed: (admin only) Filter managed vs customer-owned","tags":["integrations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedIntegrationList"}}}}}},"post":{"operationId":"api-integrations-list-create","summary":"Api Integrations List Create","description":"POST for filtering - delegate to GET.","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationRequest"}}}}},"put":{"operationId":"api-integrations-list-update","summary":"Api Integrations List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationRequest"}}}}},"patch":{"operationId":"api-integrations-list-partial-update","summary":"Api Integrations List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedIntegrationRequest"}}}}}},"/api/integrations/oauth/{provider_key}/":{"get":{"operationId":"api-integrations-oauth-retrieve","summary":"Api Integrations Oauth Retrieve","description":"Get connection status for a specific provider.","tags":["integrations"],"parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthIntegration"}}}}}},"delete":{"operationId":"api-integrations-oauth-destroy","summary":"Api Integrations Oauth Destroy","description":"Disconnect an OAuth integration. Revokes token and soft-deletes.","tags":["integrations"],"parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/api/integrations/oauth/{provider_key}/authorize/":{"get":{"operationId":"api-integrations-oauth-authorize-retrieve","summary":"Api Integrations Oauth Authorize Retrieve","description":"Return the provider's OAuth authorize URL for the FE to open in a popup. Rate limited to 30 req/min per user.","tags":["integrations"],"parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAuthorizeUrl"}}}}}}},"/api/integrations/oauth/{provider_key}/callback/":{"get":{"operationId":"api-integrations-oauth-callback-retrieve","summary":"Api Integrations Oauth Callback Retrieve","description":"OAuth callback — exchanges code for token and returns an HTML page that closes the popup.","tags":["integrations"],"parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string"}},{"name":"code","in":"query","description":"Authorization code from provider","required":false,"schema":{"type":"string"}},{"name":"error","in":"query","description":"Error from provider","required":false,"schema":{"type":"string"}},{"name":"state","in":"query","description":"Signed state parameter for CSRF protection","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integrations_api_integrations_oauth_callback_retrieve_Response_200"}}}}}}},"/api/integrations/oauth/{provider_key}/resources/list/":{"get":{"operationId":"api-integrations-oauth-resources-list-list","summary":"Api Integrations Oauth Resources List List","description":"List available resources (channels, calendars, etc.) for a connected integration.","tags":["integrations"],"parameters":[{"name":"provider_key","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number","required":false,"schema":{"type":"integer","default":1}},{"name":"page_size","in":"query","description":"Number of items per page (max 1000)","required":false,"schema":{"type":"integer","default":100}},{"name":"search","in":"query","description":"Filter resources by name (case-insensitive)","required":false,"schema":{"type":"string","default":""}},{"name":"type","in":"query","description":"Resource type to list (e.g., channel, calendar)","required":false,"schema":{"type":"string","default":"channel"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResourceList"}}}}}}},"/api/integrations/slack/events/":{"post":{"operationId":"api-integrations-slack-events-create","summary":"Api Integrations Slack Events Create","description":"Slack Events API receiver (@mention → agent bridge).\n\nUnauthenticated; HMAC-verified against SLACK_SIGNING_SECRET before any\nparsing (StripeWebhooks pattern, strict-only). Post-signature outcomes\nreturn 200 — Slack disables the subscription on sustained non-2xx.","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integrations_api_integrations_slack_events_create_Response_200"}}}}}}},"/api/integrations/summary/":{"get":{"operationId":"api-integrations-summary-retrieve","summary":"Api Integrations Summary Retrieve","description":"GET/POST /vendor_integration/integrations/summary/\nGET/POST /api/integrations/summary/\n\nGet summary statistics for integrations.\n\nReturns:\n    {\n        \"total_count\": 150,\n        \"active_count\": 120,\n        \"inactive_count\": 30,\n        \"by_provider\": {\n            \"openai\": 50,\n            \"anthropic\": 40,\n            ...\n        }\n    }\n\nFor superadmins, also includes:\n    - managed_count: Respan managed integrations\n    - customer_count: Customer-owned integrations","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integrations_api_integrations_summary_retrieve_Response_200"}}}}}},"post":{"operationId":"api-integrations-summary-create","summary":"Api Integrations Summary Create","description":"POST for filtering - delegate to GET.","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integrations_api_integrations_summary_create_Response_200"}}}}}},"put":{"operationId":"api-integrations-summary-update","summary":"Api Integrations Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integrations_api_integrations_summary_update_Response_200"}}}}}},"patch":{"operationId":"api-integrations-summary-partial-update","summary":"Api Integrations Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integrations_api_integrations_summary_partial_update_Response_200"}}}}}}},"/api/integrations/v1/traces/ingest":{"post":{"operationId":"api-integrations-v-1-traces-ingest-create","summary":"Api Integrations V 1 Traces Ingest Create","description":"Process Vercel traces.","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integrations_api_integrations_v1_traces_ingest_create_Response_200"}}}}}}},"/api/load-balance-group/{id}/":{"get":{"operationId":"api-load-balance-group-retrieve","summary":"Api Load Balance Group Retrieve","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadBalanceGroupDetail"}}}}}},"delete":{"operationId":"api-load-balance-group-destroy","summary":"Api Load Balance Group Destroy","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-load-balance-group-partial-update","summary":"Api Load Balance Group Partial Update","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadBalanceGroupDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedLoadBalanceGroupDetailRequest"}}}}}},"/api/load-balance-groups/":{"get":{"operationId":"api-load-balance-groups-list","summary":"Api Load Balance Groups List","description":"Mixin that provides automatic organization injection and cross-org write protection.\n\nThis mixin handles ALL organization-related write behavior:\n- CREATE: Injects organization (user's org for JWT, target org for API key superadmin)\n- UPDATE/DELETE: Allows same-org writes; cross-org JWT writes require the\n  caller's scope-aware ``is_superadmin()`` (active staff write scope). API\n  key superadmin can write anywhere.\n\nThis is DATA SANITIZATION, not permission. Permission classes handle authentication\nand authorization (can they write at all?). This mixin handles where they write to.\n\nInherits from:\n- JWTAuthUtils: is_jwt_auth(), is_jwt_token_format()\n- PermissionUtils: is_read_operation(), is_write_operation(), is_same_org()\n- OrgScopeMixin: is_superadmin(), get_organization(), inject_*_organization()\n\nBehavior:\n    - post(): Calls inject_target_organization() for CREATE operations\n    - patch()/put(): Calls inject_user_organization() for UPDATE operations\n    - perform_update(): Allows cross-org UPDATE for JWT auth only with active staff write scope\n    - perform_destroy(): Allows cross-org DELETE for JWT auth only with active staff write scope\n\nUsage:\n    class MyView(OrganizationInjectionMixin, JWTAndAPIKeyAuthenticationViewMixin, ListCreateAPIView):\n        # All org injection and cross-org protection automatic!\n        pass\n\nNote: SuperAdminMixin inherits from this mixin, so views using SuperAdminMixin\nautomatically get these safe defaults.","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LoadBalanceGroupCreate"}}}}}}},"post":{"operationId":"api-load-balance-groups-create","summary":"Api Load Balance Groups Create","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadBalanceGroupCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadBalanceGroupCreateRequest"}}}}}},"/api/load-balance-model/{id}/":{"get":{"operationId":"api-load-balance-model-retrieve","summary":"Api Load Balance Model Retrieve","description":"View mixin that handles both JWT and API Key authentication.\n\nInherits from JWTAuthUtils:\n- is_jwt_auth(request): Post-auth check (reliable, uses DRF's successful_authenticator)\n- is_jwt_token_format(request): Pre-auth heuristic (used here to route authenticators)\n\nThis mixin uses is_jwt_token_format() (pre-auth) in get_authenticators() and get_permissions()\nbecause those methods run BEFORE authentication completes. For post-auth checks,\nuse is_jwt_auth() instead.","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadBalanceModelUpdate"}}}}}},"delete":{"operationId":"api-load-balance-model-destroy","summary":"Api Load Balance Model Destroy","description":"View mixin that handles both JWT and API Key authentication.\n\nInherits from JWTAuthUtils:\n- is_jwt_auth(request): Post-auth check (reliable, uses DRF's successful_authenticator)\n- is_jwt_token_format(request): Pre-auth heuristic (used here to route authenticators)\n\nThis mixin uses is_jwt_token_format() (pre-auth) in get_authenticators() and get_permissions()\nbecause those methods run BEFORE authentication completes. For post-auth checks,\nuse is_jwt_auth() instead.","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-load-balance-model-partial-update","summary":"Api Load Balance Model Partial Update","description":"View mixin that handles both JWT and API Key authentication.\n\nInherits from JWTAuthUtils:\n- is_jwt_auth(request): Post-auth check (reliable, uses DRF's successful_authenticator)\n- is_jwt_token_format(request): Pre-auth heuristic (used here to route authenticators)\n\nThis mixin uses is_jwt_token_format() (pre-auth) in get_authenticators() and get_permissions()\nbecause those methods run BEFORE authentication completes. For post-auth checks,\nuse is_jwt_auth() instead.","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadBalanceModelUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedLoadBalanceModelUpdateRequest"}}}}}},"/api/load-balance-models/":{"get":{"operationId":"api-load-balance-models-list","summary":"Api Load Balance Models List","description":"View mixin that handles both JWT and API Key authentication.\n\nInherits from JWTAuthUtils:\n- is_jwt_auth(request): Post-auth check (reliable, uses DRF's successful_authenticator)\n- is_jwt_token_format(request): Pre-auth heuristic (used here to route authenticators)\n\nThis mixin uses is_jwt_token_format() (pre-auth) in get_authenticators() and get_permissions()\nbecause those methods run BEFORE authentication completes. For post-auth checks,\nuse is_jwt_auth() instead.","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LoadBalanceCreateModel"}}}}}}},"post":{"operationId":"api-load-balance-models-create","summary":"Api Load Balance Models Create","description":"View mixin that handles both JWT and API Key authentication.\n\nInherits from JWTAuthUtils:\n- is_jwt_auth(request): Post-auth check (reliable, uses DRF's successful_authenticator)\n- is_jwt_token_format(request): Pre-auth heuristic (used here to route authenticators)\n\nThis mixin uses is_jwt_token_format() (pre-auth) in get_authenticators() and get_permissions()\nbecause those methods run BEFORE authentication completes. For post-auth checks,\nuse is_jwt_auth() instead.","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadBalanceCreateModel"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadBalanceCreateModelRequest"}}}}}},"/api/validate-load-balance-model/":{"post":{"operationId":"api-validate-load-balance-model-create","summary":"Api Validate Load Balance Model Create","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integrations_api_validate_load_balance_model_create_Response_200"}}}}}}},"/vendor_integration/integration/{id}/":{"get":{"operationId":"vendor-integration-integration-retrieve","summary":"Vendor Integration Integration Retrieve","description":"GET/PATCH/DELETE /vendor_integration/integrations/{id}/\n\nRetrieve, update, or delete a single integration.\nSupports both JWT (platform UI) and API key authentication.\nSuperadmins can access all integrations; regular users only customer-visible ones.","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}}},"post":{"operationId":"vendor-integration-integration-create","summary":"Vendor Integration Integration Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationRequest"}}}}},"put":{"operationId":"vendor-integration-integration-update","summary":"Vendor Integration Integration Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationRequest"}}}}},"delete":{"operationId":"vendor-integration-integration-destroy","summary":"Vendor Integration Integration Destroy","description":"GET/PATCH/DELETE /vendor_integration/integrations/{id}/\n\nRetrieve, update, or delete a single integration.\nSupports both JWT (platform UI) and API key authentication.\nSuperadmins can access all integrations; regular users only customer-visible ones.","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"vendor-integration-integration-partial-update","summary":"Vendor Integration Integration Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedIntegrationRequest"}}}}}},"/vendor_integration/integrations/":{"get":{"operationId":"vendor-integration-integrations-list","summary":"Vendor Integration Integrations List","description":"GET/POST /vendor_integration/integrations/\n\nList and create integrations.\nSupports both JWT (platform UI) and API key authentication.\nSuperadmins see all integrations; regular users see only customer-visible ones.","tags":["integrations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedIntegrationList"}}}}}},"post":{"operationId":"vendor-integration-integrations-create","summary":"Vendor Integration Integrations Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationRequest"}}}}},"put":{"operationId":"vendor-integration-integrations-update","summary":"Vendor Integration Integrations Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationRequest"}}}}},"patch":{"operationId":"vendor-integration-integrations-partial-update","summary":"Vendor Integration Integrations Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedIntegrationRequest"}}}}}},"/vendor_integration/integrations/{id}/":{"get":{"operationId":"vendor-integration-integrations-retrieve","summary":"Vendor Integration Integrations Retrieve","description":"GET/PATCH/DELETE /vendor_integration/integrations/{id}/\n\nRetrieve, update, or delete a single integration.\nSupports both JWT (platform UI) and API key authentication.\nSuperadmins can access all integrations; regular users only customer-visible ones.","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}}},"post":{"operationId":"vendor-integration-integrations-create-2","summary":"Vendor Integration Integrations Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationRequest"}}}}},"put":{"operationId":"vendor-integration-integrations-update-2","summary":"Vendor Integration Integrations Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationRequest"}}}}},"delete":{"operationId":"vendor-integration-integrations-destroy","summary":"Vendor Integration Integrations Destroy","description":"GET/PATCH/DELETE /vendor_integration/integrations/{id}/\n\nRetrieve, update, or delete a single integration.\nSupports both JWT (platform UI) and API key authentication.\nSuperadmins can access all integrations; regular users only customer-visible ones.","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"vendor-integration-integrations-partial-update-2","summary":"Vendor Integration Integrations Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["integrations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedIntegrationRequest"}}}}}},"/vendor_integration/integrations/list/":{"get":{"operationId":"vendor-integration-integrations-list-list","summary":"Vendor Integration Integrations List List","description":"GET/POST /vendor_integration/integrations/list/\nGET/POST /api/integrations/list/\n\nPaginated, filtered listing of integrations.\nSupports both JWT (platform UI) and API key authentication.\n\nPOST is used for filtering (same as GET but allows filter body).\n\nQuery Parameters:\n    - page (int): Page number (default: 1)\n    - page_size (int): Items per page (default: 20, max: 100)\n    - sort_by (str): Field to sort by (default: -id)\n\nFilters (superadmins see additional filters):\n    - provider: Filter by provider ID\n    - is_active: Filter active/inactive\n    - organization: (admin only) Filter by organization\n    - is_managed: (admin only) Filter managed vs customer-owned","tags":["integrations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedIntegrationList"}}}}}},"post":{"operationId":"vendor-integration-integrations-list-create","summary":"Vendor Integration Integrations List Create","description":"POST for filtering - delegate to GET.","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationRequest"}}}}},"put":{"operationId":"vendor-integration-integrations-list-update","summary":"Vendor Integration Integrations List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationRequest"}}}}},"patch":{"operationId":"vendor-integration-integrations-list-partial-update","summary":"Vendor Integration Integrations List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedIntegrationRequest"}}}}}},"/vendor_integration/integrations/summary/":{"get":{"operationId":"vendor-integration-integrations-summary-retrieve","summary":"Vendor Integration Integrations Summary Retrieve","description":"GET/POST /vendor_integration/integrations/summary/\nGET/POST /api/integrations/summary/\n\nGet summary statistics for integrations.\n\nReturns:\n    {\n        \"total_count\": 150,\n        \"active_count\": 120,\n        \"inactive_count\": 30,\n        \"by_provider\": {\n            \"openai\": 50,\n            \"anthropic\": 40,\n            ...\n        }\n    }\n\nFor superadmins, also includes:\n    - managed_count: Respan managed integrations\n    - customer_count: Customer-owned integrations","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integrations_vendor_integration_integrations_summary_retrieve_Response_200"}}}}}},"post":{"operationId":"vendor-integration-integrations-summary-create","summary":"Vendor Integration Integrations Summary Create","description":"POST for filtering - delegate to GET.","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integrations_vendor_integration_integrations_summary_create_Response_200"}}}}}},"put":{"operationId":"vendor-integration-integrations-summary-update","summary":"Vendor Integration Integrations Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integrations_vendor_integration_integrations_summary_update_Response_200"}}}}}},"patch":{"operationId":"vendor-integration-integrations-summary-partial-update","summary":"Vendor Integration Integrations Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integrations_vendor_integration_integrations_summary_partial_update_Response_200"}}}}}}},"/vendor_integration/technical-partnership-integrations/":{"get":{"operationId":"vendor-integration-technical-partnership-integrations-list","summary":"Vendor Integration Technical Partnership Integrations List","description":"GET/POST /vendor_integration/technical-partnership-integrations/\n\nList and create technical partner integrations (Mem0, Linkup, Moda, etc.).\nSupports both JWT (platform UI) and API key authentication.\n\nThese integrations connect your organization to third-party services:\n- mem0: Memory management for conversational context\n- linkup: Search augmentation / RAG\n- moda: Observability and analytics\n- hyperspell: Data integrations and memory search","tags":["integrations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedTechnicalPartnershipIntegrationList"}}}}}},"post":{"operationId":"vendor-integration-technical-partnership-integrations-create","summary":"Vendor Integration Technical Partnership Integrations Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalPartnershipIntegration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalPartnershipIntegrationRequest"}}}}},"put":{"operationId":"vendor-integration-technical-partnership-integrations-update","summary":"Vendor Integration Technical Partnership Integrations Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalPartnershipIntegration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalPartnershipIntegrationRequest"}}}}},"patch":{"operationId":"vendor-integration-technical-partnership-integrations-partial-update","summary":"Vendor Integration Technical Partnership Integrations Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalPartnershipIntegration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedTechnicalPartnershipIntegrationRequest"}}}}}},"/vendor_integration/technical-partnership-integrations/{id}/":{"get":{"operationId":"vendor-integration-technical-partnership-integrations-retrieve","summary":"Vendor Integration Technical Partnership Integrations Retrieve","description":"GET/PATCH/DELETE /vendor_integration/technical-partnership-integrations/{pk}/\n\nRetrieve, update, or delete a single technical partner integration.\nSupports both JWT (platform UI) and API key authentication.","tags":["integrations"],"parameters":[{"name":"id","in":"path","description":"A unique value identifying this Technical Partnership Integration.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalPartnershipIntegration"}}}}}},"post":{"operationId":"vendor-integration-technical-partnership-integrations-create-2","summary":"Vendor Integration Technical Partnership Integrations Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["integrations"],"parameters":[{"name":"id","in":"path","description":"A unique value identifying this Technical Partnership Integration.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalPartnershipIntegration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalPartnershipIntegrationRequest"}}}}},"put":{"operationId":"vendor-integration-technical-partnership-integrations-update-2","summary":"Vendor Integration Technical Partnership Integrations Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["integrations"],"parameters":[{"name":"id","in":"path","description":"A unique value identifying this Technical Partnership Integration.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalPartnershipIntegration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalPartnershipIntegrationRequest"}}}}},"delete":{"operationId":"vendor-integration-technical-partnership-integrations-destroy","summary":"Vendor Integration Technical Partnership Integrations Destroy","description":"GET/PATCH/DELETE /vendor_integration/technical-partnership-integrations/{pk}/\n\nRetrieve, update, or delete a single technical partner integration.\nSupports both JWT (platform UI) and API key authentication.","tags":["integrations"],"parameters":[{"name":"id","in":"path","description":"A unique value identifying this Technical Partnership Integration.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"vendor-integration-technical-partnership-integrations-partial-update-2","summary":"Vendor Integration Technical Partnership Integrations Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["integrations"],"parameters":[{"name":"id","in":"path","description":"A unique value identifying this Technical Partnership Integration.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalPartnershipIntegration"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedTechnicalPartnershipIntegrationRequest"}}}}}},"/vendor_integration/validate-api-key/":{"post":{"operationId":"vendor-integration-validate-api-key-create","summary":"Vendor Integration Validate Api Key Create","description":"Validate API credentials. Supports both JWT and API key auth.","tags":["integrations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integrations_vendor_integration_validate_api_key_create_Response_200"}}}}}}},"/api/playgrounds/":{"get":{"operationId":"api-playgrounds-list","summary":"Api Playgrounds List","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["playgrounds"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPlaygroundListList"}}}}}},"post":{"operationId":"api-playgrounds-create","summary":"Api Playgrounds Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["playgrounds"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundCreateRequest"}}}}}},"/api/playgrounds/{playground_id}/":{"get":{"operationId":"api-playgrounds-retrieve","summary":"Api Playgrounds Retrieve","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["playgrounds"],"parameters":[{"name":"playground_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundDetail"}}}}}},"put":{"operationId":"api-playgrounds-update","summary":"Api Playgrounds Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["playgrounds"],"parameters":[{"name":"playground_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundUpdateRequest"}}}}},"delete":{"operationId":"api-playgrounds-destroy","summary":"Api Playgrounds Destroy","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["playgrounds"],"parameters":[{"name":"playground_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-playgrounds-partial-update","summary":"Api Playgrounds Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["playgrounds"],"parameters":[{"name":"playground_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPlaygroundUpdateRequest"}}}}}},"/api/playgrounds/{playground_id}/columns/":{"get":{"operationId":"api-playgrounds-columns-list","summary":"Api Playgrounds Columns List","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["playgrounds"],"parameters":[{"name":"playground_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PlaygroundColumnList"}}}}}}},"post":{"operationId":"api-playgrounds-columns-create","summary":"Api Playgrounds Columns Create","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["playgrounds"],"parameters":[{"name":"playground_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundColumnCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundColumnCreateRequest"}}}}}},"/api/playgrounds/{playground_id}/columns/{column_id}/":{"get":{"operationId":"api-playgrounds-columns-retrieve","summary":"Api Playgrounds Columns Retrieve","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["playgrounds"],"parameters":[{"name":"column_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"playground_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundColumnDetail"}}}}}},"put":{"operationId":"api-playgrounds-columns-update","summary":"Api Playgrounds Columns Update","description":"Default PUT handler with automatic organization injection.\n\nSame behavior as patch() - preserves ownership for superadmins,\nforces user's org for regular users.","tags":["playgrounds"],"parameters":[{"name":"column_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"playground_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundColumnDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundColumnUpdateRequest"}}}}},"delete":{"operationId":"api-playgrounds-columns-destroy","summary":"Api Playgrounds Columns Destroy","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["playgrounds"],"parameters":[{"name":"column_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"playground_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-playgrounds-columns-partial-update","summary":"Api Playgrounds Columns Partial Update","description":"Default PATCH handler with automatic organization injection.\n\nFor UPDATE operations:\n- Superadmins preserve original ownership (org fields removed from request)\n- Regular users are forced to their own organization\n\nOverride this method only for custom pre-update logic.","tags":["playgrounds"],"parameters":[{"name":"column_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"playground_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundColumnDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPlaygroundColumnUpdateRequest"}}}}}},"/api/playgrounds/{playground_id}/rows/bulk/":{"post":{"operationId":"api-playgrounds-rows-bulk-create","summary":"Api Playgrounds Rows Bulk Create","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["playgrounds"],"parameters":[{"name":"playground_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogsBulkCreateResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetLogsBulkCreateRequestRequest"}}}}}},"/api/playgrounds/{playground_id}/rows/list/":{"get":{"operationId":"api-playgrounds-rows-list-list","summary":"Api Playgrounds Rows List List","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["playgrounds"],"parameters":[{"name":"playground_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number for grouped Playground rows.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Page size for grouped Playground rows.","required":false,"schema":{"type":"integer"}},{"name":"sort_by","in":"query","description":"Sort grouped rows. Defaults to comparison_key. Supports row fields and cell sorting via cells__<experiment_id>.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundRowsListResponse"}}}}}},"post":{"operationId":"api-playgrounds-rows-list-filtered","summary":"Api Playgrounds Rows List Filtered","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["playgrounds"],"parameters":[{"name":"playground_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number for grouped Playground rows.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Page size for grouped Playground rows.","required":false,"schema":{"type":"integer"}},{"name":"sort_by","in":"query","description":"Sort grouped rows. Defaults to comparison_key. Supports row fields and cell sorting via cells__<experiment_id>.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundRowsListResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetFilterRequestRequest"}}}}}},"/api/playgrounds/{playground_id}/rows/summary/":{"get":{"operationId":"api-playgrounds-rows-summary-retrieve","summary":"Api Playgrounds Rows Summary Retrieve","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["playgrounds"],"parameters":[{"name":"playground_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundRowsSummary"}}}}}},"post":{"operationId":"api-playgrounds-rows-summary-filtered","summary":"Api Playgrounds Rows Summary Filtered","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["playgrounds"],"parameters":[{"name":"playground_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundRowsSummary"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetFilterRequestRequest"}}}}}},"/api/playgrounds/{playground_id}/runs/":{"get":{"operationId":"api-playgrounds-runs-retrieve","summary":"Api Playgrounds Runs Retrieve","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["playgrounds"],"parameters":[{"name":"playground_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundRun"}}}}}},"post":{"operationId":"api-playgrounds-runs-create","summary":"Api Playgrounds Runs Create","description":"Default POST handler with automatic organization injection.\n\nFor CREATE operations:\n- Superadmins can specify organization_id in request body (API key only)\n- Regular users always use their own organization\n\nOverride this method for:\n- POST-for-filtering pattern (delegate to self.get())\n- Custom pre-create validation\n\nNote: ``inject_target_organization`` is a DEPRECATED ``request.data``-mutating\nshim kept for backward-compat during the DEV-9410 migration. The blessed\npath stamps org via ``get_create_save_kwargs`` → ``perform_create`` → a\n``read_only`` serializer field. The shim (and these overrides' reliance on\nit) is removed in C18 (DEV-9430) once every view's org field is read_only.","tags":["playgrounds"],"parameters":[{"name":"playground_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundRun"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaygroundRunRequestRequest"}}}}}},"/api/test-webhook/":{"post":{"operationId":"api-test-webhook-create","summary":"Api Test Webhook Create","description":"Receive webhook and write to JSONL file.","tags":["webhooks"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhooks_api_test_webhook_create_Response_200"}}}}}}},"/api/test-webhook/read/":{"get":{"operationId":"api-test-webhook-read-retrieve","summary":"Api Test Webhook Read Retrieve","description":"Read webhook entries from file.","tags":["webhooks"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhooks_api_test_webhook_read_retrieve_Response_200"}}}}}},"delete":{"operationId":"api-test-webhook-read-destroy","summary":"Api Test Webhook Read Destroy","description":"Clear webhook entries for current hour or specified hour.","tags":["webhooks"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/api/webhooks/":{"get":{"operationId":"api-webhooks-list","summary":"Api Webhooks List","description":"GET /api/webhooks/ - List all webhooks for organization\nPOST /api/webhooks/ - Create a new webhook\n\nQuery Parameters (GET):\n    - Standard list/filter params\n\nRequest Body (POST):\n    - url (string, required): Webhook URL\n    - name (string, required): Webhook name\n    - event_type (string, required): Event type (request_log, on_eval_result_ingested, trace_completed)\n    - organization_key (int, optional): Scope to specific API key\n    - active (boolean, optional): Active status (default: true)\n\nResponse:\n    - List: Array of webhook objects (secrets excluded)\n    - Create: Created webhook object with auto-generated secret (secrets included)","tags":["webhooks"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookList"}}}}}}},"post":{"operationId":"api-webhooks-create","summary":"Api Webhooks Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["webhooks"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreateRequest"}}}}},"put":{"operationId":"api-webhooks-update","summary":"Api Webhooks Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["webhooks"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookListRequest"}}}}},"patch":{"operationId":"api-webhooks-partial-update","summary":"Api Webhooks Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["webhooks"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedWebhookListRequest"}}}}}},"/api/webhooks/{id}/":{"get":{"operationId":"api-webhooks-retrieve","summary":"Api Webhooks Retrieve","description":"GET /api/webhooks/<id>/ - Retrieve webhook details\nPATCH /api/webhooks/<id>/ - Update webhook\nDELETE /api/webhooks/<id>/ - Delete webhook\n\nQuery Parameters (GET):\n    - is_including_secrets (boolean, optional): Set to 'true' to reveal secrets (default: false)\n\nRequest Body (PATCH):\n    - url (string, optional): Update webhook URL\n    - name (string, optional): Update webhook name\n    - active (boolean, optional): Update active status\n    - event_type (string, optional): Update event type\n\nResponse:\n    - Webhook object (secrets included only if is_including_secrets=true)","tags":["webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"is_including_secrets","in":"query","description":"Set to true to reveal the webhook secret value. Default: false.","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDetail"}}}}}},"post":{"operationId":"api-webhooks-create-2","summary":"Api Webhooks Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDetailRequest"}}}}},"put":{"operationId":"api-webhooks-update-2","summary":"Api Webhooks Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdateRequest"}}}}},"delete":{"operationId":"api-webhooks-destroy","summary":"Api Webhooks Destroy","description":"GET /api/webhooks/<id>/ - Retrieve webhook details\nPATCH /api/webhooks/<id>/ - Update webhook\nDELETE /api/webhooks/<id>/ - Delete webhook\n\nQuery Parameters (GET):\n    - is_including_secrets (boolean, optional): Set to 'true' to reveal secrets (default: false)\n\nRequest Body (PATCH):\n    - url (string, optional): Update webhook URL\n    - name (string, optional): Update webhook name\n    - active (boolean, optional): Update active status\n    - event_type (string, optional): Update event type\n\nResponse:\n    - Webhook object (secrets included only if is_including_secrets=true)","tags":["webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"api-webhooks-partial-update-2","summary":"Api Webhooks Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedWebhookUpdateRequest"}}}}}},"/api/webhooks/{id}/rotate/":{"post":{"operationId":"api-webhooks-rotate-create","summary":"Api Webhooks Rotate Create","description":"POST /api/webhooks/<id>/rotate/ - Rotate webhook secret\n\nGenerates a new webhook secret. The new secret takes effect immediately.\nUpdate your server promptly to avoid webhook delivery failures.\n\nPath Parameters:\n    - id (int): Webhook ID\n\nResponse (200 OK):\n    {\n        \"id\": 123,\n        \"name\": \"My Webhook\",\n        \"secrets\": \"whsec_new123...\",\n        \"message\": \"Secret rotated successfully. Update your server immediately.\"\n    }\n\nError Responses:\n    - 404: Webhook not found or doesn't belong to organization","tags":["webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRotate"}}}}}}},"/auth/check_user/":{"post":{"operationId":"auth-check-user-create","summary":"Auth Check User Create","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Authentication_auth_check_user_create_Response_200"}}}}}}},"/auth/current-organization/":{"get":{"operationId":"auth-current-organization-retrieve","summary":"Auth Current Organization Retrieve","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Authentication_auth_current_organization_retrieve_Response_200"}}}}}}},"/auth/current-user/":{"get":{"operationId":"auth-current-user-retrieve","summary":"Auth Current User Retrieve","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}},{"name":"X-Respan-Frontend-Version","in":"header","description":"Frontend build/semver string. Recorded onto the user's `latest_frontend_version` when present — the FE stamps this on its requests to track the latest version each user has loaded. Truncated to 64 chars; only this endpoint persists it.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}}},"put":{"operationId":"auth-current-user-update","summary":"Auth Current User Update","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRequest"}}}}},"patch":{"operationId":"auth-current-user-partial-update","summary":"Auth Current User Partial Update","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedUserRequest"}}}}}},"/auth/impersonate/":{"post":{"operationId":"auth-impersonate-create","summary":"Auth Impersonate Create","description":"Endpoint for Respan admins to impersonate users for support purposes.\n\nSecurity: gated on the ``staff_impersonate`` session scope (Phase 9\nprereq #4 of the staff step-up auth roadmap). The scope is held\nSEPARATELY from ``staff_read`` / ``staff_write`` so operators can\nrevoke impersonation from a specific admin via\n``APIUser.has_impersonation_access`` without revoking cross-org\nread/write powers.\n\nPer-user authority:\n- ``has_impersonation_access=True`` (default) → user can claim the\n  ``staff_impersonate`` scope via ``/auth/jwt/scope/``.\n- ``has_impersonation_access=False`` → ``get_staff_authority``\n  excludes ``staff_impersonate`` from the user's set, so the scope\n  cannot be claimed. Existing API-key admins on the transitional\n  flag belt re-check the field too.\n\nStart-impersonation requires the scope; stop-impersonation is\ndeliberately ALLOWED without it so an operator can flip the lever\nto terminate in-flight sessions and the actor retains clean\ntermination of their own session.\n\nACTOR vs EFFECTIVE identity: during impersonation the JWT get_user()\nhook (``KeywordsAIJWTAuthentication.get_user``) swaps ``request.user``\nto the TARGET and stashes the real admin on ``impersonated_by_admin``.\nStart/stop state lives on the ACTOR (the admin), not the target — so\nwe resolve ``actor`` here before calling ``impersonate_user()``.\nWithout this, stop-impersonation hits the target (who is not\nimpersonating anyone) and returns ``success=False`` (HTTP 400).","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Authentication_auth_impersonate_create_Response_200"}}}}}}},"/auth/impersonate/switch-org/":{"patch":{"operationId":"auth-impersonate-switch-org-partial-update","summary":"Auth Impersonate Switch Org Partial Update","description":"Endpoint for switching organization while impersonating a user.\n\nSecurity: gated on the ``staff_impersonate`` session scope. Operators\nrevoke per-user via ``APIUser.has_impersonation_access`` — see\n``ImpersonateUserView`` for the model. Switching organizations is a\nmid-session operation that only makes sense WHILE impersonating, so\nthe same scope gates it (no separate switch scope).","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Authentication_auth_impersonate_switch_org_partial_update_Response_200"}}}}}}},"/auth/jwt/{jti}/revoke/":{"post":{"operationId":"auth-jwt-revoke-create","summary":"Auth Jwt Revoke Create","description":"Per-token revocation — Phase 7 of the staff step-up auth rollout.\n\nStateless JWT auth means the natural ``exp`` is the only kill switch\nby default. This view writes a Redis denylist key for the supplied\n``jti`` so the next time the auth class sees that token, it raises\n``AuthenticationFailed`` instead of accepting it. The TTL is bounded\nby the access-token lifetime so the denylist never grows unbounded.\n\nAuthorization:\n  - ``jti`` matches the caller's PRESENTED token: always allowed\n    (self-revoke / logout-like — kill my current session NOW).\n  - ``jti`` is a DIFFERENT token: requires ``staff_write`` scope.\n    Admin emergency revocation — used when a colleague's JWT is\n    confirmed compromised. The actor's own session is unaffected.\n\nThe OLD JWT's cryptographic validity is unchanged — denylist is a\nserver-side gate. A token presented after revocation fails\n``KeywordsAIJWTAuthentication.authenticate`` with a 401.\n\nSee implementation_logs/security/staff_step_up_auth_design.md §7b.","tags":["authentication"],"parameters":[{"name":"jti","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Authentication_auth_jwt_revoke_create_Response_200"}}}}}}},"/auth/jwt/create/":{"post":{"operationId":"auth-jwt-create-create","summary":"Auth Jwt Create Create","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Authentication_auth_jwt_create_create_Response_200"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomTokenObtainPairRequest"}}}}}},"/auth/jwt/refresh/":{"post":{"operationId":"auth-jwt-refresh-create","summary":"Auth Jwt Refresh Create","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespanTokenRefresh"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespanTokenRefreshRequest"}}}}}},"/auth/jwt/scope/":{"post":{"operationId":"auth-jwt-scope-create","summary":"Auth Jwt Scope Create","description":"Step-up scope change — Phase 5 of the staff step-up auth rollout.\n\nOne endpoint, both directions. Caller submits the desired\n``session_scope`` value; the server validates, mints a new JWT\ncarrying that scope, and returns it. Models OAuth 2.0 Token\nExchange (RFC 8693). Replaces the originally-planned two\nendpoints (/scope-up/ + /scope-down/) — they were the same\noperation with opposite signs.\n\nValidation gates differ by direction:\n  - Elevating (non-empty scope): requires ``reason`` in the body\n    AND a fresh ``is_password_recently_verified`` flag (from the\n    Phase 4 password-verify endpoint, 5-min sudo window).\n  - Narrowing (empty scope): no extra gate. Narrowing is always\n    safe and reversible.\n\nThe OLD JWT remains cryptographically valid until its ``exp``.\nCaller is responsible for replacing it client-side. Instant\ninvalidation comes in Phase 7 (JTI denylist).\n\nSee implementation_logs/security/staff_step_up_auth_design.md §5.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Authentication_auth_jwt_scope_create_Response_200"}}}}}}},"/auth/jwt/verify/":{"post":{"operationId":"auth-jwt-verify-create","summary":"Auth Jwt Verify Create","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Authentication_auth_jwt_verify_create_Response_200"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenVerifyRequest"}}}}}},"/auth/login/activate/":{"post":{"operationId":"auth-login-activate-create","summary":"Auth Login Activate Create","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Authentication_auth_login_activate_create_Response_200"}}}}}}},"/auth/logout/":{"post":{"operationId":"auth-logout-create","summary":"Auth Logout Create","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Authentication_auth_logout_create_Response_200"}}}}}}},"/auth/o/{provider}/":{"get":{"operationId":"auth-o-retrieve","summary":"Auth O Retrieve","tags":["authentication"],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderAuth"}}}}}},"post":{"operationId":"auth-o-create","summary":"Auth O Create","tags":["authentication"],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderAuth"}}}}}}},"/auth/organization/":{"get":{"operationId":"auth-organization-retrieve","summary":"Auth Organization Retrieve","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Authentication_auth_organization_retrieve_Response_200"}}}}}}},"/auth/password-verify/":{"post":{"operationId":"auth-password-verify-create","summary":"Auth Password Verify Create","description":"Step-up sudo re-auth — Phase 4 of the staff step-up auth rollout.\n\nCaller is already JWT-authenticated. They submit their password to\nrefresh the \"recently verified\" cache flag that Phase 5's\n``POST /auth/scope-up/`` reads as its gate before minting an\nelevated JWT.\n\nNo JWT issued, no permission changed, no user state mutated — the\nside effect is one Redis SET with a 5-minute TTL.\n\nSee implementation_logs/security/staff_step_up_auth_design.md §5.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Authentication_auth_password_verify_create_Response_200"}}}}}}},"/auth/teams/":{"get":{"operationId":"auth-teams-list","summary":"Auth Teams List","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamRole"}}}}}}},"post":{"operationId":"auth-teams-create","summary":"Auth Teams Create","description":"Create a new organization, and add it to the current user's company organization\nNew orgs can be safely added to the current company org.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Authentication_auth_teams_create_Response_200"}}}}}},"patch":{"operationId":"auth-teams-partial-update","summary":"Auth Teams Partial Update","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Authentication_auth_teams_partial_update_Response_200"}}}}}}},"/auth/users/":{"get":{"operationId":"auth-users-list","summary":"Auth Users List","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}}},"post":{"operationId":"auth-users-create","summary":"Auth Users Create","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUserCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomUserCreateRequest"}}}}}},"/auth/users/{id}/":{"get":{"operationId":"auth-users-retrieve","summary":"Auth Users Retrieve","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"id","in":"path","description":"A unique integer value identifying this api user.","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}}},"put":{"operationId":"auth-users-update","summary":"Auth Users Update","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"id","in":"path","description":"A unique integer value identifying this api user.","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRequest"}}}}},"delete":{"operationId":"auth-users-destroy","summary":"Auth Users Destroy","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"id","in":"path","description":"A unique integer value identifying this api user.","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"auth-users-partial-update","summary":"Auth Users Partial Update","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"id","in":"path","description":"A unique integer value identifying this api user.","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedUserRequest"}}}}}},"/auth/users/activation/":{"post":{"operationId":"auth-users-activation-create","summary":"Auth Users Activation Create","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Activation"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivationRequest"}}}}}},"/auth/users/me/":{"get":{"operationId":"auth-users-me-retrieve","summary":"Auth Users Me Retrieve","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}}}},"put":{"operationId":"auth-users-me-update","summary":"Auth Users Me Update","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeRequest"}}}}},"delete":{"operationId":"auth-users-me-destroy","summary":"Auth Users Me Destroy","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"auth-users-me-partial-update","summary":"Auth Users Me Partial Update","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedMeRequest"}}}}}},"/auth/users/resend_activation/":{"post":{"operationId":"auth-users-resend-activation-create","summary":"Auth Users Resend Activation Create","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailReset"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailResetRequest"}}}}}},"/auth/users/reset_email/":{"post":{"operationId":"auth-users-reset-email-create","summary":"Auth Users Reset Email Create","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailReset"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailResetRequest"}}}}}},"/auth/users/reset_email_confirm/":{"post":{"operationId":"auth-users-reset-email-confirm-create","summary":"Auth Users Reset Email Confirm Create","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsernameResetConfirm"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsernameResetConfirmRequest"}}}}}},"/auth/users/reset_password/":{"post":{"operationId":"auth-users-reset-password-create","summary":"Auth Users Reset Password Create","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailReset"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailResetRequest"}}}}}},"/auth/users/reset_password_confirm/":{"post":{"operationId":"auth-users-reset-password-confirm-create","summary":"Auth Users Reset Password Confirm Create","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetConfirm"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetConfirmRequest"}}}}}},"/auth/users/set_email/":{"post":{"operationId":"auth-users-set-email-create","summary":"Auth Users Set Email Create","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetUsername"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetUsernameRequest"}}}}}},"/auth/users/set_password/":{"post":{"operationId":"auth-users-set-password-create","summary":"Auth Users Set Password Create","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["authentication"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPassword"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPasswordRequest"}}}}}},"/automations/conditions/":{"get":{"operationId":"conditions-list","summary":"Conditions List","description":"REST API view for listing and creating automation conditions.\n\nThis view handles:\n- GET: List automation conditions with filtering and pagination\n- POST: Create new automation conditions or filter existing ones\n\nSuperadmin: Can LIST all conditions across all organizations.\nRegular users: Can only access conditions in their organization.\n\nAuthentication: JWT token or API Key\nPermissions: Automatic via JWTAndAPIKeyAuthenticationViewMixin\nPagination: LogPaginator","tags":["automations"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAutomationConditionListList"}}}}}},"post":{"operationId":"conditions-create","summary":"Conditions Create","description":"Handle POST requests for both creation and filtering.\n\nDetermines whether the request is for creating a new condition\nor filtering existing conditions based on the presence of\ncreation-specific fields.\n\nArgs:\n    request: HTTP request object\n\nReturns:\n    Response: Either creation response or filtered list response","tags":["automations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionCreateRequest"}}}}},"put":{"operationId":"conditions-update","summary":"Conditions Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["automations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionListRequest"}}}}},"patch":{"operationId":"conditions-partial-update","summary":"Conditions Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["automations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedAutomationConditionListRequest"}}}}}},"/automations/conditions/{condition_id}/":{"get":{"operationId":"conditions-retrieve","summary":"Conditions Retrieve","description":"REST API view for retrieving, updating, and deleting individual automation conditions.\n\nThis view handles:\n- GET: Retrieve a specific automation condition by condition_id\n- PUT/PATCH: Update an existing automation condition\n- DELETE: Delete an automation condition\n\nSuperadmin: Can access any condition across all organizations.\nRegular users: Can only access conditions in their organization.\n\nLookup field: id (condition_id in URL)\nAuthentication: JWT token or API Key\nPermissions: Automatic via JWTAndAPIKeyAuthenticationViewMixin","tags":["automations"],"parameters":[{"name":"condition_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionDetail"}}}}}},"post":{"operationId":"conditions-create-2","summary":"Conditions Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["automations"],"parameters":[{"name":"condition_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionDetailRequest"}}}}},"put":{"operationId":"conditions-update-2","summary":"Conditions Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["automations"],"parameters":[{"name":"condition_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionUpdateRequest"}}}}},"delete":{"operationId":"conditions-destroy","summary":"Conditions Destroy","description":"REST API view for retrieving, updating, and deleting individual automation conditions.\n\nThis view handles:\n- GET: Retrieve a specific automation condition by condition_id\n- PUT/PATCH: Update an existing automation condition\n- DELETE: Delete an automation condition\n\nSuperadmin: Can access any condition across all organizations.\nRegular users: Can only access conditions in their organization.\n\nLookup field: id (condition_id in URL)\nAuthentication: JWT token or API Key\nPermissions: Automatic via JWTAndAPIKeyAuthenticationViewMixin","tags":["automations"],"parameters":[{"name":"condition_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"conditions-partial-update-2","summary":"Conditions Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["automations"],"parameters":[{"name":"condition_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConditionUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedAutomationConditionUpdateRequest"}}}}}},"/automations/conditions/simulate/":{"post":{"operationId":"conditions-simulate-create","summary":"Conditions Simulate Create","description":"Simulate automation condition evaluation","tags":["automations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/automations_conditionsSimulateCreate_Response_200"}}}}}}},"/automations/conditions/validate/":{"post":{"operationId":"conditions-validate-create","summary":"Conditions Validate Create","description":"Validate an automation condition policy structure","tags":["automations"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/automations_conditionsValidateCreate_Response_200"}}}}}}},"/clickhouse/custom-identifiers/":{"get":{"operationId":"custom-identifiers-list","summary":"Custom Identifiers List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["clickhouse"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCustomIdentifierListList"}}}}}},"post":{"operationId":"custom-identifiers-create","summary":"Custom Identifiers Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["clickhouse"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomIdentifierList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomIdentifierListRequest"}}}}},"put":{"operationId":"custom-identifiers-update","summary":"Custom Identifiers Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["clickhouse"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomIdentifierList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomIdentifierListRequest"}}}}},"patch":{"operationId":"custom-identifiers-partial-update","summary":"Custom Identifiers Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["clickhouse"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomIdentifierList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCustomIdentifierListRequest"}}}}}},"/clickhouse/custom-identifiers/list/":{"get":{"operationId":"custom-identifiers-list-list","summary":"Custom Identifiers List List","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["clickhouse"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCustomIdentifierListList"}}}}}},"post":{"operationId":"custom-identifiers-list-create","summary":"Custom Identifiers List Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["clickhouse"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomIdentifierList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomIdentifierListRequest"}}}}},"put":{"operationId":"custom-identifiers-list-update","summary":"Custom Identifiers List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["clickhouse"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomIdentifierList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomIdentifierListRequest"}}}}},"patch":{"operationId":"custom-identifiers-list-partial-update","summary":"Custom Identifiers List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["clickhouse"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomIdentifierList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCustomIdentifierListRequest"}}}}}},"/clickhouse/custom-identifiers/summary/":{"get":{"operationId":"custom-identifiers-summary-retrieve","summary":"Custom Identifiers Summary Retrieve","description":"Mixin for views that need superadmin access to all resources.\n\nProvides FOUR key features (all bundled - no separate mixins needed):\n1. Queryset routing (superadmin sees all, regular user sees own org)\n2. Organization injection (post/patch/put auto-inject org)\n3. Object ownership checking (auto-registers ObjectOwnershipPermission)\n4. Superadmin-only field protection (certain fields can only be modified by superadmins)\n\nInherits from:\n- ObjectOwnershipMixin: Config attributes + auto-permission registration\n- OrganizationInjectionMixin: Cross-org write protection + org injection\n\nConfig attributes (inherited from ObjectOwnershipMixin):\n- ownership_object_field_name: Field on object (default: \"organization_id\")\n- ownership_user_field_name: Field on user (default: \"curr_org_id\")\n- is_allowing_global_object_read: Allow reading global objects (default: False)\n- is_allowing_org_admin_access: Allow org admins access to any object in their org (default: False)\n- is_requiring_org_admin_for_write: Require org admin for writes (default: False)\n\nConfig attributes (superadmin-only fields):\n- superadmin_only_fields: List of field names that only superadmins can modify (default: [])\n  On CREATE: Fields are stripped from non-superadmin requests (model defaults apply)\n  On UPDATE: Non-superadmins trying to change these fields get PermissionDenied\n\n- superadmin_lock_field: Field name that locks the entire object for non-superadmins (default: None)\n  When this field is truthy on the instance, non-superadmins cannot modify ANY field.\n  Common use case: is_managed=True means Keywords AI manages this resource, users can't edit it.\n\nNote: Writing to global objects (ownership field is None) always requires superadmin.\n\nUsage (detail view):\n\n    class MyDetailView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        # Optional: customize ownership config (inherited from ObjectOwnershipMixin)\n        is_allowing_global_object_read = True\n\n        def get_regular_user_queryset(self):\n            return MyModel.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return MyModel.objects.all()\n\nUsage (superadmin-only fields):\n\n    class IntegrationView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        superadmin_only_fields = ['is_managed']  # Only superadmins can modify is_managed\n        superadmin_lock_field = 'is_managed'  # When is_managed=True, object is locked for non-superadmins\n\n        def get_regular_user_queryset(self):\n            return Integration.objects.filter(organization_id=self.request.user.curr_org_id)\n\n        def get_superadmin_queryset(self):\n            return Integration.objects.all()\n\nUsage (related-object org pattern like PromptVersion - PREFERRED: annotate queryset):\n\n    from django.db.models import F\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_regular_user_queryset(self):\n            # Annotate organization_id so ownership checks work automatically\n            return PromptVersion.objects.filter(\n                prompt__organization_id=self.request.user.curr_org_id\n            ).annotate(organization_id=F(\"prompt__organization_id\"))\n\n        def get_superadmin_queryset(self):\n            return PromptVersion.objects.annotate(organization_id=F(\"prompt__organization_id\"))\n\nAlternative (override method - only if annotation not possible):\n\n    class PromptVersionView(SuperAdminMixin, JWTAndAPIKeyAuthenticationViewMixin, RetrieveUpdateDestroyAPIView):\n        def get_affiliated_object_organization_id(self, instance):\n            return instance.prompt.organization_id  # Org is on parent object\n\nDO NOT use inline checks like this:\n    # ❌ BAD - easy to forget in branching code\n    def get_queryset(self):\n        if has_staff_role(self.request.user):\n            return MyModel.objects.all()\n        return MyModel.objects.filter(...)","tags":["clickhouse"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/clickhouse_customIdentifiersSummaryRetrieve_Response_200"}}}}}},"post":{"operationId":"custom-identifiers-summary-create","summary":"Custom Identifiers Summary Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["clickhouse"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/clickhouse_customIdentifiersSummaryCreate_Response_200"}}}}}},"put":{"operationId":"custom-identifiers-summary-update","summary":"Custom Identifiers Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["clickhouse"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/clickhouse_customIdentifiersSummaryUpdate_Response_200"}}}}}},"patch":{"operationId":"custom-identifiers-summary-partial-update","summary":"Custom Identifiers Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["clickhouse"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/clickhouse_customIdentifiersSummaryPartialUpdate_Response_200"}}}}}}},"/clickhouse/saved-sql-queries/":{"post":{"operationId":"saved-sql-queries-create","summary":"Saved Sql Queries Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["clickhouse"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSQLQueryCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSQLQueryCreateRequest"}}}}},"put":{"operationId":"saved-sql-queries-update","summary":"Saved Sql Queries Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["clickhouse"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSQLQueryCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSQLQueryCreateRequest"}}}}},"patch":{"operationId":"saved-sql-queries-partial-update","summary":"Saved Sql Queries Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["clickhouse"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSQLQueryCreate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedSavedSQLQueryCreateRequest"}}}}}},"/clickhouse/saved-sql-queries/{id}/":{"get":{"operationId":"saved-sql-queries-retrieve","summary":"Saved Sql Queries Retrieve","description":"Retrieve, update, or delete a single saved SQL query.\n\nGET    /clickhouse/saved-sql-queries/<id>/\nPATCH  /clickhouse/saved-sql-queries/<id>/ — Partial update (name, description, query).\nDELETE /clickhouse/saved-sql-queries/<id>/","tags":["clickhouse"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSQLQueryList"}}}}}},"post":{"operationId":"saved-sql-queries-create-2","summary":"Saved Sql Queries Create 2","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["clickhouse"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSQLQueryList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSQLQueryListRequest"}}}}},"put":{"operationId":"saved-sql-queries-update-2","summary":"Saved Sql Queries Update 2","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["clickhouse"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSQLQueryUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSQLQueryUpdateRequest"}}}}},"delete":{"operationId":"saved-sql-queries-destroy","summary":"Saved Sql Queries Destroy","description":"Retrieve, update, or delete a single saved SQL query.\n\nGET    /clickhouse/saved-sql-queries/<id>/\nPATCH  /clickhouse/saved-sql-queries/<id>/ — Partial update (name, description, query).\nDELETE /clickhouse/saved-sql-queries/<id>/","tags":["clickhouse"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"saved-sql-queries-partial-update-2","summary":"Saved Sql Queries Partial Update 2","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["clickhouse"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSQLQueryUpdate"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedSavedSQLQueryUpdateRequest"}}}}}},"/clickhouse/saved-sql-queries/list/":{"get":{"operationId":"saved-sql-queries-list-list","summary":"Saved Sql Queries List List","description":"List saved SQL queries with pagination and filtering.\n\nGET  /clickhouse/saved-sql-queries/list/\nPOST /clickhouse/saved-sql-queries/list/ — POST-for-filtering pattern.\n\nSupports: pagination (page, page_size), sorting (sort_by), filtering via POST body.","tags":["clickhouse"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedSavedSQLQueryListList"}}}}}},"post":{"operationId":"saved-sql-queries-list-create","summary":"Saved Sql Queries List Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["clickhouse"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSQLQueryList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSQLQueryListRequest"}}}}},"put":{"operationId":"saved-sql-queries-list-update","summary":"Saved Sql Queries List Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["clickhouse"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSQLQueryList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSQLQueryListRequest"}}}}},"patch":{"operationId":"saved-sql-queries-list-partial-update","summary":"Saved Sql Queries List Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["clickhouse"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSQLQueryList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedSavedSQLQueryListRequest"}}}}}},"/clickhouse/saved-sql-queries/summary/":{"get":{"operationId":"saved-sql-queries-summary-retrieve","summary":"Saved Sql Queries Summary Retrieve","description":"Summary statistics for saved SQL queries.\n\nGET  /clickhouse/saved-sql-queries/summary/\nPOST /clickhouse/saved-sql-queries/summary/ — POST-for-filtering pattern.\n\nReturns: { total_count }","tags":["clickhouse"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSQLQuerySummary"}}}}}},"post":{"operationId":"saved-sql-queries-summary-create","summary":"Saved Sql Queries Summary Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["clickhouse"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSQLQuerySummary"}}}}}},"put":{"operationId":"saved-sql-queries-summary-update","summary":"Saved Sql Queries Summary Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["clickhouse"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/clickhouse_savedSqlQueriesSummaryUpdate_Response_200"}}}}}},"patch":{"operationId":"saved-sql-queries-summary-partial-update","summary":"Saved Sql Queries Summary Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["clickhouse"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No response body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/clickhouse_savedSqlQueriesSummaryPartialUpdate_Response_200"}}}}}}},"/clickhouse/sql-queries/":{"post":{"operationId":"sql-queries-create","summary":"Sql Queries Create","description":"Execute a SQL query against the organization's ClickHouse data.\n\nPOST /clickhouse/sql-queries/\n{\n    \"query\": \"SELECT model, count(*) as cnt FROM logs GROUP BY model ORDER BY cnt DESC\",\n    \"parameters\": {}  // reserved for future ClickHouse parameterized query support\n}\n\nReturns:\n{\n    \"columns\": [\"model\", \"cnt\"],\n    \"rows\": [[\"gpt-4\", 150], [\"claude-3\", 120], ...],\n    \"row_count\": 25,\n    \"execution_time_ms\": 342\n}","tags":["clickhouse"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SQLQueryResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SQLQueryErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SQLQueryErrorResponse"}}}},"413":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SQLQueryErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SQLQueryRequestRequest"}}}}}},"/clickhouse/workflows/{workflow_id}/eval-runs":{"get":{"operationId":"workflows-eval-runs-list","summary":"Workflows Eval Runs List","description":"Run history for one evaluator pipeline — one row per graded log.\n\nNewest-first list of the logs this pipeline graded, each with every grader's\nscore (``grader_scores``) plus the original log's input/output/model/status.\nBacks the evaluator metrics tab's lower table (replaces the per-version\nrollup): each row is an actual pipeline run, not a version. Keyed by the\nworkflow family id; the family→versions fan-out matches the run-metrics views.\nWith ``scope=automation`` the family id is an automation's and both the\noutput rows and the grader sub-scores match on the stamped caller\n``automation_id`` — the automation's run history across every evaluator\npipeline it runs.","tags":["clickhouse"],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max runs to return (default 100, capped at 500).","required":false,"schema":{"type":"integer"}},{"name":"offset","in":"query","description":"Number of runs to skip (pagination).","required":false,"schema":{"type":"integer"}},{"name":"scope","in":"query","description":"Set to 'automation' when the URL family id is an automation's — scores are then matched by the caller automation_id stamped on each row instead of the evaluator pipeline's version ids.","required":false,"schema":{"$ref":"#/components/schemas/ClickhouseWorkflowsWorkflowIdEvalRunsGetParametersScope"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCHEvalPipelineRunList"}}}}}}},"/clickhouse/workflows/{workflow_id}/eval-scores":{"get":{"operationId":"workflows-eval-scores-list","summary":"Workflows Eval Scores List","description":"Output-score aggregate for one evaluator pipeline, keyed by family id.\n\nOne row — the pipeline's output (rollup) score, not each grader. Numeric\noutput uses ``avg_primary_score``, boolean uses ``true_ratio``. The FE plots\nit as the one line on the scores-over-time chart. With ``scope=automation``\nthe family id is an automation's and rows match on the stamped caller\n``automation_id`` — only that automation's scores, across every evaluator\npipeline it runs.","tags":["clickhouse"],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"scope","in":"query","description":"Set to 'automation' when the URL family id is an automation's — scores are then matched by the caller automation_id stamped on each row instead of the evaluator pipeline's version ids.","required":false,"schema":{"$ref":"#/components/schemas/ClickhouseWorkflowsWorkflowIdEvalScoresGetParametersScope"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CHEvalPipelineScores"}}}}}}}},"/clickhouse/workflows/{workflow_id}/eval-scores/time-series":{"get":{"operationId":"workflows-eval-scores-time-series-list","summary":"Workflows Eval Scores Time Series List","description":"Time-bucketed output score for one evaluator pipeline (graphs).\n\nOne series — the pipeline's output (rollup) score over time. Optional\n``version_id`` scopes to a single version. With ``scope=automation`` the\nfamily id is an automation's and rows match on the stamped caller\n``automation_id`` — only that automation's scores over time.","tags":["clickhouse"],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"scope","in":"query","description":"Set to 'automation' when the URL family id is an automation's — scores are then matched by the caller automation_id stamped on each row instead of the evaluator pipeline's version ids.","required":false,"schema":{"$ref":"#/components/schemas/ClickhouseWorkflowsWorkflowIdEvalScoresTimeSeriesGetParametersScope"}},{"name":"time_tick","in":"query","description":"Time bucket granularity (default hour). Case-insensitive.","required":false,"schema":{"$ref":"#/components/schemas/ClickhouseWorkflowsWorkflowIdEvalScoresTimeSeriesGetParametersTimeTick"}},{"name":"version_id","in":"query","description":"Scope scores to a single evaluator pipeline version. Not supported with scope=automation (400).","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CHEvalPipelineScoresTimeSeries"}}}}}}}},"/clickhouse/workflows/{workflow_id}/runs/list":{"get":{"operationId":"workflows-runs-list","summary":"Workflows Runs List","description":"Run history for one monitor/automation — one row per run, newest first.\n\nKeyed by the workflow family id, same fan-out and row filter as the\nsummary view. With the ``production_traces`` sink disabled (#3926), rows\ncome from the executor's delivery-gated direct writes — each row is one\nfired (or delivery-failed) alert.","tags":["clickhouse"],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max runs to return (default 100, capped at 500).","required":false,"schema":{"type":"integer"}},{"name":"offset","in":"query","description":"Number of runs to skip (pagination).","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCHWorkflowRunList"}}}}}}},"/clickhouse/workflows/{workflow_id}/runs/summary":{"get":{"operationId":"workflows-runs-summary","summary":"Workflows Runs Summary","description":"Run summary for one monitor/automation — time-bucketed counts.\n\nOne row per bucket (hour/day/minute via ``time_tick``), ordered ascending:\ncompleted / stopped / failed run counts plus delivery sums. Powers the\nRuns tab's chart and its summed header stats. Optional ``version_id``\nscopes to a single version.","tags":["clickhouse"],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"time_tick","in":"query","description":"Time bucket granularity (default hour). Case-insensitive.","required":false,"schema":{"$ref":"#/components/schemas/ClickhouseWorkflowsWorkflowIdRunsSummaryGetParametersTimeTick"}},{"name":"version_id","in":"query","description":"Scope metrics to a single workflow version.","required":false,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CHWorkflowMetricsTimeSeries"}}}}}}}},"/organization/company-organizations/":{"get":{"operationId":"company-organizations-list","summary":"Company Organizations List","tags":["organization"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCompanyOrganizationListList"}}}}}},"post":{"operationId":"company-organizations-create","summary":"Company Organizations Create","tags":["organization"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyOrganizationList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyOrganizationListRequest"}}}}}},"/organization/company-organizations/{unique_company_organization_id}/":{"get":{"operationId":"company-organizations-retrieve","summary":"Company Organizations Retrieve","tags":["organization"],"parameters":[{"name":"unique_company_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyOrganizationDetail"}}}}}},"put":{"operationId":"company-organizations-update","summary":"Company Organizations Update","tags":["organization"],"parameters":[{"name":"unique_company_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyOrganizationDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyOrganizationDetailRequest"}}}}},"delete":{"operationId":"company-organizations-destroy","summary":"Company Organizations Destroy","tags":["organization"],"parameters":[{"name":"unique_company_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}},"patch":{"operationId":"company-organizations-partial-update","summary":"Company Organizations Partial Update","tags":["organization"],"parameters":[{"name":"unique_company_organization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyOrganizationDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCompanyOrganizationDetailRequest"}}}}}},"/organization/verifications/":{"get":{"operationId":"verifications-list","summary":"Verifications List","description":"GET  /organization/verifications/  — list verification records\nPOST /organization/verifications/  — claim a domain (create verification)\n\nSuperadmins see all records; regular users see their own org's records.\nOnly organization admins (or superadmins) can create verifications.","tags":["organization"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDomainVerificationResponseList"}}}}}},"post":{"operationId":"verifications-create","summary":"Verifications Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["organization"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainVerificationResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainVerificationResponseRequest"}}}}},"put":{"operationId":"verifications-update","summary":"Verifications Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["organization"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainVerificationResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainVerificationResponseRequest"}}}}},"patch":{"operationId":"verifications-partial-update","summary":"Verifications Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["organization"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainVerificationResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedDomainVerificationResponseRequest"}}}}}},"/organization/verifications/{id}/checks/":{"post":{"operationId":"verifications-checks-create","summary":"Verifications Checks Create","description":"POST handler with superadmin-only field protection.\n\nStrips superadmin-only fields from non-superadmin requests before\ndelegating to OrganizationInjectionMixin.post() for org injection.","tags":["organization"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainVerificationResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainVerificationResponseRequest"}}}}},"put":{"operationId":"verifications-checks-update","summary":"Verifications Checks Update","description":"PUT handler with superadmin lock and field protection.\n\nSame as patch() - checks lock and field protection before delegating.","tags":["organization"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainVerificationResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainVerificationResponseRequest"}}}}},"patch":{"operationId":"verifications-checks-partial-update","summary":"Verifications Checks Partial Update","description":"PATCH handler with superadmin lock and field protection.\n\nChecks:\n1. Object lock (is_managed=True -> non-superadmins can't modify)\n2. Field protection (non-superadmins can't modify specific fields)","tags":["organization"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainVerificationResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedDomainVerificationResponseRequest"}}}}}},"/redteam/campaigns/":{"get":{"operationId":"campaigns-list","summary":"Campaigns List","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["redteam"],"parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedRedTeamCampaignListList"}}}}}},"post":{"operationId":"campaigns-create","summary":"Campaigns Create","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["redteam"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedTeamCampaignDetail"}}}},"503":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedTeamCampaignDetail"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedTeamCampaignCreateRequest"}}}}}},"/redteam/campaigns/{campaign_id}/":{"get":{"operationId":"campaigns-retrieve","summary":"Campaigns Retrieve","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["redteam"],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedTeamCampaignDetail"}}}}}}},"/redteam/campaigns/{campaign_id}/events/":{"get":{"operationId":"campaigns-events-list","summary":"Campaigns Events List","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["redteam"],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedRedTeamCampaignEventListList"}}}}}}},"/redteam/campaigns/{campaign_id}/report/":{"get":{"operationId":"campaigns-report-retrieve","summary":"Campaigns Report Retrieve","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["redteam"],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedTeamCampaignReport"}}}}}}},"/redteam/campaigns/{campaign_id}/stream/":{"get":{"operationId":"campaigns-stream-retrieve","summary":"Campaigns Stream Retrieve","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["redteam"],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"text/event-stream":{"schema":{"type":"string"}}}}}}},"/redteam/sandbox-targets/":{"get":{"operationId":"sandbox-targets-retrieve","summary":"Sandbox Targets Retrieve","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["redteam"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedTeamSandboxTargetsResponse"}}}}}}},"/redteam/usage/":{"get":{"operationId":"usage-retrieve","summary":"Usage Retrieve","description":"Declare per-endpoint throttling configuration attributes for views.\n\nEndpoints can inherit this mixin and set:\n- endpoint_default_rate_limit_per_user_per_min: float | None\n\nWhen set (not None), throttling will use ONLY this default RPM for the endpoint\nwithout requiring API key / org attributes on the request. When unset, the\nstandard API key / organization / subscription limits apply.","tags":["redteam"],"parameters":[{"name":"Authorization","in":"header","description":"JWT access token or Respan API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedTeamCampaignUsage"}}}}}}}},"servers":[{"url":"https://api.respan.ai","description":"Respan API Server"}],"components":{"schemas":{"RequestLogCreateRequestResponseFormat":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"RequestLogCreateRequestResponseFormat"},"RequestLogCreateRequestToolChoice":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"RequestLogCreateRequestToolChoice"},"RequestLogCreateRequestTools":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"RequestLogCreateRequestTools"},"RequestLogCreateRequestToolCalls":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"RequestLogCreateRequestToolCalls"},"RequestLogCreateRequestKeywordsaiParams":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"RequestLogCreateRequestKeywordsaiParams"},"RequestLogCreateStatusEnum":{"type":"string","enum":["success","failed","warning","pending","running"],"description":"* `success` - Success\n* `failed` - Failed\n* `warning` - Warning\n* `pending` - Pending\n* `running` - Running","title":"RequestLogCreateStatusEnum"},"BlankEnum":{"type":"string","enum":[""],"title":"BlankEnum"},"RequestLogCreateRequestStatus":{"oneOf":[{"$ref":"#/components/schemas/RequestLogCreateStatusEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"RequestLogCreateRequestStatus"},"LogMethodEnum":{"type":"string","enum":["inference","logging_api","batch","python_tracing","ts_tracing","tracing_integration"],"description":"* `inference` - Inference\n* `logging_api` - Logging Api\n* `batch` - Batch\n* `python_tracing` - Python Tracing\n* `ts_tracing` - Ts Tracing\n* `tracing_integration` - Tracing Integration","title":"LogMethodEnum"},"LogTypeEnum":{"type":"string","enum":["text","chat","completion","response","embedding","transcription","speech","workflow","task","tool","agent","handoff","guardrail","function","custom","generation","unknown","score","batch","span"],"description":"* `text` - Text\n* `chat` - Chat\n* `completion` - Completion\n* `response` - Response\n* `embedding` - Embedding\n* `transcription` - Transcription\n* `speech` - Speech\n* `workflow` - Workflow\n* `task` - Task\n* `tool` - Tool\n* `agent` - Agent\n* `handoff` - Handoff\n* `guardrail` - Guardrail\n* `function` - Function\n* `custom` - Custom\n* `generation` - Generation\n* `unknown` - Unknown\n* `score` - Score\n* `batch` - Batch\n* `span` - Span","title":"LogTypeEnum"},"EnvironmentA4fEnum":{"type":"string","enum":["prod","stage","test","all"],"description":"* `prod` - Prod\n* `stage` - Dev\n* `test` - Test\n* `all` - All","title":"EnvironmentA4fEnum"},"RequestLogCreateRequestEnvironment":{"oneOf":[{"$ref":"#/components/schemas/EnvironmentA4fEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"RequestLogCreateRequestEnvironment"},"RequestLogCreateRequestStreamOptions":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"RequestLogCreateRequestStreamOptions"},"RequestLogCreateRequestLogitBias":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"RequestLogCreateRequestLogitBias"},"CoveredByEnum":{"type":"string","enum":["own_credential","user","credits","credit_and_credential","cache_hit","credit_and_cache"],"description":"* `own_credential` - Own Credential\n* `user` - User\n* `credits` - Credits\n* `credit_and_credential` - Credit And Credential\n* `cache_hit` - Cache Hit\n* `credit_and_cache` - Credit And Cache","title":"CoveredByEnum"},"RequestLogCreateRequest":{"type":"object","properties":{"ip_address":{"type":["string","null"]},"pre_commit_id":{"type":["string","null"]},"custom_identifier":{"type":["string","null"]},"group_identifier":{"type":["string","null"]},"blurred":{"type":["boolean","null"]},"hour_group":{"type":"string","format":"date-time"},"minute_group":{"type":"string","format":"date-time"},"start_time":{"type":["string","null"],"format":"date-time"},"timestamp":{"type":"string","format":"date-time"},"load_balance_group_id":{"type":"string"},"unique_id":{"type":["string","null"]},"mapped_model_name":{"type":"string"},"response_format":{"$ref":"#/components/schemas/RequestLogCreateRequestResponseFormat"},"response_format_choice":{"type":["string","null"]},"parallel_tool_calls":{"type":["boolean","null"]},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"prompt_cache_hit_tokens":{"type":["integer","null"]},"prompt_cache_creation_tokens":{"type":["integer","null"]},"total_request_tokens":{"type":"integer"},"cost":{"type":"number","format":"double"},"input":{"type":"string"},"input_array":{"type":["array","null"],"items":{"type":"string"}},"encoding_format":{"type":"string"},"dimensions":{"type":["integer","null"]},"embedding":{"type":["array","null"],"items":{"type":"number","format":"double"}},"base64_embedding":{"type":["string","null"]},"audio_input_file":{"type":["string","null"],"format":"binary"},"transcription":{"type":"string"},"audio_response_format":{"type":"string"},"audio_output_file":{"type":["string","null"],"format":"binary"},"prompt_messages":{"type":"array","items":{"description":"Any type"}},"completion_message":{"description":"Any type"},"completion_messages":{"type":["array","null"],"items":{"description":"Any type"}},"latency":{"type":["number","null"],"format":"double"},"model":{"type":"string"},"calling_model":{"type":["string","null"]},"foundation_model":{"type":"string"},"provider_id":{"type":"string"},"full_model_name":{"type":["string","null"]},"tool_choice":{"$ref":"#/components/schemas/RequestLogCreateRequestToolChoice"},"tools":{"$ref":"#/components/schemas/RequestLogCreateRequestTools"},"tool_calls":{"$ref":"#/components/schemas/RequestLogCreateRequestToolCalls"},"has_tool_calls":{"type":"boolean"},"category":{"type":"string"},"time_to_first_token":{"type":["number","null"],"format":"double"},"routing_time":{"type":"number","format":"double"},"keywordsai_params":{"$ref":"#/components/schemas/RequestLogCreateRequestKeywordsaiParams"},"note":{"type":"string"},"session_id":{"type":"string"},"metadata":{"description":"Any type"},"metadata_indexed_string_1":{"type":["string","null"]},"metadata_indexed_string_2":{"type":["string","null"]},"metadata_indexed_numerical_1":{"type":["number","null"],"format":"double"},"cached":{"type":"boolean"},"cache_bit":{"type":"integer"},"cache_miss_bit":{"type":["integer","null"]},"cache_key":{"type":["string","null"]},"positive_feedback":{"type":["boolean","null"]},"tokens_per_second":{"type":"number","format":"double"},"full_request":{"description":"Any type"},"full_response":{"description":"Any type"},"status":{"$ref":"#/components/schemas/RequestLogCreateRequestStatus"},"status_code":{"type":"integer"},"warnings":{"type":"string"},"recommendations":{"type":["string","null"]},"has_warnings":{"type":"boolean"},"error_message":{"type":"string"},"is_example":{"type":"boolean"},"is_malicious":{"type":"boolean"},"log_method":{"$ref":"#/components/schemas/LogMethodEnum"},"log_type":{"$ref":"#/components/schemas/LogTypeEnum"},"failed":{"type":"boolean"},"error_bit":{"type":"integer"},"is_test":{"type":"boolean"},"environment":{"$ref":"#/components/schemas/RequestLogCreateRequestEnvironment"},"stream":{"type":"boolean"},"stream_options":{"$ref":"#/components/schemas/RequestLogCreateRequestStreamOptions"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"logit_bias":{"$ref":"#/components/schemas/RequestLogCreateRequestLogitBias"},"logprobs":{"type":["boolean","null"]},"top_logprobs":{"type":["integer","null"]},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"stop":{"type":["string","null"]},"n":{"type":["integer","null"]},"evaluation_identifier":{"type":["string","null"]},"is_dataset":{"type":"boolean"},"based_log_unique_id":{"type":["string","null"]},"customer_identifier":{"type":"string"},"customer_email":{"type":"string","format":"email"},"customer_name":{"type":"string"},"customer_user_unique_id":{"type":["string","null"]},"used_custom_credential":{"type":"boolean"},"deployment_name":{"type":"string"},"custom_endpoint":{"type":["string","null"]},"custom_region":{"type":["string","null"]},"prompt_name":{"type":["string","null"]},"prompt_id":{"type":"string"},"prompt_version_number":{"type":["integer","null"]},"covered_by":{"$ref":"#/components/schemas/CoveredByEnum"},"system_text":{"type":["string","null"]},"prompt_text":{"type":["string","null"]},"completion_text":{"type":["string","null"]},"system_text_vector":{"type":["string","null"]},"prompt_text_vector":{"type":["string","null"]},"completion_text_vector":{"type":["string","null"]},"full_text_indexed":{"type":"boolean"},"trace_unique_id":{"type":["string","null"]},"span_unique_id":{"type":["string","null"]},"trace_group_identifier":{"type":["string","null"]},"span_name":{"type":["string","null"]},"span_handoffs":{"type":["array","null"],"items":{"type":"string"}},"span_tools":{"type":["array","null"],"items":{"type":"string"}},"span_parent_id":{"type":["string","null"]},"span_path":{"type":["string","null"]},"span_workflow_name":{"type":["string","null"]},"output":{"type":["string","null"]},"thread_identifier":{"type":"string"},"thread_unique_id":{"type":["string","null"]},"storage_object_key":{"type":["string","null"]},"error_message_search":{"type":["string","null"]},"evaluation_cost":{"type":"number","format":"double"},"LLM_based_context_precision":{"type":["number","null"],"format":"double"},"LLM_based_faithfulness":{"type":["number","null"],"format":"double"},"flesch_reading_ease":{"type":["number","null"],"format":"double"},"flesch_kincaid_grade_level":{"type":["number","null"],"format":"double"},"LLM_based_answer_relevance":{"type":["number","null"],"format":"double"},"amount_to_pay":{"type":["number","null"],"format":"double"},"full_cost_calculated":{"type":["boolean","null"]},"stripe_usage_report_sent":{"type":["boolean","null"]},"to_update_thread":{"type":["boolean","null"]},"to_update_customer_user":{"type":["boolean","null"]},"organization":{"type":["integer","null"]},"company_organization":{"type":["integer","null"]},"user":{"type":["integer","null"]},"organization_key":{"type":["string","null"]},"customer_user":{"type":["integer","null"]},"prompt_version":{"type":["integer","null"]},"thread":{"type":["integer","null"]},"trace":{"type":["integer","null"]},"span":{"type":["integer","null"]}},"title":"RequestLogCreateRequest"},"RequestLogCreateResponseFormat":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"RequestLogCreateResponseFormat"},"RequestLogCreateToolChoice":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"RequestLogCreateToolChoice"},"RequestLogCreateTools":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"RequestLogCreateTools"},"RequestLogCreateToolCalls":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"RequestLogCreateToolCalls"},"RequestLogCreateKeywordsaiParams":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"RequestLogCreateKeywordsaiParams"},"RequestLogCreateStatus":{"oneOf":[{"$ref":"#/components/schemas/RequestLogCreateStatusEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"RequestLogCreateStatus"},"RequestLogCreateEnvironment":{"oneOf":[{"$ref":"#/components/schemas/EnvironmentA4fEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"RequestLogCreateEnvironment"},"RequestLogCreateStreamOptions":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"RequestLogCreateStreamOptions"},"RequestLogCreateLogitBias":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"RequestLogCreateLogitBias"},"RequestLogCreate":{"type":"object","properties":{"id":{"type":"integer"},"ip_address":{"type":["string","null"]},"pre_commit_id":{"type":["string","null"]},"custom_identifier":{"type":["string","null"]},"group_identifier":{"type":["string","null"]},"blurred":{"type":["boolean","null"]},"hour_group":{"type":"string","format":"date-time"},"minute_group":{"type":"string","format":"date-time"},"start_time":{"type":["string","null"],"format":"date-time"},"timestamp":{"type":"string","format":"date-time"},"load_balance_group_id":{"type":"string"},"unique_id":{"type":["string","null"]},"mapped_model_name":{"type":"string"},"response_format":{"$ref":"#/components/schemas/RequestLogCreateResponseFormat"},"response_format_choice":{"type":["string","null"]},"parallel_tool_calls":{"type":["boolean","null"]},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"prompt_cache_hit_tokens":{"type":["integer","null"]},"prompt_cache_creation_tokens":{"type":["integer","null"]},"total_request_tokens":{"type":"integer"},"cost":{"type":"number","format":"double"},"input":{"type":"string"},"input_array":{"type":["array","null"],"items":{"type":"string"}},"encoding_format":{"type":"string"},"dimensions":{"type":["integer","null"]},"embedding":{"type":["array","null"],"items":{"type":"number","format":"double"}},"base64_embedding":{"type":["string","null"]},"audio_input_file":{"type":["string","null"],"format":"uri"},"transcription":{"type":"string"},"audio_response_format":{"type":"string"},"audio_output_file":{"type":["string","null"],"format":"uri"},"prompt_messages":{"type":"array","items":{"description":"Any type"}},"completion_message":{"description":"Any type"},"completion_messages":{"type":["array","null"],"items":{"description":"Any type"}},"latency":{"type":["number","null"],"format":"double"},"model":{"type":"string"},"calling_model":{"type":["string","null"]},"foundation_model":{"type":"string"},"provider_id":{"type":"string"},"full_model_name":{"type":["string","null"]},"tool_choice":{"$ref":"#/components/schemas/RequestLogCreateToolChoice"},"tools":{"$ref":"#/components/schemas/RequestLogCreateTools"},"tool_calls":{"$ref":"#/components/schemas/RequestLogCreateToolCalls"},"has_tool_calls":{"type":"boolean"},"category":{"type":"string"},"time_to_first_token":{"type":["number","null"],"format":"double"},"routing_time":{"type":"number","format":"double"},"keywordsai_params":{"$ref":"#/components/schemas/RequestLogCreateKeywordsaiParams"},"note":{"type":"string"},"session_id":{"type":"string"},"metadata":{"description":"Any type"},"metadata_indexed_string_1":{"type":["string","null"]},"metadata_indexed_string_2":{"type":["string","null"]},"metadata_indexed_numerical_1":{"type":["number","null"],"format":"double"},"cached":{"type":"boolean"},"cache_bit":{"type":"integer"},"cache_miss_bit":{"type":["integer","null"]},"cache_key":{"type":["string","null"]},"positive_feedback":{"type":["boolean","null"]},"tokens_per_second":{"type":"number","format":"double"},"full_request":{"description":"Any type"},"full_response":{"description":"Any type"},"status":{"$ref":"#/components/schemas/RequestLogCreateStatus"},"status_code":{"type":"integer"},"warnings":{"type":"string"},"recommendations":{"type":["string","null"]},"has_warnings":{"type":"boolean"},"error_message":{"type":"string"},"is_example":{"type":"boolean"},"is_malicious":{"type":"boolean"},"log_method":{"$ref":"#/components/schemas/LogMethodEnum"},"log_type":{"$ref":"#/components/schemas/LogTypeEnum"},"failed":{"type":"boolean"},"error_bit":{"type":"integer"},"is_test":{"type":"boolean"},"environment":{"$ref":"#/components/schemas/RequestLogCreateEnvironment"},"stream":{"type":"boolean"},"stream_options":{"$ref":"#/components/schemas/RequestLogCreateStreamOptions"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"logit_bias":{"$ref":"#/components/schemas/RequestLogCreateLogitBias"},"logprobs":{"type":["boolean","null"]},"top_logprobs":{"type":["integer","null"]},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"stop":{"type":["string","null"]},"n":{"type":["integer","null"]},"evaluation_identifier":{"type":["string","null"]},"is_dataset":{"type":"boolean"},"based_log_unique_id":{"type":["string","null"]},"customer_identifier":{"type":"string"},"customer_email":{"type":"string","format":"email"},"customer_name":{"type":"string"},"customer_user_unique_id":{"type":["string","null"]},"used_custom_credential":{"type":"boolean"},"deployment_name":{"type":"string"},"custom_endpoint":{"type":["string","null"]},"custom_region":{"type":["string","null"]},"prompt_name":{"type":["string","null"]},"prompt_id":{"type":"string"},"prompt_version_number":{"type":["integer","null"]},"covered_by":{"$ref":"#/components/schemas/CoveredByEnum"},"system_text":{"type":["string","null"]},"prompt_text":{"type":["string","null"]},"completion_text":{"type":["string","null"]},"system_text_vector":{"type":["string","null"]},"prompt_text_vector":{"type":["string","null"]},"completion_text_vector":{"type":["string","null"]},"full_text_indexed":{"type":"boolean"},"trace_unique_id":{"type":["string","null"]},"span_unique_id":{"type":["string","null"]},"trace_group_identifier":{"type":["string","null"]},"span_name":{"type":["string","null"]},"span_handoffs":{"type":["array","null"],"items":{"type":"string"}},"span_tools":{"type":["array","null"],"items":{"type":"string"}},"span_parent_id":{"type":["string","null"]},"span_path":{"type":["string","null"]},"span_workflow_name":{"type":["string","null"]},"output":{"type":["string","null"]},"thread_identifier":{"type":"string"},"thread_unique_id":{"type":["string","null"]},"storage_object_key":{"type":["string","null"]},"error_message_search":{"type":["string","null"]},"evaluation_cost":{"type":"number","format":"double"},"LLM_based_context_precision":{"type":["number","null"],"format":"double"},"LLM_based_faithfulness":{"type":["number","null"],"format":"double"},"flesch_reading_ease":{"type":["number","null"],"format":"double"},"flesch_kincaid_grade_level":{"type":["number","null"],"format":"double"},"LLM_based_answer_relevance":{"type":["number","null"],"format":"double"},"amount_to_pay":{"type":["number","null"],"format":"double"},"full_cost_calculated":{"type":["boolean","null"]},"stripe_usage_report_sent":{"type":["boolean","null"]},"to_update_thread":{"type":["boolean","null"]},"to_update_customer_user":{"type":["boolean","null"]},"organization":{"type":["integer","null"]},"company_organization":{"type":["integer","null"]},"user":{"type":["integer","null"]},"organization_key":{"type":["string","null"]},"customer_user":{"type":["integer","null"]},"prompt_version":{"type":["integer","null"]},"thread":{"type":["integer","null"]},"trace":{"type":["integer","null"]},"span":{"type":["integer","null"]}},"required":["id"],"title":"RequestLogCreate"},"CHLogV2Detail":{"type":"object","properties":{"id":{"type":"string"},"input_words":{"type":"string"},"output_words":{"type":"string"},"input_chars":{"type":"string"},"output_chars":{"type":"string"},"organization_key_name":{"type":"string"},"organization_id":{"type":"string"},"unique_organization_id":{"type":"string"},"organization_name":{"type":"string"},"error_message":{"type":"string"},"warnings":{"type":"string"},"annotation_status":{"type":"string"},"keywordsai_params":{"type":"string"},"full_request":{"type":"string"},"full_response":{"type":"string"},"metadata":{"type":"string"},"tools":{"type":"string"},"tool_calls":{"type":"string"},"prompt_messages":{"type":"string"},"completion_message":{"type":"string"},"completion_messages":{"description":"Any type"},"input":{"type":"string"},"output":{"type":"string"},"variables":{"description":"Any type"},"temperature":{"type":"number","format":"double"},"max_tokens":{"type":"integer"},"top_p":{"type":"number","format":"double"},"frequency_penalty":{"type":"number","format":"double"},"presence_penalty":{"type":"number","format":"double"},"stop":{"type":"string"},"response_format":{"description":"Any type"},"matched_meter_ids":{"type":"array","items":{"description":"Any type"}},"unit_prices":{"type":"object","additionalProperties":{"description":"Any type"}},"component_costs":{"type":"object","additionalProperties":{"description":"Any type"}},"custom_identifier":{"type":"string"},"group_identifier":{"type":"string"},"blurred":{"type":"boolean"},"start_time":{"type":"string","format":"date-time"},"timestamp":{"type":"string","format":"date-time"},"load_balance_group_id":{"type":"string"},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"prompt_cache_hit_tokens":{"type":"integer"},"prompt_cache_creation_tokens":{"type":"integer"},"reasoning_tokens":{"type":"integer"},"total_request_tokens":{"type":"integer"},"is_token_count_estimated":{"type":"integer"},"cost":{"type":"number","format":"double"},"llm_gateway_markup_rate":{"type":"number","format":"double"},"service_tier":{"type":"string"},"model_discount":{"type":"number","format":"double"},"pricing_tier":{"type":"string"},"audio_input_file":{"type":"string"},"audio_output_file":{"type":"string"},"organization_key_id":{"type":"string"},"user_email":{"type":"string"},"model":{"type":"string"},"provider_id":{"type":"string"},"category":{"type":"string"},"properties":{"type":"string"},"cache_bit":{"type":"integer"},"cache_miss_bit":{"type":"integer"},"cache_key":{"type":"string"},"latency":{"type":"number","format":"double"},"tokens_per_second":{"type":"number","format":"double"},"time_to_first_token":{"type":"number","format":"double"},"routing_time":{"type":"number","format":"double"},"status":{"type":"string"},"has_tool_calls":{"type":"boolean"},"status_code":{"type":"integer"},"log_method":{"type":"string"},"log_type":{"type":"string"},"environment":{"type":"string"},"stream":{"type":"boolean"},"evaluation_identifier":{"type":"string"},"customer_identifier":{"type":"string"},"customer_email":{"type":"string"},"customer_name":{"type":"string"},"customer_user_unique_id":{"type":"string"},"used_custom_credential":{"type":"boolean"},"deployment_name":{"type":"string"},"deployment_id":{"type":"string"},"prompt_name":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"system_text":{"type":"string"},"prompt_text":{"type":"string"},"completion_text":{"type":"string"},"prompt_message_count":{"type":"integer"},"completion_message_count":{"type":"integer"},"trace_unique_id":{"type":"string"},"span_unique_id":{"type":"string"},"span_name":{"type":"string"},"span_parent_id":{"type":"string"},"span_workflow_name":{"type":"string"},"session_identifier":{"type":"string"},"span_links":{"type":"string"},"trace_group_identifier":{"type":"string"},"thread_identifier":{"type":"string"},"thread_unique_id":{"type":"string"},"storage_object_key":{"type":"string"},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":"string","format":"date-time"},"unique_id":{"type":"string"},"respan_gateway_request_id":{"type":"string"},"full_text":{"type":"string"}},"required":["id","input_words","output_words","input_chars","output_chars","organization_key_name","organization_id","warnings","annotation_status","keywordsai_params","full_request","full_response","metadata","tools","tool_calls","prompt_messages","completion_message"],"description":"Mixin for serializers to provide generic field retrieval methods\nwith backward compatibility and input/output parsing support.","title":"CHLogV2Detail"},"PatchedCHLogV2DetailRequest":{"type":"object","properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"unique_organization_id":{"type":"string"},"organization_name":{"type":"string"},"error_message":{"type":"string"},"completion_messages":{"description":"Any type"},"input":{"type":"string"},"output":{"type":"string"},"variables":{"description":"Any type"},"temperature":{"type":"number","format":"double"},"max_tokens":{"type":"integer"},"top_p":{"type":"number","format":"double"},"frequency_penalty":{"type":"number","format":"double"},"presence_penalty":{"type":"number","format":"double"},"stop":{"type":"string"},"response_format":{"description":"Any type"},"matched_meter_ids":{"type":"array","items":{"description":"Any type"}},"unit_prices":{"type":"object","additionalProperties":{"description":"Any type"}},"component_costs":{"type":"object","additionalProperties":{"description":"Any type"}},"custom_identifier":{"type":"string"},"group_identifier":{"type":"string"},"blurred":{"type":"boolean"},"start_time":{"type":"string","format":"date-time"},"timestamp":{"type":"string","format":"date-time"},"load_balance_group_id":{"type":"string"},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"prompt_cache_hit_tokens":{"type":"integer"},"prompt_cache_creation_tokens":{"type":"integer"},"reasoning_tokens":{"type":"integer"},"total_request_tokens":{"type":"integer"},"is_token_count_estimated":{"type":"integer"},"cost":{"type":"number","format":"double"},"llm_gateway_markup_rate":{"type":"number","format":"double"},"service_tier":{"type":"string"},"model_discount":{"type":"number","format":"double"},"pricing_tier":{"type":"string"},"audio_input_file":{"type":"string"},"audio_output_file":{"type":"string"},"organization_key_id":{"type":"string"},"user_email":{"type":"string"},"model":{"type":"string"},"provider_id":{"type":"string"},"category":{"type":"string"},"properties":{"type":"string"},"cache_bit":{"type":"integer"},"cache_miss_bit":{"type":"integer"},"cache_key":{"type":"string"},"latency":{"type":"number","format":"double"},"tokens_per_second":{"type":"number","format":"double"},"time_to_first_token":{"type":"number","format":"double"},"routing_time":{"type":"number","format":"double"},"status":{"type":"string"},"has_tool_calls":{"type":"boolean"},"status_code":{"type":"integer"},"log_method":{"type":"string"},"log_type":{"type":"string"},"environment":{"type":"string"},"stream":{"type":"boolean"},"evaluation_identifier":{"type":"string"},"customer_identifier":{"type":"string"},"customer_email":{"type":"string"},"customer_name":{"type":"string"},"customer_user_unique_id":{"type":"string"},"used_custom_credential":{"type":"boolean"},"deployment_name":{"type":"string"},"deployment_id":{"type":"string"},"prompt_name":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"system_text":{"type":"string"},"prompt_text":{"type":"string"},"completion_text":{"type":"string"},"prompt_message_count":{"type":"integer"},"completion_message_count":{"type":"integer"},"trace_unique_id":{"type":"string"},"span_unique_id":{"type":"string"},"span_name":{"type":"string"},"span_parent_id":{"type":"string"},"span_workflow_name":{"type":"string"},"session_identifier":{"type":"string"},"span_links":{"type":"string"},"trace_group_identifier":{"type":"string"},"thread_identifier":{"type":"string"},"thread_unique_id":{"type":"string"},"storage_object_key":{"type":"string"},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":"string","format":"date-time"},"unique_id":{"type":"string"},"respan_gateway_request_id":{"type":"string"},"full_text":{"type":"string"}},"description":"Mixin for serializers to provide generic field retrieval methods\nwith backward compatibility and input/output parsing support.","title":"PatchedCHLogV2DetailRequest"},"Spans_bulkCreateSpans_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Spans_bulkCreateSpans_Response_200"},"PublicCHLogV2DetailRequest":{"type":"object","properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"unique_organization_id":{"type":"string"},"error_message":{"type":"string"},"completion_messages":{"description":"Any type"},"input":{"type":"string"},"output":{"type":"string"},"variables":{"description":"Any type"},"temperature":{"type":"number","format":"double"},"max_tokens":{"type":"integer"},"top_p":{"type":"number","format":"double"},"frequency_penalty":{"type":"number","format":"double"},"presence_penalty":{"type":"number","format":"double"},"stop":{"type":"string"},"response_format":{"description":"Any type"},"matched_meter_ids":{"type":"array","items":{"description":"Any type"}},"unit_prices":{"type":"object","additionalProperties":{"description":"Any type"}},"component_costs":{"type":"object","additionalProperties":{"description":"Any type"}},"custom_identifier":{"type":"string"},"group_identifier":{"type":"string"},"blurred":{"type":"boolean"},"start_time":{"type":"string","format":"date-time"},"timestamp":{"type":"string","format":"date-time"},"load_balance_group_id":{"type":"string"},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"prompt_cache_hit_tokens":{"type":"integer"},"prompt_cache_creation_tokens":{"type":"integer"},"reasoning_tokens":{"type":"integer"},"total_request_tokens":{"type":"integer"},"cost":{"type":"number","format":"double"},"llm_gateway_markup_rate":{"type":"number","format":"double"},"service_tier":{"type":"string"},"model_discount":{"type":"number","format":"double"},"pricing_tier":{"type":"string"},"audio_input_file":{"type":"string"},"audio_output_file":{"type":"string"},"organization_key_id":{"type":"string"},"user_email":{"type":"string"},"model":{"type":"string"},"provider_id":{"type":"string"},"category":{"type":"string"},"properties":{"type":"string"},"cache_bit":{"type":"integer"},"cache_miss_bit":{"type":"integer"},"cache_key":{"type":"string"},"latency":{"type":"number","format":"double"},"tokens_per_second":{"type":"number","format":"double"},"time_to_first_token":{"type":"number","format":"double"},"routing_time":{"type":"number","format":"double"},"status":{"type":"string"},"has_tool_calls":{"type":"boolean"},"status_code":{"type":"integer"},"log_method":{"type":"string"},"log_type":{"type":"string"},"environment":{"type":"string"},"stream":{"type":"boolean"},"evaluation_identifier":{"type":"string"},"customer_identifier":{"type":"string"},"customer_email":{"type":"string"},"customer_name":{"type":"string"},"customer_user_unique_id":{"type":"string"},"used_custom_credential":{"type":"boolean"},"deployment_name":{"type":"string"},"deployment_id":{"type":"string"},"prompt_name":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"system_text":{"type":"string"},"prompt_text":{"type":"string"},"completion_text":{"type":"string"},"prompt_message_count":{"type":"integer"},"completion_message_count":{"type":"integer"},"trace_unique_id":{"type":"string"},"span_unique_id":{"type":"string"},"span_name":{"type":"string"},"span_parent_id":{"type":"string"},"span_workflow_name":{"type":"string"},"session_identifier":{"type":"string"},"span_links":{"type":"string"},"trace_group_identifier":{"type":"string"},"thread_identifier":{"type":"string"},"thread_unique_id":{"type":"string"},"storage_object_key":{"type":"string"},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":"string","format":"date-time"},"unique_id":{"type":"string"},"respan_gateway_request_id":{"type":"string"},"full_text":{"type":"string"}},"required":["id"],"description":"Mixin for serializers to provide generic field retrieval methods\nwith backward compatibility and input/output parsing support.","title":"PublicCHLogV2DetailRequest"},"PublicCHLogV2Detail":{"type":"object","properties":{"id":{"type":"string"},"organization_key_name":{"type":"string"},"organization_id":{"type":"string"},"unique_organization_id":{"type":"string"},"error_message":{"type":"string"},"warnings":{"type":"string"},"status_in_eval_set":{"type":"string"},"full_request":{"type":"string"},"full_response":{"type":"string"},"metadata":{"type":"string"},"scores":{"type":"string"},"tools":{"type":"string"},"tool_calls":{"type":"string"},"prompt_messages":{"type":"string"},"completion_message":{"type":"string"},"completion_messages":{"description":"Any type"},"input":{"type":"string"},"output":{"type":"string"},"variables":{"description":"Any type"},"temperature":{"type":"number","format":"double"},"max_tokens":{"type":"integer"},"top_p":{"type":"number","format":"double"},"frequency_penalty":{"type":"number","format":"double"},"presence_penalty":{"type":"number","format":"double"},"stop":{"type":"string"},"response_format":{"description":"Any type"},"matched_meter_ids":{"type":"array","items":{"description":"Any type"}},"unit_prices":{"type":"object","additionalProperties":{"description":"Any type"}},"component_costs":{"type":"object","additionalProperties":{"description":"Any type"}},"custom_identifier":{"type":"string"},"group_identifier":{"type":"string"},"blurred":{"type":"boolean"},"start_time":{"type":"string","format":"date-time"},"timestamp":{"type":"string","format":"date-time"},"load_balance_group_id":{"type":"string"},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"prompt_cache_hit_tokens":{"type":"integer"},"prompt_cache_creation_tokens":{"type":"integer"},"reasoning_tokens":{"type":"integer"},"total_request_tokens":{"type":"integer"},"cost":{"type":"number","format":"double"},"llm_gateway_markup_rate":{"type":"number","format":"double"},"service_tier":{"type":"string"},"model_discount":{"type":"number","format":"double"},"pricing_tier":{"type":"string"},"audio_input_file":{"type":"string"},"audio_output_file":{"type":"string"},"organization_key_id":{"type":"string"},"user_email":{"type":"string"},"model":{"type":"string"},"provider_id":{"type":"string"},"category":{"type":"string"},"properties":{"type":"string"},"cache_bit":{"type":"integer"},"cache_miss_bit":{"type":"integer"},"cache_key":{"type":"string"},"latency":{"type":"number","format":"double"},"tokens_per_second":{"type":"number","format":"double"},"time_to_first_token":{"type":"number","format":"double"},"routing_time":{"type":"number","format":"double"},"status":{"type":"string"},"has_tool_calls":{"type":"boolean"},"status_code":{"type":"integer"},"log_method":{"type":"string"},"log_type":{"type":"string"},"environment":{"type":"string"},"stream":{"type":"boolean"},"evaluation_identifier":{"type":"string"},"customer_identifier":{"type":"string"},"customer_email":{"type":"string"},"customer_name":{"type":"string"},"customer_user_unique_id":{"type":"string"},"used_custom_credential":{"type":"boolean"},"deployment_name":{"type":"string"},"deployment_id":{"type":"string"},"prompt_name":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"system_text":{"type":"string"},"prompt_text":{"type":"string"},"completion_text":{"type":"string"},"prompt_message_count":{"type":"integer"},"completion_message_count":{"type":"integer"},"trace_unique_id":{"type":"string"},"span_unique_id":{"type":"string"},"span_name":{"type":"string"},"span_parent_id":{"type":"string"},"span_workflow_name":{"type":"string"},"session_identifier":{"type":"string"},"span_links":{"type":"string"},"trace_group_identifier":{"type":"string"},"thread_identifier":{"type":"string"},"thread_unique_id":{"type":"string"},"storage_object_key":{"type":"string"},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":"string","format":"date-time"},"unique_id":{"type":"string"},"respan_gateway_request_id":{"type":"string"},"full_text":{"type":"string"}},"required":["id","organization_key_name","warnings","status_in_eval_set","full_request","full_response","metadata","scores","tools","tool_calls","prompt_messages","completion_message"],"description":"Mixin for serializers to provide generic field retrieval methods\nwith backward compatibility and input/output parsing support.","title":"PublicCHLogV2Detail"},"CHLogV2ListRequest":{"type":"object","properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"organization_key_id":{"type":"string"},"environment":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"start_time":{"type":"string","format":"date-time"},"prompt_id":{"type":"string"},"prompt_name":{"type":"string"},"trace_unique_id":{"type":"string"},"customer_identifier":{"type":"string"},"customer_name":{"type":"string"},"customer_email":{"type":"string"},"thread_identifier":{"type":"string"},"custom_identifier":{"type":"string"},"unique_organization_id":{"type":"string"},"log_type":{"type":"string"},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_request_tokens":{"type":"integer"},"prompt_cache_hit_tokens":{"type":"integer"},"prompt_cache_creation_tokens":{"type":"integer"},"reasoning_tokens":{"type":"integer"},"cost":{"type":"number","format":"double"},"model":{"type":"string"},"latency":{"type":"number","format":"double"},"tokens_per_second":{"type":"number","format":"double"},"time_to_first_token":{"type":"number","format":"double"},"routing_time":{"type":"number","format":"double"},"status_code":{"type":"integer"},"status":{"type":"string"},"blurred":{"type":"boolean"},"storage_object_key":{"type":"string"},"updated_storage_object_key":{"type":"string"},"span_workflow_name":{"type":"string"},"span_name":{"type":"string"},"note":{"type":"string"}},"required":["id","organization_id","organization_key_id","environment","prompt_name","trace_unique_id","customer_identifier","thread_identifier","unique_organization_id","log_type"],"description":"Mixin to handle underscore-prefixed field mapping in serializers.\n\nThis is used when Django annotations require underscore prefixes to avoid\nname conflicts with original column names, but we want to expose the\nclean field names in the API response.\n\nUsage:\n    1. Annotate queryset with underscore prefixes: _field_name\n    2. This mixin automatically maps _field_name -> field_name in to_internal_value\n    3. The serializer can then use the clean field names normally","title":"CHLogV2ListRequest"},"CHLogV2List":{"type":"object","properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"organization_key_id":{"type":"string"},"environment":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"start_time":{"type":"string","format":"date-time"},"prompt_id":{"type":"string"},"prompt_name":{"type":"string"},"trace_unique_id":{"type":"string"},"customer_identifier":{"type":"string"},"customer_name":{"type":"string"},"customer_email":{"type":"string"},"thread_identifier":{"type":"string"},"custom_identifier":{"type":"string"},"unique_organization_id":{"type":"string"},"log_type":{"type":"string"},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_request_tokens":{"type":"integer"},"prompt_cache_hit_tokens":{"type":"integer"},"prompt_cache_creation_tokens":{"type":"integer"},"reasoning_tokens":{"type":"integer"},"cost":{"type":"number","format":"double"},"model":{"type":"string"},"latency":{"type":"number","format":"double"},"tokens_per_second":{"type":"number","format":"double"},"time_to_first_token":{"type":"number","format":"double"},"routing_time":{"type":"number","format":"double"},"status_code":{"type":"integer"},"status":{"type":"string"},"blurred":{"type":"boolean"},"metadata":{"type":"string"},"scores":{"type":"string"},"storage_object_key":{"type":"string"},"updated_storage_object_key":{"type":"string"},"system":{"type":"string"},"prompt":{"type":"string"},"completion":{"type":"string"},"span_workflow_name":{"type":"string"},"span_name":{"type":"string"},"positive_feedback":{"type":"string"},"note":{"type":"string"}},"required":["id","organization_id","organization_key_id","environment","prompt_name","trace_unique_id","customer_identifier","thread_identifier","unique_organization_id","log_type","metadata","scores","system","prompt","completion","positive_feedback"],"description":"Mixin to handle underscore-prefixed field mapping in serializers.\n\nThis is used when Django annotations require underscore prefixes to avoid\nname conflicts with original column names, but we want to expose the\nclean field names in the API response.\n\nUsage:\n    1. Annotate queryset with underscore prefixes: _field_name\n    2. This mixin automatically maps _field_name -> field_name in to_internal_value\n    3. The serializer can then use the clean field names normally","title":"CHLogV2List"},"Traces_retrievePublicTrace_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Traces_retrievePublicTrace_Response_200"},"Traces_retrieveTrace_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Traces_retrieveTrace_Response_200"},"Traces_shareTrace_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Traces_shareTrace_Response_200"},"Traces_bulkDeleteTraces_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Traces_bulkDeleteTraces_Response_200"},"CHTraceListRequest":{"type":"object","properties":{"id":{"type":"string"},"trace_unique_id":{"type":"string"},"root_span_unique_id":{"type":"string"},"unique_organization_id":{"type":"string"},"environment":{"type":"string"},"customer_identifier":{"type":"string"},"start_time":{"type":"string","format":"date-time"},"end_time":{"type":"string","format":"date-time"},"duration":{"type":"number","format":"double"},"span_count":{"type":"integer"},"llm_call_count":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"total_prompt_tokens":{"type":"integer"},"total_completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"error_count":{"type":"integer"},"name":{"type":"string"},"input":{"type":"string"},"output":{"type":"string"},"storage_object_key":{"type":"string"},"organization_name":{"type":"string"},"organization_id":{"type":"string"},"organization_key_id":{"type":"string"},"metadata":{"description":"Any type"},"trace_group_identifier":{"type":"string"},"session_identifier":{"type":"string"},"model":{"type":"string"}},"required":["id","trace_unique_id"],"description":"Serializer for trace list data from the CTE query.\nHandles the output from _get_trace_queryset_with_cte.\n\nInherits all common fields from BaseTraceSerializer and adds:\n- organization_name, organization_key_id: Organization details\n- metadata: Trace metadata\n- trace_group_identifier: For grouping related traces\n- model: Model information","title":"CHTraceListRequest"},"CHTraceList":{"type":"object","properties":{"id":{"type":"string"},"trace_unique_id":{"type":"string"},"root_span_unique_id":{"type":"string"},"unique_organization_id":{"type":"string"},"environment":{"type":"string"},"customer_identifier":{"type":"string"},"start_time":{"type":"string","format":"date-time"},"end_time":{"type":"string","format":"date-time"},"duration":{"type":"number","format":"double"},"span_count":{"type":"integer"},"llm_call_count":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"total_prompt_tokens":{"type":"integer"},"total_completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"error_count":{"type":"integer"},"name":{"type":"string"},"input":{"type":"string"},"output":{"type":"string"},"storage_object_key":{"type":"string"},"organization_name":{"type":"string"},"organization_id":{"type":"string"},"organization_key_id":{"type":"string"},"metadata":{"description":"Any type"},"trace_group_identifier":{"type":"string"},"session_identifier":{"type":"string"},"model":{"type":"string"}},"required":["id","trace_unique_id"],"description":"Serializer for trace list data from the CTE query.\nHandles the output from _get_trace_queryset_with_cte.\n\nInherits all common fields from BaseTraceSerializer and adds:\n- organization_name, organization_key_id: Organization details\n- metadata: Trace metadata\n- trace_group_identifier: For grouping related traces\n- model: Model information","title":"CHTraceList"},"Traces_createTraceLegacy_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Traces_createTraceLegacy_Response_200"},"Traces_createTrace_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Traces_createTrace_Response_200"},"CHThreadListRequest":{"type":"object","properties":{"id":{"type":"string"},"thread_identifier":{"type":"string"},"thread_unique_id":{"type":"string"},"organization_name":{"type":"string"},"environment":{"type":"string"},"organization_id":{"type":"string"},"unique_organization_id":{"type":"string"},"organization_key_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"timestamp":{"type":"string","format":"date-time"},"log_count":{"type":"integer"},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"tokens":{"type":"integer"},"cost":{"type":"number","format":"double"},"tokens_per_second":{"type":"number","format":"double"},"latency":{"type":"number","format":"double"},"time_to_first_token":{"type":"number","format":"double"},"input":{"type":"string","default":""},"output":{"type":"string","default":""},"storage_object_key":{"type":"string"}},"required":["id","thread_identifier","log_count","prompt_tokens","completion_tokens","tokens","cost","tokens_per_second","latency","time_to_first_token"],"description":"Serializer for thread list data from the CTE query.\nHandles the output from _get_thread_queryset.","title":"CHThreadListRequest"},"CHThreadList":{"type":"object","properties":{"id":{"type":"string"},"thread_identifier":{"type":"string"},"thread_unique_id":{"type":"string"},"organization_name":{"type":"string"},"environment":{"type":"string"},"organization_id":{"type":"string"},"unique_organization_id":{"type":"string"},"organization_key_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"timestamp":{"type":"string","format":"date-time"},"log_count":{"type":"integer"},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"tokens":{"type":"integer"},"cost":{"type":"number","format":"double"},"tokens_per_second":{"type":"number","format":"double"},"latency":{"type":"number","format":"double"},"time_to_first_token":{"type":"number","format":"double"},"prompt":{"type":"string"},"completion":{"type":"string"},"system":{"type":"string"},"input":{"type":"string","default":""},"output":{"type":"string","default":""},"storage_object_key":{"type":"string"}},"required":["id","thread_identifier","log_count","prompt_tokens","completion_tokens","tokens","cost","tokens_per_second","latency","time_to_first_token","prompt","completion","system"],"description":"Serializer for thread list data from the CTE query.\nHandles the output from _get_thread_queryset.","title":"CHThreadList"},"CustomerUserListRequest":{"type":"object","properties":{"environment":{"type":"string"},"customer_identifier":{"type":"string"},"unique_organization_id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"first_seen":{"type":"string","format":"date-time"},"last_active_timeframe":{"type":"string"},"active_days":{"type":"integer"},"number_of_requests":{"type":"integer"},"total_requests":{"type":"integer"},"total_tokens":{"type":"integer"},"tokens":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"cost":{"type":"number","format":"double"},"average_latency":{"type":"number","format":"double"},"average_ttft":{"type":"number","format":"double"}},"required":["environment","customer_identifier","first_seen","last_active_timeframe","active_days","number_of_requests","total_requests","total_tokens","tokens","total_cost","cost","average_latency","average_ttft"],"description":"Serializer for customer user list responses from ClickHouse.\n\nCombines ClickHouse analytics data with PostgreSQL budget data for\nbackward compatibility with the legacy /api/users/ endpoint.\n\nBudget data enrichment:\n- View passes budget_data_map in context (keyed by customer_identifier+environment)\n- SerializerMethodFields look up budget values from context","title":"CustomerUserListRequest"},"CustomerUserList":{"type":"object","properties":{"id":{"type":"string"},"environment":{"type":"string"},"customer_identifier":{"type":"string"},"unique_organization_id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"first_seen":{"type":"string","format":"date-time"},"last_active_timeframe":{"type":"string"},"active_days":{"type":"integer"},"number_of_requests":{"type":"integer"},"total_requests":{"type":"integer"},"total_tokens":{"type":"integer"},"tokens":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"cost":{"type":"number","format":"double"},"average_latency":{"type":"number","format":"double"},"average_ttft":{"type":"number","format":"double"},"average_monthly_cost":{"type":"string"},"period_budget":{"type":"string"},"budget_duration":{"type":"string"},"total_budget":{"type":"string"}},"required":["id","environment","customer_identifier","first_seen","last_active_timeframe","active_days","number_of_requests","total_requests","total_tokens","tokens","total_cost","cost","average_latency","average_ttft","average_monthly_cost","period_budget","budget_duration","total_budget"],"description":"Serializer for customer user list responses from ClickHouse.\n\nCombines ClickHouse analytics data with PostgreSQL budget data for\nbackward compatibility with the legacy /api/users/ endpoint.\n\nBudget data enrichment:\n- View passes budget_data_map in context (keyed by customer_identifier+environment)\n- SerializerMethodFields look up budget values from context","title":"CustomerUserList"},"CustomerUserDetailEnvironment":{"oneOf":[{"$ref":"#/components/schemas/EnvironmentA4fEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"CustomerUserDetailEnvironment"},"CustomerUserDetail":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"customer_identifier":{"type":["string","null"]},"environment":{"$ref":"#/components/schemas/CustomerUserDetailEnvironment"},"total_budget":{"type":["number","null"],"format":"double"},"period_budget":{"type":["number","null"],"format":"double"},"organization_name":{"type":"string"},"total_period_usage":{"type":"number","format":"double"},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":["string","null"],"format":"date-time"},"budget_duration":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","organization_name"],"description":"Serializer for customer user detail view (retrieve/update/delete).\n\nUsed by both:\n- Public API: /api/users/<customer_identifier>/\n- Dashboard: /clickhouse/customer-users/<id>/\n\nDifferences from base CustomerUserUpdateSerializer:\n- id: Returns string (frontend compatibility) via SerializerMethodField\n- organization_name: Included for dashboard display\n- Explicit fields list: Only returns relevant fields for detail view","title":"CustomerUserDetail"},"PatchedCustomerUserDetailRequestEnvironment":{"oneOf":[{"$ref":"#/components/schemas/EnvironmentA4fEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"PatchedCustomerUserDetailRequestEnvironment"},"PatchedCustomerUserDetailRequest":{"type":"object","properties":{"name":{"type":["string","null"]},"email":{"type":["string","null"]},"customer_identifier":{"type":["string","null"]},"environment":{"$ref":"#/components/schemas/PatchedCustomerUserDetailRequestEnvironment"},"total_budget":{"type":["number","null"],"format":"double"},"period_budget":{"type":["number","null"],"format":"double"},"total_period_usage":{"type":"number","format":"double"},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":["string","null"],"format":"date-time"},"budget_duration":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"description":"Serializer for customer user detail view (retrieve/update/delete).\n\nUsed by both:\n- Public API: /api/users/<customer_identifier>/\n- Dashboard: /clickhouse/customer-users/<id>/\n\nDifferences from base CustomerUserUpdateSerializer:\n- id: Returns string (frontend compatibility) via SerializerMethodField\n- organization_name: Included for dashboard display\n- Explicit fields list: Only returns relevant fields for detail view","title":"PatchedCustomerUserDetailRequest"},"FilterParamDictPydantic":{"type":"object","properties":{},"description":"Pydantic model for FilterParamDict.\nA dictionary that maps metric names to their filter parameters.\n\nEach key is a metric name (str), and each value can be:\n- A single MetricFilterParamPydantic (one condition)\n- A List[MetricFilterParamPydantic] (multiple conditions for same metric)\n- A FilterBundlePydantic (nested filter bundle with connector)\n\nNote: Uses extra=\"allow\" for dynamic metric name fields.\nThe __pydantic_extra__ annotation tells Pydantic what types to expect for\nextra fields, and generates typed additionalProperties in JSON Schema.","title":"FilterParamDictPydantic"},"PaginatedPlatformAccountListListFiltersData":{"type":"object","properties":{},"title":"PaginatedPlatformAccountListListFiltersData"},"PlatformAccountList":{"type":"object","properties":{"id":{"type":"integer"},"email":{"type":"string"},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"last_login":{"type":["string","null"],"format":"date-time"},"organization_id":{"type":["integer","null"]},"organization_name":{"type":["string","null"]}},"required":["id","email","organization_id","organization_name"],"description":"For list operations - summarized account info.\nUsed by GET /api/accounts/","title":"PlatformAccountList"},"PaginatedPlatformAccountListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedPlatformAccountListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/PlatformAccountList"}}},"required":["count","results"],"title":"PaginatedPlatformAccountListList"},"PlatformAccountCreateRequest":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"is_active":{"type":"boolean"},"organization_name":{"type":["string","null"],"default":"Test Org"},"create_organization":{"type":"boolean","default":true}},"required":["email","password"],"description":"For create operations - creates account with optional organization.\nUsed by POST /api/accounts/\n\nCreates:\n1. APIUser with email/password\n2. Optionally creates Organization with specified name (default: creates org)\n3. Links user to organization via OrganizationUserRole (if org created)","title":"PlatformAccountCreateRequest"},"OnboardingMethodEnum":{"type":"string","enum":["gateway","tracing"],"description":"* `gateway` - Gateway\n* `tracing` - Tracing","title":"OnboardingMethodEnum"},"NullEnum":{"description":"Any type","title":"NullEnum"},"OrganizationOnboardingMethod":{"oneOf":[{"$ref":"#/components/schemas/OnboardingMethodEnum"},{"$ref":"#/components/schemas/NullEnum"}],"title":"OrganizationOnboardingMethod"},"PlanEnum":{"type":"string","enum":["none","starter","team","custom","seat_based_free","seat_based_pro","seat_based_team","seat_based_enterprise","seat_based_custom","respan_team","respan_pro"],"description":"* `none` - Default\n* `starter` - Starter\n* `team` - Team\n* `custom` - Custom\n* `seat_based_free` - Seat Based Free\n* `seat_based_pro` - Seat Based Pro\n* `seat_based_team` - Seat Based Team\n* `seat_based_enterprise` - Seat Based Enterprise\n* `seat_based_custom` - Seat Based Custom\n* `respan_team` - Respan Team\n* `respan_pro` - Respan Pro","title":"PlanEnum"},"CompanyOrganizationList":{"type":"object","properties":{"id":{"type":"integer"},"plan_level":{"type":"integer"},"unique_company_organization_id":{"type":"string"},"company_organization_unique_id":{"type":["string","null"]},"name":{"type":"string"},"email_domain":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"plan":{"$ref":"#/components/schemas/PlanEnum"},"stripe_customer_id":{"type":"string"},"llm_gateway_markup_rate":{"type":"number","format":"double","description":"LLM gateway markup rate (default 0% markup). Single source of truth: DEFAULT_LLM_GATEWAY_MARKUP_RATE."},"credit_low_balance_threshold":{"type":["number","null"],"format":"double"},"credit_auto_top_off_threshold":{"type":["number","null"],"format":"double"},"credit_auto_top_off_amount":{"type":["number","null"],"format":"double"},"is_auto_top_off_enabled":{"type":"boolean"}},"required":["id","plan_level","name","created_at","updated_at"],"title":"CompanyOrganizationList"},"Credit":{"type":"object","properties":{"id":{"type":"integer"},"expired":{"type":"boolean"},"amount":{"type":"number","format":"double"},"currency":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"expire_at":{"type":["string","null"],"format":"date-time"},"recurring":{"type":"boolean"},"hidden_threshold":{"type":"number","format":"double"},"organization_subscription":{"type":["integer","null"]}},"required":["id","expired","created_at"],"description":"Legacy credits serializer - DEPRECATED","title":"Credit"},"BillingMethodEnum":{"type":"string","enum":["stripe","invoice","other"],"description":"* `stripe` - Stripe\n* `invoice` - Invoice\n* `other` - Other","title":"BillingMethodEnum"},"BillingPeriodEnum":{"type":"string","enum":["monthly","yearly"],"description":"* `monthly` - Monthly\n* `yearly` - Yearly","title":"BillingPeriodEnum"},"UsageReportIntervalEnum":{"type":"string","enum":["monthly","yearly"],"description":"* `monthly` - Monthly\n* `yearly` - Yearly","title":"UsageReportIntervalEnum"},"OrganizationSubscription":{"type":"object","properties":{"id":{"type":"integer"},"plan_level":{"type":"integer"},"api_key_limit":{"type":"integer"},"log_limit":{"type":"integer"},"current_customer_id":{"type":"string"},"dataset_size_limit":{"type":"integer"},"credits":{"type":"array","items":{"$ref":"#/components/schemas/Credit"}},"project":{"type":["string","null"]},"active_billing":{"type":"boolean"},"seats_cost_for_full_period":{"type":"number","format":"double"},"prompts_cost":{"type":"number","format":"double"},"free_trial_days_left":{"type":"integer"},"current_period_start_dt":{"type":"string","format":"date-time"},"current_period_end_dt":{"type":"string","format":"date-time"},"is_on_free_trial":{"type":"boolean"},"plan":{"type":"string"},"mrr":{"type":"number","format":"double"},"invoice_this_period":{"type":"number","format":"double"},"invoice_last_period":{"type":"number","format":"double"},"free_log_limit":{"type":"integer"},"logs_cost_this_period":{"type":"number","format":"double"},"logs_cost_last_period":{"type":"number","format":"double"},"member_limit":{"type":"integer"},"member_count":{"type":"integer"},"monthly_seats_cost":{"type":"number","format":"double"},"logs_in_period":{"type":"integer"},"credit_balance":{"type":"number","format":"double"},"prompt_limit":{"type":["integer","null"]},"evaluator_limit":{"type":["integer","null"]},"dataset_count_limit":{"type":["integer","null"]},"score_limit":{"type":["integer","null"]},"plan_retention_period_in_days":{"type":["integer","null"]},"subscription_unique_id":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"subscribed_at":{"type":["string","null"],"format":"date-time"},"free_trial_end_at":{"type":["string","null"],"format":"date-time"},"log_visibility_cutoff_at":{"type":["string","null"],"format":"date-time"},"deal_id":{"type":"string"},"monthly_recurring_revenue":{"type":"number","format":"double"},"expected_annual_contract_value":{"type":"number","format":"double"},"customer_ids":{"type":"array","items":{"type":"string"}},"metered_item_id":{"type":["string","null"]},"seat_based_item_id":{"type":["string","null"]},"base_item_id":{"type":["string","null"]},"stripe_customer_id":{"type":"string"},"usage_report_subscription_id":{"type":"string"},"subscription_id":{"type":"string"},"current_period_start":{"type":"number","format":"double"},"current_period_end":{"type":"number","format":"double"},"current_usage_period_start":{"type":"number","format":"double"},"current_usage_period_end":{"type":"number","format":"double"},"usage_in_period":{"type":"number","format":"double"},"keywordsai_llm_credentials_usage_in_period":{"type":"number","format":"double"},"keywordsai_llm_credentials_usage_last_period":{"type":"number","format":"double"},"logs_in_last_period":{"type":"integer"},"logs_three_months_ago":{"type":"integer"},"customer_user_count":{"type":"integer"},"prompt_count":{"type":"integer"},"evals_in_period":{"type":"integer"},"evals_in_last_period":{"type":"integer"},"past_billing_periods":{"type":"array","items":{"description":"Any type"}},"last_usage_reported":{"type":"number","format":"double"},"last_reconciled_at":{"type":["number","null"],"format":"double"},"billing_method":{"$ref":"#/components/schemas/BillingMethodEnum"},"billing_period":{"$ref":"#/components/schemas/BillingPeriodEnum"},"usage_report_interval":{"$ref":"#/components/schemas/UsageReportIntervalEnum"},"current_period_invoice_amount":{"type":"number","format":"double"},"last_period_invoice_amount":{"type":"number","format":"double"},"budget":{"type":["number","null"],"format":"double"},"custom_log_limit":{"type":["integer","null"]},"custom_plan_name":{"type":"string"},"custom_monthly_cost":{"type":["number","null"],"format":"double"},"custom_yearly_cost":{"type":["number","null"],"format":"double"},"deprecated_subscription_ids":{"description":"Any type"},"subscription_bool":{"type":"boolean"},"custom_subscription":{"description":"Any type"},"custom_bundle":{"description":"Any type"},"accumulative_balance":{"type":"number","format":"double"},"periodic_invoice_amount":{"type":"number","format":"double"},"org":{"type":["integer","null"]},"company_organization":{"type":["integer","null"]},"billing_subscription":{"type":["integer","null"],"description":"If set, credits and billing are managed by this subscription (company-level billing). NULL means this subscription manages its own billing (is a primary billing subscription)."},"organization":{"type":["integer","null"]}},"required":["id","plan_level","api_key_limit","log_limit","current_customer_id","dataset_size_limit","credits","active_billing","seats_cost_for_full_period","prompts_cost","free_trial_days_left","current_period_start_dt","current_period_end_dt","is_on_free_trial","plan","mrr","invoice_this_period","invoice_last_period","free_log_limit","logs_cost_this_period","logs_cost_last_period","member_limit","member_count","monthly_seats_cost","logs_in_period","credit_balance","prompt_limit","evaluator_limit","dataset_count_limit","score_limit","plan_retention_period_in_days","created_at","log_visibility_cutoff_at"],"title":"OrganizationSubscription"},"WarningsSettings":{"type":"object","properties":{"fallback":{"type":"boolean","default":true},"retry":{"type":"boolean","default":true},"invalid_json":{"type":"boolean","default":true},"stream_timeout":{"type":"boolean","default":true},"empty_response":{"type":"boolean","default":true},"using_keywordsai_credentials":{"type":"boolean","default":true}},"description":"Schema-only mirror of the WarningsSettings pydantic model.\n\nNever used at runtime — get_warnings_settings validates through pydantic;\nthis exists so the generated schema types the field (was string). Keep the\nfields in lockstep with utils.keywordsai_types.types.WarningsSettings.","title":"WarningsSettings"},"OrganizationList":{"type":"object","properties":{"id":{"type":"string"},"unique_organization_id":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"],"format":"uri"}},"required":["id","name"],"title":"OrganizationList"},"Status23eEnum":{"type":"string","enum":["active","deleting","inactive"],"description":"* `active` - Active\n* `deleting` - Deleting\n* `inactive` - Inactive","title":"Status23eEnum"},"BudgetDurationEnum":{"type":"string","enum":["daily","weekly","monthly"],"description":"* `daily` - daily\n* `weekly` - weekly\n* `monthly` - monthly","title":"BudgetDurationEnum"},"Organization":{"type":"object","properties":{"id":{"type":"integer"},"active_subscription":{"type":"boolean"},"onboarding_method":{"$ref":"#/components/schemas/OrganizationOnboardingMethod"},"disabled_span_behaviors":{"type":"array","items":{"type":"string"},"description":"Behavior slugs excluded from span-behavior evaluation."},"company_organization":{"$ref":"#/components/schemas/CompanyOrganizationList"},"organization_subscription":{"$ref":"#/components/schemas/OrganizationSubscription"},"warnings_settings":{"$ref":"#/components/schemas/WarningsSettings"},"custom_property_index_mapping":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Custom property key -> indexed ClickHouse column name (e.g. custom_string_1)."},"has_provider_keys":{"type":"boolean"},"has_api_keys":{"type":"boolean"},"sibling_organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationList"}},"is_blocked":{"type":"boolean"},"has_api_call":{"type":"boolean"},"has_api_call_with_non_default_key":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"first_api_call_at":{"type":["string","null"],"format":"date-time"},"last_api_call_at":{"type":["string","null"],"format":"date-time"},"logo":{"type":["string","null"],"format":"uri"},"notes":{"type":"string"},"name":{"type":"string"},"digest_email_inboxes":{"type":"array","items":{"type":"string"}},"organization_size":{"type":"integer"},"product_use_cases":{"type":"array","items":{"type":"string"}},"prioritize_objectives":{"type":"array","items":{"type":"string"}},"unique_organization_id":{"type":"string"},"budget_goal":{"type":"string"},"monthly_spending":{"type":"number","format":"double"},"preset_models":{"type":"array","items":{"type":"string"}},"preset_option":{"type":"string"},"dynamic_routing_enabled":{"type":"boolean"},"fallback_model_enabled":{"type":"boolean"},"fallback_models":{"type":"array","items":{"type":"string"}},"alert_settings":{"description":"Any type"},"system_fallback_enabled":{"type":"boolean"},"alerts_enabled":{"type":"boolean"},"disable_log":{"type":"boolean"},"status":{"$ref":"#/components/schemas/Status23eEnum"},"stripe_customer_id":{"type":"string"},"onboarded":{"type":"boolean"},"onboarding_integration_options":{"description":"Any type"},"onboarding_key":{"type":"string"},"gateway_onboarding_completed_at":{"type":["string","null"],"format":"date-time"},"tracing_onboarding_completed_at":{"type":["string","null"],"format":"date-time"},"curr_onboarding_step":{"type":"integer"},"onboarding_start":{"type":"string","format":"date-time"},"onboarding_end":{"type":["string","null"],"format":"date-time"},"enable_cache":{"type":"boolean"},"archive_duration":{"type":"integer"},"cache_saved_cost":{"type":"number","format":"double"},"cache_hit_count":{"type":"integer","format":"int64"},"cache_hit_tokens":{"type":"integer","format":"int64"},"omit_log_when_cache_hit":{"type":"boolean"},"cache_saved_time":{"type":"number","format":"double"},"last_cache_aggregations_update":{"type":"string","format":"date-time"},"classification_percentage":{"type":["number","null"],"format":"double"},"use_custom_credentials":{"type":"boolean"},"default_customer_user_budget":{"type":["number","null"],"format":"double"},"llm_gateway_markup_rate":{"type":"number","format":"double","description":"LLM gateway markup rate (default 0% markup). Applied when Keywords AI provides LLM credentials. Formula: credit_charge = cost * (1 + llm_gateway_markup_rate)"},"credit_low_balance_threshold":{"type":["number","null"],"format":"double","description":"Credit balance threshold (in USD) to trigger low balance warning webhook. When credit balance drops below this value, a credit_low_balance_threshold_reached webhook event is dispatched once until balance goes above threshold again."},"credit_auto_top_off_threshold":{"type":["number","null"],"format":"double","description":"Credit balance threshold (in USD) to trigger auto top-off. When credit balance drops below this value, automatically charge credit_auto_top_off_amount via Stripe."},"credit_auto_top_off_amount":{"type":["number","null"],"format":"double","description":"Amount (in USD) to automatically charge when credit balance drops below credit_auto_top_off_threshold. Requires stripe_customer_id with valid payment method."},"is_auto_top_off_enabled":{"type":"boolean","description":"Enable automatic credit top-off. When enabled and balance drops below credit_auto_top_off_threshold, automatically charges credit_auto_top_off_amount via Stripe. Requires stripe_customer_id with valid payment method."},"metadata_keys":{"type":["array","null"],"items":{"type":"string"}},"custom_models":{"type":["array","null"],"items":{"type":"string"}},"spend_cap":{"type":["number","null"],"format":"double","description":"Spend cap amount in USD. Enforced in real-time via atomic Redis limiter."},"spend_cap_warning_threshold":{"type":["number","null"],"format":"double","description":"Spend threshold in USD to trigger warning alert."},"budget_duration":{"$ref":"#/components/schemas/BudgetDurationEnum","description":"Duration for spend_cap enforcement: daily, weekly, or monthly.\n\n* `daily` - daily\n* `weekly` - weekly\n* `monthly` - monthly"},"use_keywordsai_credentials":{"type":"boolean"},"rate_limit":{"type":["number","null"],"format":"double"},"customer_user_rate_limit":{"type":["number","null"],"format":"double"},"retry_enabled":{"type":"boolean"},"retry_after":{"type":"number","format":"double"},"num_retries":{"type":"integer"},"custom_preset_models":{"type":"array","items":{"type":"string"}},"image_assets":{"type":"array","items":{"type":"string"}},"logs_retention_period_in_days":{"type":["integer","null"]},"is_extended_retention_enabled":{"type":"boolean"},"is_custom_retention_enabled":{"type":"boolean"},"starred":{"type":"boolean"},"is_span_behaviors_enabled":{"type":"boolean"},"curr_owner":{"type":["integer","null"]},"users":{"type":"array","items":{"type":"integer"}}},"required":["id","active_subscription","onboarding_method","company_organization","organization_subscription","warnings_settings","has_provider_keys","has_api_keys","sibling_organizations","is_blocked","has_api_call","has_api_call_with_non_default_key","name","status","stripe_customer_id","llm_gateway_markup_rate","users"],"description":"DEV-10098: the \"Customize retention policy\" toggle IS the override's presence.\n\n``Organization.is_custom_retention_enabled`` was never read by\n``enforce_data_retention`` — the cron only ever min()s\n``logs_retention_period_in_days`` with the plan window — so switching the\ntoggle off left the stale override silently hard-deleting on the old (shorter)\nwindow while the page claimed the plan default. The column is retired; the wire\nfield of the same name keeps its shape but is now DERIVED from the override, so\nwhat the page renders is what the cron enforces.","title":"Organization"},"PlatformAccountCreate":{"type":"object","properties":{"id":{"type":"integer"},"email":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"organization":{"$ref":"#/components/schemas/Organization"}},"required":["id","email","created_at","organization"],"description":"For create operations - creates account with optional organization.\nUsed by POST /api/accounts/\n\nCreates:\n1. APIUser with email/password\n2. Optionally creates Organization with specified name (default: creates org)\n3. Links user to organization via OrganizationUserRole (if org created)","title":"PlatformAccountCreate"},"PlatformAccountListRequest":{"type":"object","properties":{"email":{"type":"string"},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"last_login":{"type":["string","null"],"format":"date-time"}},"required":["email"],"description":"For list operations - summarized account info.\nUsed by GET /api/accounts/","title":"PlatformAccountListRequest"},"PatchedPlatformAccountListRequest":{"type":"object","properties":{"email":{"type":"string"},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"last_login":{"type":["string","null"],"format":"date-time"}},"description":"For list operations - summarized account info.\nUsed by GET /api/accounts/","title":"PatchedPlatformAccountListRequest"},"PlatformAccountOrganization":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"unique_organization_id":{"type":"string"},"status":{"$ref":"#/components/schemas/Status23eEnum"}},"required":["id","name"],"description":"Lightweight organization serializer for account detail view.\nOnly includes essential fields - NOT the full OrganizationSerializer.","title":"PlatformAccountOrganization"},"PlatformAccountDetail":{"type":"object","properties":{"id":{"type":"integer"},"email":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"last_login":{"type":["string","null"],"format":"date-time"},"organization":{"$ref":"#/components/schemas/PlatformAccountOrganization"}},"required":["id","email","organization"],"description":"For retrieve operations - detailed account info with lightweight organization.\nUsed by GET /api/accounts/{email}/","title":"PlatformAccountDetail"},"PlatformAccountDetailRequest":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"last_login":{"type":["string","null"],"format":"date-time"}},"required":["email"],"description":"For retrieve operations - detailed account info with lightweight organization.\nUsed by GET /api/accounts/{email}/","title":"PlatformAccountDetailRequest"},"Status719Enum":{"type":"string","enum":["active","blocked"],"description":"* `active` - Active\n* `blocked` - Blocked","title":"Status719Enum"},"PatchedPlatformAccountUpdateRequest":{"type":"object","properties":{"password":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"is_active":{"type":"boolean"},"status":{"$ref":"#/components/schemas/Status719Enum"},"is_admin":{"type":"boolean"}},"description":"For update operations - update account fields.\nUsed by PATCH /api/accounts/{email}/\n\nSupports updating:\n- password (write-only)\n- is_active\n- status (operator block lever — ACTIVE | BLOCKED)\n- name, username, first_name, last_name\n- is_admin\n\nNote: email is read-only since it's the lookup field. ``is_superadmin``\nis exposed read-only for legacy FE compat (derived from\n``StaffMembership`` via ``APIUser.is_superadmin`` @property) — to\ngrant/revoke staff role, hit ``/api/admin/staff-groups/<name>/memberships/``.","title":"PatchedPlatformAccountUpdateRequest"},"PlatformAccountUpdate":{"type":"object","properties":{"id":{"type":"integer"},"email":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"is_active":{"type":"boolean"},"status":{"$ref":"#/components/schemas/Status719Enum"},"is_admin":{"type":"boolean"},"is_superadmin":{"type":"boolean"}},"required":["id","email","is_superadmin"],"description":"For update operations - update account fields.\nUsed by PATCH /api/accounts/{email}/\n\nSupports updating:\n- password (write-only)\n- is_active\n- status (operator block lever — ACTIVE | BLOCKED)\n- name, username, first_name, last_name\n- is_admin\n\nNote: email is read-only since it's the lookup field. ``is_superadmin``\nis exposed read-only for legacy FE compat (derived from\n``StaffMembership`` via ``APIUser.is_superadmin`` @property) — to\ngrant/revoke staff role, hit ``/api/admin/staff-groups/<name>/memberships/``.","title":"PlatformAccountUpdate"},"Users_api_accounts_add_to_org_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_accounts_add_to_org_retrieve_Response_200"},"Users_api_accounts_add_to_org_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_accounts_add_to_org_create_Response_200"},"Users_api_accounts_allow_signup_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_accounts_allow_signup_retrieve_Response_200"},"Users_api_accounts_allow_signup_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_accounts_allow_signup_create_Response_200"},"Users_api_accounts_change_role_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_accounts_change_role_retrieve_Response_200"},"Users_api_accounts_change_role_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_accounts_change_role_create_Response_200"},"Users_api_accounts_invitations_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_accounts_invitations_retrieve_Response_200"},"Users_api_accounts_invitations_create_2_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_accounts_invitations_create_2_Response_200"},"Users_api_accounts_remove_from_org_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_accounts_remove_from_org_retrieve_Response_200"},"Users_api_accounts_remove_from_org_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_accounts_remove_from_org_create_Response_200"},"Users_api_accounts_revoke_signup_allow_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_accounts_revoke_signup_allow_retrieve_Response_200"},"Users_api_accounts_revoke_signup_allow_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_accounts_revoke_signup_allow_create_Response_200"},"Users_api_accounts_transfer_ownership_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_accounts_transfer_ownership_retrieve_Response_200"},"Users_api_accounts_transfer_ownership_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_accounts_transfer_ownership_create_Response_200"},"PaginatedInvitationListListFiltersData":{"type":"object","properties":{},"title":"PaginatedInvitationListListFiltersData"},"RoleEnum":{"type":"string","enum":["member","admin","owner","keywordsai_admin","annotator"],"description":"* `member` - member\n* `admin` - admin\n* `owner` - owner\n* `keywordsai_admin` - keywordsai_admin\n* `annotator` - annotator","title":"RoleEnum"},"InvitationList":{"type":"object","properties":{"id":{"type":"integer"},"organization_name":{"type":"string"},"member_count":{"type":"integer"},"project":{"type":["string","null"]},"email":{"type":"string","format":"email"},"message":{"type":"string"},"code":{"type":"string","format":"uuid"},"sent_at":{"type":"string","format":"date-time"},"accepted_at":{"type":["string","null"],"format":"date-time"},"role":{"$ref":"#/components/schemas/RoleEnum"},"organization":{"type":"integer"}},"required":["id","organization_name","member_count","email","sent_at","organization"],"title":"InvitationList"},"PaginatedInvitationListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedInvitationListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/InvitationList"}}},"required":["count","results"],"title":"PaginatedInvitationListList"},"InvitationListRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"email":{"type":"string","format":"email"},"message":{"type":"string"},"code":{"type":"string","format":"uuid"},"accepted_at":{"type":["string","null"],"format":"date-time"},"role":{"$ref":"#/components/schemas/RoleEnum"},"organization":{"type":"integer"}},"required":["email","organization"],"title":"InvitationListRequest"},"PatchedInvitationListRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"email":{"type":"string","format":"email"},"message":{"type":"string"},"code":{"type":"string","format":"uuid"},"accepted_at":{"type":["string","null"],"format":"date-time"},"role":{"$ref":"#/components/schemas/RoleEnum"},"organization":{"type":"integer"}},"title":"PatchedInvitationListRequest"},"Users_api_accounts_invitations_create_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_accounts_invitations_create_create_Response_200"},"Users_api_accounts_signup_allowlist_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_accounts_signup_allowlist_retrieve_Response_200"},"Users_api_accounts_summary_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_accounts_summary_retrieve_Response_200"},"Users_api_accounts_summary_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_accounts_summary_create_Response_200"},"Users_api_accounts_summary_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_accounts_summary_update_Response_200"},"Users_api_accounts_summary_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_accounts_summary_partial_update_Response_200"},"PaginatedOrganizationKeyReadListFiltersData":{"type":"object","properties":{},"title":"PaginatedOrganizationKeyReadListFiltersData"},"GenericTagDisplay":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","color","created_at","updated_at"],"description":"Lightweight serializer for returning tag metadata on assignments.","title":"GenericTagDisplay"},"RevocableStatusEnum":{"type":"string","enum":["active","expired","revoked"],"description":"* `active` - Active\n* `expired` - Expired\n* `revoked` - Revoked","title":"RevocableStatusEnum"},"OrganizationKeyRead":{"type":"object","properties":{"id":{"type":"string"},"suffix":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"}},"status":{"$ref":"#/components/schemas/RevocableStatusEnum"},"project":{"type":["string","null"]},"prefix":{"type":"string"},"hashed_key":{"type":"string"},"created":{"type":"string","format":"date-time"},"name":{"type":"string","description":"A free-form name for the API key. Need not be unique. 50 characters max."},"revoked":{"type":"boolean","description":"If the API key is revoked, clients cannot use it anymore. (This cannot be undone.)"},"expiry_date":{"type":["string","null"],"format":"date-time","description":"Once API key expires, clients cannot use it anymore."},"key_usage":{"type":"integer"},"max_usage":{"type":"integer"},"last_used":{"type":"string","format":"date-time"},"rate_limit":{"type":["number","null"],"format":"double"},"spending_limit":{"type":["number","null"],"format":"double"},"spending_in_period":{"type":"number","format":"double"},"is_test":{"type":"boolean"},"is_temporary":{"type":"boolean"},"revoked_at":{"type":["string","null"],"format":"date-time"},"revoked_by_email":{"type":["string","null"]},"user":{"type":["integer","null"]},"organization":{"type":["integer","null"]},"created_by":{"type":["integer","null"]},"updated_by":{"type":["integer","null"]}},"required":["id","suffix","tags","status","prefix","hashed_key","created","key_usage","last_used","spending_in_period","revoked_at","revoked_by_email","user","organization","created_by","updated_by"],"description":"List/retrieve variant — omits ``api_key`` entirely.\n\nThe plaintext secret is only ever populated in ``create()``'s context, so\nreads never had it; advertising it as an always-present OpenAPI field was\nmisleading (DEV-9810).","title":"OrganizationKeyRead"},"PaginatedOrganizationKeyReadList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedOrganizationKeyReadListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationKeyRead"}}},"required":["count","results"],"title":"PaginatedOrganizationKeyReadList"},"OrganizationKeyRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"name":{"type":"string","description":"A free-form name for the API key. Need not be unique. 50 characters max."},"revoked":{"type":"boolean","description":"If the API key is revoked, clients cannot use it anymore. (This cannot be undone.)"},"expiry_date":{"type":["string","null"],"format":"date-time","description":"Once API key expires, clients cannot use it anymore."},"max_usage":{"type":"integer"},"rate_limit":{"type":["number","null"],"format":"double"},"spending_limit":{"type":["number","null"],"format":"double"},"is_test":{"type":"boolean"},"is_temporary":{"type":"boolean"}},"title":"OrganizationKeyRequest"},"OrganizationKey":{"type":"object","properties":{"id":{"type":"string"},"api_key":{"type":"string"},"suffix":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"}},"status":{"$ref":"#/components/schemas/RevocableStatusEnum"},"project":{"type":["string","null"]},"prefix":{"type":"string"},"hashed_key":{"type":"string"},"created":{"type":"string","format":"date-time"},"name":{"type":"string","description":"A free-form name for the API key. Need not be unique. 50 characters max."},"revoked":{"type":"boolean","description":"If the API key is revoked, clients cannot use it anymore. (This cannot be undone.)"},"expiry_date":{"type":["string","null"],"format":"date-time","description":"Once API key expires, clients cannot use it anymore."},"key_usage":{"type":"integer"},"max_usage":{"type":"integer"},"last_used":{"type":"string","format":"date-time"},"rate_limit":{"type":["number","null"],"format":"double"},"spending_limit":{"type":["number","null"],"format":"double"},"spending_in_period":{"type":"number","format":"double"},"is_test":{"type":"boolean"},"is_temporary":{"type":"boolean"},"revoked_at":{"type":["string","null"],"format":"date-time"},"revoked_by_email":{"type":["string","null"]},"user":{"type":["integer","null"]},"organization":{"type":["integer","null"]},"created_by":{"type":["integer","null"]},"updated_by":{"type":["integer","null"]}},"required":["id","api_key","suffix","tags","status","prefix","hashed_key","created","key_usage","last_used","spending_in_period","revoked_at","revoked_by_email","user","organization","created_by","updated_by"],"title":"OrganizationKey"},"PatchedOrganizationKeyUpdateRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"name":{"type":"string","description":"A free-form name for the API key. Need not be unique. 50 characters max."},"revoked":{"type":"boolean","description":"If the API key is revoked, clients cannot use it anymore. (This cannot be undone.)"},"expiry_date":{"type":["string","null"],"format":"date-time","description":"Once API key expires, clients cannot use it anymore."},"max_usage":{"type":"integer"},"rate_limit":{"type":["number","null"],"format":"double"},"spending_limit":{"type":["number","null"],"format":"double"},"is_temporary":{"type":"boolean"}},"title":"PatchedOrganizationKeyUpdateRequest"},"OrganizationKeyUpdate":{"type":"object","properties":{"id":{"type":"string"},"api_key":{"type":"string"},"suffix":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"}},"status":{"$ref":"#/components/schemas/RevocableStatusEnum"},"project":{"type":["string","null"]},"prefix":{"type":"string"},"hashed_key":{"type":"string"},"created":{"type":"string","format":"date-time"},"name":{"type":"string","description":"A free-form name for the API key. Need not be unique. 50 characters max."},"revoked":{"type":"boolean","description":"If the API key is revoked, clients cannot use it anymore. (This cannot be undone.)"},"expiry_date":{"type":["string","null"],"format":"date-time","description":"Once API key expires, clients cannot use it anymore."},"key_usage":{"type":"integer"},"max_usage":{"type":"integer"},"last_used":{"type":"string","format":"date-time"},"rate_limit":{"type":["number","null"],"format":"double"},"spending_limit":{"type":["number","null"],"format":"double"},"spending_in_period":{"type":"number","format":"double"},"is_test":{"type":"boolean"},"is_temporary":{"type":"boolean"},"revoked_at":{"type":["string","null"],"format":"date-time"},"revoked_by_email":{"type":["string","null"]},"user":{"type":["integer","null"]},"organization":{"type":["integer","null"]},"created_by":{"type":["integer","null"]},"updated_by":{"type":["integer","null"]}},"required":["id","api_key","suffix","tags","status","prefix","hashed_key","created","key_usage","last_used","spending_in_period","is_test","revoked_at","revoked_by_email","user","organization","created_by","updated_by"],"title":"OrganizationKeyUpdate"},"OrganizationKeyFilterRequestRequest":{"type":"object","properties":{"filters":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Filter parameters keyed by field name."}},"description":"Request body for POST-for-filtering on /api/keys/list/ and\n/api/keys/summary/ — distinguishes the filter POST from key creation.\n\n`filters` is an open dict (matches DatasetFilterRequestSerializer): the\nfilter shape is dynamic and the frontend owns a typed FilterRequest, so a\nstrict per-field schema would only fight the FE's filter types.","title":"OrganizationKeyFilterRequestRequest"},"OrganizationKeySummaryResponse":{"type":"object","properties":{"total_count":{"type":"integer"}},"required":["total_count"],"description":"Response body for /api/keys/summary/ — total matching API keys.","title":"OrganizationKeySummaryResponse"},"Users_api_keys_summary_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_keys_summary_update_Response_200"},"Users_api_keys_summary_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_keys_summary_partial_update_Response_200"},"Users_api_organization_statistics_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_organization_statistics_retrieve_Response_200"},"Users_api_organizations_feature_flags_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_organizations_feature_flags_retrieve_Response_200"},"Users_api_organizations_feature_flags_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_organizations_feature_flags_create_Response_200"},"OrganizationKeyUpdateRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"name":{"type":"string","description":"A free-form name for the API key. Need not be unique. 50 characters max."},"revoked":{"type":"boolean","description":"If the API key is revoked, clients cannot use it anymore. (This cannot be undone.)"},"expiry_date":{"type":["string","null"],"format":"date-time","description":"Once API key expires, clients cannot use it anymore."},"max_usage":{"type":"integer"},"rate_limit":{"type":["number","null"],"format":"double"},"spending_limit":{"type":["number","null"],"format":"double"},"is_temporary":{"type":"boolean"}},"title":"OrganizationKeyUpdateRequest"},"PinItemKind":{"type":"string","enum":["nav","settings","prompts","datasets","evaluators","experiments","models","providers"],"title":"PinItemKind"},"PinItem":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/PinItemKind"},"ref":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"}},"required":["kind","ref","title","href"],"description":"One entry inside ``UserOrgSetting.pins`` (#2469).\n\n``kind`` is validated against the ``PinKind`` allowlist by Pydantic itself --\nno separate check in the serializer. ``ref`` and ``title`` are render\nsnapshots captured when the user pins; ``href`` is the resolved app-relative\npath. extra=\"forbid\" rejects unknown keys so a client cannot poison the\nstored JSON with junk fields (the shape is fixed, unlike the FE-owned opaque\ndicts inside a dashboard widget).","title":"PinItem"},"UserOrgSetting":{"type":"object","properties":{"pins":{"type":"array","items":{"$ref":"#/components/schemas/PinItem"}}},"required":["pins"],"description":"Read + partial-update serializer for a user's per-org settings (#2469).\n\nReads and writes the ``pins`` column of the ``UserOrgSetting`` row. ``pins``\nis the ordered list of {kind, ref, title, href} dicts, checked element-by-\nelement via ``PinItem`` (the dashboard-widgets idiom: a Pydantic\nitem model + the shared indexed-error parser), with the\nPIN_LIMIT cap layered on in ``validate_pins``. The kind\nallowlist is enforced by the Pydantic model itself (``kind`` is a ``PinKind``\nliteral), so there is no separate allowlist check here. Doubles as the read\nserializer: ``UserOrgSettingSerializer(instance).data`` returns {pins} off the\nmodel -- an unsaved default instance serializes as the empty {pins: []}\nbaseline a never-written (user, org) reports.","title":"UserOrgSetting"},"PatchedUserOrgSettingRequest":{"type":"object","properties":{"pins":{"type":"array","items":{"$ref":"#/components/schemas/PinItem"}}},"description":"Read + partial-update serializer for a user's per-org settings (#2469).\n\nReads and writes the ``pins`` column of the ``UserOrgSetting`` row. ``pins``\nis the ordered list of {kind, ref, title, href} dicts, checked element-by-\nelement via ``PinItem`` (the dashboard-widgets idiom: a Pydantic\nitem model + the shared indexed-error parser), with the\nPIN_LIMIT cap layered on in ``validate_pins``. The kind\nallowlist is enforced by the Pydantic model itself (``kind`` is a ``PinKind``\nliteral), so there is no separate allowlist check here. Doubles as the read\nserializer: ``UserOrgSettingSerializer(instance).data`` returns {pins} off the\nmodel -- an unsaved default instance serializes as the empty {pins: []}\nbaseline a never-written (user, org) reports.","title":"PatchedUserOrgSettingRequest"},"CustomerUserDetailRequestEnvironment":{"oneOf":[{"$ref":"#/components/schemas/EnvironmentA4fEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"CustomerUserDetailRequestEnvironment"},"CustomerUserDetailRequest":{"type":"object","properties":{"name":{"type":["string","null"]},"email":{"type":["string","null"]},"customer_identifier":{"type":["string","null"]},"environment":{"$ref":"#/components/schemas/CustomerUserDetailRequestEnvironment"},"total_budget":{"type":["number","null"],"format":"double"},"period_budget":{"type":["number","null"],"format":"double"},"total_period_usage":{"type":"number","format":"double"},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":["string","null"],"format":"date-time"},"budget_duration":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"description":"Serializer for customer user detail view (retrieve/update/delete).\n\nUsed by both:\n- Public API: /api/users/<customer_identifier>/\n- Dashboard: /clickhouse/customer-users/<id>/\n\nDifferences from base CustomerUserUpdateSerializer:\n- id: Returns string (frontend compatibility) via SerializerMethodField\n- organization_name: Included for dashboard display\n- Explicit fields list: Only returns relevant fields for detail view","title":"CustomerUserDetailRequest"},"PaginatedCustomerUserListListFiltersData":{"type":"object","properties":{},"title":"PaginatedCustomerUserListListFiltersData"},"PaginatedCustomerUserListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedCustomerUserListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/CustomerUserList"}}},"required":["count","results"],"title":"PaginatedCustomerUserListList"},"PatchedCustomerUserListRequest":{"type":"object","properties":{"environment":{"type":"string"},"customer_identifier":{"type":"string"},"unique_organization_id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"first_seen":{"type":"string","format":"date-time"},"last_active_timeframe":{"type":"string"},"active_days":{"type":"integer"},"number_of_requests":{"type":"integer"},"total_requests":{"type":"integer"},"total_tokens":{"type":"integer"},"tokens":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"cost":{"type":"number","format":"double"},"average_latency":{"type":"number","format":"double"},"average_ttft":{"type":"number","format":"double"}},"description":"Serializer for customer user list responses from ClickHouse.\n\nCombines ClickHouse analytics data with PostgreSQL budget data for\nbackward compatibility with the legacy /api/users/ endpoint.\n\nBudget data enrichment:\n- View passes budget_data_map in context (keyed by customer_identifier+environment)\n- SerializerMethodFields look up budget values from context","title":"PatchedCustomerUserListRequest"},"Users_api_users_summary_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_users_summary_retrieve_Response_200"},"Users_api_users_summary_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_users_summary_create_Response_200"},"Users_api_users_summary_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_users_summary_update_Response_200"},"Users_api_users_summary_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_api_users_summary_partial_update_Response_200"},"Users_clickhouse_customer_users_summary_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_clickhouse_customer_users_summary_retrieve_Response_200"},"Users_clickhouse_customer_users_summary_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_clickhouse_customer_users_summary_create_Response_200"},"Users_clickhouse_customer_users_summary_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_clickhouse_customer_users_summary_update_Response_200"},"Users_clickhouse_customer_users_summary_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_clickhouse_customer_users_summary_partial_update_Response_200"},"PaginatedChCustomerListListFiltersData":{"type":"object","properties":{},"title":"PaginatedChCustomerListListFiltersData"},"CHCustomerList":{"type":"object","properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"unique_organization_id":{"type":"string"},"owner_email":{"type":"string"},"organization_name":{"type":"string"},"stripe_customer_identifier":{"type":"string"},"user_count":{"type":"integer"},"plan":{"type":"string"},"is_blocked":{"type":"boolean"},"disable_log":{"type":"boolean"},"first_seen":{"type":"string"},"starred":{"type":"boolean"},"last_active":{"type":"string"},"total_tokens":{"type":"integer"},"total_requests":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"active_days":{"type":"integer"},"credit_balance":{"type":["number","null"],"format":"double"}},"required":["id","organization_id","first_seen","last_active","total_tokens","total_requests","total_cost"],"title":"CHCustomerList"},"PaginatedCHCustomerListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedChCustomerListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/CHCustomerList"}}},"required":["count","results"],"title":"PaginatedCHCustomerListList"},"CHCustomerFilterRequestRequest":{"type":"object","properties":{"filters":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Filter parameters keyed by metric name."}},"description":"Request body for the customers POST-for-filtering endpoint.","title":"CHCustomerFilterRequestRequest"},"CHOrganizationSubscriptionCustomerPage":{"type":"object","properties":{"id":{"type":"integer"},"api_key_count":{"type":"integer"},"plan_level":{"type":"integer"},"api_key_limit":{"type":"integer"},"log_limit":{"type":"integer"},"current_customer_id":{"type":"string"},"dataset_size_limit":{"type":"integer"},"credits":{"type":"array","items":{"$ref":"#/components/schemas/Credit"}},"active_billing":{"type":"boolean"},"seats_cost_for_full_period":{"type":"number","format":"double"},"prompts_cost":{"type":"number","format":"double"},"free_trial_days_left":{"type":"integer"},"current_period_start_dt":{"type":"string","format":"date-time"},"current_period_end_dt":{"type":"string","format":"date-time"},"is_on_free_trial":{"type":"boolean"},"plan":{"type":"string"},"mrr":{"type":"number","format":"double"},"invoice_this_period":{"type":"number","format":"double"},"invoice_last_period":{"type":"number","format":"double"},"free_log_limit":{"type":"integer"},"logs_cost_this_period":{"type":"number","format":"double"},"logs_cost_last_period":{"type":"number","format":"double"},"member_limit":{"type":"integer"},"member_count":{"type":"integer"},"monthly_seats_cost":{"type":"number","format":"double"},"current_usage_period_start_dt":{"type":"string","format":"date-time"},"current_usage_period_end_dt":{"type":"string","format":"date-time"},"prompt_limit":{"type":["integer","null"]},"evaluator_limit":{"type":["integer","null"]},"dataset_count_limit":{"type":["integer","null"]},"score_limit":{"type":["integer","null"]},"plan_retention_period_in_days":{"type":["integer","null"]},"logs_in_period":{"type":"integer"},"logs_three_months_ago":{"type":"integer"},"keywordsai_llm_credentials_usage_in_period":{"type":"number","format":"double"},"keywordsai_llm_credentials_usage_last_period":{"type":"number","format":"double"},"total_cost_with_keywordsai_credentials":{"type":"number","format":"double"},"subscription_unique_id":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"subscribed_at":{"type":["string","null"],"format":"date-time"},"free_trial_end_at":{"type":["string","null"],"format":"date-time"},"log_visibility_cutoff_at":{"type":["string","null"],"format":"date-time"},"deal_id":{"type":"string"},"monthly_recurring_revenue":{"type":"number","format":"double"},"expected_annual_contract_value":{"type":"number","format":"double"},"customer_ids":{"type":"array","items":{"type":"string"}},"metered_item_id":{"type":["string","null"]},"seat_based_item_id":{"type":["string","null"]},"base_item_id":{"type":["string","null"]},"stripe_customer_id":{"type":"string"},"usage_report_subscription_id":{"type":"string"},"subscription_id":{"type":"string"},"current_period_start":{"type":"number","format":"double"},"current_period_end":{"type":"number","format":"double"},"current_usage_period_start":{"type":"number","format":"double"},"current_usage_period_end":{"type":"number","format":"double"},"usage_in_period":{"type":"number","format":"double"},"logs_in_last_period":{"type":"integer"},"customer_user_count":{"type":"integer"},"prompt_count":{"type":"integer"},"evals_in_period":{"type":"integer"},"evals_in_last_period":{"type":"integer"},"past_billing_periods":{"type":"array","items":{"description":"Any type"}},"last_usage_reported":{"type":"number","format":"double"},"last_reconciled_at":{"type":["number","null"],"format":"double"},"billing_method":{"$ref":"#/components/schemas/BillingMethodEnum"},"billing_period":{"$ref":"#/components/schemas/BillingPeriodEnum"},"usage_report_interval":{"$ref":"#/components/schemas/UsageReportIntervalEnum"},"current_period_invoice_amount":{"type":"number","format":"double"},"last_period_invoice_amount":{"type":"number","format":"double"},"budget":{"type":["number","null"],"format":"double"},"credit_balance":{"type":"number","format":"double","description":"Current available Keywords AI credit balance in USD"},"custom_log_limit":{"type":["integer","null"]},"custom_plan_name":{"type":"string"},"custom_monthly_cost":{"type":["number","null"],"format":"double"},"custom_yearly_cost":{"type":["number","null"],"format":"double"},"deprecated_subscription_ids":{"description":"Any type"},"subscription_bool":{"type":"boolean"},"custom_subscription":{"description":"Any type"},"custom_bundle":{"description":"Any type"},"accumulative_balance":{"type":"number","format":"double"},"periodic_invoice_amount":{"type":"number","format":"double"},"org":{"type":["integer","null"]},"project":{"type":["string","null"]},"company_organization":{"type":["integer","null"]},"billing_subscription":{"type":["integer","null"],"description":"If set, credits and billing are managed by this subscription (company-level billing). NULL means this subscription manages its own billing (is a primary billing subscription)."},"organization":{"type":["integer","null"]}},"required":["id","api_key_count","plan_level","api_key_limit","log_limit","current_customer_id","dataset_size_limit","credits","active_billing","seats_cost_for_full_period","prompts_cost","free_trial_days_left","current_period_start_dt","current_period_end_dt","is_on_free_trial","plan","mrr","invoice_this_period","invoice_last_period","free_log_limit","logs_cost_this_period","logs_cost_last_period","member_limit","member_count","monthly_seats_cost","current_usage_period_start_dt","current_usage_period_end_dt","prompt_limit","evaluator_limit","dataset_count_limit","score_limit","plan_retention_period_in_days","logs_in_period","logs_three_months_ago","keywordsai_llm_credentials_usage_in_period","keywordsai_llm_credentials_usage_last_period","total_cost_with_keywordsai_credentials","created_at","log_visibility_cutoff_at"],"title":"CHOrganizationSubscriptionCustomerPage"},"UserRole":{"type":"object","properties":{"id":{"type":"integer"},"email":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"profile_color":{"type":"string"},"has_customized_password":{"type":"boolean"}},"required":["id","email","name","has_customized_password"],"title":"UserRole"},"OrganizationUserRole":{"type":"object","properties":{"id":{"type":"integer"},"access_level":{"type":"integer"},"user":{"$ref":"#/components/schemas/UserRole"},"organization_name":{"type":"string"},"user_count":{"type":"integer"},"email":{"type":"string","default":""},"role":{"$ref":"#/components/schemas/RoleEnum"},"pending":{"type":"boolean"},"hidden":{"type":"boolean"},"permissions_override":{"type":["array","null"],"items":{"type":"string"}},"organization":{"type":"integer"},"project":{"type":["string","null"]}},"required":["id","access_level","user","organization_name","user_count","organization"],"description":"Serializer for organization user roles.\n\nSecurity Note: Privilege escalation prevention is handled at the VIEW level\n(OrganizationMemberView), not here. This serializer is used by org admins to\nupdate member roles, so fields (role, permissions_override, ...) must remain\nwritable. The view gates all writes on org admin via\n``is_requiring_org_admin_for_write = True`` — a member cannot PATCH their own\nrow to escalate. Any new write path using this serializer MUST apply the same\nadmin gate, since the fields here are privilege-defining.","title":"OrganizationUserRole"},"CHCustomerDetail":{"type":"object","properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"unique_organization_id":{"type":"string"},"owner_email":{"type":"string"},"organization_name":{"type":"string"},"stripe_customer_identifier":{"type":"string"},"user_count":{"type":"integer"},"plan":{"type":"string"},"is_blocked":{"type":"boolean"},"disable_log":{"type":"boolean"},"first_seen":{"type":"string"},"starred":{"type":"boolean"},"last_active":{"type":"string"},"total_tokens":{"type":"integer"},"total_requests":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"active_days":{"type":"integer"},"credit_balance":{"type":["number","null"],"format":"double"},"organization_subscription":{"$ref":"#/components/schemas/CHOrganizationSubscriptionCustomerPage"},"members":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationUserRole"}},"total_member_count":{"type":"integer"},"has_provider_keys":{"type":"boolean"},"sibling_organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationList"}},"has_api_keys":{"type":"boolean"},"status":{"type":["string","null"]},"onboarded":{"type":"boolean"},"has_api_call_with_non_default_key":{"type":"boolean"},"onboarding_method":{"type":["string","null"]},"gateway_onboarding_completed_at":{"type":["string","null"]},"tracing_onboarding_completed_at":{"type":["string","null"]},"onboarding_integration_options":{"type":"object","additionalProperties":{"description":"Any type"}},"fallback_model_enabled":{"type":"boolean"},"fallback_models":{"type":"array","items":{"type":"string"}},"system_fallback_enabled":{"type":"boolean"},"retry_enabled":{"type":"boolean"},"num_retries":{"type":"integer"},"total_logging_cost":{"type":"number","format":"double"}},"required":["id","organization_id","first_seen","last_active","total_tokens","total_requests","total_cost","organization_subscription","members","total_member_count","has_provider_keys","sibling_organizations","has_api_keys","status","onboarded","has_api_call_with_non_default_key","onboarding_method","gateway_onboarding_completed_at","tracing_onboarding_completed_at","onboarding_integration_options","fallback_model_enabled","fallback_models","system_fallback_enabled","retry_enabled","num_retries","total_logging_cost"],"title":"CHCustomerDetail"},"InvitationAcceptRequest":{"type":"object","properties":{"code":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"}},"required":["code","email"],"title":"InvitationAcceptRequest"},"InvitationAccept":{"type":"object","properties":{"code":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"}},"required":["code","email"],"title":"InvitationAccept"},"PaginatedInvitationCreateListFiltersData":{"type":"object","properties":{},"title":"PaginatedInvitationCreateListFiltersData"},"InvitationCreate":{"type":"object","properties":{"email":{"type":"string","format":"email"},"organization":{"type":"integer"},"role":{"$ref":"#/components/schemas/RoleEnum"},"temp_role":{"type":"string"},"message":{"type":"string"}},"required":["email","organization","temp_role"],"title":"InvitationCreate"},"PaginatedInvitationCreateList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedInvitationCreateListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/InvitationCreate"}}},"required":["count","results"],"title":"PaginatedInvitationCreateList"},"InvitationCreateRequest":{"type":"object","properties":{"email":{"type":"string","format":"email"},"organization":{"type":"integer"},"role":{"$ref":"#/components/schemas/RoleEnum"},"message":{"type":"string"},"from_host":{"type":"string"}},"required":["email","organization"],"title":"InvitationCreateRequest"},"Users_user_organization_images_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_user_organization_images_retrieve_Response_200"},"Users_user_organization_images_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_user_organization_images_create_Response_200"},"Users_user_organization_images_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_user_organization_images_partial_update_Response_200"},"PaginatedOrganizationNotificationMethodListListFiltersData":{"type":"object","properties":{},"title":"PaginatedOrganizationNotificationMethodListListFiltersData"},"NotificationTypeEnum":{"type":"string","enum":["email","slack","microsoft_teams","pagerduty","webhook","sms","custom","none"],"description":"* `email` - Email\n* `slack` - Slack\n* `microsoft_teams` - Microsoft Teams\n* `pagerduty` - Pagerduty\n* `webhook` - Webhook\n* `sms` - Sms\n* `custom` - Custom\n* `none` - None","title":"NotificationTypeEnum"},"EmailNotificationMethod":{"type":"object","properties":{"email":{"type":"string"},"subject_prefix":{"type":"string"},"email_title":{"type":"string"}},"required":["email"],"title":"EmailNotificationMethod"},"SlackNotificationMethod":{"type":"object","properties":{"webhook_url":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"method":{"type":"string","default":"POST"},"payload_format":{"type":"string","default":"generic"},"oauth_integration_id":{"type":"string"},"channel_id":{"type":"string"},"channel_name":{"type":"string"},"unique_organization_id":{"type":"string"}},"title":"SlackNotificationMethod"},"TeamsNotificationMethod":{"type":"object","properties":{"webhook_url":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"method":{"type":"string","default":"POST"},"payload_format":{"type":"string","default":"generic"},"oauth_integration_id":{"type":"string"},"team_id":{"type":"string"},"team_name":{"type":"string"},"channel_id":{"type":"string"},"channel_name":{"type":"string"},"unique_organization_id":{"type":"string"}},"description":"Posts to a Teams channel via a Workflows webhook or the Graph OAuth path.\n\nTeams addressing is two-level, so the OAuth branch requires BOTH ``team_id``\nand ``channel_id`` (Slack's flat model needs only ``channel_id``). The\nwebhook branch needs only ``webhook_url`` — its Workflows URL carries auth\nas a signature in the query string, so ``notification_target`` surfaces the\nhost only for that path.","title":"TeamsNotificationMethod"},"WebhookNotificationMethod":{"type":"object","properties":{"webhook_url":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"method":{"type":"string","default":"POST"},"payload_format":{"type":"string","default":"generic"}},"required":["webhook_url"],"title":"WebhookNotificationMethod"},"PagerDutyNotificationMethod":{"type":"object","properties":{"integration_key":{"type":"string"},"service_name":{"type":"string"}},"required":["integration_key"],"title":"PagerDutyNotificationMethod"},"SMSNotificationMethod":{"type":"object","properties":{"phone_number":{"type":"string"},"provider":{"type":"string"}},"required":["phone_number"],"title":"SMSNotificationMethod"},"CustomNotificationMethod":{"type":"object","properties":{"webhook_url":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"method":{"type":"string","default":"POST"}},"required":["webhook_url"],"title":"CustomNotificationMethod"},"OrganizationNotificationMethodListNotificationConfig":{"oneOf":[{"$ref":"#/components/schemas/EmailNotificationMethod"},{"$ref":"#/components/schemas/SlackNotificationMethod"},{"$ref":"#/components/schemas/TeamsNotificationMethod"},{"$ref":"#/components/schemas/WebhookNotificationMethod"},{"$ref":"#/components/schemas/PagerDutyNotificationMethod"},{"$ref":"#/components/schemas/SMSNotificationMethod"},{"$ref":"#/components/schemas/CustomNotificationMethod"}],"title":"OrganizationNotificationMethodListNotificationConfig"},"OrganizationNotificationMethodList":{"type":"object","properties":{"id":{"type":"string"},"notification_type":{"$ref":"#/components/schemas/NotificationTypeEnum"},"notification_config":{"$ref":"#/components/schemas/OrganizationNotificationMethodListNotificationConfig"},"unique_organization_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","notification_config","created_at","updated_at"],"description":"Serializer for listing organization notification methods with summarized information.","title":"OrganizationNotificationMethodList"},"PaginatedOrganizationNotificationMethodListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedOrganizationNotificationMethodListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationNotificationMethodList"}}},"required":["count","results"],"title":"PaginatedOrganizationNotificationMethodListList"},"OrganizationNotificationMethodCreateRequestNotificationConfig":{"oneOf":[{"$ref":"#/components/schemas/EmailNotificationMethod"},{"$ref":"#/components/schemas/SlackNotificationMethod"},{"$ref":"#/components/schemas/TeamsNotificationMethod"},{"$ref":"#/components/schemas/WebhookNotificationMethod"},{"$ref":"#/components/schemas/PagerDutyNotificationMethod"},{"$ref":"#/components/schemas/SMSNotificationMethod"},{"$ref":"#/components/schemas/CustomNotificationMethod"}],"title":"OrganizationNotificationMethodCreateRequestNotificationConfig"},"OrganizationNotificationMethodCreateRequest":{"type":"object","properties":{"notification_config":{"$ref":"#/components/schemas/OrganizationNotificationMethodCreateRequestNotificationConfig"},"project":{"type":["string","null"]},"unique_organization_id":{"type":"string"},"notification_type":{"$ref":"#/components/schemas/NotificationTypeEnum"},"organization":{"type":"integer"},"updated_by":{"type":["integer","null"]}},"required":["notification_config"],"description":"Serializer for creating new organization notification methods.","title":"OrganizationNotificationMethodCreateRequest"},"OrganizationNotificationMethodCreateNotificationConfig":{"oneOf":[{"$ref":"#/components/schemas/EmailNotificationMethod"},{"$ref":"#/components/schemas/SlackNotificationMethod"},{"$ref":"#/components/schemas/TeamsNotificationMethod"},{"$ref":"#/components/schemas/WebhookNotificationMethod"},{"$ref":"#/components/schemas/PagerDutyNotificationMethod"},{"$ref":"#/components/schemas/SMSNotificationMethod"},{"$ref":"#/components/schemas/CustomNotificationMethod"}],"title":"OrganizationNotificationMethodCreateNotificationConfig"},"OrganizationNotificationMethodCreate":{"type":"object","properties":{"id":{"type":"string"},"notification_config":{"$ref":"#/components/schemas/OrganizationNotificationMethodCreateNotificationConfig"},"project":{"type":["string","null"]},"unique_organization_id":{"type":"string"},"notification_type":{"$ref":"#/components/schemas/NotificationTypeEnum"},"updated_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"organization":{"type":"integer"},"updated_by":{"type":["integer","null"]}},"required":["id","notification_config","updated_at","created_at"],"description":"Serializer for creating new organization notification methods.","title":"OrganizationNotificationMethodCreate"},"OrganizationNotificationMethodListRequest":{"type":"object","properties":{"notification_type":{"$ref":"#/components/schemas/NotificationTypeEnum"},"unique_organization_id":{"type":"string"}},"description":"Serializer for listing organization notification methods with summarized information.","title":"OrganizationNotificationMethodListRequest"},"PatchedOrganizationNotificationMethodListRequest":{"type":"object","properties":{"notification_type":{"$ref":"#/components/schemas/NotificationTypeEnum"},"unique_organization_id":{"type":"string"}},"description":"Serializer for listing organization notification methods with summarized information.","title":"PatchedOrganizationNotificationMethodListRequest"},"OrganizationNotificationMethodDetailNotificationConfig":{"oneOf":[{"$ref":"#/components/schemas/EmailNotificationMethod"},{"$ref":"#/components/schemas/SlackNotificationMethod"},{"$ref":"#/components/schemas/TeamsNotificationMethod"},{"$ref":"#/components/schemas/WebhookNotificationMethod"},{"$ref":"#/components/schemas/PagerDutyNotificationMethod"},{"$ref":"#/components/schemas/SMSNotificationMethod"},{"$ref":"#/components/schemas/CustomNotificationMethod"}],"title":"OrganizationNotificationMethodDetailNotificationConfig"},"Editor":{"type":"object","properties":{"id":{"type":"integer"},"email":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"}},"required":["id","email","name"],"title":"Editor"},"OrganizationNotificationMethodDetail":{"type":"object","properties":{"id":{"type":"string"},"notification_type":{"$ref":"#/components/schemas/NotificationTypeEnum"},"notification_config":{"$ref":"#/components/schemas/OrganizationNotificationMethodDetailNotificationConfig"},"unique_organization_id":{"type":"string"},"updated_by":{"$ref":"#/components/schemas/Editor"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","notification_config","updated_by","created_at","updated_at"],"description":"Serializer for retrieving detailed organization notification method information.","title":"OrganizationNotificationMethodDetail"},"OrganizationNotificationMethodDetailRequest":{"type":"object","properties":{"notification_type":{"$ref":"#/components/schemas/NotificationTypeEnum"},"unique_organization_id":{"type":"string"}},"description":"Serializer for retrieving detailed organization notification method information.","title":"OrganizationNotificationMethodDetailRequest"},"OrganizationNotificationMethodUpdateRequestNotificationConfig":{"oneOf":[{"$ref":"#/components/schemas/EmailNotificationMethod"},{"$ref":"#/components/schemas/SlackNotificationMethod"},{"$ref":"#/components/schemas/TeamsNotificationMethod"},{"$ref":"#/components/schemas/WebhookNotificationMethod"},{"$ref":"#/components/schemas/PagerDutyNotificationMethod"},{"$ref":"#/components/schemas/SMSNotificationMethod"},{"$ref":"#/components/schemas/CustomNotificationMethod"}],"title":"OrganizationNotificationMethodUpdateRequestNotificationConfig"},"OrganizationNotificationMethodUpdateRequest":{"type":"object","properties":{"notification_config":{"$ref":"#/components/schemas/OrganizationNotificationMethodUpdateRequestNotificationConfig"},"project":{"type":["string","null"]},"notification_type":{"$ref":"#/components/schemas/NotificationTypeEnum"},"updated_by":{"type":["integer","null"]}},"required":["notification_config"],"description":"Serializer for updating existing organization notification methods.","title":"OrganizationNotificationMethodUpdateRequest"},"OrganizationNotificationMethodUpdateNotificationConfig":{"oneOf":[{"$ref":"#/components/schemas/EmailNotificationMethod"},{"$ref":"#/components/schemas/SlackNotificationMethod"},{"$ref":"#/components/schemas/TeamsNotificationMethod"},{"$ref":"#/components/schemas/WebhookNotificationMethod"},{"$ref":"#/components/schemas/PagerDutyNotificationMethod"},{"$ref":"#/components/schemas/SMSNotificationMethod"},{"$ref":"#/components/schemas/CustomNotificationMethod"}],"title":"OrganizationNotificationMethodUpdateNotificationConfig"},"OrganizationNotificationMethodUpdate":{"type":"object","properties":{"id":{"type":"string"},"notification_config":{"$ref":"#/components/schemas/OrganizationNotificationMethodUpdateNotificationConfig"},"project":{"type":["string","null"]},"unique_organization_id":{"type":"string"},"notification_type":{"$ref":"#/components/schemas/NotificationTypeEnum"},"updated_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"organization":{"type":"integer"},"updated_by":{"type":["integer","null"]}},"required":["id","notification_config","unique_organization_id","updated_at","created_at","organization"],"description":"Serializer for updating existing organization notification methods.","title":"OrganizationNotificationMethodUpdate"},"PatchedOrganizationNotificationMethodUpdateRequestNotificationConfig":{"oneOf":[{"$ref":"#/components/schemas/EmailNotificationMethod"},{"$ref":"#/components/schemas/SlackNotificationMethod"},{"$ref":"#/components/schemas/TeamsNotificationMethod"},{"$ref":"#/components/schemas/WebhookNotificationMethod"},{"$ref":"#/components/schemas/PagerDutyNotificationMethod"},{"$ref":"#/components/schemas/SMSNotificationMethod"},{"$ref":"#/components/schemas/CustomNotificationMethod"}],"title":"PatchedOrganizationNotificationMethodUpdateRequestNotificationConfig"},"PatchedOrganizationNotificationMethodUpdateRequest":{"type":"object","properties":{"notification_config":{"$ref":"#/components/schemas/PatchedOrganizationNotificationMethodUpdateRequestNotificationConfig"},"project":{"type":["string","null"]},"notification_type":{"$ref":"#/components/schemas/NotificationTypeEnum"},"updated_by":{"type":["integer","null"]}},"description":"Serializer for updating existing organization notification methods.","title":"PatchedOrganizationNotificationMethodUpdateRequest"},"OrganizationNotificationMethodSummary":{"type":"object","properties":{"total_count":{"type":"integer"}},"required":["total_count"],"title":"OrganizationNotificationMethodSummary"},"OrganizationNotificationMethodSummaryResponse":{"type":"object","properties":{"summary":{"$ref":"#/components/schemas/OrganizationNotificationMethodSummary"}},"required":["summary"],"description":"Response body for /user/organization-notification-methods/summary/.","title":"OrganizationNotificationMethodSummaryResponse"},"OrganizationUserRoleRequest":{"type":"object","properties":{"access_level":{"type":"integer"},"email":{"type":"string","default":""},"role":{"$ref":"#/components/schemas/RoleEnum"},"pending":{"type":"boolean"},"hidden":{"type":"boolean"},"permissions_override":{"type":["array","null"],"items":{"type":"string"}},"organization":{"type":"integer"},"project":{"type":["string","null"]}},"required":["access_level","organization"],"description":"Serializer for organization user roles.\n\nSecurity Note: Privilege escalation prevention is handled at the VIEW level\n(OrganizationMemberView), not here. This serializer is used by org admins to\nupdate member roles, so fields (role, permissions_override, ...) must remain\nwritable. The view gates all writes on org admin via\n``is_requiring_org_admin_for_write = True`` — a member cannot PATCH their own\nrow to escalate. Any new write path using this serializer MUST apply the same\nadmin gate, since the fields here are privilege-defining.","title":"OrganizationUserRoleRequest"},"PatchedOrganizationUserRoleRequest":{"type":"object","properties":{"access_level":{"type":"integer"},"email":{"type":"string","default":""},"role":{"$ref":"#/components/schemas/RoleEnum"},"pending":{"type":"boolean"},"hidden":{"type":"boolean"},"permissions_override":{"type":["array","null"],"items":{"type":"string"}},"organization":{"type":"integer"},"project":{"type":["string","null"]}},"description":"Serializer for organization user roles.\n\nSecurity Note: Privilege escalation prevention is handled at the VIEW level\n(OrganizationMemberView), not here. This serializer is used by org admins to\nupdate member roles, so fields (role, permissions_override, ...) must remain\nwritable. The view gates all writes on org admin via\n``is_requiring_org_admin_for_write = True`` — a member cannot PATCH their own\nrow to escalate. Any new write path using this serializer MUST apply the same\nadmin gate, since the fields here are privilege-defining.","title":"PatchedOrganizationUserRoleRequest"},"OrganizationUpdateWarningsSettings":{"oneOf":[{"$ref":"#/components/schemas/WarningsSettings"},{"description":"Any type"}],"title":"OrganizationUpdateWarningsSettings"},"OrganizationUpdateOnboardingMethod":{"oneOf":[{"$ref":"#/components/schemas/OnboardingMethodEnum"},{"$ref":"#/components/schemas/NullEnum"}],"title":"OrganizationUpdateOnboardingMethod"},"OrganizationUpdate":{"type":"object","properties":{"id":{"type":"integer"},"disabled_span_behaviors":{"type":"array","items":{"type":"string"},"description":"Behavior slugs excluded from span-behavior evaluation."},"warnings_settings":{"$ref":"#/components/schemas/OrganizationUpdateWarningsSettings"},"custom_property_index_mapping":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Custom property key -> indexed ClickHouse column name (e.g. custom_string_1)."},"is_blocked":{"type":"boolean"},"onboarding_method":{"$ref":"#/components/schemas/OrganizationUpdateOnboardingMethod"},"created_at":{"type":["string","null"],"format":"date-time"},"first_api_call_at":{"type":["string","null"],"format":"date-time"},"last_api_call_at":{"type":["string","null"],"format":"date-time"},"logo":{"type":["string","null"],"format":"uri"},"notes":{"type":"string"},"name":{"type":"string"},"digest_email_inboxes":{"type":"array","items":{"type":"string"}},"organization_size":{"type":"integer"},"product_use_cases":{"type":"array","items":{"type":"string"}},"prioritize_objectives":{"type":"array","items":{"type":"string"}},"unique_organization_id":{"type":"string"},"budget_goal":{"type":"string"},"monthly_spending":{"type":"number","format":"double"},"preset_models":{"type":"array","items":{"type":"string"}},"preset_option":{"type":"string"},"dynamic_routing_enabled":{"type":"boolean"},"fallback_model_enabled":{"type":"boolean"},"fallback_models":{"type":"array","items":{"type":"string"}},"alert_settings":{"description":"Any type"},"system_fallback_enabled":{"type":"boolean"},"alerts_enabled":{"type":"boolean"},"disable_log":{"type":"boolean"},"status":{"$ref":"#/components/schemas/Status23eEnum"},"stripe_customer_id":{"type":"string"},"has_api_call":{"type":"boolean"},"onboarded":{"type":"boolean"},"has_api_call_with_non_default_key":{"type":"boolean"},"onboarding_integration_options":{"description":"Any type"},"onboarding_key":{"type":"string"},"gateway_onboarding_completed_at":{"type":["string","null"],"format":"date-time"},"tracing_onboarding_completed_at":{"type":["string","null"],"format":"date-time"},"curr_onboarding_step":{"type":"integer"},"onboarding_start":{"type":"string","format":"date-time"},"onboarding_end":{"type":["string","null"],"format":"date-time"},"enable_cache":{"type":"boolean"},"archive_duration":{"type":"integer"},"cache_saved_cost":{"type":"number","format":"double"},"cache_hit_count":{"type":"integer","format":"int64"},"cache_hit_tokens":{"type":"integer","format":"int64"},"omit_log_when_cache_hit":{"type":"boolean"},"cache_saved_time":{"type":"number","format":"double"},"last_cache_aggregations_update":{"type":"string","format":"date-time"},"classification_percentage":{"type":["number","null"],"format":"double"},"use_custom_credentials":{"type":"boolean"},"default_customer_user_budget":{"type":["number","null"],"format":"double"},"llm_gateway_markup_rate":{"type":"number","format":"double","description":"LLM gateway markup rate (default 0% markup). Applied when Keywords AI provides LLM credentials. Formula: credit_charge = cost * (1 + llm_gateway_markup_rate)"},"credit_low_balance_threshold":{"type":["number","null"],"format":"double","description":"Credit balance threshold (in USD) to trigger low balance warning webhook. When credit balance drops below this value, a credit_low_balance_threshold_reached webhook event is dispatched once until balance goes above threshold again."},"credit_auto_top_off_threshold":{"type":["number","null"],"format":"double","description":"Credit balance threshold (in USD) to trigger auto top-off. When credit balance drops below this value, automatically charge credit_auto_top_off_amount via Stripe."},"credit_auto_top_off_amount":{"type":["number","null"],"format":"double","description":"Amount (in USD) to automatically charge when credit balance drops below credit_auto_top_off_threshold. Requires stripe_customer_id with valid payment method."},"is_auto_top_off_enabled":{"type":"boolean","description":"Enable automatic credit top-off. When enabled and balance drops below credit_auto_top_off_threshold, automatically charges credit_auto_top_off_amount via Stripe. Requires stripe_customer_id with valid payment method."},"metadata_keys":{"type":["array","null"],"items":{"type":"string"}},"custom_models":{"type":["array","null"],"items":{"type":"string"}},"spend_cap":{"type":["number","null"],"format":"double","description":"Spend cap amount in USD. Enforced in real-time via atomic Redis limiter."},"spend_cap_warning_threshold":{"type":["number","null"],"format":"double","description":"Spend threshold in USD to trigger warning alert."},"budget_duration":{"$ref":"#/components/schemas/BudgetDurationEnum","description":"Duration for spend_cap enforcement: daily, weekly, or monthly.\n\n* `daily` - daily\n* `weekly` - weekly\n* `monthly` - monthly"},"use_keywordsai_credentials":{"type":"boolean"},"rate_limit":{"type":["number","null"],"format":"double"},"customer_user_rate_limit":{"type":["number","null"],"format":"double"},"retry_enabled":{"type":"boolean"},"retry_after":{"type":"number","format":"double"},"num_retries":{"type":"integer"},"custom_preset_models":{"type":"array","items":{"type":"string"}},"image_assets":{"type":"array","items":{"type":"string"}},"logs_retention_period_in_days":{"type":["integer","null"]},"is_extended_retention_enabled":{"type":"boolean"},"is_custom_retention_enabled":{"type":"boolean"},"starred":{"type":"boolean"},"is_span_behaviors_enabled":{"type":"boolean"},"company_organization":{"type":["integer","null"]},"curr_owner":{"type":["integer","null"]},"users":{"type":"array","items":{"type":"integer"}}},"required":["id","is_blocked","onboarding_method","name","status","stripe_customer_id","gateway_onboarding_completed_at","tracing_onboarding_completed_at","llm_gateway_markup_rate","company_organization","users"],"description":"Serializer for organization updates by regular users.\n\nSecurity: Sensitive admin-only fields are excluded to prevent privilege escalation.\nUse AdminOrganizationUpdateSerializer for admin operations.","title":"OrganizationUpdate"},"WarningsSettingsRequest":{"type":"object","properties":{"fallback":{"type":"boolean","default":true},"retry":{"type":"boolean","default":true},"invalid_json":{"type":"boolean","default":true},"stream_timeout":{"type":"boolean","default":true},"empty_response":{"type":"boolean","default":true},"using_keywordsai_credentials":{"type":"boolean","default":true}},"description":"Schema-only mirror of the WarningsSettings pydantic model.\n\nNever used at runtime — get_warnings_settings validates through pydantic;\nthis exists so the generated schema types the field (was string). Keep the\nfields in lockstep with utils.keywordsai_types.types.WarningsSettings.","title":"WarningsSettingsRequest"},"UserOrganizationUniqueOrganizationIdPostRequestBodyContentMultipartFormDataSchemaWarningsSettings":{"oneOf":[{"$ref":"#/components/schemas/WarningsSettingsRequest"},{"description":"Any type"}],"title":"UserOrganizationUniqueOrganizationIdPostRequestBodyContentMultipartFormDataSchemaWarningsSettings"},"AdminOrganizationUpdateRequestWarningsSettings":{"oneOf":[{"$ref":"#/components/schemas/WarningsSettingsRequest"},{"description":"Any type"}],"title":"AdminOrganizationUpdateRequestWarningsSettings"},"AdminOrganizationUpdateStatusEnum":{"type":"string","enum":["active","inactive"],"description":"* `active` - active\n* `inactive` - inactive","title":"AdminOrganizationUpdateStatusEnum"},"AdminOrganizationUpdateRequest":{"type":"object","properties":{"disabled_span_behaviors":{"type":"array","items":{"type":"string"},"description":"Behavior slugs excluded from span-behavior evaluation."},"warnings_settings":{"$ref":"#/components/schemas/AdminOrganizationUpdateRequestWarningsSettings"},"custom_property_index_mapping":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Custom property key -> indexed ClickHouse column name (e.g. custom_string_1)."},"status":{"$ref":"#/components/schemas/AdminOrganizationUpdateStatusEnum","description":"Staff-only ban/unban switch. Read-only (ignored) for non-staff callers.\n\n* `active` - active\n* `inactive` - inactive"},"logo":{"type":["string","null"],"description":"Send null to clear the organization logo. Uploading a new logo is a separate multipart operation: PATCH /user/organization/{unique_organization_id}/logo/."},"created_at":{"type":["string","null"],"format":"date-time"},"first_api_call_at":{"type":["string","null"],"format":"date-time"},"last_api_call_at":{"type":["string","null"],"format":"date-time"},"notes":{"type":"string"},"name":{"type":"string"},"digest_email_inboxes":{"type":"array","items":{"type":"string"}},"organization_size":{"type":"integer"},"product_use_cases":{"type":"array","items":{"type":"string"}},"prioritize_objectives":{"type":"array","items":{"type":"string"}},"unique_organization_id":{"type":"string"},"budget_goal":{"type":"string"},"monthly_spending":{"type":"number","format":"double"},"preset_models":{"type":"array","items":{"type":"string"}},"preset_option":{"type":"string"},"dynamic_routing_enabled":{"type":"boolean"},"fallback_model_enabled":{"type":"boolean"},"fallback_models":{"type":"array","items":{"type":"string"}},"alert_settings":{"description":"Any type"},"system_fallback_enabled":{"type":"boolean"},"alerts_enabled":{"type":"boolean"},"disable_log":{"type":"boolean"},"has_api_call":{"type":"boolean"},"onboarded":{"type":"boolean"},"has_api_call_with_non_default_key":{"type":"boolean"},"onboarding_integration_options":{"description":"Any type"},"onboarding_key":{"type":"string"},"curr_onboarding_step":{"type":"integer"},"onboarding_start":{"type":"string","format":"date-time"},"onboarding_end":{"type":["string","null"],"format":"date-time"},"enable_cache":{"type":"boolean"},"archive_duration":{"type":"integer"},"cache_saved_cost":{"type":"number","format":"double"},"cache_hit_count":{"type":"integer","format":"int64"},"cache_hit_tokens":{"type":"integer","format":"int64"},"omit_log_when_cache_hit":{"type":"boolean"},"cache_saved_time":{"type":"number","format":"double"},"last_cache_aggregations_update":{"type":"string","format":"date-time"},"classification_percentage":{"type":["number","null"],"format":"double"},"use_custom_credentials":{"type":"boolean"},"default_customer_user_budget":{"type":["number","null"],"format":"double"},"credit_low_balance_threshold":{"type":["number","null"],"format":"double","description":"Credit balance threshold (in USD) to trigger low balance warning webhook. When credit balance drops below this value, a credit_low_balance_threshold_reached webhook event is dispatched once until balance goes above threshold again."},"credit_auto_top_off_threshold":{"type":["number","null"],"format":"double","description":"Credit balance threshold (in USD) to trigger auto top-off. When credit balance drops below this value, automatically charge credit_auto_top_off_amount via Stripe."},"credit_auto_top_off_amount":{"type":["number","null"],"format":"double","description":"Amount (in USD) to automatically charge when credit balance drops below credit_auto_top_off_threshold. Requires stripe_customer_id with valid payment method."},"is_auto_top_off_enabled":{"type":"boolean","description":"Enable automatic credit top-off. When enabled and balance drops below credit_auto_top_off_threshold, automatically charges credit_auto_top_off_amount via Stripe. Requires stripe_customer_id with valid payment method."},"metadata_keys":{"type":["array","null"],"items":{"type":"string"}},"custom_models":{"type":["array","null"],"items":{"type":"string"}},"spend_cap":{"type":["number","null"],"format":"double","description":"Spend cap amount in USD. Enforced in real-time via atomic Redis limiter."},"spend_cap_warning_threshold":{"type":["number","null"],"format":"double","description":"Spend threshold in USD to trigger warning alert."},"budget_duration":{"$ref":"#/components/schemas/BudgetDurationEnum","description":"Duration for spend_cap enforcement: daily, weekly, or monthly.\n\n* `daily` - daily\n* `weekly` - weekly\n* `monthly` - monthly"},"use_keywordsai_credentials":{"type":"boolean"},"rate_limit":{"type":["number","null"],"format":"double"},"customer_user_rate_limit":{"type":["number","null"],"format":"double"},"retry_enabled":{"type":"boolean"},"retry_after":{"type":"number","format":"double"},"num_retries":{"type":"integer"},"custom_preset_models":{"type":"array","items":{"type":"string"}},"image_assets":{"type":"array","items":{"type":"string"}},"logs_retention_period_in_days":{"type":["integer","null"]},"is_extended_retention_enabled":{"type":"boolean"},"is_custom_retention_enabled":{"type":"boolean"},"starred":{"type":"boolean"},"is_span_behaviors_enabled":{"type":"boolean"},"curr_owner":{"type":["integer","null"]}},"required":["name"],"description":"Doc-only request schema for the org PUT/PATCH operations (DEV-10003).\n\nAdds the staff-only ``status`` flip (ban/unban, inherited from\n``AdminOrganizationUpdateSerializer``) to the documented contract so\nthe generated client can express it. Never used at runtime: the view\nroutes non-staff through ``OrganizationUpdateSerializer`` (``status``\nread-only — the block-escape guard) and staff through\n``AdminOrganizationUpdateSerializer``.\n\n``deleting`` is deliberately not offered — deletion goes through\nDELETE on the same endpoint, which drives the async cleanup pipeline.","title":"AdminOrganizationUpdateRequest"},"PatchedAdminOrganizationUpdateRequestWarningsSettings":{"oneOf":[{"$ref":"#/components/schemas/WarningsSettingsRequest"},{"description":"Any type"}],"title":"PatchedAdminOrganizationUpdateRequestWarningsSettings"},"PatchedAdminOrganizationUpdateRequest":{"type":"object","properties":{"disabled_span_behaviors":{"type":"array","items":{"type":"string"},"description":"Behavior slugs excluded from span-behavior evaluation."},"warnings_settings":{"$ref":"#/components/schemas/PatchedAdminOrganizationUpdateRequestWarningsSettings"},"custom_property_index_mapping":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Custom property key -> indexed ClickHouse column name (e.g. custom_string_1)."},"status":{"$ref":"#/components/schemas/AdminOrganizationUpdateStatusEnum","description":"Staff-only ban/unban switch. Read-only (ignored) for non-staff callers.\n\n* `active` - active\n* `inactive` - inactive"},"logo":{"type":["string","null"],"description":"Send null to clear the organization logo. Uploading a new logo is a separate multipart operation: PATCH /user/organization/{unique_organization_id}/logo/."},"created_at":{"type":["string","null"],"format":"date-time"},"first_api_call_at":{"type":["string","null"],"format":"date-time"},"last_api_call_at":{"type":["string","null"],"format":"date-time"},"notes":{"type":"string"},"name":{"type":"string"},"digest_email_inboxes":{"type":"array","items":{"type":"string"}},"organization_size":{"type":"integer"},"product_use_cases":{"type":"array","items":{"type":"string"}},"prioritize_objectives":{"type":"array","items":{"type":"string"}},"unique_organization_id":{"type":"string"},"budget_goal":{"type":"string"},"monthly_spending":{"type":"number","format":"double"},"preset_models":{"type":"array","items":{"type":"string"}},"preset_option":{"type":"string"},"dynamic_routing_enabled":{"type":"boolean"},"fallback_model_enabled":{"type":"boolean"},"fallback_models":{"type":"array","items":{"type":"string"}},"alert_settings":{"description":"Any type"},"system_fallback_enabled":{"type":"boolean"},"alerts_enabled":{"type":"boolean"},"disable_log":{"type":"boolean"},"has_api_call":{"type":"boolean"},"onboarded":{"type":"boolean"},"has_api_call_with_non_default_key":{"type":"boolean"},"onboarding_integration_options":{"description":"Any type"},"onboarding_key":{"type":"string"},"curr_onboarding_step":{"type":"integer"},"onboarding_start":{"type":"string","format":"date-time"},"onboarding_end":{"type":["string","null"],"format":"date-time"},"enable_cache":{"type":"boolean"},"archive_duration":{"type":"integer"},"cache_saved_cost":{"type":"number","format":"double"},"cache_hit_count":{"type":"integer","format":"int64"},"cache_hit_tokens":{"type":"integer","format":"int64"},"omit_log_when_cache_hit":{"type":"boolean"},"cache_saved_time":{"type":"number","format":"double"},"last_cache_aggregations_update":{"type":"string","format":"date-time"},"classification_percentage":{"type":["number","null"],"format":"double"},"use_custom_credentials":{"type":"boolean"},"default_customer_user_budget":{"type":["number","null"],"format":"double"},"credit_low_balance_threshold":{"type":["number","null"],"format":"double","description":"Credit balance threshold (in USD) to trigger low balance warning webhook. When credit balance drops below this value, a credit_low_balance_threshold_reached webhook event is dispatched once until balance goes above threshold again."},"credit_auto_top_off_threshold":{"type":["number","null"],"format":"double","description":"Credit balance threshold (in USD) to trigger auto top-off. When credit balance drops below this value, automatically charge credit_auto_top_off_amount via Stripe."},"credit_auto_top_off_amount":{"type":["number","null"],"format":"double","description":"Amount (in USD) to automatically charge when credit balance drops below credit_auto_top_off_threshold. Requires stripe_customer_id with valid payment method."},"is_auto_top_off_enabled":{"type":"boolean","description":"Enable automatic credit top-off. When enabled and balance drops below credit_auto_top_off_threshold, automatically charges credit_auto_top_off_amount via Stripe. Requires stripe_customer_id with valid payment method."},"metadata_keys":{"type":["array","null"],"items":{"type":"string"}},"custom_models":{"type":["array","null"],"items":{"type":"string"}},"spend_cap":{"type":["number","null"],"format":"double","description":"Spend cap amount in USD. Enforced in real-time via atomic Redis limiter."},"spend_cap_warning_threshold":{"type":["number","null"],"format":"double","description":"Spend threshold in USD to trigger warning alert."},"budget_duration":{"$ref":"#/components/schemas/BudgetDurationEnum","description":"Duration for spend_cap enforcement: daily, weekly, or monthly.\n\n* `daily` - daily\n* `weekly` - weekly\n* `monthly` - monthly"},"use_keywordsai_credentials":{"type":"boolean"},"rate_limit":{"type":["number","null"],"format":"double"},"customer_user_rate_limit":{"type":["number","null"],"format":"double"},"retry_enabled":{"type":"boolean"},"retry_after":{"type":"number","format":"double"},"num_retries":{"type":"integer"},"custom_preset_models":{"type":"array","items":{"type":"string"}},"image_assets":{"type":"array","items":{"type":"string"}},"logs_retention_period_in_days":{"type":["integer","null"]},"is_extended_retention_enabled":{"type":"boolean"},"is_custom_retention_enabled":{"type":"boolean"},"starred":{"type":"boolean"},"is_span_behaviors_enabled":{"type":"boolean"},"curr_owner":{"type":["integer","null"]}},"description":"Doc-only request schema for the org PUT/PATCH operations (DEV-10003).\n\nAdds the staff-only ``status`` flip (ban/unban, inherited from\n``AdminOrganizationUpdateSerializer``) to the documented contract so\nthe generated client can express it. Never used at runtime: the view\nroutes non-staff through ``OrganizationUpdateSerializer`` (``status``\nread-only — the block-escape guard) and staff through\n``AdminOrganizationUpdateSerializer``.\n\n``deleting`` is deliberately not offered — deletion goes through\nDELETE on the same endpoint, which drives the async cleanup pipeline.","title":"PatchedAdminOrganizationUpdateRequest"},"OrganizationLogoUpload":{"type":"object","properties":{"logo":{"type":"string","format":"uri"}},"required":["logo"],"description":"Multipart logo upload for the org logo sub-resource (DEV-10034).\n\nIts own operation so the file upload is documented as multipart/form-data —\nthe generated FE client then emits FormData handling instead of\nJSON.stringify (which drops the File). Clearing the logo stays on the JSON\norg PATCH (send ``{\"logo\": null}``). ``validate_logo`` is inherited from the\nmixin (same DEV-674 size + magic-byte policy).","title":"OrganizationLogoUpload"},"OrganizationSetTeamDomainRequestRequest":{"type":"object","properties":{"email_domain":{"type":"string"}},"required":["email_domain"],"description":"Schema-only request body for OrganizationSetTeamDomainView.\n\nThe view validates request.data by hand; this exists so the generated API\nschema declares the body.","title":"OrganizationSetTeamDomainRequestRequest"},"Users_user_organization_set_team_domain_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_user_organization_set_team_domain_create_Response_200"},"OrganizationTransferOwnershipRequestRequest":{"type":"object","properties":{"new_owner_id":{"type":["integer","null"]},"new_owner_email":{"type":["string","null"],"format":"email"}},"description":"Schema-only request body for OrganizationTransferOwnershipView.\n\nThe view validates request.data by hand; this exists so the generated API\nschema declares the body (exactly one of the two fields is required).","title":"OrganizationTransferOwnershipRequestRequest"},"Users_user_organization_transfer_ownership_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_user_organization_transfer_ownership_create_Response_200"},"Users_user_organization_statistics_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Users_user_organization_statistics_retrieve_Response_200"},"OrganizationCreateRequestWarningsSettings":{"oneOf":[{"$ref":"#/components/schemas/WarningsSettingsRequest"},{"description":"Any type"}],"title":"OrganizationCreateRequestWarningsSettings"},"OrganizationCreateRequestOnboardingMethod":{"oneOf":[{"$ref":"#/components/schemas/OnboardingMethodEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}],"title":"OrganizationCreateRequestOnboardingMethod"},"OrganizationCreateRequest":{"type":"object","properties":{"user":{"type":"integer"},"disabled_span_behaviors":{"type":"array","items":{"type":"string"},"description":"Behavior slugs excluded from span-behavior evaluation."},"warnings_settings":{"$ref":"#/components/schemas/OrganizationCreateRequestWarningsSettings"},"custom_property_index_mapping":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Custom property key -> indexed ClickHouse column name (e.g. custom_string_1)."},"created_at":{"type":["string","null"],"format":"date-time"},"first_api_call_at":{"type":["string","null"],"format":"date-time"},"last_api_call_at":{"type":["string","null"],"format":"date-time"},"logo":{"type":["string","null"],"format":"binary"},"notes":{"type":"string"},"name":{"type":"string"},"digest_email_inboxes":{"type":"array","items":{"type":"string"}},"organization_size":{"type":"integer"},"product_use_cases":{"type":"array","items":{"type":"string"}},"prioritize_objectives":{"type":"array","items":{"type":"string"}},"unique_organization_id":{"type":"string"},"budget_goal":{"type":"string"},"monthly_spending":{"type":"number","format":"double"},"preset_models":{"type":"array","items":{"type":"string"}},"preset_option":{"type":"string"},"dynamic_routing_enabled":{"type":"boolean"},"fallback_model_enabled":{"type":"boolean"},"fallback_models":{"type":"array","items":{"type":"string"}},"alert_settings":{"description":"Any type"},"system_fallback_enabled":{"type":"boolean"},"alerts_enabled":{"type":"boolean"},"disable_log":{"type":"boolean"},"status":{"$ref":"#/components/schemas/Status23eEnum"},"stripe_customer_id":{"type":"string"},"has_api_call":{"type":"boolean"},"onboarded":{"type":"boolean"},"has_api_call_with_non_default_key":{"type":"boolean"},"onboarding_integration_options":{"description":"Any type"},"onboarding_key":{"type":"string"},"onboarding_method":{"$ref":"#/components/schemas/OrganizationCreateRequestOnboardingMethod"},"gateway_onboarding_completed_at":{"type":["string","null"],"format":"date-time"},"tracing_onboarding_completed_at":{"type":["string","null"],"format":"date-time"},"curr_onboarding_step":{"type":"integer"},"onboarding_start":{"type":"string","format":"date-time"},"onboarding_end":{"type":["string","null"],"format":"date-time"},"enable_cache":{"type":"boolean"},"archive_duration":{"type":"integer"},"cache_saved_cost":{"type":"number","format":"double"},"cache_hit_count":{"type":"integer","format":"int64"},"cache_hit_tokens":{"type":"integer","format":"int64"},"omit_log_when_cache_hit":{"type":"boolean"},"cache_saved_time":{"type":"number","format":"double"},"last_cache_aggregations_update":{"type":"string","format":"date-time"},"classification_percentage":{"type":["number","null"],"format":"double"},"use_custom_credentials":{"type":"boolean"},"default_customer_user_budget":{"type":["number","null"],"format":"double"},"llm_gateway_markup_rate":{"type":"number","format":"double","description":"LLM gateway markup rate (default 0% markup). Applied when Keywords AI provides LLM credentials. Formula: credit_charge = cost * (1 + llm_gateway_markup_rate)"},"credit_low_balance_threshold":{"type":["number","null"],"format":"double","description":"Credit balance threshold (in USD) to trigger low balance warning webhook. When credit balance drops below this value, a credit_low_balance_threshold_reached webhook event is dispatched once until balance goes above threshold again."},"credit_auto_top_off_threshold":{"type":["number","null"],"format":"double","description":"Credit balance threshold (in USD) to trigger auto top-off. When credit balance drops below this value, automatically charge credit_auto_top_off_amount via Stripe."},"credit_auto_top_off_amount":{"type":["number","null"],"format":"double","description":"Amount (in USD) to automatically charge when credit balance drops below credit_auto_top_off_threshold. Requires stripe_customer_id with valid payment method."},"is_auto_top_off_enabled":{"type":"boolean","description":"Enable automatic credit top-off. When enabled and balance drops below credit_auto_top_off_threshold, automatically charges credit_auto_top_off_amount via Stripe. Requires stripe_customer_id with valid payment method."},"metadata_keys":{"type":["array","null"],"items":{"type":"string"}},"custom_models":{"type":["array","null"],"items":{"type":"string"}},"spend_cap":{"type":["number","null"],"format":"double","description":"Spend cap amount in USD. Enforced in real-time via atomic Redis limiter."},"spend_cap_warning_threshold":{"type":["number","null"],"format":"double","description":"Spend threshold in USD to trigger warning alert."},"budget_duration":{"$ref":"#/components/schemas/BudgetDurationEnum","description":"Duration for spend_cap enforcement: daily, weekly, or monthly.\n\n* `daily` - daily\n* `weekly` - weekly\n* `monthly` - monthly"},"use_keywordsai_credentials":{"type":"boolean"},"rate_limit":{"type":["number","null"],"format":"double"},"customer_user_rate_limit":{"type":["number","null"],"format":"double"},"retry_enabled":{"type":"boolean"},"retry_after":{"type":"number","format":"double"},"num_retries":{"type":"integer"},"custom_preset_models":{"type":"array","items":{"type":"string"}},"image_assets":{"type":"array","items":{"type":"string"}},"logs_retention_period_in_days":{"type":["integer","null"]},"is_extended_retention_enabled":{"type":"boolean"},"is_custom_retention_enabled":{"type":"boolean"},"starred":{"type":"boolean"},"is_span_behaviors_enabled":{"type":"boolean"},"company_organization":{"type":["integer","null"]},"curr_owner":{"type":["integer","null"]}},"required":["user","name"],"title":"OrganizationCreateRequest"},"OrganizationCreateWarningsSettings":{"oneOf":[{"$ref":"#/components/schemas/WarningsSettings"},{"description":"Any type"}],"title":"OrganizationCreateWarningsSettings"},"OrganizationCreateOnboardingMethod":{"oneOf":[{"$ref":"#/components/schemas/OnboardingMethodEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}],"title":"OrganizationCreateOnboardingMethod"},"OrganizationCreate":{"type":"object","properties":{"id":{"type":"integer"},"disabled_span_behaviors":{"type":"array","items":{"type":"string"},"description":"Behavior slugs excluded from span-behavior evaluation."},"warnings_settings":{"$ref":"#/components/schemas/OrganizationCreateWarningsSettings"},"custom_property_index_mapping":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Custom property key -> indexed ClickHouse column name (e.g. custom_string_1)."},"created_at":{"type":["string","null"],"format":"date-time"},"first_api_call_at":{"type":["string","null"],"format":"date-time"},"last_api_call_at":{"type":["string","null"],"format":"date-time"},"logo":{"type":["string","null"],"format":"uri"},"notes":{"type":"string"},"name":{"type":"string"},"digest_email_inboxes":{"type":"array","items":{"type":"string"}},"organization_size":{"type":"integer"},"product_use_cases":{"type":"array","items":{"type":"string"}},"prioritize_objectives":{"type":"array","items":{"type":"string"}},"unique_organization_id":{"type":"string"},"budget_goal":{"type":"string"},"monthly_spending":{"type":"number","format":"double"},"preset_models":{"type":"array","items":{"type":"string"}},"preset_option":{"type":"string"},"dynamic_routing_enabled":{"type":"boolean"},"fallback_model_enabled":{"type":"boolean"},"fallback_models":{"type":"array","items":{"type":"string"}},"alert_settings":{"description":"Any type"},"system_fallback_enabled":{"type":"boolean"},"alerts_enabled":{"type":"boolean"},"disable_log":{"type":"boolean"},"status":{"$ref":"#/components/schemas/Status23eEnum"},"stripe_customer_id":{"type":"string"},"has_api_call":{"type":"boolean"},"onboarded":{"type":"boolean"},"has_api_call_with_non_default_key":{"type":"boolean"},"onboarding_integration_options":{"description":"Any type"},"onboarding_key":{"type":"string"},"onboarding_method":{"$ref":"#/components/schemas/OrganizationCreateOnboardingMethod"},"gateway_onboarding_completed_at":{"type":["string","null"],"format":"date-time"},"tracing_onboarding_completed_at":{"type":["string","null"],"format":"date-time"},"curr_onboarding_step":{"type":"integer"},"onboarding_start":{"type":"string","format":"date-time"},"onboarding_end":{"type":["string","null"],"format":"date-time"},"enable_cache":{"type":"boolean"},"archive_duration":{"type":"integer"},"cache_saved_cost":{"type":"number","format":"double"},"cache_hit_count":{"type":"integer","format":"int64"},"cache_hit_tokens":{"type":"integer","format":"int64"},"omit_log_when_cache_hit":{"type":"boolean"},"cache_saved_time":{"type":"number","format":"double"},"last_cache_aggregations_update":{"type":"string","format":"date-time"},"classification_percentage":{"type":["number","null"],"format":"double"},"use_custom_credentials":{"type":"boolean"},"default_customer_user_budget":{"type":["number","null"],"format":"double"},"llm_gateway_markup_rate":{"type":"number","format":"double","description":"LLM gateway markup rate (default 0% markup). Applied when Keywords AI provides LLM credentials. Formula: credit_charge = cost * (1 + llm_gateway_markup_rate)"},"credit_low_balance_threshold":{"type":["number","null"],"format":"double","description":"Credit balance threshold (in USD) to trigger low balance warning webhook. When credit balance drops below this value, a credit_low_balance_threshold_reached webhook event is dispatched once until balance goes above threshold again."},"credit_auto_top_off_threshold":{"type":["number","null"],"format":"double","description":"Credit balance threshold (in USD) to trigger auto top-off. When credit balance drops below this value, automatically charge credit_auto_top_off_amount via Stripe."},"credit_auto_top_off_amount":{"type":["number","null"],"format":"double","description":"Amount (in USD) to automatically charge when credit balance drops below credit_auto_top_off_threshold. Requires stripe_customer_id with valid payment method."},"is_auto_top_off_enabled":{"type":"boolean","description":"Enable automatic credit top-off. When enabled and balance drops below credit_auto_top_off_threshold, automatically charges credit_auto_top_off_amount via Stripe. Requires stripe_customer_id with valid payment method."},"metadata_keys":{"type":["array","null"],"items":{"type":"string"}},"custom_models":{"type":["array","null"],"items":{"type":"string"}},"spend_cap":{"type":["number","null"],"format":"double","description":"Spend cap amount in USD. Enforced in real-time via atomic Redis limiter."},"spend_cap_warning_threshold":{"type":["number","null"],"format":"double","description":"Spend threshold in USD to trigger warning alert."},"budget_duration":{"$ref":"#/components/schemas/BudgetDurationEnum","description":"Duration for spend_cap enforcement: daily, weekly, or monthly.\n\n* `daily` - daily\n* `weekly` - weekly\n* `monthly` - monthly"},"use_keywordsai_credentials":{"type":"boolean"},"rate_limit":{"type":["number","null"],"format":"double"},"customer_user_rate_limit":{"type":["number","null"],"format":"double"},"retry_enabled":{"type":"boolean"},"retry_after":{"type":"number","format":"double"},"num_retries":{"type":"integer"},"custom_preset_models":{"type":"array","items":{"type":"string"}},"image_assets":{"type":"array","items":{"type":"string"}},"logs_retention_period_in_days":{"type":["integer","null"]},"is_extended_retention_enabled":{"type":"boolean"},"is_custom_retention_enabled":{"type":"boolean"},"starred":{"type":"boolean"},"is_span_behaviors_enabled":{"type":"boolean"},"company_organization":{"type":["integer","null"]},"curr_owner":{"type":["integer","null"]},"users":{"type":"array","items":{"type":"integer"}}},"required":["id","name","users"],"title":"OrganizationCreate"},"PaginatedTagManagerListFiltersData":{"type":"object","properties":{},"title":"PaginatedTagManagerListFiltersData"},"FeatureTypeEnum":{"type":"string","enum":["logs","threads","datasets","dataset_logs","scores","evaluators","experiments","testsets","prompts","models","providers","credentials","members","api_keys","customer_users","monitors","automations","workflows","conditions","notification_methods","webhooks","export_sinks","caches","custom_behaviors","behaviors","errors","credit_transactions","annotation_items","users","saved_filters","trackers","traces","dashboard","agent_conversations","agent_skills","limit_policies","staff_memberships","organizations","experiments_v2"],"description":"* `logs` - Logs\n* `threads` - Threads\n* `datasets` - Datasets\n* `dataset_logs` - Dataset Logs\n* `scores` - Scores\n* `evaluators` - Evaluators\n* `experiments` - Experiments\n* `testsets` - Testsets\n* `prompts` - Prompts\n* `models` - Models\n* `providers` - Providers\n* `credentials` - Credentials\n* `members` - Members\n* `api_keys` - Api Keys\n* `customer_users` - Customer Users\n* `monitors` - Monitors\n* `automations` - Automations\n* `workflows` - Workflows\n* `conditions` - Conditions\n* `notification_methods` - Notification Methods\n* `webhooks` - Webhooks\n* `export_sinks` - Export Sinks\n* `caches` - Caches\n* `custom_behaviors` - Custom Behaviors\n* `behaviors` - Behaviors\n* `errors` - Errors\n* `credit_transactions` - Credit Transactions\n* `annotation_items` - Annotation Items\n* `users` - Users\n* `saved_filters` - Saved Filters\n* `trackers` - Trackers\n* `traces` - Traces\n* `dashboard` - Dashboard\n* `agent_conversations` - Agent Conversations\n* `agent_skills` - Agent Skills\n* `limit_policies` - Limit Policies\n* `staff_memberships` - Staff Memberships\n* `organizations` - Organizations\n* `experiments_v2` - Experiments V2","title":"FeatureTypeEnum"},"TagManager":{"type":"object","properties":{"id":{"type":"string"},"feature_type":{"$ref":"#/components/schemas/FeatureTypeEnum"},"object_id":{"type":"string"},"organization":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","feature_type","object_id","organization","created_at","updated_at"],"title":"TagManager"},"PaginatedTagManagerList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedTagManagerListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/TagManager"}}},"required":["count","results"],"title":"PaginatedTagManagerList"},"TagManagerRequest":{"type":"object","properties":{"tag":{"type":"string"},"feature_type":{"$ref":"#/components/schemas/FeatureTypeEnum"},"object_id":{"type":"string"}},"required":["tag","feature_type","object_id"],"title":"TagManagerRequest"},"PatchedTagManagerRequest":{"type":"object","properties":{"tag":{"type":"string"},"feature_type":{"$ref":"#/components/schemas/FeatureTypeEnum"},"object_id":{"type":"string"}},"title":"PatchedTagManagerRequest"},"TagFeatureUsage":{"type":"object","properties":{"feature_type":{"$ref":"#/components/schemas/FeatureTypeEnum"},"count":{"type":"integer"}},"required":["feature_type","count"],"description":"One feature type a tag is used on, with the count of assigned objects.","title":"TagFeatureUsage"},"GenericTag":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","default":"Untitled"},"color":{"type":"string"},"description":{"type":"string"},"organization":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"usage":{"type":"array","items":{"$ref":"#/components/schemas/TagFeatureUsage"}}},"required":["id","organization","created_at","updated_at","usage"],"title":"GenericTag"},"GenericTagRequest":{"type":"object","properties":{"name":{"type":"string","default":"Untitled"},"color":{"type":"string"},"description":{"type":"string"}},"title":"GenericTagRequest"},"PatchedGenericTagRequest":{"type":"object","properties":{"name":{"type":"string","default":"Untitled"},"color":{"type":"string"},"description":{"type":"string"}},"title":"PatchedGenericTagRequest"},"EventTypeEnum":{"type":"string","enum":["request_log","on_eval_result_ingested","trace_completed","customer_budget_limit_reached","credit_low_balance_threshold_reached","spend_cap_warning_threshold_reached","limit_policy_soft_triggered","limit_policy_hard_triggered"],"description":"* `request_log` - Request Log\n* `on_eval_result_ingested` - Evaluation Result\n* `trace_completed` - Trace Completed\n* `customer_budget_limit_reached` - Customer Budget Limit Reached\n* `credit_low_balance_threshold_reached` - Credit Low Balance Threshold Reached\n* `spend_cap_warning_threshold_reached` - Spend Cap Warning Threshold Reached\n* `limit_policy_soft_triggered` - Limit Policy Soft Triggered\n* `limit_policy_hard_triggered` - Limit Policy Hard Triggered","title":"EventTypeEnum"},"WebhookDetailEventType":{"oneOf":[{"$ref":"#/components/schemas/EventTypeEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"WebhookDetailEventType"},"WebhookDetail":{"type":"object","properties":{"id":{"type":"integer"},"secrets":{"type":"string"},"project":{"type":["string","null"]},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"created":{"type":"string","format":"date-time"},"event_type":{"$ref":"#/components/schemas/WebhookDetailEventType"},"active":{"type":"boolean"},"organization":{"type":"integer"},"organization_key":{"type":["string","null"]}},"required":["id","secrets","url","organization"],"description":"For detail operations - conditionally includes secret","title":"WebhookDetail"},"WebhookDetailRequestEventType":{"oneOf":[{"$ref":"#/components/schemas/EventTypeEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"WebhookDetailRequestEventType"},"WebhookDetailRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"created":{"type":"string","format":"date-time"},"event_type":{"$ref":"#/components/schemas/WebhookDetailRequestEventType"},"active":{"type":"boolean"},"organization":{"type":"integer"},"organization_key":{"type":["string","null"]}},"required":["url","organization"],"description":"For detail operations - conditionally includes secret","title":"WebhookDetailRequest"},"WebhookUpdateRequestEventType":{"oneOf":[{"$ref":"#/components/schemas/EventTypeEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"WebhookUpdateRequestEventType"},"WebhookUpdateRequest":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"name":{"type":"string"},"created":{"type":"string","format":"date-time"},"event_type":{"$ref":"#/components/schemas/WebhookUpdateRequestEventType"},"active":{"type":"boolean"},"organization_key":{"type":["string","null"]}},"required":["url"],"description":"For update operations - excludes secrets.\n\nSecurity: ``organization``/``project`` are read_only so a PATCH cannot move\na webhook to another org; ``organization_key`` must stay within the\nwebhook's own org (DEV-9908).","title":"WebhookUpdateRequest"},"WebhookUpdateEventType":{"oneOf":[{"$ref":"#/components/schemas/EventTypeEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"WebhookUpdateEventType"},"WebhookUpdate":{"type":"object","properties":{"id":{"type":"integer"},"project":{"type":["string","null"]},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"created":{"type":"string","format":"date-time"},"event_type":{"$ref":"#/components/schemas/WebhookUpdateEventType"},"active":{"type":"boolean"},"organization":{"type":"integer"},"organization_key":{"type":["string","null"]}},"required":["id","project","url","organization"],"description":"For update operations - excludes secrets.\n\nSecurity: ``organization``/``project`` are read_only so a PATCH cannot move\na webhook to another org; ``organization_key`` must stay within the\nwebhook's own org (DEV-9908).","title":"WebhookUpdate"},"PatchedWebhookUpdateRequestEventType":{"oneOf":[{"$ref":"#/components/schemas/EventTypeEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"PatchedWebhookUpdateRequestEventType"},"PatchedWebhookUpdateRequest":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"name":{"type":"string"},"created":{"type":"string","format":"date-time"},"event_type":{"$ref":"#/components/schemas/PatchedWebhookUpdateRequestEventType"},"active":{"type":"boolean"},"organization_key":{"type":["string","null"]}},"description":"For update operations - excludes secrets.\n\nSecurity: ``organization``/``project`` are read_only so a PATCH cannot move\na webhook to another org; ``organization_key`` must stay within the\nwebhook's own org (DEV-9908).","title":"PatchedWebhookUpdateRequest"},"WebhookRotate":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"secrets":{"type":"string"},"message":{"type":"string"}},"required":["id","name","secrets","message"],"description":"Response serializer for rotation endpoint","title":"WebhookRotate"},"WebhookListEventType":{"oneOf":[{"$ref":"#/components/schemas/EventTypeEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"WebhookListEventType"},"WebhookList":{"type":"object","properties":{"id":{"type":"integer"},"project":{"type":["string","null"]},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"created":{"type":"string","format":"date-time"},"event_type":{"$ref":"#/components/schemas/WebhookListEventType"},"active":{"type":"boolean"},"organization":{"type":"integer"},"organization_key":{"type":["string","null"]}},"required":["id","url","organization"],"description":"For list operations - excludes secret","title":"WebhookList"},"WebhookCreateRequestEventType":{"oneOf":[{"$ref":"#/components/schemas/EventTypeEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"WebhookCreateRequestEventType"},"WebhookCreateRequest":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"name":{"type":"string"},"created":{"type":"string","format":"date-time"},"event_type":{"$ref":"#/components/schemas/WebhookCreateRequestEventType"},"active":{"type":"boolean"},"organization_key":{"type":["string","null"]}},"required":["url"],"description":"For create operations - auto-generates secret.\n\nSecurity: ``organization``/``project`` are server-stamped (read_only) via\n``OrganizationInjectionMixin.get_create_save_kwargs`` — never taken from the\nrequest body. ``organization_key`` must belong to the same target org.","title":"WebhookCreateRequest"},"WebhookCreateEventType":{"oneOf":[{"$ref":"#/components/schemas/EventTypeEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"WebhookCreateEventType"},"WebhookCreate":{"type":"object","properties":{"id":{"type":"integer"},"secrets":{"type":"string"},"project":{"type":["string","null"]},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"created":{"type":"string","format":"date-time"},"event_type":{"$ref":"#/components/schemas/WebhookCreateEventType"},"active":{"type":"boolean"},"organization":{"type":"integer"},"organization_key":{"type":["string","null"]}},"required":["id","secrets","project","url","organization"],"description":"For create operations - auto-generates secret.\n\nSecurity: ``organization``/``project`` are server-stamped (read_only) via\n``OrganizationInjectionMixin.get_create_save_kwargs`` — never taken from the\nrequest body. ``organization_key`` must belong to the same target org.","title":"WebhookCreate"},"WebhookListRequestEventType":{"oneOf":[{"$ref":"#/components/schemas/EventTypeEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"WebhookListRequestEventType"},"WebhookListRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"created":{"type":"string","format":"date-time"},"event_type":{"$ref":"#/components/schemas/WebhookListRequestEventType"},"active":{"type":"boolean"},"organization":{"type":"integer"},"organization_key":{"type":["string","null"]}},"required":["url","organization"],"description":"For list operations - excludes secret","title":"WebhookListRequest"},"PatchedWebhookListRequestEventType":{"oneOf":[{"$ref":"#/components/schemas/EventTypeEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"PatchedWebhookListRequestEventType"},"PatchedWebhookListRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"created":{"type":"string","format":"date-time"},"event_type":{"$ref":"#/components/schemas/PatchedWebhookListRequestEventType"},"active":{"type":"boolean"},"organization":{"type":"integer"},"organization_key":{"type":["string","null"]}},"description":"For list operations - excludes secret","title":"PatchedWebhookListRequest"},"ApiChatCompletionsPostParametersFormat":{"type":"string","enum":["json","txt"],"title":"ApiChatCompletionsPostParametersFormat"},"Gateway_createChatCompletion_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Gateway_createChatCompletion_Response_200"},"ApiResponsesPostParametersFormat":{"type":"string","enum":["json","txt"],"title":"ApiResponsesPostParametersFormat"},"ApiResponsesPostParametersXRespanRouteProvider":{"type":"string","enum":["openai","azure","perplexity"],"title":"ApiResponsesPostParametersXRespanRouteProvider"},"ApiResponsesPostRequestBodyContentApplicationJsonSchemaInput":{"oneOf":[{"type":"string"},{"type":"array","items":{"description":"Any type"}}],"description":"Text or structured input for the response.","title":"ApiResponsesPostRequestBodyContentApplicationJsonSchemaInput"},"ApiResponsesPostRequestBodyContentApplicationJsonSchemaResponseFormat":{"type":"object","properties":{},"description":"Perplexity Agent API structured response configuration.","title":"ApiResponsesPostRequestBodyContentApplicationJsonSchemaResponseFormat"},"ApiResponsesPostRequestBodyContentApplicationJsonSchemaRespanParamsCredentialOverride":{"type":"object","properties":{"api_key":{"type":"string","format":"password","description":"API key for the selected upstream provider, not your Respan API key. Enter the Respan key in the Authorization control."},"api_base":{"type":"string","format":"uri","description":"Azure OpenAI resource endpoint, for example https://YOUR_RESOURCE.openai.azure.com."},"api_version":{"type":"string","description":"Azure OpenAI API version. The Azure example prefills 2025-04-01-preview, which supports the Responses API."}},"title":"ApiResponsesPostRequestBodyContentApplicationJsonSchemaRespanParamsCredentialOverride"},"ApiResponsesPostRequestBodyContentApplicationJsonSchemaRespanParams":{"type":"object","properties":{"credential_override":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ApiResponsesPostRequestBodyContentApplicationJsonSchemaRespanParamsCredentialOverride"},"description":"Request-scoped provider credentials. Named examples prefill the correct selector; keep that selector and replace only its credential values. OpenAI and Azure selectors exactly match model. Perplexity uses an empty-string selector because its credential is provider-scoped."}},"description":"Respan metadata, prompt configuration, customer identifiers, provider credentials, and other gateway parameters. route_provider_override here cannot activate the Perplexity route.","title":"ApiResponsesPostRequestBodyContentApplicationJsonSchemaRespanParams"},"PromptFilterRequestRequest":{"type":"object","properties":{"filters":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Filter parameters keyed by metric name."}},"description":"Shared request body for prompt POST-for-filtering endpoints.","title":"PromptFilterRequestRequest"},"PaginatedPromptListListFiltersData":{"type":"object","properties":{},"title":"PaginatedPromptListListFiltersData"},"PromptChatMessageId":{"oneOf":[{"type":"string"},{"type":"integer"}],"title":"PromptChatMessageId"},"PromptMultipartContentType":{"type":"string","enum":["text","image_url","file"],"title":"PromptMultipartContentType"},"PromptMultipartContentImageUrl":{"type":"object","properties":{},"title":"PromptMultipartContentImageUrl"},"PromptMultipartContentFile":{"type":"object","properties":{},"title":"PromptMultipartContentFile"},"PromptMultipartContent":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/PromptMultipartContentType"},"text":{"type":"string"},"annotations":{"description":"Any type"},"image_url":{"$ref":"#/components/schemas/PromptMultipartContentImageUrl"},"file":{"$ref":"#/components/schemas/PromptMultipartContentFile"}},"required":["type"],"description":"One part of a multipart message ``content`` array.","title":"PromptMultipartContent"},"PromptChatMessageContent1":{"type":"array","items":{"$ref":"#/components/schemas/PromptMultipartContent"},"title":"PromptChatMessageContent1"},"PromptChatMessageContent":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/PromptChatMessageContent1"}],"title":"PromptChatMessageContent"},"PromptChatMessageToolCallsItems":{"type":"object","properties":{},"title":"PromptChatMessageToolCallsItems"},"PromptChatMessage":{"type":"object","properties":{"id":{"oneOf":[{"$ref":"#/components/schemas/PromptChatMessageId"},{"type":"null"}]},"role":{"type":"string"},"content":{"$ref":"#/components/schemas/PromptChatMessageContent"},"model":{"type":"string"},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessageToolCallsItems"}},"tool_call_id":{"type":"string"}},"required":["role","content"],"description":"A single chat message in a prompt version's ``messages`` array.","title":"PromptChatMessage"},"PromptVariableValueType":{"type":"string","enum":["image_url","object","prompt"],"title":"PromptVariableValueType"},"PromptVariableValueVersion":{"oneOf":[{"type":"string"},{"type":"integer"}],"title":"PromptVariableValueVersion"},"PromptVariableValueVariables":{"type":"object","properties":{},"title":"PromptVariableValueVariables"},"PromptVariableValue":{"type":"object","properties":{"_type":{"$ref":"#/components/schemas/PromptVariableValueType"},"value":{"type":"string"},"parsed":{"description":"Any type"},"parseError":{"type":"string"},"prompt_id":{"type":"string"},"prompt_slug":{"type":"string"},"version":{"oneOf":[{"$ref":"#/components/schemas/PromptVariableValueVersion"},{"type":"null"}]},"variables":{"$ref":"#/components/schemas/PromptVariableValueVariables"}},"required":["_type"],"description":"Object form of a ``variables`` entry (the string form is handled inline).","title":"PromptVariableValue"},"PromptVariableEntry":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/PromptVariableValue"}],"title":"PromptVariableEntry"},"PromptFunctionToolType":{"type":"string","enum":["function"],"default":"function","title":"PromptFunctionToolType"},"PromptFunctionParametersType":{"type":"string","enum":["object"],"default":"object","title":"PromptFunctionParametersType"},"PromptFunctionPropertySchema":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"enum":{"type":"array","items":{"description":"Any type"}}},"required":["type"],"description":"JSON-schema-ish descriptor for one function parameter property.","title":"PromptFunctionPropertySchema"},"PromptFunctionParameters":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/PromptFunctionParametersType"},"properties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptFunctionPropertySchema"}},"required":{"type":"array","items":{"type":"string"}}},"required":["type"],"description":"The ``parameters`` object of a function tool (JSON-schema subset).","title":"PromptFunctionParameters"},"PromptFunctionDefinition":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"strict":{"type":"boolean"},"additionalProperties":{"type":"boolean"},"parameters":{"$ref":"#/components/schemas/PromptFunctionParameters"}},"required":["name"],"description":"The ``function`` body of a function tool.","title":"PromptFunctionDefinition"},"PromptFunctionTool":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/PromptFunctionToolType"},"function":{"$ref":"#/components/schemas/PromptFunctionDefinition"}},"required":["type","function"],"description":"One entry of a prompt version's ``tools`` array.","title":"PromptFunctionTool"},"PromptLoadBalanceModelCredentials":{"type":"object","properties":{},"title":"PromptLoadBalanceModelCredentials"},"PromptLoadBalanceModel":{"type":"object","properties":{"model":{"type":"string"},"weight":{"type":"number","format":"double"},"credentials":{"$ref":"#/components/schemas/PromptLoadBalanceModelCredentials"}},"description":"One entry of a prompt version's ``load_balance_models`` array.","title":"PromptLoadBalanceModel"},"PromptThinkingConfigType":{"type":"string","enum":["enabled","disabled"],"title":"PromptThinkingConfigType"},"PromptThinkingConfig":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/PromptThinkingConfigType"},"budget_tokens":{"type":"integer"}},"required":["type","budget_tokens"],"description":"The ``thinking`` extended-reasoning config.","title":"PromptThinkingConfig"},"PromptVersionDetailThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PromptVersionDetailThinking"},"PromptToolChoiceFunctionType":{"type":"string","enum":["function"],"default":"function","title":"PromptToolChoiceFunctionType"},"PromptToolChoiceFunctionName":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"title":"PromptToolChoiceFunctionName"},"PromptToolChoiceFunction":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/PromptToolChoiceFunctionType"},"function":{"$ref":"#/components/schemas/PromptToolChoiceFunctionName"}},"required":["type","function"],"description":"Object form of ``tool_choice`` (the string form is handled inline).","title":"PromptToolChoiceFunction"},"PromptToolChoice":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/PromptToolChoiceFunction"}],"title":"PromptToolChoice"},"PromptVersionDetailToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PromptVersionDetailToolChoice"},"PromptVersionDetailResponseFormat":{"type":"object","properties":{},"title":"PromptVersionDetailResponseFormat"},"PromptVersionDetailJsonSchema":{"type":"object","properties":{},"title":"PromptVersionDetailJsonSchema"},"PromptVersionDetail":{"type":"object","properties":{"id":{"type":"integer"},"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PromptVersionDetailThinking"},"tool_choice":{"$ref":"#/components/schemas/PromptVersionDetailToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PromptVersionDetailResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PromptVersionDetailJsonSchema"},{"type":"null"}]},"edited_by":{"$ref":"#/components/schemas/Editor"},"is_deployed":{"type":"boolean"},"prompt_version_id":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"version":{"type":"integer"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"readonly":{"type":"boolean"},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"prompt":{"type":"integer"}},"required":["id","edited_by","updated_at","prompt"],"title":"PromptVersionDetail"},"PromptList":{"type":"object","properties":{"id":{"type":"integer"},"current_version":{"$ref":"#/components/schemas/PromptVersionDetail"},"full_prompt_id":{"type":"string"},"created_by":{"type":"integer"},"project":{"type":["string","null"]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"}},"prompt_live_version_number":{"type":"integer"},"live_version":{"$ref":"#/components/schemas/PromptVersionDetail"},"name":{"type":"string"},"description":{"type":"string"},"prompt_id":{"type":"string"},"prompt_slug":{"type":["string","null"]},"commit_count":{"type":"integer"},"starred":{"type":"boolean"},"deleted_at":{"type":["string","null"],"format":"date-time"},"organization":{"type":"integer"}},"required":["id","current_version","full_prompt_id","created_by","tags","prompt_live_version_number","live_version","commit_count","organization"],"title":"PromptList"},"PaginatedPromptListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedPromptListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/PromptList"}}},"required":["count","results"],"title":"PaginatedPromptListList"},"PublicPromptDetailRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":"string"},"prompt_id":{"type":"string"},"prompt_slug":{"type":["string","null"]},"starred":{"type":"boolean"},"deleted_at":{"type":["string","null"],"format":"date-time"},"organization":{"type":"integer"}},"required":["organization"],"title":"PublicPromptDetailRequest"},"PublicPromptVersionDetailThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PublicPromptVersionDetailThinking"},"PublicPromptVersionDetailToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PublicPromptVersionDetailToolChoice"},"PublicPromptVersionDetailResponseFormat":{"type":"object","properties":{},"title":"PublicPromptVersionDetailResponseFormat"},"PublicPromptVersionDetailJsonSchema":{"type":"object","properties":{},"title":"PublicPromptVersionDetailJsonSchema"},"PublicPromptVersionDetail":{"type":"object","properties":{"id":{"type":"string"},"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PublicPromptVersionDetailThinking"},"tool_choice":{"$ref":"#/components/schemas/PublicPromptVersionDetailToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptVersionDetailResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptVersionDetailJsonSchema"},{"type":"null"}]},"edited_by":{"$ref":"#/components/schemas/Editor"},"is_deployed":{"type":"boolean"},"prompt_version_id":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"version":{"type":"integer"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"readonly":{"type":"boolean"},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"prompt":{"type":"integer"}},"required":["id","edited_by","prompt_version_id","updated_at","prompt"],"title":"PublicPromptVersionDetail"},"PublicPromptDetail":{"type":"object","properties":{"id":{"type":"string"},"current_version":{"$ref":"#/components/schemas/PublicPromptVersionDetail"},"full_prompt_id":{"type":"string"},"created_by":{"type":"integer"},"project":{"type":["string","null"]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"}},"prompt_versions":{"type":"array","items":{"$ref":"#/components/schemas/PromptVersionDetail"}},"live_version":{"$ref":"#/components/schemas/PublicPromptVersionDetail"},"name":{"type":"string"},"description":{"type":"string"},"prompt_id":{"type":"string"},"prompt_slug":{"type":["string","null"]},"commit_count":{"type":"integer"},"starred":{"type":"boolean"},"deleted_at":{"type":["string","null"],"format":"date-time"},"organization":{"type":"integer"}},"required":["id","current_version","full_prompt_id","created_by","tags","prompt_versions","live_version","commit_count","organization"],"title":"PublicPromptDetail"},"ActionEnum":{"type":"string","enum":["update","commit","deploy"],"description":"* `update` - update\n* `commit` - commit\n* `deploy` - deploy","title":"ActionEnum"},"PromptBulkRequestItemRequest":{"type":"object","properties":{"prompt_id":{"type":"string"},"action":{"$ref":"#/components/schemas/ActionEnum"},"body":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Per-action payload: prompt-config fields for `update`, commit metadata for `commit`, omitted for `deploy`."}},"required":["prompt_id","action"],"title":"PromptBulkRequestItemRequest"},"PromptBulkRequestRequest":{"type":"object","properties":{"requests":{"type":"array","items":{"$ref":"#/components/schemas/PromptBulkRequestItemRequest"}}},"required":["requests"],"title":"PromptBulkRequestRequest"},"BulkItemError":{"type":"object","properties":{"index":{"type":"integer"},"error":{"type":"string"}},"required":["index","error"],"title":"BulkItemError"},"BulkOperationResponse":{"type":"object","properties":{"success_count":{"type":"integer"},"error_count":{"type":"integer"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/BulkItemError"}}},"required":["success_count","error_count","errors"],"title":"BulkOperationResponse"},"PatchedPublicPromptUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"prompt_slug":{"type":["string","null"]},"starred":{"type":"boolean"},"is_example":{"type":"boolean"},"blurred":{"type":"boolean"},"deleted_at":{"type":["string","null"],"format":"date-time"},"organization":{"type":"integer"},"project":{"type":["string","null"]},"created_by":{"type":["integer","null"]}},"title":"PatchedPublicPromptUpdateRequest"},"PublicPromptUpdate":{"type":"object","properties":{"id":{"type":"string"},"prompt_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"prompt_slug":{"type":["string","null"]},"commit_count":{"type":"integer"},"starred":{"type":"boolean"},"is_example":{"type":"boolean"},"blurred":{"type":"boolean"},"deleted_at":{"type":["string","null"],"format":"date-time"},"organization":{"type":"integer"},"project":{"type":["string","null"]},"created_by":{"type":["integer","null"]}},"required":["id","prompt_id","commit_count","organization"],"title":"PublicPromptUpdate"},"PublicPromptVersionCreateRequestThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PublicPromptVersionCreateRequestThinking"},"PublicPromptVersionCreateRequestToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PublicPromptVersionCreateRequestToolChoice"},"PublicPromptVersionCreateRequestResponseFormat":{"type":"object","properties":{},"title":"PublicPromptVersionCreateRequestResponseFormat"},"PublicPromptVersionCreateRequestJsonSchema":{"type":"object","properties":{},"title":"PublicPromptVersionCreateRequestJsonSchema"},"PublicPromptVersionCreateRequest":{"type":"object","properties":{"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PublicPromptVersionCreateRequestThinking"},"tool_choice":{"$ref":"#/components/schemas/PublicPromptVersionCreateRequestToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptVersionCreateRequestResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptVersionCreateRequestJsonSchema"},{"type":"null"}]},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"prompt":{"type":"integer"}},"required":["prompt"],"title":"PublicPromptVersionCreateRequest"},"PublicPromptVersionCreateThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PublicPromptVersionCreateThinking"},"PublicPromptVersionCreateToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PublicPromptVersionCreateToolChoice"},"PublicPromptVersionCreateResponseFormat":{"type":"object","properties":{},"title":"PublicPromptVersionCreateResponseFormat"},"PublicPromptVersionCreateJsonSchema":{"type":"object","properties":{},"title":"PublicPromptVersionCreateJsonSchema"},"PublicPromptVersionCreate":{"type":"object","properties":{"id":{"type":"string"},"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PublicPromptVersionCreateThinking"},"tool_choice":{"$ref":"#/components/schemas/PublicPromptVersionCreateToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptVersionCreateResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptVersionCreateJsonSchema"},{"type":"null"}]},"prompt_version_id":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"version":{"type":"integer"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"readonly":{"type":"boolean"},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"edited_by":{"type":["integer","null"]},"prompt":{"type":"integer"}},"required":["id","prompt_version_id","updated_at","version","readonly","edited_by","prompt"],"title":"PublicPromptVersionCreate"},"PaginatedPublicPromptVersionListListFiltersData":{"type":"object","properties":{},"title":"PaginatedPublicPromptVersionListListFiltersData"},"PublicPromptVersionListThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PublicPromptVersionListThinking"},"PublicPromptVersionListToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PublicPromptVersionListToolChoice"},"PublicPromptVersionListResponseFormat":{"type":"object","properties":{},"title":"PublicPromptVersionListResponseFormat"},"PublicPromptVersionListJsonSchema":{"type":"object","properties":{},"title":"PublicPromptVersionListJsonSchema"},"PublicPromptVersionList":{"type":"object","properties":{"id":{"type":"string"},"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PublicPromptVersionListThinking"},"tool_choice":{"$ref":"#/components/schemas/PublicPromptVersionListToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptVersionListResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptVersionListJsonSchema"},{"type":"null"}]},"edited_by":{"$ref":"#/components/schemas/Editor"},"is_deployed":{"type":"boolean"},"prompt_version_id":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"version":{"type":"integer"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"readonly":{"type":"boolean"},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"prompt":{"type":"integer"}},"required":["id","edited_by","prompt_version_id","updated_at","prompt"],"title":"PublicPromptVersionList"},"PaginatedPublicPromptVersionListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedPublicPromptVersionListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/PublicPromptVersionList"}}},"required":["count","results"],"title":"PaginatedPublicPromptVersionListList"},"PatchedPublicPromptVersionUpdateRequestThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PatchedPublicPromptVersionUpdateRequestThinking"},"PatchedPublicPromptVersionUpdateRequestToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PatchedPublicPromptVersionUpdateRequestToolChoice"},"PatchedPublicPromptVersionUpdateRequestResponseFormat":{"type":"object","properties":{},"title":"PatchedPublicPromptVersionUpdateRequestResponseFormat"},"PatchedPublicPromptVersionUpdateRequestJsonSchema":{"type":"object","properties":{},"title":"PatchedPublicPromptVersionUpdateRequestJsonSchema"},"PatchedPublicPromptVersionUpdateRequest":{"type":"object","properties":{"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PatchedPublicPromptVersionUpdateRequestThinking"},"tool_choice":{"$ref":"#/components/schemas/PatchedPublicPromptVersionUpdateRequestToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PatchedPublicPromptVersionUpdateRequestResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PatchedPublicPromptVersionUpdateRequestJsonSchema"},{"type":"null"}]},"description":{"type":"string"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"prompt":{"type":"integer"}},"title":"PatchedPublicPromptVersionUpdateRequest"},"PublicPromptVersionUpdateThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PublicPromptVersionUpdateThinking"},"PublicPromptVersionUpdateToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PublicPromptVersionUpdateToolChoice"},"PublicPromptVersionUpdateResponseFormat":{"type":"object","properties":{},"title":"PublicPromptVersionUpdateResponseFormat"},"PublicPromptVersionUpdateJsonSchema":{"type":"object","properties":{},"title":"PublicPromptVersionUpdateJsonSchema"},"PublicPromptVersionUpdate":{"type":"object","properties":{"id":{"type":"string"},"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PublicPromptVersionUpdateThinking"},"tool_choice":{"$ref":"#/components/schemas/PublicPromptVersionUpdateToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptVersionUpdateResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptVersionUpdateJsonSchema"},{"type":"null"}]},"prompt_version_id":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"version":{"type":"integer"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"readonly":{"type":"boolean"},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"edited_by":{"type":["integer","null"]},"prompt":{"type":"integer"}},"required":["id","prompt_version_id","created_at","updated_at","version","readonly","edited_by","prompt"],"title":"PublicPromptVersionUpdate"},"PublicPromptCommitResponseRequestThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PublicPromptCommitResponseRequestThinking"},"PublicPromptCommitResponseRequestToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PublicPromptCommitResponseRequestToolChoice"},"PublicPromptCommitResponseRequestResponseFormat":{"type":"object","properties":{},"title":"PublicPromptCommitResponseRequestResponseFormat"},"PublicPromptCommitResponseRequestJsonSchema":{"type":"object","properties":{},"title":"PublicPromptCommitResponseRequestJsonSchema"},"PublicPromptCommitResponseRequest":{"type":"object","properties":{"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PublicPromptCommitResponseRequestThinking"},"tool_choice":{"$ref":"#/components/schemas/PublicPromptCommitResponseRequestToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptCommitResponseRequestResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptCommitResponseRequestJsonSchema"},{"type":"null"}]},"prompt_version_id":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"version":{"type":"integer"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"readonly":{"type":"boolean"},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"edited_by":{"type":["integer","null"]},"prompt":{"type":"integer"}},"required":["prompt"],"title":"PublicPromptCommitResponseRequest"},"PublicPromptCommitResponseThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PublicPromptCommitResponseThinking"},"PublicPromptCommitResponseToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PublicPromptCommitResponseToolChoice"},"PublicPromptCommitResponseResponseFormat":{"type":"object","properties":{},"title":"PublicPromptCommitResponseResponseFormat"},"PublicPromptCommitResponseJsonSchema":{"type":"object","properties":{},"title":"PublicPromptCommitResponseJsonSchema"},"PublicPromptCommitResponse":{"type":"object","properties":{"id":{"type":"integer"},"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PublicPromptCommitResponseThinking"},"tool_choice":{"$ref":"#/components/schemas/PublicPromptCommitResponseToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptCommitResponseResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptCommitResponseJsonSchema"},{"type":"null"}]},"prompt_version_id":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"version":{"type":"integer"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"readonly":{"type":"boolean"},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"edited_by":{"type":["integer","null"]},"prompt":{"type":"integer"}},"required":["id","updated_at","prompt"],"title":"PublicPromptCommitResponse"},"PublicPromptDeploymentResponseRequestThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PublicPromptDeploymentResponseRequestThinking"},"PublicPromptDeploymentResponseRequestToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PublicPromptDeploymentResponseRequestToolChoice"},"PublicPromptDeploymentResponseRequestResponseFormat":{"type":"object","properties":{},"title":"PublicPromptDeploymentResponseRequestResponseFormat"},"PublicPromptDeploymentResponseRequestJsonSchema":{"type":"object","properties":{},"title":"PublicPromptDeploymentResponseRequestJsonSchema"},"PublicPromptDeploymentResponseRequest":{"type":"object","properties":{"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PublicPromptDeploymentResponseRequestThinking"},"tool_choice":{"$ref":"#/components/schemas/PublicPromptDeploymentResponseRequestToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptDeploymentResponseRequestResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptDeploymentResponseRequestJsonSchema"},{"type":"null"}]},"prompt_version_id":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"version":{"type":"integer"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"readonly":{"type":"boolean"},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"edited_by":{"type":["integer","null"]},"prompt":{"type":"integer"}},"required":["prompt"],"title":"PublicPromptDeploymentResponseRequest"},"PublicPromptDeploymentResponseThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PublicPromptDeploymentResponseThinking"},"PublicPromptDeploymentResponseToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PublicPromptDeploymentResponseToolChoice"},"PublicPromptDeploymentResponseResponseFormat":{"type":"object","properties":{},"title":"PublicPromptDeploymentResponseResponseFormat"},"PublicPromptDeploymentResponseJsonSchema":{"type":"object","properties":{},"title":"PublicPromptDeploymentResponseJsonSchema"},"PublicPromptDeploymentResponse":{"type":"object","properties":{"id":{"type":"integer"},"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PublicPromptDeploymentResponseThinking"},"tool_choice":{"$ref":"#/components/schemas/PublicPromptDeploymentResponseToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptDeploymentResponseResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptDeploymentResponseJsonSchema"},{"type":"null"}]},"prompt_version_id":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"version":{"type":"integer"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"readonly":{"type":"boolean"},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"edited_by":{"type":["integer","null"]},"prompt":{"type":"integer"}},"required":["id","updated_at","prompt"],"title":"PublicPromptDeploymentResponse"},"PromptsSummaryResponse":{"type":"object","properties":{"total_count":{"type":"integer"}},"required":["total_count"],"description":"Response body for the prompts summary endpoint.","title":"PromptsSummaryResponse"},"PaginatedPublicPromptListListFiltersData":{"type":"object","properties":{},"title":"PaginatedPublicPromptListListFiltersData"},"PublicPromptList":{"type":"object","properties":{"id":{"type":"string"},"current_version":{"$ref":"#/components/schemas/PublicPromptVersionDetail"},"full_prompt_id":{"type":"string"},"created_by":{"type":"integer"},"project":{"type":["string","null"]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"}},"prompt_live_version_number":{"type":"integer"},"live_version":{"$ref":"#/components/schemas/PromptVersionDetail"},"name":{"type":"string"},"description":{"type":"string"},"prompt_id":{"type":"string"},"prompt_slug":{"type":["string","null"]},"commit_count":{"type":"integer"},"starred":{"type":"boolean"},"deleted_at":{"type":["string","null"],"format":"date-time"},"organization":{"type":"integer"}},"required":["id","current_version","full_prompt_id","created_by","tags","prompt_live_version_number","live_version","commit_count","organization"],"title":"PublicPromptList"},"PaginatedPublicPromptListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedPublicPromptListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/PublicPromptList"}}},"required":["count","results"],"title":"PaginatedPublicPromptListList"},"PublicPromptListRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":"string"},"prompt_id":{"type":"string"},"prompt_slug":{"type":["string","null"]},"starred":{"type":"boolean"},"deleted_at":{"type":["string","null"],"format":"date-time"},"organization":{"type":"integer"}},"required":["organization"],"title":"PublicPromptListRequest"},"PatchedPublicPromptListRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":"string"},"prompt_id":{"type":"string"},"prompt_slug":{"type":["string","null"]},"starred":{"type":"boolean"},"deleted_at":{"type":["string","null"],"format":"date-time"},"organization":{"type":"integer"}},"title":"PatchedPublicPromptListRequest"},"PublicPromptUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"prompt_slug":{"type":["string","null"]},"starred":{"type":"boolean"},"is_example":{"type":"boolean"},"blurred":{"type":"boolean"},"deleted_at":{"type":["string","null"],"format":"date-time"},"organization":{"type":"integer"},"project":{"type":["string","null"]},"created_by":{"type":["integer","null"]}},"required":["organization"],"title":"PublicPromptUpdateRequest"},"PatchedPublicPromptCommitResponseRequestThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PatchedPublicPromptCommitResponseRequestThinking"},"PatchedPublicPromptCommitResponseRequestToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PatchedPublicPromptCommitResponseRequestToolChoice"},"PatchedPublicPromptCommitResponseRequestResponseFormat":{"type":"object","properties":{},"title":"PatchedPublicPromptCommitResponseRequestResponseFormat"},"PatchedPublicPromptCommitResponseRequestJsonSchema":{"type":"object","properties":{},"title":"PatchedPublicPromptCommitResponseRequestJsonSchema"},"PatchedPublicPromptCommitResponseRequest":{"type":"object","properties":{"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PatchedPublicPromptCommitResponseRequestThinking"},"tool_choice":{"$ref":"#/components/schemas/PatchedPublicPromptCommitResponseRequestToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PatchedPublicPromptCommitResponseRequestResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PatchedPublicPromptCommitResponseRequestJsonSchema"},{"type":"null"}]},"prompt_version_id":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"version":{"type":"integer"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"readonly":{"type":"boolean"},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"edited_by":{"type":["integer","null"]},"prompt":{"type":"integer"}},"title":"PatchedPublicPromptCommitResponseRequest"},"PatchedPublicPromptDeploymentResponseRequestThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PatchedPublicPromptDeploymentResponseRequestThinking"},"PatchedPublicPromptDeploymentResponseRequestToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PatchedPublicPromptDeploymentResponseRequestToolChoice"},"PatchedPublicPromptDeploymentResponseRequestResponseFormat":{"type":"object","properties":{},"title":"PatchedPublicPromptDeploymentResponseRequestResponseFormat"},"PatchedPublicPromptDeploymentResponseRequestJsonSchema":{"type":"object","properties":{},"title":"PatchedPublicPromptDeploymentResponseRequestJsonSchema"},"PatchedPublicPromptDeploymentResponseRequest":{"type":"object","properties":{"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PatchedPublicPromptDeploymentResponseRequestThinking"},"tool_choice":{"$ref":"#/components/schemas/PatchedPublicPromptDeploymentResponseRequestToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PatchedPublicPromptDeploymentResponseRequestResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PatchedPublicPromptDeploymentResponseRequestJsonSchema"},{"type":"null"}]},"prompt_version_id":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"version":{"type":"integer"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"readonly":{"type":"boolean"},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"edited_by":{"type":["integer","null"]},"prompt":{"type":"integer"}},"title":"PatchedPublicPromptDeploymentResponseRequest"},"PublicPromptVersionListRequestThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PublicPromptVersionListRequestThinking"},"PublicPromptVersionListRequestToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PublicPromptVersionListRequestToolChoice"},"PublicPromptVersionListRequestResponseFormat":{"type":"object","properties":{},"title":"PublicPromptVersionListRequestResponseFormat"},"PublicPromptVersionListRequestJsonSchema":{"type":"object","properties":{},"title":"PublicPromptVersionListRequestJsonSchema"},"PublicPromptVersionListRequest":{"type":"object","properties":{"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PublicPromptVersionListRequestThinking"},"tool_choice":{"$ref":"#/components/schemas/PublicPromptVersionListRequestToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptVersionListRequestResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptVersionListRequestJsonSchema"},{"type":"null"}]},"is_deployed":{"type":"boolean"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"version":{"type":"integer"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"readonly":{"type":"boolean"},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"prompt":{"type":"integer"}},"required":["prompt"],"title":"PublicPromptVersionListRequest"},"PatchedPublicPromptVersionListRequestThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PatchedPublicPromptVersionListRequestThinking"},"PatchedPublicPromptVersionListRequestToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PatchedPublicPromptVersionListRequestToolChoice"},"PatchedPublicPromptVersionListRequestResponseFormat":{"type":"object","properties":{},"title":"PatchedPublicPromptVersionListRequestResponseFormat"},"PatchedPublicPromptVersionListRequestJsonSchema":{"type":"object","properties":{},"title":"PatchedPublicPromptVersionListRequestJsonSchema"},"PatchedPublicPromptVersionListRequest":{"type":"object","properties":{"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PatchedPublicPromptVersionListRequestThinking"},"tool_choice":{"$ref":"#/components/schemas/PatchedPublicPromptVersionListRequestToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PatchedPublicPromptVersionListRequestResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PatchedPublicPromptVersionListRequestJsonSchema"},{"type":"null"}]},"is_deployed":{"type":"boolean"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"version":{"type":"integer"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"readonly":{"type":"boolean"},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"prompt":{"type":"integer"}},"title":"PatchedPublicPromptVersionListRequest"},"PublicPromptVersionDetailRequestThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PublicPromptVersionDetailRequestThinking"},"PublicPromptVersionDetailRequestToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PublicPromptVersionDetailRequestToolChoice"},"PublicPromptVersionDetailRequestResponseFormat":{"type":"object","properties":{},"title":"PublicPromptVersionDetailRequestResponseFormat"},"PublicPromptVersionDetailRequestJsonSchema":{"type":"object","properties":{},"title":"PublicPromptVersionDetailRequestJsonSchema"},"PublicPromptVersionDetailRequest":{"type":"object","properties":{"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PublicPromptVersionDetailRequestThinking"},"tool_choice":{"$ref":"#/components/schemas/PublicPromptVersionDetailRequestToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptVersionDetailRequestResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptVersionDetailRequestJsonSchema"},{"type":"null"}]},"is_deployed":{"type":"boolean"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"version":{"type":"integer"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"readonly":{"type":"boolean"},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"prompt":{"type":"integer"}},"required":["prompt"],"title":"PublicPromptVersionDetailRequest"},"PublicPromptVersionUpdateRequestThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PublicPromptVersionUpdateRequestThinking"},"PublicPromptVersionUpdateRequestToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PublicPromptVersionUpdateRequestToolChoice"},"PublicPromptVersionUpdateRequestResponseFormat":{"type":"object","properties":{},"title":"PublicPromptVersionUpdateRequestResponseFormat"},"PublicPromptVersionUpdateRequestJsonSchema":{"type":"object","properties":{},"title":"PublicPromptVersionUpdateRequestJsonSchema"},"PublicPromptVersionUpdateRequest":{"type":"object","properties":{"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PublicPromptVersionUpdateRequestThinking"},"tool_choice":{"$ref":"#/components/schemas/PublicPromptVersionUpdateRequestToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptVersionUpdateRequestResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PublicPromptVersionUpdateRequestJsonSchema"},{"type":"null"}]},"description":{"type":"string"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"prompt":{"type":"integer"}},"required":["prompt"],"title":"PublicPromptVersionUpdateRequest"},"Prompts_api_prompts_backups_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Prompts_api_prompts_backups_retrieve_Response_200"},"Prompts_api_prompts_backups_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Prompts_api_prompts_backups_create_Response_200"},"Prompts_api_prompts_backups_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Prompts_api_prompts_backups_update_Response_200"},"Prompts_api_prompts_backups_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Prompts_api_prompts_backups_partial_update_Response_200"},"Prompts_api_prompts_bulk_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Prompts_api_prompts_bulk_update_Response_200"},"Prompts_api_prompts_bulk_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Prompts_api_prompts_bulk_partial_update_Response_200"},"Prompts_api_prompts_summary_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Prompts_api_prompts_summary_update_Response_200"},"Prompts_api_prompts_summary_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Prompts_api_prompts_summary_partial_update_Response_200"},"PaginatedChRequestLogPromptVersionAggregationListFiltersData":{"type":"object","properties":{},"title":"PaginatedChRequestLogPromptVersionAggregationListFiltersData"},"CHRequestLogPromptVersionAggregation":{"type":"object","properties":{"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"number_of_requests":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"total_prompt_tokens":{"type":"integer"},"total_completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"error_count":{"type":"integer"},"error_percentage":{"type":"number","format":"double"},"average_ttft":{"type":"number","format":"double"},"average_latency":{"type":"number","format":"double"},"average_tps":{"type":"number","format":"double"},"average_cost":{"type":"number","format":"double"},"average_tokens":{"type":"integer"},"average_prompt_tokens":{"type":"integer"},"average_completion_tokens":{"type":"integer"}},"title":"CHRequestLogPromptVersionAggregation"},"PaginatedCHRequestLogPromptVersionAggregationList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedChRequestLogPromptVersionAggregationListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/CHRequestLogPromptVersionAggregation"}}},"required":["count","results"],"title":"PaginatedCHRequestLogPromptVersionAggregationList"},"Prompts_getLastEditedPromptRetrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Prompts_getLastEditedPromptRetrieve_Response_200"},"PromptsJwtJsonSchemaGenerationPostParametersFormat":{"type":"string","enum":["json","txt"],"title":"PromptsJwtJsonSchemaGenerationPostParametersFormat"},"Prompts_jwtJsonSchemaGenerationCreate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Prompts_jwtJsonSchemaGenerationCreate_Response_200"},"PromptsJwtPromptCommitGenerationPostParametersFormat":{"type":"string","enum":["json","txt"],"title":"PromptsJwtPromptCommitGenerationPostParametersFormat"},"Prompts_jwtPromptCommitGenerationCreate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Prompts_jwtPromptCommitGenerationCreate_Response_200"},"PromptsJwtPromptGenerationPostParametersFormat":{"type":"string","enum":["json","txt"],"title":"PromptsJwtPromptGenerationPostParametersFormat"},"Prompts_jwtPromptGenerationCreate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Prompts_jwtPromptGenerationCreate_Response_200"},"PromptsJwtPromptOptimizationPostParametersFormat":{"type":"string","enum":["json","txt"],"title":"PromptsJwtPromptOptimizationPostParametersFormat"},"Prompts_jwtPromptOptimizationCreate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Prompts_jwtPromptOptimizationCreate_Response_200"},"PromptsJwtPromptSummaryGenerationPostParametersFormat":{"type":"string","enum":["json","txt"],"title":"PromptsJwtPromptSummaryGenerationPostParametersFormat"},"Prompts_jwtPromptSummaryGenerationCreate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Prompts_jwtPromptSummaryGenerationCreate_Response_200"},"PromptVersionDetailRequestThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PromptVersionDetailRequestThinking"},"PromptVersionDetailRequestToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PromptVersionDetailRequestToolChoice"},"PromptVersionDetailRequestResponseFormat":{"type":"object","properties":{},"title":"PromptVersionDetailRequestResponseFormat"},"PromptVersionDetailRequestJsonSchema":{"type":"object","properties":{},"title":"PromptVersionDetailRequestJsonSchema"},"PromptVersionDetailRequest":{"type":"object","properties":{"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PromptVersionDetailRequestThinking"},"tool_choice":{"$ref":"#/components/schemas/PromptVersionDetailRequestToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PromptVersionDetailRequestResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PromptVersionDetailRequestJsonSchema"},{"type":"null"}]},"is_deployed":{"type":"boolean"},"prompt_version_id":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"version":{"type":"integer"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"readonly":{"type":"boolean"},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"prompt":{"type":"integer"}},"required":["prompt"],"title":"PromptVersionDetailRequest"},"PromptVersionUpdateRequestThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PromptVersionUpdateRequestThinking"},"PromptVersionUpdateRequestToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PromptVersionUpdateRequestToolChoice"},"PromptVersionUpdateRequestResponseFormat":{"type":"object","properties":{},"title":"PromptVersionUpdateRequestResponseFormat"},"PromptVersionUpdateRequestJsonSchema":{"type":"object","properties":{},"title":"PromptVersionUpdateRequestJsonSchema"},"PromptVersionUpdateRequest":{"type":"object","properties":{"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PromptVersionUpdateRequestThinking"},"tool_choice":{"$ref":"#/components/schemas/PromptVersionUpdateRequestToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PromptVersionUpdateRequestResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PromptVersionUpdateRequestJsonSchema"},{"type":"null"}]},"description":{"type":"string"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"prompt":{"type":"integer"}},"required":["prompt"],"title":"PromptVersionUpdateRequest"},"PromptVersionUpdateThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PromptVersionUpdateThinking"},"PromptVersionUpdateToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PromptVersionUpdateToolChoice"},"PromptVersionUpdateResponseFormat":{"type":"object","properties":{},"title":"PromptVersionUpdateResponseFormat"},"PromptVersionUpdateJsonSchema":{"type":"object","properties":{},"title":"PromptVersionUpdateJsonSchema"},"PromptVersionUpdate":{"type":"object","properties":{"id":{"type":"integer"},"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PromptVersionUpdateThinking"},"tool_choice":{"$ref":"#/components/schemas/PromptVersionUpdateToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PromptVersionUpdateResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PromptVersionUpdateJsonSchema"},{"type":"null"}]},"prompt_version_id":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"version":{"type":"integer"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"readonly":{"type":"boolean"},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"edited_by":{"type":["integer","null"]},"prompt":{"type":"integer"}},"required":["id","prompt_version_id","created_at","updated_at","version","readonly","edited_by","prompt"],"title":"PromptVersionUpdate"},"PatchedPromptVersionUpdateRequestThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PatchedPromptVersionUpdateRequestThinking"},"PatchedPromptVersionUpdateRequestToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PatchedPromptVersionUpdateRequestToolChoice"},"PatchedPromptVersionUpdateRequestResponseFormat":{"type":"object","properties":{},"title":"PatchedPromptVersionUpdateRequestResponseFormat"},"PatchedPromptVersionUpdateRequestJsonSchema":{"type":"object","properties":{},"title":"PatchedPromptVersionUpdateRequestJsonSchema"},"PatchedPromptVersionUpdateRequest":{"type":"object","properties":{"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PatchedPromptVersionUpdateRequestThinking"},"tool_choice":{"$ref":"#/components/schemas/PatchedPromptVersionUpdateRequestToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PatchedPromptVersionUpdateRequestResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PatchedPromptVersionUpdateRequestJsonSchema"},{"type":"null"}]},"description":{"type":"string"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"prompt":{"type":"integer"}},"title":"PatchedPromptVersionUpdateRequest"},"PaginatedPromptVersionListListFiltersData":{"type":"object","properties":{},"title":"PaginatedPromptVersionListListFiltersData"},"PromptVersionListThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PromptVersionListThinking"},"PromptVersionListToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PromptVersionListToolChoice"},"PromptVersionListResponseFormat":{"type":"object","properties":{},"title":"PromptVersionListResponseFormat"},"PromptVersionListJsonSchema":{"type":"object","properties":{},"title":"PromptVersionListJsonSchema"},"PromptVersionList":{"type":"object","properties":{"id":{"type":"integer"},"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PromptVersionListThinking"},"tool_choice":{"$ref":"#/components/schemas/PromptVersionListToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PromptVersionListResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PromptVersionListJsonSchema"},{"type":"null"}]},"edited_by":{"$ref":"#/components/schemas/Editor"},"is_deployed":{"type":"boolean"},"prompt_version_id":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"version":{"type":"integer"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"readonly":{"type":"boolean"},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"prompt":{"type":"integer"}},"required":["id","edited_by","updated_at","prompt"],"title":"PromptVersionList"},"PaginatedPromptVersionListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedPromptVersionListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/PromptVersionList"}}},"required":["count","results"],"title":"PaginatedPromptVersionListList"},"PromptVersionCreateRequestThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PromptVersionCreateRequestThinking"},"PromptVersionCreateRequestToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PromptVersionCreateRequestToolChoice"},"PromptVersionCreateRequestResponseFormat":{"type":"object","properties":{},"title":"PromptVersionCreateRequestResponseFormat"},"PromptVersionCreateRequestJsonSchema":{"type":"object","properties":{},"title":"PromptVersionCreateRequestJsonSchema"},"PromptVersionCreateRequest":{"type":"object","properties":{"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PromptVersionCreateRequestThinking"},"tool_choice":{"$ref":"#/components/schemas/PromptVersionCreateRequestToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PromptVersionCreateRequestResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PromptVersionCreateRequestJsonSchema"},{"type":"null"}]},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"prompt":{"type":"integer"}},"required":["prompt"],"title":"PromptVersionCreateRequest"},"PromptVersionCreateThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PromptVersionCreateThinking"},"PromptVersionCreateToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PromptVersionCreateToolChoice"},"PromptVersionCreateResponseFormat":{"type":"object","properties":{},"title":"PromptVersionCreateResponseFormat"},"PromptVersionCreateJsonSchema":{"type":"object","properties":{},"title":"PromptVersionCreateJsonSchema"},"PromptVersionCreate":{"type":"object","properties":{"id":{"type":"integer"},"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PromptVersionCreateThinking"},"tool_choice":{"$ref":"#/components/schemas/PromptVersionCreateToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PromptVersionCreateResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PromptVersionCreateJsonSchema"},{"type":"null"}]},"prompt_version_id":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"version":{"type":"integer"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"readonly":{"type":"boolean"},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"edited_by":{"type":["integer","null"]},"prompt":{"type":"integer"}},"required":["id","prompt_version_id","updated_at","version","readonly","edited_by","prompt"],"title":"PromptVersionCreate"},"PromptVersionListRequestThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PromptVersionListRequestThinking"},"PromptVersionListRequestToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PromptVersionListRequestToolChoice"},"PromptVersionListRequestResponseFormat":{"type":"object","properties":{},"title":"PromptVersionListRequestResponseFormat"},"PromptVersionListRequestJsonSchema":{"type":"object","properties":{},"title":"PromptVersionListRequestJsonSchema"},"PromptVersionListRequest":{"type":"object","properties":{"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PromptVersionListRequestThinking"},"tool_choice":{"$ref":"#/components/schemas/PromptVersionListRequestToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PromptVersionListRequestResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PromptVersionListRequestJsonSchema"},{"type":"null"}]},"is_deployed":{"type":"boolean"},"prompt_version_id":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"version":{"type":"integer"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"readonly":{"type":"boolean"},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"prompt":{"type":"integer"}},"required":["prompt"],"title":"PromptVersionListRequest"},"PatchedPromptVersionListRequestThinking":{"oneOf":[{"$ref":"#/components/schemas/PromptThinkingConfig"},{"description":"Any type"}],"title":"PatchedPromptVersionListRequestThinking"},"PatchedPromptVersionListRequestToolChoice":{"oneOf":[{"$ref":"#/components/schemas/PromptToolChoice"},{"description":"Any type"}],"title":"PatchedPromptVersionListRequestToolChoice"},"PatchedPromptVersionListRequestResponseFormat":{"type":"object","properties":{},"title":"PatchedPromptVersionListRequestResponseFormat"},"PatchedPromptVersionListRequestJsonSchema":{"type":"object","properties":{},"title":"PatchedPromptVersionListRequestJsonSchema"},"PatchedPromptVersionListRequest":{"type":"object","properties":{"parent_prompt":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptChatMessage"}},"variables":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PromptVariableEntry"}},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptFunctionTool"}},"load_balance_models":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PromptLoadBalanceModel"}},"thinking":{"$ref":"#/components/schemas/PatchedPromptVersionListRequestThinking"},"tool_choice":{"$ref":"#/components/schemas/PatchedPromptVersionListRequestToolChoice"},"response_format":{"oneOf":[{"$ref":"#/components/schemas/PatchedPromptVersionListRequestResponseFormat"},{"type":"null"}]},"json_schema":{"oneOf":[{"$ref":"#/components/schemas/PatchedPromptVersionListRequestJsonSchema"},{"type":"null"}]},"is_deployed":{"type":"boolean"},"prompt_version_id":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"version":{"type":"integer"},"model":{"type":"string"},"stream":{"type":"boolean"},"temperature":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"top_p":{"type":["number","null"],"format":"double"},"frequency_penalty":{"type":["number","null"],"format":"double"},"presence_penalty":{"type":["number","null"],"format":"double"},"reasoning_effort":{"type":["string","null"]},"verbosity":{"type":["string","null"]},"seed":{"type":["integer","null"]},"readonly":{"type":"boolean"},"fallback_models":{"type":["array","null"],"items":{"type":"string"}},"is_enforcing_response_format":{"type":"boolean"},"prompt":{"type":"integer"}},"title":"PatchedPromptVersionListRequest"},"PromptDetail":{"type":"object","properties":{"id":{"type":"integer"},"current_version":{"$ref":"#/components/schemas/PromptVersionDetail"},"full_prompt_id":{"type":"string"},"created_by":{"type":"integer"},"project":{"type":["string","null"]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"}},"prompt_versions":{"type":"array","items":{"$ref":"#/components/schemas/PromptVersionDetail"}},"live_version":{"$ref":"#/components/schemas/PromptVersionDetail"},"name":{"type":"string"},"description":{"type":"string"},"prompt_id":{"type":"string"},"prompt_slug":{"type":["string","null"]},"commit_count":{"type":"integer"},"starred":{"type":"boolean"},"deleted_at":{"type":["string","null"],"format":"date-time"},"organization":{"type":"integer"}},"required":["id","current_version","full_prompt_id","created_by","tags","prompt_versions","live_version","commit_count","organization"],"title":"PromptDetail"},"PromptDetailRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":"string"},"prompt_id":{"type":"string"},"prompt_slug":{"type":["string","null"]},"starred":{"type":"boolean"},"deleted_at":{"type":["string","null"],"format":"date-time"},"organization":{"type":"integer"}},"required":["organization"],"title":"PromptDetailRequest"},"PromptUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"prompt_slug":{"type":["string","null"]},"starred":{"type":"boolean"},"is_example":{"type":"boolean"},"blurred":{"type":"boolean"},"deleted_at":{"type":["string","null"],"format":"date-time"},"organization":{"type":"integer"},"project":{"type":["string","null"]},"created_by":{"type":["integer","null"]}},"required":["organization"],"title":"PromptUpdateRequest"},"PromptUpdate":{"type":"object","properties":{"id":{"type":"integer"},"prompt_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"prompt_slug":{"type":["string","null"]},"commit_count":{"type":"integer"},"starred":{"type":"boolean"},"is_example":{"type":"boolean"},"blurred":{"type":"boolean"},"deleted_at":{"type":["string","null"],"format":"date-time"},"organization":{"type":"integer"},"project":{"type":["string","null"]},"created_by":{"type":["integer","null"]}},"required":["id","prompt_id","commit_count","organization"],"title":"PromptUpdate"},"PatchedPromptUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"prompt_slug":{"type":["string","null"]},"starred":{"type":"boolean"},"is_example":{"type":"boolean"},"blurred":{"type":"boolean"},"deleted_at":{"type":["string","null"],"format":"date-time"},"organization":{"type":"integer"},"project":{"type":["string","null"]},"created_by":{"type":["integer","null"]}},"title":"PatchedPromptUpdateRequest"},"PromptCreationRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":"string"},"prompt_id":{"type":"string"},"prompt_slug":{"type":["string","null"]},"starred":{"type":"boolean"},"deleted_at":{"type":["string","null"],"format":"date-time"},"organization":{"type":"integer"}},"required":["organization"],"title":"PromptCreationRequest"},"PromptCreation":{"type":"object","properties":{"id":{"type":"integer"},"current_version":{"$ref":"#/components/schemas/PromptVersionDetail"},"full_prompt_id":{"type":"string"},"created_by":{"type":"integer"},"project":{"type":["string","null"]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"}},"prompt_live_version_number":{"type":"integer"},"live_version":{"$ref":"#/components/schemas/PromptVersionDetail"},"name":{"type":"string"},"description":{"type":"string"},"prompt_id":{"type":"string"},"prompt_slug":{"type":["string","null"]},"commit_count":{"type":"integer"},"starred":{"type":"boolean"},"deleted_at":{"type":["string","null"],"format":"date-time"},"organization":{"type":"integer"}},"required":["id","current_version","full_prompt_id","created_by","tags","prompt_live_version_number","live_version","commit_count","organization"],"title":"PromptCreation"},"PromptListRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":"string"},"prompt_id":{"type":"string"},"prompt_slug":{"type":["string","null"]},"starred":{"type":"boolean"},"deleted_at":{"type":["string","null"],"format":"date-time"},"organization":{"type":"integer"}},"required":["organization"],"title":"PromptListRequest"},"PatchedPromptListRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":"string"},"prompt_id":{"type":"string"},"prompt_slug":{"type":["string","null"]},"starred":{"type":"boolean"},"deleted_at":{"type":["string","null"],"format":"date-time"},"organization":{"type":"integer"}},"title":"PatchedPromptListRequest"},"Prompts_jwtPromptsSummaryUpdate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Prompts_jwtPromptsSummaryUpdate_Response_200"},"Prompts_jwtPromptsSummaryPartialUpdate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Prompts_jwtPromptsSummaryPartialUpdate_Response_200"},"PaginatedWorkflowListListFiltersData":{"type":"object","properties":{},"title":"PaginatedWorkflowListListFiltersData"},"WorkflowVersionTypeEnum":{"type":"string","enum":["automations","monitors","evaluators","reports","exports","ingests"],"description":"* `automations` - Automation\n* `monitors` - Monitor\n* `evaluators` - Evaluator\n* `reports` - Report\n* `exports` - Export\n* `ingests` - Ingest","title":"WorkflowVersionTypeEnum"},"TriggerEventTypeEnum":{"type":"string","enum":["request_log","trace_completed","customer_budget_limit_reached","credit_low_balance_threshold_reached","spend_cap_warning_threshold_reached","limit_policy_soft_triggered","limit_policy_hard_triggered","on_eval_result_ingested","custom_event","eval_only","scheduled"],"description":"* `request_log` - LOG_INGESTED\n* `trace_completed` - TRACE_COMPLETED\n* `customer_budget_limit_reached` - BUDGET_EXCEEDED\n* `credit_low_balance_threshold_reached` - CREDIT_LOW\n* `spend_cap_warning_threshold_reached` - SPEND_CAP_WARNING\n* `limit_policy_soft_triggered` - LIMIT_POLICY_SOFT_TRIGGERED\n* `limit_policy_hard_triggered` - LIMIT_POLICY_HARD_TRIGGERED\n* `on_eval_result_ingested` - EVAL_COMPLETED\n* `custom_event` - CUSTOM_EVENT\n* `eval_only` - EVAL_ONLY\n* `scheduled` - SCHEDULED","title":"TriggerEventTypeEnum"},"WorkflowListTriggerEventType":{"oneOf":[{"$ref":"#/components/schemas/TriggerEventTypeEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}],"description":"Event type that triggers this workflow when used as an event responder\n\n* `request_log` - LOG_INGESTED\n* `trace_completed` - TRACE_COMPLETED\n* `customer_budget_limit_reached` - BUDGET_EXCEEDED\n* `credit_low_balance_threshold_reached` - CREDIT_LOW\n* `spend_cap_warning_threshold_reached` - SPEND_CAP_WARNING\n* `limit_policy_soft_triggered` - LIMIT_POLICY_SOFT_TRIGGERED\n* `limit_policy_hard_triggered` - LIMIT_POLICY_HARD_TRIGGERED\n* `on_eval_result_ingested` - EVAL_COMPLETED\n* `custom_event` - CUSTOM_EVENT\n* `eval_only` - EVAL_ONLY\n* `scheduled` - SCHEDULED","title":"WorkflowListTriggerEventType"},"WorkflowList":{"type":"object","properties":{"id":{"type":"string"},"workflow_id":{"type":"string","description":"Logical workflow family key shared across versions"},"version":{"type":"integer","default":1},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"type":{"$ref":"#/components/schemas/WorkflowVersionTypeEnum","description":"Kind of workflow: automation, monitor, or evaluator\n\n* `automations` - Automation\n* `monitors` - Monitor\n* `evaluators` - Evaluator\n* `reports` - Report\n* `exports` - Export\n* `ingests` - Ingest"},"trigger_event_type":{"$ref":"#/components/schemas/WorkflowListTriggerEventType","description":"Event type that triggers this workflow when used as an event responder\n\n* `request_log` - LOG_INGESTED\n* `trace_completed` - TRACE_COMPLETED\n* `customer_budget_limit_reached` - BUDGET_EXCEEDED\n* `credit_low_balance_threshold_reached` - CREDIT_LOW\n* `spend_cap_warning_threshold_reached` - SPEND_CAP_WARNING\n* `limit_policy_soft_triggered` - LIMIT_POLICY_SOFT_TRIGGERED\n* `limit_policy_hard_triggered` - LIMIT_POLICY_HARD_TRIGGERED\n* `on_eval_result_ingested` - EVAL_COMPLETED\n* `custom_event` - CUSTOM_EVENT\n* `eval_only` - EVAL_ONLY\n* `scheduled` - SCHEDULED"},"is_enabled":{"type":"boolean"},"is_starred":{"type":"boolean"},"is_read_only":{"type":"boolean","description":"True for committed versions; only the latest version is editable"},"is_public":{"type":"boolean"},"unique_organization_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"has_async_steps":{"type":"boolean"},"editor":{"$ref":"#/components/schemas/Editor"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"}},"deployed_version":{"type":["integer","null"]}},"required":["is_enabled","is_public","unique_organization_id","created_at","updated_at","editor","tags","deployed_version"],"description":"Computes family-level deployment state from committed versions.\n\nLookup strategy (checked in order):\n1. Queryset annotation (``_annotated_deployed_version``) — zero extra queries\n2. Per-instance cache — avoids re-querying for same object\n3. Per-workflow_id cache in serializer context — collapses versions list N→1\n4. Direct database query","title":"WorkflowList"},"PaginatedWorkflowListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedWorkflowListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowList"}}},"required":["count","results"],"title":"PaginatedWorkflowListList"},"WorkflowFilterRequestRequest":{"type":"object","properties":{"filters":{"$ref":"#/components/schemas/FilterParamDictPydantic","description":"Filter parameters keyed by field name."}},"description":"Request body for POST-for-filtering on /api/workflows/list/.","title":"WorkflowFilterRequestRequest"},"WorkflowCreateRequestTasksItems":{"type":"object","title":"WorkflowCreateRequestTasksItems"},"WorkflowCreateRequestTriggerEventType":{"oneOf":[{"$ref":"#/components/schemas/TriggerEventTypeEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}],"description":"Event type that triggers this workflow when used as an event responder\n\n* `request_log` - LOG_INGESTED\n* `trace_completed` - TRACE_COMPLETED\n* `customer_budget_limit_reached` - BUDGET_EXCEEDED\n* `credit_low_balance_threshold_reached` - CREDIT_LOW\n* `spend_cap_warning_threshold_reached` - SPEND_CAP_WARNING\n* `limit_policy_soft_triggered` - LIMIT_POLICY_SOFT_TRIGGERED\n* `limit_policy_hard_triggered` - LIMIT_POLICY_HARD_TRIGGERED\n* `on_eval_result_ingested` - EVAL_COMPLETED\n* `custom_event` - CUSTOM_EVENT\n* `eval_only` - EVAL_ONLY\n* `scheduled` - SCHEDULED","title":"WorkflowCreateRequestTriggerEventType"},"WorkflowCreateRequest":{"type":"object","properties":{"id":{"type":"string"},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowCreateRequestTasksItems"}},"workflow_id":{"type":"string","description":"Logical workflow family key shared across versions"},"version":{"type":"integer","default":1},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"type":{"$ref":"#/components/schemas/WorkflowVersionTypeEnum","description":"Kind of workflow: automation, monitor, or evaluator\n\n* `automations` - Automation\n* `monitors` - Monitor\n* `evaluators` - Evaluator\n* `reports` - Report\n* `exports` - Export\n* `ingests` - Ingest"},"trigger_event_type":{"$ref":"#/components/schemas/WorkflowCreateRequestTriggerEventType","description":"Event type that triggers this workflow when used as an event responder\n\n* `request_log` - LOG_INGESTED\n* `trace_completed` - TRACE_COMPLETED\n* `customer_budget_limit_reached` - BUDGET_EXCEEDED\n* `credit_low_balance_threshold_reached` - CREDIT_LOW\n* `spend_cap_warning_threshold_reached` - SPEND_CAP_WARNING\n* `limit_policy_soft_triggered` - LIMIT_POLICY_SOFT_TRIGGERED\n* `limit_policy_hard_triggered` - LIMIT_POLICY_HARD_TRIGGERED\n* `on_eval_result_ingested` - EVAL_COMPLETED\n* `custom_event` - CUSTOM_EVENT\n* `eval_only` - EVAL_ONLY\n* `scheduled` - SCHEDULED"},"schedule_cron":{"type":["string","null"],"description":"UTC cron schedule (5-field). Populated when trigger_event_type='scheduled'."},"has_async_steps":{"type":"boolean"},"is_starred":{"type":"boolean"},"resource_ids":{"type":"array","items":{"type":"string"},"description":"All resource IDs referenced in workflow (for reverse lookup)"}},"description":"Validate workflow task structure on create/update via validate_workflow_structure().","title":"WorkflowCreateRequest"},"WorkflowCreateTasksItems":{"type":"object","title":"WorkflowCreateTasksItems"},"WorkflowCreateTriggerEventType":{"oneOf":[{"$ref":"#/components/schemas/TriggerEventTypeEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}],"description":"Event type that triggers this workflow when used as an event responder\n\n* `request_log` - LOG_INGESTED\n* `trace_completed` - TRACE_COMPLETED\n* `customer_budget_limit_reached` - BUDGET_EXCEEDED\n* `credit_low_balance_threshold_reached` - CREDIT_LOW\n* `spend_cap_warning_threshold_reached` - SPEND_CAP_WARNING\n* `limit_policy_soft_triggered` - LIMIT_POLICY_SOFT_TRIGGERED\n* `limit_policy_hard_triggered` - LIMIT_POLICY_HARD_TRIGGERED\n* `on_eval_result_ingested` - EVAL_COMPLETED\n* `custom_event` - CUSTOM_EVENT\n* `eval_only` - EVAL_ONLY\n* `scheduled` - SCHEDULED","title":"WorkflowCreateTriggerEventType"},"WorkflowCreate":{"type":"object","properties":{"id":{"type":"string"},"unique_organization_id":{"type":"string"},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowCreateTasksItems"}},"project":{"type":["string","null"]},"workflow_id":{"type":"string","description":"Logical workflow family key shared across versions"},"version":{"type":"integer","default":1},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"type":{"$ref":"#/components/schemas/WorkflowVersionTypeEnum","description":"Kind of workflow: automation, monitor, or evaluator\n\n* `automations` - Automation\n* `monitors` - Monitor\n* `evaluators` - Evaluator\n* `reports` - Report\n* `exports` - Export\n* `ingests` - Ingest"},"trigger_event_type":{"$ref":"#/components/schemas/WorkflowCreateTriggerEventType","description":"Event type that triggers this workflow when used as an event responder\n\n* `request_log` - LOG_INGESTED\n* `trace_completed` - TRACE_COMPLETED\n* `customer_budget_limit_reached` - BUDGET_EXCEEDED\n* `credit_low_balance_threshold_reached` - CREDIT_LOW\n* `spend_cap_warning_threshold_reached` - SPEND_CAP_WARNING\n* `limit_policy_soft_triggered` - LIMIT_POLICY_SOFT_TRIGGERED\n* `limit_policy_hard_triggered` - LIMIT_POLICY_HARD_TRIGGERED\n* `on_eval_result_ingested` - EVAL_COMPLETED\n* `custom_event` - CUSTOM_EVENT\n* `eval_only` - EVAL_ONLY\n* `scheduled` - SCHEDULED"},"schedule_cron":{"type":["string","null"],"description":"UTC cron schedule (5-field). Populated when trigger_event_type='scheduled'."},"has_async_steps":{"type":"boolean"},"is_enabled":{"type":"boolean","description":"Only committed (is_read_only=True) versions may be enabled. At most one version per workflow family should be enabled at a time."},"is_starred":{"type":"boolean"},"is_read_only":{"type":"boolean","description":"True for committed versions; only the latest version is editable"},"resource_ids":{"type":"array","items":{"type":"string"},"description":"All resource IDs referenced in workflow (for reverse lookup)"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"organization":{"type":["integer","null"]},"updated_by":{"type":["integer","null"]}},"required":["unique_organization_id","project","is_enabled","is_read_only","created_at","updated_at","organization","updated_by"],"description":"Validate workflow task structure on create/update via validate_workflow_structure().","title":"WorkflowCreate"},"WorkflowDetailTriggerEventType":{"oneOf":[{"$ref":"#/components/schemas/TriggerEventTypeEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}],"description":"Event type that triggers this workflow when used as an event responder\n\n* `request_log` - LOG_INGESTED\n* `trace_completed` - TRACE_COMPLETED\n* `customer_budget_limit_reached` - BUDGET_EXCEEDED\n* `credit_low_balance_threshold_reached` - CREDIT_LOW\n* `spend_cap_warning_threshold_reached` - SPEND_CAP_WARNING\n* `limit_policy_soft_triggered` - LIMIT_POLICY_SOFT_TRIGGERED\n* `limit_policy_hard_triggered` - LIMIT_POLICY_HARD_TRIGGERED\n* `on_eval_result_ingested` - EVAL_COMPLETED\n* `custom_event` - CUSTOM_EVENT\n* `eval_only` - EVAL_ONLY\n* `scheduled` - SCHEDULED","title":"WorkflowDetailTriggerEventType"},"WorkflowDetailTasksItems":{"type":"object","title":"WorkflowDetailTasksItems"},"WorkflowDetailGraphNodes":{"type":"object","properties":{"type":{"type":"string"},"in_degree":{"type":"integer"},"out_degree":{"type":"integer"},"is_entry":{"type":"boolean"},"is_terminal":{"type":"boolean"},"predecessors":{"type":"array","items":{"type":"string"}},"successors":{"type":"array","items":{"type":"string"}}},"title":"WorkflowDetailGraphNodes"},"WorkflowDetailGraph":{"type":"object","properties":{"node_count":{"type":"integer"},"edge_count":{"type":"integer"},"entry_nodes":{"type":"array","items":{"type":"string"}},"terminal_nodes":{"type":"array","items":{"type":"string"}},"nodes":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WorkflowDetailGraphNodes"}}},"title":"WorkflowDetailGraph"},"WorkflowDetail":{"type":"object","properties":{"id":{"type":"string"},"workflow_id":{"type":"string","description":"Logical workflow family key shared across versions"},"version":{"type":"integer","default":1},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"type":{"$ref":"#/components/schemas/WorkflowVersionTypeEnum","description":"Kind of workflow: automation, monitor, or evaluator\n\n* `automations` - Automation\n* `monitors` - Monitor\n* `evaluators` - Evaluator\n* `reports` - Report\n* `exports` - Export\n* `ingests` - Ingest"},"trigger_event_type":{"$ref":"#/components/schemas/WorkflowDetailTriggerEventType","description":"Event type that triggers this workflow when used as an event responder\n\n* `request_log` - LOG_INGESTED\n* `trace_completed` - TRACE_COMPLETED\n* `customer_budget_limit_reached` - BUDGET_EXCEEDED\n* `credit_low_balance_threshold_reached` - CREDIT_LOW\n* `spend_cap_warning_threshold_reached` - SPEND_CAP_WARNING\n* `limit_policy_soft_triggered` - LIMIT_POLICY_SOFT_TRIGGERED\n* `limit_policy_hard_triggered` - LIMIT_POLICY_HARD_TRIGGERED\n* `on_eval_result_ingested` - EVAL_COMPLETED\n* `custom_event` - CUSTOM_EVENT\n* `eval_only` - EVAL_ONLY\n* `scheduled` - SCHEDULED"},"schedule_cron":{"type":["string","null"],"description":"UTC cron schedule (5-field). Populated when trigger_event_type='scheduled'."},"is_enabled":{"type":"boolean"},"is_starred":{"type":"boolean"},"is_read_only":{"type":"boolean","description":"True for committed versions; only the latest version is editable"},"is_public":{"type":"boolean"},"unique_organization_id":{"type":"string"},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowDetailTasksItems"}},"graph":{"oneOf":[{"$ref":"#/components/schemas/WorkflowDetailGraph"},{"type":"null"}]},"has_async_steps":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deployed_version":{"type":["integer","null"]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"}}},"required":["is_enabled","is_public","unique_organization_id","tasks","graph","created_at","updated_at","deployed_version","tags"],"description":"Computes family-level deployment state from committed versions.\n\nLookup strategy (checked in order):\n1. Queryset annotation (``_annotated_deployed_version``) — zero extra queries\n2. Per-instance cache — avoids re-querying for same object\n3. Per-workflow_id cache in serializer context — collapses versions list N→1\n4. Direct database query","title":"WorkflowDetail"},"WorkflowExportWorkflow":{"type":"object","properties":{"name":{"type":["string","null"]},"description":{"type":["string","null"]},"trigger_event_type":{"type":["string","null"]},"schedule_cron":{"type":["string","null"]},"is_enabled":{"type":"boolean"},"tasks":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}}},"title":"WorkflowExportWorkflow"},"WorkflowExport":{"type":"object","properties":{"schema_version":{"type":"string","default":"v1"},"workflow":{"$ref":"#/components/schemas/WorkflowExportWorkflow"}},"required":["schema_version","workflow"],"description":"Portable workflow export returned by the retrieve endpoint when\n``is_exporting=true``: a ``schema_version`` envelope wrapping a sanitized\n``workflow`` whose org-scoped resource ids are replaced with\n``resource_ref`` placeholders so the workflow can be imported elsewhere.","title":"WorkflowExport"},"WorkflowRetrieveResponse":{"oneOf":[{"$ref":"#/components/schemas/WorkflowDetail"},{"$ref":"#/components/schemas/WorkflowExport"}],"title":"WorkflowRetrieveResponse"},"PatchedWorkflowUpdateRequestTasksItems":{"type":"object","title":"PatchedWorkflowUpdateRequestTasksItems"},"PatchedWorkflowUpdateRequestTriggerEventType":{"oneOf":[{"$ref":"#/components/schemas/TriggerEventTypeEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}],"description":"Event type that triggers this workflow when used as an event responder\n\n* `request_log` - LOG_INGESTED\n* `trace_completed` - TRACE_COMPLETED\n* `customer_budget_limit_reached` - BUDGET_EXCEEDED\n* `credit_low_balance_threshold_reached` - CREDIT_LOW\n* `spend_cap_warning_threshold_reached` - SPEND_CAP_WARNING\n* `limit_policy_soft_triggered` - LIMIT_POLICY_SOFT_TRIGGERED\n* `limit_policy_hard_triggered` - LIMIT_POLICY_HARD_TRIGGERED\n* `on_eval_result_ingested` - EVAL_COMPLETED\n* `custom_event` - CUSTOM_EVENT\n* `eval_only` - EVAL_ONLY\n* `scheduled` - SCHEDULED","title":"PatchedWorkflowUpdateRequestTriggerEventType"},"PatchedWorkflowUpdateRequest":{"type":"object","properties":{"tasks":{"type":"array","items":{"$ref":"#/components/schemas/PatchedWorkflowUpdateRequestTasksItems"}},"workflow_id":{"type":"string","description":"Logical workflow family key shared across versions"},"version":{"type":"integer","default":1},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"type":{"$ref":"#/components/schemas/WorkflowVersionTypeEnum","description":"Kind of workflow: automation, monitor, or evaluator\n\n* `automations` - Automation\n* `monitors` - Monitor\n* `evaluators` - Evaluator\n* `reports` - Report\n* `exports` - Export\n* `ingests` - Ingest"},"trigger_event_type":{"$ref":"#/components/schemas/PatchedWorkflowUpdateRequestTriggerEventType","description":"Event type that triggers this workflow when used as an event responder\n\n* `request_log` - LOG_INGESTED\n* `trace_completed` - TRACE_COMPLETED\n* `customer_budget_limit_reached` - BUDGET_EXCEEDED\n* `credit_low_balance_threshold_reached` - CREDIT_LOW\n* `spend_cap_warning_threshold_reached` - SPEND_CAP_WARNING\n* `limit_policy_soft_triggered` - LIMIT_POLICY_SOFT_TRIGGERED\n* `limit_policy_hard_triggered` - LIMIT_POLICY_HARD_TRIGGERED\n* `on_eval_result_ingested` - EVAL_COMPLETED\n* `custom_event` - CUSTOM_EVENT\n* `eval_only` - EVAL_ONLY\n* `scheduled` - SCHEDULED"},"schedule_cron":{"type":["string","null"],"description":"UTC cron schedule (5-field). Populated when trigger_event_type='scheduled'."},"has_async_steps":{"type":"boolean"},"is_starred":{"type":"boolean"},"resource_ids":{"type":"array","items":{"type":"string"},"description":"All resource IDs referenced in workflow (for reverse lookup)"},"updated_by":{"type":["integer","null"]}},"description":"Validate workflow task structure on create/update via validate_workflow_structure().","title":"PatchedWorkflowUpdateRequest"},"WorkflowUpdateTasksItems":{"type":"object","title":"WorkflowUpdateTasksItems"},"WorkflowUpdateTriggerEventType":{"oneOf":[{"$ref":"#/components/schemas/TriggerEventTypeEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}],"description":"Event type that triggers this workflow when used as an event responder\n\n* `request_log` - LOG_INGESTED\n* `trace_completed` - TRACE_COMPLETED\n* `customer_budget_limit_reached` - BUDGET_EXCEEDED\n* `credit_low_balance_threshold_reached` - CREDIT_LOW\n* `spend_cap_warning_threshold_reached` - SPEND_CAP_WARNING\n* `limit_policy_soft_triggered` - LIMIT_POLICY_SOFT_TRIGGERED\n* `limit_policy_hard_triggered` - LIMIT_POLICY_HARD_TRIGGERED\n* `on_eval_result_ingested` - EVAL_COMPLETED\n* `custom_event` - CUSTOM_EVENT\n* `eval_only` - EVAL_ONLY\n* `scheduled` - SCHEDULED","title":"WorkflowUpdateTriggerEventType"},"WorkflowUpdate":{"type":"object","properties":{"id":{"type":"string"},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowUpdateTasksItems"}},"project":{"type":["string","null"]},"workflow_id":{"type":"string","description":"Logical workflow family key shared across versions"},"version":{"type":"integer","default":1},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"unique_organization_id":{"type":"string"},"type":{"$ref":"#/components/schemas/WorkflowVersionTypeEnum","description":"Kind of workflow: automation, monitor, or evaluator\n\n* `automations` - Automation\n* `monitors` - Monitor\n* `evaluators` - Evaluator\n* `reports` - Report\n* `exports` - Export\n* `ingests` - Ingest"},"trigger_event_type":{"$ref":"#/components/schemas/WorkflowUpdateTriggerEventType","description":"Event type that triggers this workflow when used as an event responder\n\n* `request_log` - LOG_INGESTED\n* `trace_completed` - TRACE_COMPLETED\n* `customer_budget_limit_reached` - BUDGET_EXCEEDED\n* `credit_low_balance_threshold_reached` - CREDIT_LOW\n* `spend_cap_warning_threshold_reached` - SPEND_CAP_WARNING\n* `limit_policy_soft_triggered` - LIMIT_POLICY_SOFT_TRIGGERED\n* `limit_policy_hard_triggered` - LIMIT_POLICY_HARD_TRIGGERED\n* `on_eval_result_ingested` - EVAL_COMPLETED\n* `custom_event` - CUSTOM_EVENT\n* `eval_only` - EVAL_ONLY\n* `scheduled` - SCHEDULED"},"schedule_cron":{"type":["string","null"],"description":"UTC cron schedule (5-field). Populated when trigger_event_type='scheduled'."},"has_async_steps":{"type":"boolean"},"is_enabled":{"type":"boolean","description":"Only committed (is_read_only=True) versions may be enabled. At most one version per workflow family should be enabled at a time."},"is_starred":{"type":"boolean"},"is_read_only":{"type":"boolean","description":"True for committed versions; only the latest version is editable"},"resource_ids":{"type":"array","items":{"type":"string"},"description":"All resource IDs referenced in workflow (for reverse lookup)"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":["integer","null"]}},"required":["id","project","unique_organization_id","is_enabled","is_read_only","created_at","updated_at"],"description":"Validate workflow task structure on create/update via validate_workflow_structure().","title":"WorkflowUpdate"},"WorkflowCommitRequest":{"type":"object","properties":{"description":{"type":"string","description":"Commit message stamped on the newly committed version."}},"description":"Request body for POST /api/workflows/{id}/commits/.","title":"WorkflowCommitRequest"},"WorkflowCommitConflictError":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"],"title":"WorkflowCommitConflictError"},"WorkflowDeployRequestRequest":{"type":"object","properties":{"version":{"type":"integer","description":"Version number to deploy. If omitted, deploys the latest committed version."}},"title":"WorkflowDeployRequestRequest"},"WorkflowDeployResponse":{"type":"object","properties":{"id":{"type":"string"},"workflow_id":{"type":"string","description":"Logical workflow family key shared across versions"},"version":{"type":"integer"},"is_enabled":{"type":"boolean","description":"Only committed (is_read_only=True) versions may be enabled. At most one version per workflow family should be enabled at a time."},"is_read_only":{"type":"boolean","description":"True for committed versions; only the latest version is editable"}},"required":["id","workflow_id","version","is_enabled","is_read_only"],"title":"WorkflowDeployResponse"},"WorkflowValidationResponseStatusEnum":{"type":"string","enum":["success","validation_error"],"description":"* `success` - success\n* `validation_error` - validation_error","title":"WorkflowValidationResponseStatusEnum"},"ValidationDetail":{"type":"object","properties":{"is_valid":{"type":"boolean"},"error":{"type":["string","null"]}},"required":["is_valid","error"],"title":"ValidationDetail"},"TaskValidationResultStatusEnum":{"type":"string","enum":["passed","failed","skipped"],"description":"* `passed` - passed\n* `failed` - failed\n* `skipped` - skipped","title":"TaskValidationResultStatusEnum"},"TaskValidationResult":{"type":"object","properties":{"task_id":{"type":"string"},"task_type":{"type":"string"},"status":{"$ref":"#/components/schemas/TaskValidationResultStatusEnum"},"message":{"type":"string"}},"required":["task_id","task_type","status","message"],"title":"TaskValidationResult"},"WorkflowValidationResponse":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/WorkflowValidationResponseStatusEnum"},"validation":{"$ref":"#/components/schemas/ValidationDetail"},"task_results":{"type":"array","items":{"$ref":"#/components/schemas/TaskValidationResult"}},"is_all_passed":{"type":"boolean"}},"required":["status","validation","task_results","is_all_passed"],"title":"WorkflowValidationResponse"},"PaginatedAutomationConditionListListFiltersData":{"type":"object","properties":{},"title":"PaginatedAutomationConditionListListFiltersData"},"AutomationConditionListConditionPolicyOperator":{"type":"string","enum":["","=","==","eq","equals","in","not","contains","icontains","startswith","endswith","gt","gte","lt","lte","isnull","regex","ilike","trigram_word_similar","full_text_search","empty","notEmpty","not_empty"],"description":"The comparison operator","title":"AutomationConditionListConditionPolicyOperator"},"AutomationConditionListConditionPolicyConnector":{"type":"string","enum":["AND","OR"],"default":"AND","description":"How to connect this rule with the next one","title":"AutomationConditionListConditionPolicyConnector"},"AutomationConditionListConditionPolicyValueOneOf0Items":{"oneOf":[{"type":"string"},{"type":"integer"},{"type":"number","format":"double"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"integer"}},{"type":"array","items":{"type":"number","format":"double"}},{"type":"array","items":{"type":"boolean"}}],"title":"AutomationConditionListConditionPolicyValueOneOf0Items"},"AutomationConditionListConditionPolicyValue0":{"type":"array","items":{"$ref":"#/components/schemas/AutomationConditionListConditionPolicyValueOneOf0Items"},"title":"AutomationConditionListConditionPolicyValue0"},"AutomationConditionListConditionPolicyValue":{"oneOf":[{"$ref":"#/components/schemas/AutomationConditionListConditionPolicyValue0"},{"type":"string"},{"type":"integer"},{"type":"number","format":"double"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"integer"}},{"type":"array","items":{"type":"number","format":"double"}},{"type":"array","items":{"type":"boolean"}}],"description":"The value to compare against","title":"AutomationConditionListConditionPolicyValue"},"AutomationConditionListConditionPolicy":{"type":"object","properties":{"operator":{"$ref":"#/components/schemas/AutomationConditionListConditionPolicyOperator","description":"The comparison operator"},"connector":{"oneOf":[{"$ref":"#/components/schemas/AutomationConditionListConditionPolicyConnector"},{"type":"null"}],"description":"How to connect this rule with the next one"},"value":{"$ref":"#/components/schemas/AutomationConditionListConditionPolicyValue","description":"The value to compare against"}},"required":["operator","value"],"description":"Base mixin for common filter/condition functionality (Pydantic version).\nThis provides the core fields that both filters and conditions share.\nUse this version for Pydantic model-based type definitions.","title":"AutomationConditionListConditionPolicy"},"AutomationConditionList":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"Human-readable name for the condition"},"unique_organization_id":{"type":"string","description":"Organization identifier"},"condition_policy":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AutomationConditionListConditionPolicy"}},"time_step_minutes":{"type":["integer","null"],"description":"Time window in minutes for aggregation type conditions"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","unique_organization_id","condition_policy","created_at","updated_at"],"description":"Serializer for listing automation conditions with summarized information","title":"AutomationConditionList"},"PaginatedAutomationConditionListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedAutomationConditionListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/AutomationConditionList"}}},"required":["count","results"],"title":"PaginatedAutomationConditionListList"},"AutomationConditionCreateRequest":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"Human-readable name for the condition"},"description":{"type":"string","description":"Description of what this condition does"},"condition_policy":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Complex condition rules and logic stored as JSON"},"filter_set_id":{"type":["string","null"],"description":"Filter set identifier for log filtering"},"time_step_minutes":{"type":["integer","null"],"description":"Time window in minutes for aggregation type conditions"},"sampling_rate":{"type":["number","null"],"format":"double","description":"Sampling rate for single log conditions (0.0 to 1.0)"},"updated_by":{"type":["integer","null"]}},"required":["name","condition_policy"],"description":"Serializer for creating new automation conditions","title":"AutomationConditionCreateRequest"},"AutomationConditionCreate":{"type":"object","properties":{"id":{"type":"string"},"unique_organization_id":{"type":"string","description":"Organization identifier"},"name":{"type":"string","description":"Human-readable name for the condition"},"description":{"type":"string","description":"Description of what this condition does"},"condition_policy":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Complex condition rules and logic stored as JSON"},"filter_set_id":{"type":["string","null"],"description":"Filter set identifier for log filtering"},"time_step_minutes":{"type":["integer","null"],"description":"Time window in minutes for aggregation type conditions"},"sampling_rate":{"type":["number","null"],"format":"double","description":"Sampling rate for single log conditions (0.0 to 1.0)"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":["integer","null"]}},"required":["unique_organization_id","name","condition_policy","created_at","updated_at"],"description":"Serializer for creating new automation conditions","title":"AutomationConditionCreate"},"AutomationConditionListRequest":{"type":"object","properties":{"name":{"type":"string","description":"Human-readable name for the condition"},"unique_organization_id":{"type":"string","description":"Organization identifier"},"time_step_minutes":{"type":["integer","null"],"description":"Time window in minutes for aggregation type conditions"}},"required":["name","unique_organization_id"],"description":"Serializer for listing automation conditions with summarized information","title":"AutomationConditionListRequest"},"PatchedAutomationConditionListRequest":{"type":"object","properties":{"name":{"type":"string","description":"Human-readable name for the condition"},"unique_organization_id":{"type":"string","description":"Organization identifier"},"time_step_minutes":{"type":["integer","null"],"description":"Time window in minutes for aggregation type conditions"}},"description":"Serializer for listing automation conditions with summarized information","title":"PatchedAutomationConditionListRequest"},"AutomationConditionDetailConditionPolicyOperator":{"type":"string","enum":["","=","==","eq","equals","in","not","contains","icontains","startswith","endswith","gt","gte","lt","lte","isnull","regex","ilike","trigram_word_similar","full_text_search","empty","notEmpty","not_empty"],"description":"The comparison operator","title":"AutomationConditionDetailConditionPolicyOperator"},"AutomationConditionDetailConditionPolicyConnector":{"type":"string","enum":["AND","OR"],"default":"AND","description":"How to connect this rule with the next one","title":"AutomationConditionDetailConditionPolicyConnector"},"AutomationConditionDetailConditionPolicyValueOneOf0Items":{"oneOf":[{"type":"string"},{"type":"integer"},{"type":"number","format":"double"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"integer"}},{"type":"array","items":{"type":"number","format":"double"}},{"type":"array","items":{"type":"boolean"}}],"title":"AutomationConditionDetailConditionPolicyValueOneOf0Items"},"AutomationConditionDetailConditionPolicyValue0":{"type":"array","items":{"$ref":"#/components/schemas/AutomationConditionDetailConditionPolicyValueOneOf0Items"},"title":"AutomationConditionDetailConditionPolicyValue0"},"AutomationConditionDetailConditionPolicyValue":{"oneOf":[{"$ref":"#/components/schemas/AutomationConditionDetailConditionPolicyValue0"},{"type":"string"},{"type":"integer"},{"type":"number","format":"double"},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"integer"}},{"type":"array","items":{"type":"number","format":"double"}},{"type":"array","items":{"type":"boolean"}}],"description":"The value to compare against","title":"AutomationConditionDetailConditionPolicyValue"},"AutomationConditionDetailConditionPolicy":{"type":"object","properties":{"operator":{"$ref":"#/components/schemas/AutomationConditionDetailConditionPolicyOperator","description":"The comparison operator"},"connector":{"oneOf":[{"$ref":"#/components/schemas/AutomationConditionDetailConditionPolicyConnector"},{"type":"null"}],"description":"How to connect this rule with the next one"},"value":{"$ref":"#/components/schemas/AutomationConditionDetailConditionPolicyValue","description":"The value to compare against"}},"required":["operator","value"],"description":"Base mixin for common filter/condition functionality (Pydantic version).\nThis provides the core fields that both filters and conditions share.\nUse this version for Pydantic model-based type definitions.","title":"AutomationConditionDetailConditionPolicy"},"AutomationConditionDetail":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"Human-readable name for the condition"},"description":{"type":"string","description":"Description of what this condition does"},"condition_policy":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AutomationConditionDetailConditionPolicy"}},"unique_organization_id":{"type":"string","description":"Organization identifier"},"filter_set_id":{"type":["string","null"],"description":"Filter set identifier for log filtering"},"sampling_rate":{"type":["number","null"],"format":"double","description":"Sampling rate for single log conditions (0.0 to 1.0)"},"time_step_minutes":{"type":["integer","null"],"description":"Time window in minutes for aggregation type conditions"},"updated_by":{"$ref":"#/components/schemas/Editor"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","condition_policy","unique_organization_id","updated_by","created_at","updated_at"],"description":"Serializer for retrieving detailed automation condition information","title":"AutomationConditionDetail"},"AutomationConditionDetailRequest":{"type":"object","properties":{"name":{"type":"string","description":"Human-readable name for the condition"},"description":{"type":"string","description":"Description of what this condition does"},"unique_organization_id":{"type":"string","description":"Organization identifier"},"filter_set_id":{"type":["string","null"],"description":"Filter set identifier for log filtering"},"sampling_rate":{"type":["number","null"],"format":"double","description":"Sampling rate for single log conditions (0.0 to 1.0)"},"time_step_minutes":{"type":["integer","null"],"description":"Time window in minutes for aggregation type conditions"}},"required":["name","unique_organization_id"],"description":"Serializer for retrieving detailed automation condition information","title":"AutomationConditionDetailRequest"},"AutomationConditionUpdateRequest":{"type":"object","properties":{"id":{"type":"string"},"unique_organization_id":{"type":"string","description":"Organization identifier"},"name":{"type":"string","description":"Human-readable name for the condition"},"description":{"type":"string","description":"Description of what this condition does"},"condition_policy":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Complex condition rules and logic stored as JSON"},"filter_set_id":{"type":["string","null"],"description":"Filter set identifier for log filtering"},"time_step_minutes":{"type":["integer","null"],"description":"Time window in minutes for aggregation type conditions"},"sampling_rate":{"type":["number","null"],"format":"double","description":"Sampling rate for single log conditions (0.0 to 1.0)"},"updated_by":{"type":["integer","null"]}},"required":["unique_organization_id","name","condition_policy"],"description":"Serializer for updating existing automation conditions","title":"AutomationConditionUpdateRequest"},"AutomationConditionUpdate":{"type":"object","properties":{"id":{"type":"string"},"unique_organization_id":{"type":"string","description":"Organization identifier"},"name":{"type":"string","description":"Human-readable name for the condition"},"description":{"type":"string","description":"Description of what this condition does"},"condition_policy":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Complex condition rules and logic stored as JSON"},"filter_set_id":{"type":["string","null"],"description":"Filter set identifier for log filtering"},"time_step_minutes":{"type":["integer","null"],"description":"Time window in minutes for aggregation type conditions"},"sampling_rate":{"type":["number","null"],"format":"double","description":"Sampling rate for single log conditions (0.0 to 1.0)"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"updated_by":{"type":["integer","null"]}},"required":["unique_organization_id","name","condition_policy","created_at","updated_at"],"description":"Serializer for updating existing automation conditions","title":"AutomationConditionUpdate"},"PatchedAutomationConditionUpdateRequest":{"type":"object","properties":{"id":{"type":"string"},"unique_organization_id":{"type":"string","description":"Organization identifier"},"name":{"type":"string","description":"Human-readable name for the condition"},"description":{"type":"string","description":"Description of what this condition does"},"condition_policy":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Complex condition rules and logic stored as JSON"},"filter_set_id":{"type":["string","null"],"description":"Filter set identifier for log filtering"},"time_step_minutes":{"type":["integer","null"],"description":"Time window in minutes for aggregation type conditions"},"sampling_rate":{"type":["number","null"],"format":"double","description":"Sampling rate for single log conditions (0.0 to 1.0)"},"updated_by":{"type":["integer","null"]}},"description":"Serializer for updating existing automation conditions","title":"PatchedAutomationConditionUpdateRequest"},"Workflows_api_workflows_summary_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Workflows_api_workflows_summary_retrieve_Response_200"},"WorkflowSummaryResponse":{"type":"object","properties":{"total_count":{"type":"integer"}},"required":["total_count"],"description":"Response body for /api/workflows/summary/ — total matching workflows.","title":"WorkflowSummaryResponse"},"Workflows_api_workflows_summary_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Workflows_api_workflows_summary_update_Response_200"},"Workflows_api_workflows_summary_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Workflows_api_workflows_summary_partial_update_Response_200"},"DatasetTypeEnum":{"type":"string","enum":["llm","human","dataset","sampling","reference"],"description":"* `llm` - Llm\n* `human` - Human\n* `dataset` - Dataset\n* `sampling` - Sampling\n* `reference` - Reference","title":"DatasetTypeEnum"},"GranularityEnum":{"type":"string","enum":["logs","traces","threads"],"description":"* `logs` - Logs\n* `traces` - Traces\n* `threads` - Threads","title":"GranularityEnum"},"DatasetCreateRequest":{"type":"object","properties":{"organization":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/DatasetTypeEnum"},"granularity":{"$ref":"#/components/schemas/GranularityEnum","description":"Eval unit for this dataset: 'logs' (one span per row) or 'traces' (one root row per trace). Chosen at creation and immutable.\n\n* `logs` - Logs\n* `traces` - Traces\n* `threads` - Threads"},"initial_log_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"start_time":{"type":"string","format":"date-time"},"end_time":{"type":"string","format":"date-time"},"sampling":{"type":"integer","default":100,"description":"Percent of logs to add (1-100)."},"is_empty":{"type":"boolean","default":false,"description":"Create empty dataset without adding logs."},"source_dataset_id":{"type":"string","default":"","description":"ID of dataset to duplicate. Copies all logs asynchronously."}},"required":["organization","name"],"title":"DatasetCreateRequest"},"DatasetStatusEnum":{"type":"string","enum":["initializing","ready","failed","loading"],"description":"* `initializing` - Initializing\n* `ready` - Ready\n* `failed` - Failed\n* `loading` - Loading","title":"DatasetStatusEnum"},"DatasetCreate":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"integer"},"updated_by":{"$ref":"#/components/schemas/Editor"},"name":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/DatasetTypeEnum"},"granularity":{"$ref":"#/components/schemas/GranularityEnum","description":"Eval unit for this dataset: 'logs' (one span per row) or 'traces' (one root row per trace). Chosen at creation and immutable.\n\n* `logs` - Logs\n* `traces` - Traces\n* `threads` - Threads"},"status":{"$ref":"#/components/schemas/DatasetStatusEnum"},"initial_log_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"log_count":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","organization","updated_by","name","status","log_count","created_at","updated_at"],"title":"DatasetCreate"},"DatasetFilterRequestRequest":{"type":"object","properties":{"filters":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Filter parameters keyed by metric name."}},"description":"Shared request body for all dataset POST-for-filtering endpoints.","title":"DatasetFilterRequestRequest"},"PaginatedDatasetListListFiltersData":{"type":"object","properties":{},"title":"PaginatedDatasetListListFiltersData"},"DatasetLLMRunStatusEnum":{"type":"string","enum":["draft","pending","paused","running","waiting_for_annotations","completed","failed"],"description":"* `draft` - Draft\n* `pending` - Pending\n* `paused` - Paused\n* `running` - Running\n* `waiting_for_annotations` - Waiting For Annotations\n* `completed` - Completed\n* `failed` - Failed","title":"DatasetLLMRunStatusEnum"},"DatasetList":{"type":"object","properties":{"id":{"type":"string"},"organization_id":{"type":"integer"},"updated_by":{"$ref":"#/components/schemas/Editor"},"log_count":{"type":"integer"},"name":{"type":"string"},"log_ids":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/DatasetTypeEnum"},"status":{"$ref":"#/components/schemas/DatasetStatusEnum"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_annotation_count":{"type":"integer"},"running_status":{"$ref":"#/components/schemas/DatasetLLMRunStatusEnum"},"running_progress":{"type":"number","format":"double"},"starred":{"type":"boolean"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"}},"granularity":{"$ref":"#/components/schemas/GranularityEnum","description":"Eval unit for this dataset: 'logs' (one span per row) or 'traces' (one root row per trace). Chosen at creation and immutable.\n\n* `logs` - Logs\n* `traces` - Traces\n* `threads` - Threads"}},"required":["organization_id","updated_by","name","created_at","updated_at","completed_annotation_count","tags","granularity"],"title":"DatasetList"},"PaginatedDatasetListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedDatasetListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/DatasetList"}}},"required":["count","results"],"title":"PaginatedDatasetListList"},"DatasetDetail":{"type":"object","properties":{"id":{"type":"string"},"completed_annotation_count":{"type":"integer"},"updated_by":{"$ref":"#/components/schemas/Editor"},"initial_log_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"}},"project":{"type":["string","null"]},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/DatasetTypeEnum"},"granularity":{"$ref":"#/components/schemas/GranularityEnum","description":"Eval unit for this dataset: 'logs' (one span per row) or 'traces' (one root row per trace). Chosen at creation and immutable.\n\n* `logs` - Logs\n* `traces` - Traces\n* `threads` - Threads"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"running_progress":{"type":"number","format":"double"},"running_status":{"$ref":"#/components/schemas/DatasetLLMRunStatusEnum"},"running_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"unique_organization_ids":{"type":"array","items":{"type":"string"}},"timestamps":{"type":"array","items":{"type":"string","format":"date-time"}},"log_count":{"type":"integer"},"ingest_workflow_id":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/DatasetStatusEnum"},"starred":{"type":"boolean"},"organization":{"type":"integer"},"evaluator":{"type":["string","null"]}},"required":["id","completed_annotation_count","updated_by","tags","name","granularity","created_at","updated_at","log_count","status","organization"],"title":"DatasetDetail"},"PatchedDatasetDetailRequest":{"type":"object","properties":{"initial_log_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"project":{"type":["string","null"]},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/DatasetTypeEnum"},"description":{"type":"string"},"running_progress":{"type":"number","format":"double"},"running_status":{"$ref":"#/components/schemas/DatasetLLMRunStatusEnum"},"running_at":{"type":["string","null"],"format":"date-time"},"unique_organization_ids":{"type":"array","items":{"type":"string"}},"timestamps":{"type":"array","items":{"type":"string","format":"date-time"}},"ingest_workflow_id":{"type":["string","null"]},"starred":{"type":"boolean"},"organization":{"type":"integer"},"evaluator":{"type":["string","null"]}},"title":"PatchedDatasetDetailRequest"},"DatasetLogCreateRequestRequest":{"type":"object","properties":{"input":{"description":"Any type"},"output":{"description":"Any type"},"metadata":{"description":"Any type"},"metrics":{"description":"Any type"}},"required":["input"],"title":"DatasetLogCreateRequestRequest"},"DatasetLogCreateResponse":{"type":"object","properties":{"message":{"type":"string"},"unique_id":{"type":"string"}},"required":["message","unique_id"],"title":"DatasetLogCreateResponse"},"PaginatedChDatasetLogListListFiltersData":{"type":"object","properties":{},"title":"PaginatedChDatasetLogListListFiltersData"},"CHDatasetLogList":{"type":"object","properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"organization_key_id":{"type":"string"},"environment":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"start_time":{"type":"string","format":"date-time"},"prompt_id":{"type":"string"},"prompt_name":{"type":"string"},"trace_unique_id":{"type":"string"},"customer_identifier":{"type":"string"},"customer_name":{"type":"string"},"customer_email":{"type":"string"},"thread_identifier":{"type":"string"},"custom_identifier":{"type":"string"},"unique_organization_id":{"type":"string"},"log_type":{"type":"string"},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_request_tokens":{"type":"integer"},"prompt_cache_hit_tokens":{"type":"integer"},"prompt_cache_creation_tokens":{"type":"integer"},"reasoning_tokens":{"type":"integer"},"cost":{"type":"number","format":"double"},"model":{"type":"string"},"latency":{"type":"number","format":"double"},"tokens_per_second":{"type":"number","format":"double"},"time_to_first_token":{"type":"number","format":"double"},"routing_time":{"type":"number","format":"double"},"status_code":{"type":"integer"},"status":{"type":"string"},"blurred":{"type":"boolean"},"metadata":{"type":"string"},"scores":{"type":"string"},"storage_object_key":{"type":"string"},"updated_storage_object_key":{"type":"string"},"system":{"type":"string"},"prompt":{"type":"string"},"completion":{"type":"string"},"span_workflow_name":{"type":"string"},"span_name":{"type":"string"},"positive_feedback":{"type":"string"},"note":{"type":"string"},"unique_id":{"type":"string"},"dataset_id":{"type":"string"},"annotation_status":{"type":"string"},"annotation_completed_by":{"description":"Any type"},"updated_at":{"type":"string","format":"date-time"},"updated_by_email":{"type":"string"},"input":{"type":"string"},"expected_output":{"type":"string"},"output":{"type":"string"}},"required":["id","organization_id","organization_key_id","environment","prompt_name","trace_unique_id","customer_identifier","thread_identifier","unique_organization_id","log_type","metadata","scores","system","prompt","completion","positive_feedback","unique_id"],"description":"Mixin to handle underscore-prefixed field mapping in serializers.\n\nThis is used when Django annotations require underscore prefixes to avoid\nname conflicts with original column names, but we want to expose the\nclean field names in the API response.\n\nUsage:\n    1. Annotate queryset with underscore prefixes: _field_name\n    2. This mixin automatically maps _field_name -> field_name in to_internal_value\n    3. The serializer can then use the clean field names normally","title":"CHDatasetLogList"},"PaginatedCHDatasetLogListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedChDatasetLogListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/CHDatasetLogList"}}},"required":["count","results"],"title":"PaginatedCHDatasetLogListList"},"CHDatasetLog":{"type":"object","properties":{"id":{"type":"string"},"input_words":{"type":"string"},"output_words":{"type":"string"},"input_chars":{"type":"string"},"output_chars":{"type":"string"},"organization_key_name":{"type":"string"},"organization_id":{"type":"string"},"unique_organization_id":{"type":"string"},"organization_name":{"type":"string"},"error_message":{"type":"string"},"warnings":{"type":"string"},"annotation_status":{"type":"string"},"keywordsai_params":{"type":"string"},"full_request":{"type":"string"},"full_response":{"type":"string"},"metadata":{"type":"string"},"tools":{"type":"string"},"tool_calls":{"type":"string"},"prompt_messages":{"type":"string"},"completion_message":{"type":"string"},"completion_messages":{"description":"Any type"},"input":{"type":"string"},"output":{"type":"string"},"variables":{"description":"Any type"},"temperature":{"type":"number","format":"double"},"max_tokens":{"type":"integer"},"top_p":{"type":"number","format":"double"},"frequency_penalty":{"type":"number","format":"double"},"presence_penalty":{"type":"number","format":"double"},"stop":{"type":"string"},"response_format":{"description":"Any type"},"matched_meter_ids":{"type":"array","items":{"description":"Any type"}},"unit_prices":{"type":"object","additionalProperties":{"description":"Any type"}},"component_costs":{"type":"object","additionalProperties":{"description":"Any type"}},"dataset_id":{"type":"string"},"original_copy_unique_id":{"type":"string"},"comparison_key":{"type":"string"},"expected_output":{"type":"string"},"custom_identifier":{"type":"string"},"group_identifier":{"type":"string"},"blurred":{"type":"boolean"},"start_time":{"type":"string","format":"date-time"},"timestamp":{"type":"string","format":"date-time"},"load_balance_group_id":{"type":"string"},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"prompt_cache_hit_tokens":{"type":"integer"},"prompt_cache_creation_tokens":{"type":"integer"},"reasoning_tokens":{"type":"integer"},"total_request_tokens":{"type":"integer"},"is_token_count_estimated":{"type":"integer"},"cost":{"type":"number","format":"double"},"llm_gateway_markup_rate":{"type":"number","format":"double"},"service_tier":{"type":"string"},"model_discount":{"type":"number","format":"double"},"pricing_tier":{"type":"string"},"audio_input_file":{"type":"string"},"audio_output_file":{"type":"string"},"organization_key_id":{"type":"string"},"user_email":{"type":"string"},"model":{"type":"string"},"provider_id":{"type":"string"},"category":{"type":"string"},"properties":{"type":"string"},"cache_bit":{"type":"integer"},"cache_miss_bit":{"type":"integer"},"cache_key":{"type":"string"},"latency":{"type":"number","format":"double"},"tokens_per_second":{"type":"number","format":"double"},"time_to_first_token":{"type":"number","format":"double"},"routing_time":{"type":"number","format":"double"},"status":{"type":"string"},"has_tool_calls":{"type":"boolean"},"status_code":{"type":"integer"},"log_method":{"type":"string"},"log_type":{"type":"string"},"environment":{"type":"string"},"stream":{"type":"boolean"},"evaluation_identifier":{"type":"string"},"customer_identifier":{"type":"string"},"customer_email":{"type":"string"},"customer_name":{"type":"string"},"customer_user_unique_id":{"type":"string"},"used_custom_credential":{"type":"boolean"},"deployment_name":{"type":"string"},"deployment_id":{"type":"string"},"prompt_name":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"system_text":{"type":"string"},"prompt_text":{"type":"string"},"completion_text":{"type":"string"},"prompt_message_count":{"type":"integer"},"completion_message_count":{"type":"integer"},"trace_unique_id":{"type":"string"},"span_unique_id":{"type":"string"},"span_name":{"type":"string"},"span_parent_id":{"type":"string"},"span_workflow_name":{"type":"string"},"session_identifier":{"type":"string"},"span_links":{"type":"string"},"trace_group_identifier":{"type":"string"},"thread_identifier":{"type":"string"},"thread_unique_id":{"type":"string"},"storage_object_key":{"type":"string"},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":"string","format":"date-time"},"unique_id":{"type":"string"},"respan_gateway_request_id":{"type":"string"},"full_text":{"type":"string"}},"required":["id","input_words","output_words","input_chars","output_chars","organization_key_name","organization_id","warnings","annotation_status","keywordsai_params","full_request","full_response","metadata","tools","tool_calls","prompt_messages","completion_message"],"description":"Serializer for CHDatasetLog that's backward compatible with EvalSetLogListSerializer.\nIncludes all the same fields as CHLogV2ListSerializer plus dataset-specific fields.","title":"CHDatasetLog"},"PatchedCHDatasetLogRequest":{"type":"object","properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"unique_organization_id":{"type":"string"},"organization_name":{"type":"string"},"error_message":{"type":"string"},"completion_messages":{"description":"Any type"},"input":{"type":"string"},"output":{"type":"string"},"variables":{"description":"Any type"},"temperature":{"type":"number","format":"double"},"max_tokens":{"type":"integer"},"top_p":{"type":"number","format":"double"},"frequency_penalty":{"type":"number","format":"double"},"presence_penalty":{"type":"number","format":"double"},"stop":{"type":"string"},"response_format":{"description":"Any type"},"matched_meter_ids":{"type":"array","items":{"description":"Any type"}},"unit_prices":{"type":"object","additionalProperties":{"description":"Any type"}},"component_costs":{"type":"object","additionalProperties":{"description":"Any type"}},"dataset_id":{"type":"string"},"original_copy_unique_id":{"type":"string"},"comparison_key":{"type":"string"},"expected_output":{"type":"string"},"custom_identifier":{"type":"string"},"group_identifier":{"type":"string"},"blurred":{"type":"boolean"},"start_time":{"type":"string","format":"date-time"},"timestamp":{"type":"string","format":"date-time"},"load_balance_group_id":{"type":"string"},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"prompt_cache_hit_tokens":{"type":"integer"},"prompt_cache_creation_tokens":{"type":"integer"},"reasoning_tokens":{"type":"integer"},"total_request_tokens":{"type":"integer"},"is_token_count_estimated":{"type":"integer"},"cost":{"type":"number","format":"double"},"llm_gateway_markup_rate":{"type":"number","format":"double"},"service_tier":{"type":"string"},"model_discount":{"type":"number","format":"double"},"pricing_tier":{"type":"string"},"audio_input_file":{"type":"string"},"audio_output_file":{"type":"string"},"organization_key_id":{"type":"string"},"user_email":{"type":"string"},"model":{"type":"string"},"provider_id":{"type":"string"},"category":{"type":"string"},"properties":{"type":"string"},"cache_bit":{"type":"integer"},"cache_miss_bit":{"type":"integer"},"cache_key":{"type":"string"},"latency":{"type":"number","format":"double"},"tokens_per_second":{"type":"number","format":"double"},"time_to_first_token":{"type":"number","format":"double"},"routing_time":{"type":"number","format":"double"},"status":{"type":"string"},"has_tool_calls":{"type":"boolean"},"status_code":{"type":"integer"},"log_method":{"type":"string"},"log_type":{"type":"string"},"environment":{"type":"string"},"stream":{"type":"boolean"},"evaluation_identifier":{"type":"string"},"customer_identifier":{"type":"string"},"customer_email":{"type":"string"},"customer_name":{"type":"string"},"customer_user_unique_id":{"type":"string"},"used_custom_credential":{"type":"boolean"},"deployment_name":{"type":"string"},"deployment_id":{"type":"string"},"prompt_name":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"system_text":{"type":"string"},"prompt_text":{"type":"string"},"completion_text":{"type":"string"},"prompt_message_count":{"type":"integer"},"completion_message_count":{"type":"integer"},"trace_unique_id":{"type":"string"},"span_unique_id":{"type":"string"},"span_name":{"type":"string"},"span_parent_id":{"type":"string"},"span_workflow_name":{"type":"string"},"session_identifier":{"type":"string"},"span_links":{"type":"string"},"trace_group_identifier":{"type":"string"},"thread_identifier":{"type":"string"},"thread_unique_id":{"type":"string"},"storage_object_key":{"type":"string"},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":"string","format":"date-time"},"unique_id":{"type":"string"},"respan_gateway_request_id":{"type":"string"},"full_text":{"type":"string"}},"description":"Serializer for CHDatasetLog that's backward compatible with EvalSetLogListSerializer.\nIncludes all the same fields as CHLogV2ListSerializer plus dataset-specific fields.","title":"PatchedCHDatasetLogRequest"},"DatasetLogsBulkCreateRequestRequest":{"type":"object","properties":{"logs":{"type":"array","items":{"description":"Any type"}}},"required":["logs"],"title":"DatasetLogsBulkCreateRequestRequest"},"DatasetLogsBulkCreateResponse":{"type":"object","properties":{"success_count":{"type":"integer"},"error_count":{"type":"integer"},"errors":{"type":"array","items":{"description":"Any type"}}},"required":["success_count","error_count","errors"],"title":"DatasetLogsBulkCreateResponse"},"DatasetLogsBulkCreateBadRequest":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"],"title":"DatasetLogsBulkCreateBadRequest"},"DatasetLogsBulkCreateNotFound":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"],"title":"DatasetLogsBulkCreateNotFound"},"DatasetTaskTrackerRunEvaluationCreateRequest":{"type":"object","properties":{"dataset_id":{"type":"string"},"evaluator_slug":{"type":"string"},"unique_organization_id":{"type":"string"},"experiment_id":{"type":"string","default":""}},"required":["dataset_id","evaluator_slug","unique_organization_id"],"description":"Serializer for creating dataset evaluation tasks.","title":"DatasetTaskTrackerRunEvaluationCreateRequest"},"DatasetTaskTrackerRunEvaluationCreate":{"type":"object","properties":{"dataset_id":{"type":"string"},"evaluator_slug":{"type":"string"},"unique_organization_id":{"type":"string"},"experiment_id":{"type":"string","default":""}},"required":["dataset_id","evaluator_slug","unique_organization_id"],"description":"Serializer for creating dataset evaluation tasks.","title":"DatasetTaskTrackerRunEvaluationCreate"},"PaginatedPublicDatasetTaskTrackerRunEvalListListFiltersData":{"type":"object","properties":{},"title":"PaginatedPublicDatasetTaskTrackerRunEvalListListFiltersData"},"Status66cEnum":{"type":"string","enum":["pending","processing","paused","completed","failed","cancelled"],"description":"* `pending` - Pending\n* `processing` - Processing\n* `paused` - Paused\n* `completed` - Completed\n* `failed` - Failed\n* `cancelled` - Cancelled","title":"Status66cEnum"},"PublicDatasetTaskTrackerRunEvalList":{"type":"object","properties":{"task_id":{"type":"string"},"name":{"type":"string"},"dataset_id":{"type":"string"},"evaluator_slug":{"type":"string"},"status":{"$ref":"#/components/schemas/Status66cEnum"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"error_message":{"type":"string"},"evaluated_logs_count":{"type":"integer"},"score":{"type":"number","format":"double"}},"required":["task_id","name","dataset_id","evaluator_slug"],"description":"Serializer for listing dataset evaluation tasks.","title":"PublicDatasetTaskTrackerRunEvalList"},"PaginatedPublicDatasetTaskTrackerRunEvalListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedPublicDatasetTaskTrackerRunEvalListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/PublicDatasetTaskTrackerRunEvalList"}}},"required":["count","results"],"title":"PaginatedPublicDatasetTaskTrackerRunEvalListList"},"PaginatedDatasetTaskTrackerRunEvalListListFiltersData":{"type":"object","properties":{},"title":"PaginatedDatasetTaskTrackerRunEvalListListFiltersData"},"Type0cbEnum":{"type":"string","enum":["add_logs","remove_logs","run_logs","run_evals","run_experiment"],"description":"* `add_logs` - Add Logs\n* `remove_logs` - Remove Logs\n* `run_logs` - Run Logs\n* `run_evals` - Run Evals\n* `run_experiment` - Run Experiment","title":"Type0cbEnum"},"DatasetTaskTrackerRunEvalList":{"type":"object","properties":{"task_id":{"type":"string"},"name":{"type":"string"},"dataset_id":{"type":"string"},"type":{"$ref":"#/components/schemas/Type0cbEnum"},"status":{"$ref":"#/components/schemas/Status66cEnum"},"progress_percentage":{"type":"string"},"processed_count":{"type":"string"},"total_count":{"type":"string"},"evaluator_name":{"type":"string"},"evaluator_slug":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"error_message":{"type":"string"},"id":{"type":"string"},"result_count":{"type":"integer"},"primary_score_avg":{"type":"number","format":"double"},"run_at":{"type":"string","format":"date-time"},"evaluator_description":{"type":"string"},"evaluator_id":{"type":"string"}},"required":["task_id","name","dataset_id","progress_percentage","processed_count","total_count","evaluator_name","evaluator_slug","created_at","id","evaluator_description"],"description":"Serializer for listing dataset evaluation tasks.","title":"DatasetTaskTrackerRunEvalList"},"PaginatedDatasetTaskTrackerRunEvalListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedDatasetTaskTrackerRunEvalListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/DatasetTaskTrackerRunEvalList"}}},"required":["count","results"],"title":"PaginatedDatasetTaskTrackerRunEvalListList"},"PublicDatasetTaskTrackerRunEvalListRequest":{"type":"object","properties":{"task_id":{"type":"string"},"name":{"type":"string"},"dataset_id":{"type":"string"},"status":{"$ref":"#/components/schemas/Status66cEnum"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"error_message":{"type":"string"},"evaluated_logs_count":{"type":"integer"},"score":{"type":"number","format":"double"}},"required":["task_id","name","dataset_id"],"description":"Serializer for listing dataset evaluation tasks.","title":"PublicDatasetTaskTrackerRunEvalListRequest"},"DatasetLogStatusCreateStatusEnum":{"type":"string","enum":["pending","completed"],"description":"* `pending` - Pending\n* `completed` - Completed","title":"DatasetLogStatusCreateStatusEnum"},"DatasetLogStatusCreate":{"type":"object","properties":{"organization":{"type":["integer","null"]},"completed_by":{"type":["integer","null"]},"status":{"$ref":"#/components/schemas/DatasetLogStatusCreateStatusEnum"}},"title":"DatasetLogStatusCreate"},"DatasetLogStatusCreateRequest":{"type":"object","properties":{"organization":{"type":["integer","null"]},"completed_by":{"type":["integer","null"]},"status":{"$ref":"#/components/schemas/DatasetLogStatusCreateStatusEnum"}},"title":"DatasetLogStatusCreateRequest"},"CHDatasetLogRequest":{"type":"object","properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"unique_organization_id":{"type":"string"},"organization_name":{"type":"string"},"error_message":{"type":"string"},"completion_messages":{"description":"Any type"},"input":{"type":"string"},"output":{"type":"string"},"variables":{"description":"Any type"},"temperature":{"type":"number","format":"double"},"max_tokens":{"type":"integer"},"top_p":{"type":"number","format":"double"},"frequency_penalty":{"type":"number","format":"double"},"presence_penalty":{"type":"number","format":"double"},"stop":{"type":"string"},"response_format":{"description":"Any type"},"matched_meter_ids":{"type":"array","items":{"description":"Any type"}},"unit_prices":{"type":"object","additionalProperties":{"description":"Any type"}},"component_costs":{"type":"object","additionalProperties":{"description":"Any type"}},"dataset_id":{"type":"string"},"original_copy_unique_id":{"type":"string"},"comparison_key":{"type":"string"},"expected_output":{"type":"string"},"custom_identifier":{"type":"string"},"group_identifier":{"type":"string"},"blurred":{"type":"boolean"},"start_time":{"type":"string","format":"date-time"},"timestamp":{"type":"string","format":"date-time"},"load_balance_group_id":{"type":"string"},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"prompt_cache_hit_tokens":{"type":"integer"},"prompt_cache_creation_tokens":{"type":"integer"},"reasoning_tokens":{"type":"integer"},"total_request_tokens":{"type":"integer"},"is_token_count_estimated":{"type":"integer"},"cost":{"type":"number","format":"double"},"llm_gateway_markup_rate":{"type":"number","format":"double"},"service_tier":{"type":"string"},"model_discount":{"type":"number","format":"double"},"pricing_tier":{"type":"string"},"audio_input_file":{"type":"string"},"audio_output_file":{"type":"string"},"organization_key_id":{"type":"string"},"user_email":{"type":"string"},"model":{"type":"string"},"provider_id":{"type":"string"},"category":{"type":"string"},"properties":{"type":"string"},"cache_bit":{"type":"integer"},"cache_miss_bit":{"type":"integer"},"cache_key":{"type":"string"},"latency":{"type":"number","format":"double"},"tokens_per_second":{"type":"number","format":"double"},"time_to_first_token":{"type":"number","format":"double"},"routing_time":{"type":"number","format":"double"},"status":{"type":"string"},"has_tool_calls":{"type":"boolean"},"status_code":{"type":"integer"},"log_method":{"type":"string"},"log_type":{"type":"string"},"environment":{"type":"string"},"stream":{"type":"boolean"},"evaluation_identifier":{"type":"string"},"customer_identifier":{"type":"string"},"customer_email":{"type":"string"},"customer_name":{"type":"string"},"customer_user_unique_id":{"type":"string"},"used_custom_credential":{"type":"boolean"},"deployment_name":{"type":"string"},"deployment_id":{"type":"string"},"prompt_name":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"system_text":{"type":"string"},"prompt_text":{"type":"string"},"completion_text":{"type":"string"},"prompt_message_count":{"type":"integer"},"completion_message_count":{"type":"integer"},"trace_unique_id":{"type":"string"},"span_unique_id":{"type":"string"},"span_name":{"type":"string"},"span_parent_id":{"type":"string"},"span_workflow_name":{"type":"string"},"session_identifier":{"type":"string"},"span_links":{"type":"string"},"trace_group_identifier":{"type":"string"},"thread_identifier":{"type":"string"},"thread_unique_id":{"type":"string"},"storage_object_key":{"type":"string"},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":"string","format":"date-time"},"unique_id":{"type":"string"},"respan_gateway_request_id":{"type":"string"},"full_text":{"type":"string"}},"required":["id","organization_id"],"description":"Serializer for CHDatasetLog that's backward compatible with EvalSetLogListSerializer.\nIncludes all the same fields as CHLogV2ListSerializer plus dataset-specific fields.","title":"CHDatasetLogRequest"},"PaginatedChDatasetLogListFiltersData":{"type":"object","properties":{},"title":"PaginatedChDatasetLogListFiltersData"},"PaginatedCHDatasetLogList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedChDatasetLogListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/CHDatasetLog"}}},"required":["count","results"],"title":"PaginatedCHDatasetLogList"},"DatasetLogsImportRequestRequest":{"type":"object","properties":{"start_time":{"type":"string","format":"date-time"},"end_time":{"type":"string","format":"date-time"},"filters":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Filter parameters keyed by metric name."},"sampling_percentage":{"type":"integer","default":100,"description":"Percent of logs to import (1-100)."}},"required":["start_time","end_time"],"description":"POST /api/datasets/{dataset_id}/logs/import/ request body.","title":"DatasetLogsImportRequestRequest"},"DatasetLogsImportResponse":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"description":"Shared response for import/remove operations.","title":"DatasetLogsImportResponse"},"CHDatasetLogListRequest":{"type":"object","properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"organization_key_id":{"type":"string"},"environment":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"start_time":{"type":"string","format":"date-time"},"prompt_id":{"type":"string"},"prompt_name":{"type":"string"},"trace_unique_id":{"type":"string"},"customer_identifier":{"type":"string"},"customer_name":{"type":"string"},"customer_email":{"type":"string"},"thread_identifier":{"type":"string"},"custom_identifier":{"type":"string"},"unique_organization_id":{"type":"string"},"log_type":{"type":"string"},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_request_tokens":{"type":"integer"},"prompt_cache_hit_tokens":{"type":"integer"},"prompt_cache_creation_tokens":{"type":"integer"},"reasoning_tokens":{"type":"integer"},"cost":{"type":"number","format":"double"},"model":{"type":"string"},"latency":{"type":"number","format":"double"},"tokens_per_second":{"type":"number","format":"double"},"time_to_first_token":{"type":"number","format":"double"},"routing_time":{"type":"number","format":"double"},"status_code":{"type":"integer"},"status":{"type":"string"},"blurred":{"type":"boolean"},"storage_object_key":{"type":"string"},"updated_storage_object_key":{"type":"string"},"span_workflow_name":{"type":"string"},"span_name":{"type":"string"},"note":{"type":"string"},"unique_id":{"type":"string"},"dataset_id":{"type":"string"},"annotation_status":{"type":"string"},"annotation_completed_by":{"description":"Any type"},"updated_at":{"type":"string","format":"date-time"},"updated_by_email":{"type":"string"},"input":{"type":"string"},"expected_output":{"type":"string"},"output":{"type":"string"}},"required":["id","organization_id","organization_key_id","environment","prompt_name","trace_unique_id","customer_identifier","thread_identifier","unique_organization_id","log_type","unique_id"],"description":"Mixin to handle underscore-prefixed field mapping in serializers.\n\nThis is used when Django annotations require underscore prefixes to avoid\nname conflicts with original column names, but we want to expose the\nclean field names in the API response.\n\nUsage:\n    1. Annotate queryset with underscore prefixes: _field_name\n    2. This mixin automatically maps _field_name -> field_name in to_internal_value\n    3. The serializer can then use the clean field names normally","title":"CHDatasetLogListRequest"},"PatchedCHDatasetLogListRequest":{"type":"object","properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"organization_key_id":{"type":"string"},"environment":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"start_time":{"type":"string","format":"date-time"},"prompt_id":{"type":"string"},"prompt_name":{"type":"string"},"trace_unique_id":{"type":"string"},"customer_identifier":{"type":"string"},"customer_name":{"type":"string"},"customer_email":{"type":"string"},"thread_identifier":{"type":"string"},"custom_identifier":{"type":"string"},"unique_organization_id":{"type":"string"},"log_type":{"type":"string"},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_request_tokens":{"type":"integer"},"prompt_cache_hit_tokens":{"type":"integer"},"prompt_cache_creation_tokens":{"type":"integer"},"reasoning_tokens":{"type":"integer"},"cost":{"type":"number","format":"double"},"model":{"type":"string"},"latency":{"type":"number","format":"double"},"tokens_per_second":{"type":"number","format":"double"},"time_to_first_token":{"type":"number","format":"double"},"routing_time":{"type":"number","format":"double"},"status_code":{"type":"integer"},"status":{"type":"string"},"blurred":{"type":"boolean"},"storage_object_key":{"type":"string"},"updated_storage_object_key":{"type":"string"},"span_workflow_name":{"type":"string"},"span_name":{"type":"string"},"note":{"type":"string"},"unique_id":{"type":"string"},"dataset_id":{"type":"string"},"annotation_status":{"type":"string"},"annotation_completed_by":{"description":"Any type"},"updated_at":{"type":"string","format":"date-time"},"updated_by_email":{"type":"string"},"input":{"type":"string"},"expected_output":{"type":"string"},"output":{"type":"string"}},"description":"Mixin to handle underscore-prefixed field mapping in serializers.\n\nThis is used when Django annotations require underscore prefixes to avoid\nname conflicts with original column names, but we want to expose the\nclean field names in the API response.\n\nUsage:\n    1. Annotate queryset with underscore prefixes: _field_name\n    2. This mixin automatically maps _field_name -> field_name in to_internal_value\n    3. The serializer can then use the clean field names normally","title":"PatchedCHDatasetLogListRequest"},"DatasetLogsSummaryResponse":{"type":"object","properties":{"number_of_requests":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"total_tokens":{"type":"integer"},"total_prompt_tokens":{"type":"integer"},"total_completion_tokens":{"type":"integer"},"avg_latency":{"type":"number","format":"double"},"avg_tps":{"type":"number","format":"double"},"avg_ttft":{"type":"number","format":"double"},"has_output":{"type":"boolean"},"scores":{"type":"object","additionalProperties":{"description":"Any type"}}},"required":["number_of_requests","total_cost","total_tokens","total_prompt_tokens","total_completion_tokens","avg_latency","avg_tps","avg_ttft","has_output","scores"],"title":"DatasetLogsSummaryResponse"},"Datasets_api_datasets_logs_summary_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Datasets_api_datasets_logs_summary_update_Response_200"},"Datasets_api_datasets_logs_summary_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Datasets_api_datasets_logs_summary_partial_update_Response_200"},"DatasetLogPresenceResponse":{"type":"object","properties":{"presence":{"type":"object","additionalProperties":{"type":"array","items":{"description":"Any type"}}}},"required":["presence"],"title":"DatasetLogPresenceResponse"},"DatasetDetailRequest":{"type":"object","properties":{"initial_log_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"project":{"type":["string","null"]},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/DatasetTypeEnum"},"description":{"type":"string"},"running_progress":{"type":"number","format":"double"},"running_status":{"$ref":"#/components/schemas/DatasetLLMRunStatusEnum"},"running_at":{"type":["string","null"],"format":"date-time"},"unique_organization_ids":{"type":"array","items":{"type":"string"}},"timestamps":{"type":"array","items":{"type":"string","format":"date-time"}},"ingest_workflow_id":{"type":["string","null"]},"starred":{"type":"boolean"},"organization":{"type":"integer"},"evaluator":{"type":["string","null"]}},"required":["name","organization"],"title":"DatasetDetailRequest"},"DatasetListRequest":{"type":"object","properties":{"id":{"type":"string"},"log_count":{"type":"integer"},"name":{"type":"string"},"log_ids":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/DatasetTypeEnum"},"status":{"$ref":"#/components/schemas/DatasetStatusEnum"},"running_status":{"$ref":"#/components/schemas/DatasetLLMRunStatusEnum"},"running_progress":{"type":"number","format":"double"},"starred":{"type":"boolean"}},"required":["name"],"title":"DatasetListRequest"},"PatchedDatasetListRequest":{"type":"object","properties":{"id":{"type":"string"},"log_count":{"type":"integer"},"name":{"type":"string"},"log_ids":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/DatasetTypeEnum"},"status":{"$ref":"#/components/schemas/DatasetStatusEnum"},"running_status":{"$ref":"#/components/schemas/DatasetLLMRunStatusEnum"},"running_progress":{"type":"number","format":"double"},"starred":{"type":"boolean"}},"title":"PatchedDatasetListRequest"},"DatasetsSummaryResponse":{"type":"object","properties":{"total_count":{"type":"integer"},"filters_data":{"type":"object","additionalProperties":{"description":"Any type"}}},"required":["total_count"],"title":"DatasetsSummaryResponse"},"DatasetsSummaryResponseRequest":{"type":"object","properties":{"total_count":{"type":"integer"},"filters_data":{"type":"object","additionalProperties":{"description":"Any type"}}},"required":["total_count"],"title":"DatasetsSummaryResponseRequest"},"PatchedDatasetsSummaryResponseRequest":{"type":"object","properties":{"total_count":{"type":"integer"},"filters_data":{"type":"object","additionalProperties":{"description":"Any type"}}},"title":"PatchedDatasetsSummaryResponseRequest"},"TestsetSheetRequest":{"type":"object","properties":{"testset_unique_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"description":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"row_count":{"type":"integer"},"column_count":{"type":"integer"},"max_insertions_before_rebalance":{"type":"integer"},"used_row_indexes":{"type":"array","items":{"type":"number","format":"double"}},"current_max_row_index":{"type":"number","format":"double"},"column_definitions":{"type":"array","items":{"description":"Any type"}},"starred":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}}},"required":["name"],"title":"TestsetSheetRequest"},"TestsetSheet":{"type":"object","properties":{"testset_unique_id":{"type":"string"},"project":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"description":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"row_count":{"type":"integer"},"column_count":{"type":"integer"},"max_insertions_before_rebalance":{"type":"integer"},"used_row_indexes":{"type":"array","items":{"type":"number","format":"double"}},"current_max_row_index":{"type":"number","format":"double"},"column_definitions":{"type":"array","items":{"description":"Any type"}},"starred":{"type":"boolean"},"created_by":{"type":["integer","null"]},"organization":{"type":"integer"},"updated_by":{"type":["integer","null"]},"tags":{"type":"array","items":{"type":"string"}}},"required":["project","name","created_by","organization","updated_by"],"title":"TestsetSheet"},"TestsetSheetListRequest":{"type":"object","properties":{"testset_unique_id":{"type":"string"},"project":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"description":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"row_count":{"type":"integer"},"column_count":{"type":"integer"},"max_insertions_before_rebalance":{"type":"integer"},"used_row_indexes":{"type":"array","items":{"type":"number","format":"double"}},"current_max_row_index":{"type":"number","format":"double"},"column_definitions":{"type":"array","items":{"description":"Any type"}},"starred":{"type":"boolean"},"created_by":{"type":["integer","null"]},"organization":{"type":"integer"}},"required":["name","organization"],"title":"TestsetSheetListRequest"},"TestsetSheetList":{"type":"object","properties":{"testset_unique_id":{"type":"string"},"updated_by":{"$ref":"#/components/schemas/Editor"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"}},"project":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"description":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"row_count":{"type":"integer"},"column_count":{"type":"integer"},"max_insertions_before_rebalance":{"type":"integer"},"used_row_indexes":{"type":"array","items":{"type":"number","format":"double"}},"current_max_row_index":{"type":"number","format":"double"},"column_definitions":{"type":"array","items":{"description":"Any type"}},"starred":{"type":"boolean"},"created_by":{"type":["integer","null"]},"organization":{"type":"integer"}},"required":["updated_by","tags","name","organization"],"title":"TestsetSheetList"},"PublicTestsetSheetDetail":{"type":"object","properties":{"testset_unique_id":{"type":"string"},"project":{"type":["string","null"]},"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"description":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"row_count":{"type":"integer"},"column_count":{"type":"integer"},"max_insertions_before_rebalance":{"type":"integer"},"used_row_indexes":{"type":"array","items":{"type":"number","format":"double"}},"current_max_row_index":{"type":"number","format":"double"},"column_definitions":{"type":"array","items":{"description":"Any type"}},"starred":{"type":"boolean"},"created_by":{"type":["integer","null"]},"organization":{"type":"integer"},"updated_by":{"type":["integer","null"]},"tags":{"type":"array","items":{"type":"string"}}},"required":["project","id","created_at","name","updated_at","row_count","column_count","max_insertions_before_rebalance","used_row_indexes","current_max_row_index","created_by","organization","updated_by"],"description":"Detail serializer for testsets with masked fields for API key users","title":"PublicTestsetSheetDetail"},"PatchedPublicTestsetSheetUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"column_definitions":{"type":"array","items":{"description":"Any type"}},"starred":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}}},"description":"Update serializer for testsets via API key","title":"PatchedPublicTestsetSheetUpdateRequest"},"PublicTestsetSheetUpdate":{"type":"object","properties":{"testset_unique_id":{"type":"string"},"project":{"type":["string","null"]},"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"description":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"row_count":{"type":"integer"},"column_count":{"type":"integer"},"max_insertions_before_rebalance":{"type":"integer"},"used_row_indexes":{"type":"array","items":{"type":"number","format":"double"}},"current_max_row_index":{"type":"number","format":"double"},"column_definitions":{"type":"array","items":{"description":"Any type"}},"starred":{"type":"boolean"},"created_by":{"type":["integer","null"]},"organization":{"type":"integer"},"updated_by":{"type":["integer","null"]},"tags":{"type":"array","items":{"type":"string"}}},"required":["testset_unique_id","project","id","created_at","name","updated_at","row_count","column_count","max_insertions_before_rebalance","used_row_indexes","current_max_row_index","created_by","organization","updated_by"],"description":"Update serializer for testsets via API key","title":"PublicTestsetSheetUpdate"},"PublicTestsetRowCreateRequest":{"type":"object","properties":{"row_index":{"type":"number","format":"double","default":1},"row_data":{"description":"Any type"},"testset_sheet":{"type":"string"}},"required":["testset_sheet"],"description":"Create serializer for testset rows via API key","title":"PublicTestsetRowCreateRequest"},"PublicTestsetRowCreate":{"type":"object","properties":{"id":{"type":"integer"},"row_index":{"type":"number","format":"double","default":1},"height":{"type":["integer","null"]},"row_data":{"description":"Any type"},"testset_sheet":{"type":"string"}},"required":["id","height","testset_sheet"],"description":"Create serializer for testset rows via API key","title":"PublicTestsetRowCreate"},"PaginatedPublicTestsetRowListListFiltersData":{"type":"object","properties":{},"title":"PaginatedPublicTestsetRowListListFiltersData"},"PublicTestsetRowList":{"type":"object","properties":{"row_index":{"type":"number","format":"double","default":1},"height":{"type":["integer","null"]},"row_data":{"description":"Any type"},"testset_sheet":{"type":"string"}},"required":["testset_sheet"],"description":"List serializer for testset rows with masked fields for API key users","title":"PublicTestsetRowList"},"PaginatedPublicTestsetRowListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedPublicTestsetRowListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/PublicTestsetRowList"}}},"required":["count","results"],"title":"PaginatedPublicTestsetRowListList"},"PatchedPublicTestsetRowUpdateRequest":{"type":"object","properties":{"row_data":{"description":"Any type"}},"description":"Update serializer for testset rows via API key","title":"PatchedPublicTestsetRowUpdateRequest"},"PublicTestsetRowUpdate":{"type":"object","properties":{"id":{"type":"integer"},"row_index":{"type":"number","format":"double","default":1},"height":{"type":["integer","null"]},"row_data":{"description":"Any type"},"testset_sheet":{"type":"string"}},"required":["id","row_index","height","testset_sheet"],"description":"Update serializer for testset rows via API key","title":"PublicTestsetRowUpdate"},"PublicTestsetSheetUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"column_definitions":{"type":"array","items":{"description":"Any type"}},"starred":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}}},"required":["name"],"description":"Update serializer for testsets via API key","title":"PublicTestsetSheetUpdateRequest"},"PublicTestsetRowDetail":{"type":"object","properties":{"id":{"type":"integer"},"row_index":{"type":"number","format":"double","default":1},"height":{"type":["integer","null"]},"row_data":{"description":"Any type"},"testset_sheet":{"type":"string"}},"required":["id","height","testset_sheet"],"description":"Detail serializer for testset rows with masked fields for API key users","title":"PublicTestsetRowDetail"},"PublicTestsetRowUpdateRequest":{"type":"object","properties":{"row_data":{"description":"Any type"}},"description":"Update serializer for testset rows via API key","title":"PublicTestsetRowUpdateRequest"},"Testsets_getFilteredTestsetsSummary_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Testsets_getFilteredTestsetsSummary_Response_200"},"Type4e2Enum":{"type":"string","enum":["llm","code","human","function","human_numerical","human_categorical","human_boolean","human_text","custom"],"description":"* `llm` - Llm\n* `code` - Code\n* `human` - Human\n* `function` - Function\n* `human_numerical` - Human Numerical\n* `human_categorical` - Human Categorical\n* `human_boolean` - Human Boolean\n* `human_text` - Human Text\n* `custom` - Custom","title":"Type4e2Enum"},"ScoreValueTypeEnum":{"type":"string","enum":["numerical","boolean","percentage","single_select","multi_select","text","json","comment","categorical"],"description":"* `numerical` - Numerical\n* `boolean` - Boolean\n* `percentage` - Percentage\n* `single_select` - Single Select\n* `multi_select` - Multi Select\n* `text` - Text\n* `json` - Json\n* `comment` - Comment\n* `categorical` - Categorical","title":"ScoreValueTypeEnum"},"PublicEvaluatorCreateRequest":{"type":"object","properties":{"version_id":{"type":"string"},"configurations":{"type":"object","additionalProperties":{"description":"Any type"}},"categorical_choices":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"score_config":{"type":"object","additionalProperties":{"description":"Any type"}},"passing_conditions":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"llm_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"code_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"project":{"type":["string","null"]},"eval_class":{"type":"string"},"id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"version_description":{"type":"string"},"evaluator_slug":{"type":"string"},"name":{"type":"string"},"unique_organization_id":{"type":["string","null"]},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"score_value_type":{"$ref":"#/components/schemas/ScoreValueTypeEnum"},"custom_required_fields":{"type":"array","items":{"type":"string"}},"starred":{"type":"boolean"},"organization":{"type":["integer","null"]}},"required":["name"],"description":"User-friendly serializer for creating evaluators via API.\nAccepts configurations as a simple dict of field values.\nAutomatically infers evaluator type based on eval_class.","title":"PublicEvaluatorCreateRequest"},"PublicEvaluatorCreate":{"type":"object","properties":{"version_id":{"type":"string"},"configurations":{"type":"object","additionalProperties":{"description":"Any type"}},"categorical_choices":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"score_config":{"type":"object","additionalProperties":{"description":"Any type"}},"passing_conditions":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"llm_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"code_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"project":{"type":["string","null"]},"is_public":{"type":"boolean"},"eval_class":{"type":"string"},"id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"version_description":{"type":"string"},"evaluator_slug":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"score_value_type":{"$ref":"#/components/schemas/ScoreValueTypeEnum"},"custom_required_fields":{"type":"array","items":{"type":"string"}},"starred":{"type":"boolean"},"created_by":{"type":["integer","null"]},"updated_by":{"type":["integer","null"]}},"required":["is_public","name","created_at","updated_at","created_by","updated_by"],"description":"User-friendly serializer for creating evaluators via API.\nAccepts configurations as a simple dict of field values.\nAutomatically infers evaluator type based on eval_class.","title":"PublicEvaluatorCreate"},"EvalClassEnum":{"type":"string","enum":["ragas_faithfulness","ragas_noise_sensitivity","ragas_response_relevancy","ragas_answer_relevancy","ragas_context_precision","ragas_context_recall","ragas_context_entity_recall","ragas_factual_correctness","ragas_semantic_similarity","ragas_non_llm_string_similarity","ragas_non_llm_string_presence","ragas_non_llm_exact_match","relari_llm_based_custom_metric","relari_llm_based_answer_correctness","keywordsai_custom_evaluator","keywordsai_custom_llm","output_char_count","output_word_count","custom_code"],"description":"* `ragas_faithfulness` - ragas_faithfulness\n* `ragas_noise_sensitivity` - ragas_noise_sensitivity\n* `ragas_response_relevancy` - ragas_response_relevancy\n* `ragas_answer_relevancy` - ragas_answer_relevancy\n* `ragas_context_precision` - ragas_context_precision\n* `ragas_context_recall` - ragas_context_recall\n* `ragas_context_entity_recall` - ragas_context_entity_recall\n* `ragas_factual_correctness` - ragas_factual_correctness\n* `ragas_semantic_similarity` - ragas_semantic_similarity\n* `ragas_non_llm_string_similarity` - ragas_non_llm_string_similarity\n* `ragas_non_llm_string_presence` - ragas_non_llm_string_presence\n* `ragas_non_llm_exact_match` - ragas_non_llm_exact_match\n* `relari_llm_based_custom_metric` - relari_llm_based_custom_metric\n* `relari_llm_based_answer_correctness` - relari_llm_based_answer_correctness\n* `keywordsai_custom_evaluator` - keywordsai_custom_evaluator\n* `keywordsai_custom_llm` - keywordsai_custom_llm\n* `output_char_count` - output_char_count\n* `output_word_count` - output_word_count\n* `custom_code` - custom_code","title":"EvalClassEnum"},"PublicEvaluatorListRequestEvalClass":{"oneOf":[{"$ref":"#/components/schemas/EvalClassEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"PublicEvaluatorListRequestEvalClass"},"PublicEvaluatorListRequest":{"type":"object","properties":{"version_id":{"type":"string"},"configurations":{"type":"object","additionalProperties":{"description":"Any type"}},"score_config":{"type":"object","additionalProperties":{"description":"Any type"}},"passing_conditions":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"llm_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"code_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"project":{"type":["string","null"]},"id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"version_description":{"type":"string"},"evaluator_slug":{"type":"string"},"name":{"type":"string"},"unique_organization_id":{"type":["string","null"]},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"score_value_type":{"$ref":"#/components/schemas/ScoreValueTypeEnum"},"eval_class":{"$ref":"#/components/schemas/PublicEvaluatorListRequestEvalClass"},"custom_required_fields":{"type":"array","items":{"type":"string"}},"starred":{"type":"boolean"},"organization":{"type":["integer","null"]}},"required":["name"],"description":"User-friendly serializer for evaluator list view via API.","title":"PublicEvaluatorListRequest"},"PublicEvaluatorListEvalClass":{"oneOf":[{"$ref":"#/components/schemas/EvalClassEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"PublicEvaluatorListEvalClass"},"PublicEvaluatorList":{"type":"object","properties":{"version_id":{"type":"string"},"configurations":{"type":"object","additionalProperties":{"description":"Any type"}},"categorical_choices":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"score_config":{"type":"object","additionalProperties":{"description":"Any type"}},"passing_conditions":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"llm_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"code_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"project":{"type":["string","null"]},"is_public":{"type":"boolean"},"created_by":{"$ref":"#/components/schemas/Editor"},"updated_by":{"$ref":"#/components/schemas/Editor"},"editor":{"$ref":"#/components/schemas/Editor"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"}},"version_count":{"type":"integer","description":"Number of versions for this evaluator.\n\nReads the ``version_count`` annotation added by the list querysets\n(see ``annotate_evaluator_version_count``). Falls back to 0 when the\nqueryset was not annotated, so the serializer never issues a\nper-row count query."},"id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"version_description":{"type":"string"},"evaluator_slug":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"score_value_type":{"$ref":"#/components/schemas/ScoreValueTypeEnum"},"eval_class":{"$ref":"#/components/schemas/PublicEvaluatorListEvalClass"},"custom_required_fields":{"type":"array","items":{"type":"string"}},"starred":{"type":"boolean"}},"required":["categorical_choices","is_public","created_by","updated_by","editor","tags","version_count","name","created_at","updated_at"],"description":"User-friendly serializer for evaluator list view via API.","title":"PublicEvaluatorList"},"PublicEvaluatorDetail":{"type":"object","properties":{"version_id":{"type":"string"},"configurations":{"type":"object","additionalProperties":{"description":"Any type"}},"categorical_choices":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"score_config":{"type":"object","additionalProperties":{"description":"Any type"}},"passing_conditions":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"llm_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"code_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"project":{"type":["string","null"]},"is_public":{"type":"boolean"},"eval_class":{"type":"string"},"created_by":{"$ref":"#/components/schemas/Editor"},"updated_by":{"$ref":"#/components/schemas/Editor"},"editor":{"$ref":"#/components/schemas/Editor"},"id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"version_description":{"type":"string"},"evaluator_slug":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"score_value_type":{"$ref":"#/components/schemas/ScoreValueTypeEnum"},"custom_required_fields":{"type":"array","items":{"type":"string"}},"starred":{"type":"boolean"}},"required":["is_public","created_by","updated_by","editor","name","created_at","updated_at"],"description":"User-friendly serializer for evaluator detail view via API.","title":"PublicEvaluatorDetail"},"PatchedPublicEvaluatorUpdateRequest":{"type":"object","properties":{"version_id":{"type":"string"},"configurations":{"type":"object","additionalProperties":{"description":"Any type"}},"categorical_choices":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"score_config":{"type":"object","additionalProperties":{"description":"Any type"}},"passing_conditions":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"llm_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"code_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"project":{"type":["string","null"]},"id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"version_description":{"type":"string"},"evaluator_slug":{"type":"string"},"name":{"type":"string"},"unique_organization_id":{"type":["string","null"]},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"score_value_type":{"$ref":"#/components/schemas/ScoreValueTypeEnum"},"custom_required_fields":{"type":"array","items":{"type":"string"}},"starred":{"type":"boolean"},"organization":{"type":["integer","null"]}},"description":"User-friendly serializer for updating evaluators via API.\nSupports partial updates of configuration fields.","title":"PatchedPublicEvaluatorUpdateRequest"},"PublicEvaluatorUpdate":{"type":"object","properties":{"version_id":{"type":"string"},"configurations":{"type":"object","additionalProperties":{"description":"Any type"}},"categorical_choices":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"score_config":{"type":"object","additionalProperties":{"description":"Any type"}},"passing_conditions":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"llm_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"code_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"project":{"type":["string","null"]},"is_public":{"type":"boolean"},"eval_class":{"type":"string"},"id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"version_description":{"type":"string"},"evaluator_slug":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"score_value_type":{"$ref":"#/components/schemas/ScoreValueTypeEnum"},"custom_required_fields":{"type":"array","items":{"type":"string"}},"starred":{"type":"boolean"},"created_by":{"type":["integer","null"]},"updated_by":{"type":["integer","null"]}},"required":["is_public","eval_class","name","created_at","updated_at","created_by","updated_by"],"description":"User-friendly serializer for updating evaluators via API.\nSupports partial updates of configuration fields.","title":"PublicEvaluatorUpdate"},"Evaluators_runEvaluator_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Evaluators_runEvaluator_Response_200"},"PublicEvaluatorUpdateRequest":{"type":"object","properties":{"version_id":{"type":"string"},"configurations":{"type":"object","additionalProperties":{"description":"Any type"}},"categorical_choices":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"score_config":{"type":"object","additionalProperties":{"description":"Any type"}},"passing_conditions":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"llm_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"code_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"project":{"type":["string","null"]},"id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"version_description":{"type":"string"},"evaluator_slug":{"type":"string"},"name":{"type":"string"},"unique_organization_id":{"type":["string","null"]},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"score_value_type":{"$ref":"#/components/schemas/ScoreValueTypeEnum"},"custom_required_fields":{"type":"array","items":{"type":"string"}},"starred":{"type":"boolean"},"organization":{"type":["integer","null"]}},"required":["name"],"description":"User-friendly serializer for updating evaluators via API.\nSupports partial updates of configuration fields.","title":"PublicEvaluatorUpdateRequest"},"PaginatedPublicEvaluatorVersionListListFiltersData":{"type":"object","properties":{},"title":"PaginatedPublicEvaluatorVersionListListFiltersData"},"PublicEvaluatorVersionList":{"type":"object","properties":{"id":{"type":"string"},"version_id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"version_description":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"score_value_type":{"$ref":"#/components/schemas/ScoreValueTypeEnum"},"created_at":{"type":"string","format":"date-time"},"created_by":{"$ref":"#/components/schemas/Editor"}},"required":["name","created_at","created_by"],"description":"Serializer for listing all versions of an evaluator.\nUsed for GET /evaluators/{id}/versions/","title":"PublicEvaluatorVersionList"},"PaginatedPublicEvaluatorVersionListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedPublicEvaluatorVersionListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/PublicEvaluatorVersionList"}}},"required":["count","results"],"title":"PaginatedPublicEvaluatorVersionListList"},"EvaluatorCreateVersionRequestEvalClass":{"oneOf":[{"$ref":"#/components/schemas/EvalClassEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"EvaluatorCreateVersionRequestEvalClass"},"EvaluatorCreateVersionRequest":{"type":"object","properties":{"configurations":{"type":"object","additionalProperties":{"description":"Any type"}},"categorical_choices":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"score_config":{"type":"object","additionalProperties":{"description":"Any type"}},"passing_conditions":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"llm_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"code_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"project":{"type":["string","null"]},"name":{"type":"string"},"score_value_type":{"type":"string"},"version_description":{"type":"string","default":""},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"eval_class":{"$ref":"#/components/schemas/EvaluatorCreateVersionRequestEvalClass"},"custom_required_fields":{"type":"array","items":{"type":"string"}},"starred":{"type":"boolean"},"created_by":{"type":["integer","null"]},"updated_by":{"type":["integer","null"]}},"description":"Serializer for creating a new version of an evaluator.\nUsed for POST /evaluators/{evaluator_id}/versions/\n\nSupports two modes:\n1. Minimal payload (commit snapshot): Just provide version_description\n   - All configuration fields are auto-copied from current draft\n2. Full payload (commit with changes): Provide full configuration\n   - Client provides all fields, only identity fields are copied\n\nSignal handles: version increment, marking old versions as is_read_only=True\n\nVersioning model:\n- id: Evaluator identity (same across versions, copied from source)\n- version_id: Unique per row (auto-generated)\n- version: Version number (0, 1, 2...) - set by signal\n- is_read_only: False for new version (draft), True for old versions\n- version_description: Commit message for this version","title":"EvaluatorCreateVersionRequest"},"EvaluatorCreateVersionEvalClass":{"oneOf":[{"$ref":"#/components/schemas/EvalClassEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"EvaluatorCreateVersionEvalClass"},"EvaluatorCreateVersion":{"type":"object","properties":{"version_id":{"type":"string"},"configurations":{"type":"object","additionalProperties":{"description":"Any type"}},"categorical_choices":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"score_config":{"type":"object","additionalProperties":{"description":"Any type"}},"passing_conditions":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"llm_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"code_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"project":{"type":["string","null"]},"is_public":{"type":"boolean"},"id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"name":{"type":"string"},"score_value_type":{"type":"string"},"version_description":{"type":"string","default":""},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"eval_class":{"$ref":"#/components/schemas/EvaluatorCreateVersionEvalClass"},"custom_required_fields":{"type":"array","items":{"type":"string"}},"starred":{"type":"boolean"},"created_by":{"type":["integer","null"]},"updated_by":{"type":["integer","null"]}},"required":["version_id","is_public","id","version","is_read_only","created_at","updated_at"],"description":"Serializer for creating a new version of an evaluator.\nUsed for POST /evaluators/{evaluator_id}/versions/\n\nSupports two modes:\n1. Minimal payload (commit snapshot): Just provide version_description\n   - All configuration fields are auto-copied from current draft\n2. Full payload (commit with changes): Provide full configuration\n   - Client provides all fields, only identity fields are copied\n\nSignal handles: version increment, marking old versions as is_read_only=True\n\nVersioning model:\n- id: Evaluator identity (same across versions, copied from source)\n- version_id: Unique per row (auto-generated)\n- version: Version number (0, 1, 2...) - set by signal\n- is_read_only: False for new version (draft), True for old versions\n- version_description: Commit message for this version","title":"EvaluatorCreateVersion"},"PublicEvaluatorVersionDetailEvalClass":{"oneOf":[{"$ref":"#/components/schemas/EvalClassEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"PublicEvaluatorVersionDetailEvalClass"},"PublicEvaluatorVersionDetail":{"type":"object","properties":{"id":{"type":"string"},"version_id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"version_description":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"score_value_type":{"$ref":"#/components/schemas/ScoreValueTypeEnum"},"score_config":{"type":"object","additionalProperties":{"description":"Any type"}},"passing_conditions":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"llm_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"code_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"configurations":{"type":"object","additionalProperties":{"description":"Any type"}},"categorical_choices":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"eval_class":{"$ref":"#/components/schemas/PublicEvaluatorVersionDetailEvalClass"},"starred":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"created_by":{"$ref":"#/components/schemas/Editor"},"updated_by":{"$ref":"#/components/schemas/Editor"}},"required":["name","created_at","updated_at","created_by","updated_by"],"description":"Serializer for a specific version of an evaluator.\nUsed for GET /evaluators/{id}/versions/{version}/\n\nFields:\n- id: Unique per row (will be identity after PK swap)\n- version_id: Unique per row\n- version: The version number (0, 1, 2...)\n- is_read_only: True = committed, False = draft (editable)\n- version_description: Commit message for this version","title":"PublicEvaluatorVersionDetail"},"PublicEvaluatorVersionDetailRequestEvalClass":{"oneOf":[{"$ref":"#/components/schemas/EvalClassEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"PublicEvaluatorVersionDetailRequestEvalClass"},"PublicEvaluatorVersionDetailRequest":{"type":"object","properties":{"id":{"type":"string"},"version_id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"version_description":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"score_value_type":{"$ref":"#/components/schemas/ScoreValueTypeEnum"},"score_config":{"type":"object","additionalProperties":{"description":"Any type"}},"passing_conditions":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"llm_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"code_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"configurations":{"type":"object","additionalProperties":{"description":"Any type"}},"categorical_choices":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"eval_class":{"$ref":"#/components/schemas/PublicEvaluatorVersionDetailRequestEvalClass"},"starred":{"type":"boolean"}},"required":["name"],"description":"Serializer for a specific version of an evaluator.\nUsed for GET /evaluators/{id}/versions/{version}/\n\nFields:\n- id: Unique per row (will be identity after PK swap)\n- version_id: Unique per row\n- version: The version number (0, 1, 2...)\n- is_read_only: True = committed, False = draft (editable)\n- version_description: Commit message for this version","title":"PublicEvaluatorVersionDetailRequest"},"PatchedPublicEvaluatorVersionDetailRequestEvalClass":{"oneOf":[{"$ref":"#/components/schemas/EvalClassEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"PatchedPublicEvaluatorVersionDetailRequestEvalClass"},"PatchedPublicEvaluatorVersionDetailRequest":{"type":"object","properties":{"id":{"type":"string"},"version_id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"version_description":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"score_value_type":{"$ref":"#/components/schemas/ScoreValueTypeEnum"},"score_config":{"type":"object","additionalProperties":{"description":"Any type"}},"passing_conditions":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"llm_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"code_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"configurations":{"type":"object","additionalProperties":{"description":"Any type"}},"categorical_choices":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"eval_class":{"$ref":"#/components/schemas/PatchedPublicEvaluatorVersionDetailRequestEvalClass"},"starred":{"type":"boolean"}},"description":"Serializer for a specific version of an evaluator.\nUsed for GET /evaluators/{id}/versions/{version}/\n\nFields:\n- id: Unique per row (will be identity after PK swap)\n- version_id: Unique per row\n- version: The version number (0, 1, 2...)\n- is_read_only: True = committed, False = draft (editable)\n- version_description: Commit message for this version","title":"PatchedPublicEvaluatorVersionDetailRequest"},"Evaluators_getFilteredEvaluatorsSummary_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Evaluators_getFilteredEvaluatorsSummary_Response_200"},"StatusC33Enum":{"type":"string","enum":["pending","completed","failed"],"description":"* `pending` - Pending\n* `completed` - Completed\n* `failed` - Failed","title":"StatusC33Enum"},"PublicEvalResultCreateRequest":{"type":"object","properties":{"organization":{"type":"integer"},"unique_organization_id":{"type":"string"},"updated_by":{"type":["integer","null"]},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"environment":{"type":"string"},"numerical_value":{"type":"number","format":"double"},"string_value":{"type":"string"},"boolean_value":{"type":["boolean","null"]},"categorical_value":{"type":"array","items":{"type":"string"}},"json_value":{"type":"string"},"is_passed":{"type":"boolean"},"cost":{"type":"number","format":"double"},"evaluator_id":{"type":"string"},"evaluator_slug":{"type":"string"},"scorer":{"type":"string"},"log_id":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"dataset_id":{"type":"string"},"status":{"$ref":"#/components/schemas/StatusC33Enum"},"error_message":{"type":["string","null"]}},"required":["organization"],"description":"Mixin to handle underscore-prefixed field mapping in serializers.\n\nThis is used when Django annotations require underscore prefixes to avoid\nname conflicts with original column names, but we want to expose the\nclean field names in the API response.\n\nUsage:\n    1. Annotate queryset with underscore prefixes: _field_name\n    2. This mixin automatically maps _field_name -> field_name in to_internal_value\n    3. The serializer can then use the clean field names normally","title":"PublicEvalResultCreateRequest"},"PublicEvalResultCreate":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"environment":{"type":"string"},"numerical_value":{"type":"number","format":"double"},"string_value":{"type":"string"},"boolean_value":{"type":["boolean","null"]},"categorical_value":{"type":"array","items":{"type":"string"}},"json_value":{"type":"string"},"is_passed":{"type":"boolean"},"cost":{"type":"number","format":"double"},"evaluator_id":{"type":"string"},"evaluator_slug":{"type":"string"},"scorer":{"type":"string"},"log_id":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"dataset_id":{"type":"string"},"status":{"$ref":"#/components/schemas/StatusC33Enum"},"error_message":{"type":["string","null"]}},"required":["id","created_at"],"description":"Mixin to handle underscore-prefixed field mapping in serializers.\n\nThis is used when Django annotations require underscore prefixes to avoid\nname conflicts with original column names, but we want to expose the\nclean field names in the API response.\n\nUsage:\n    1. Annotate queryset with underscore prefixes: _field_name\n    2. This mixin automatically maps _field_name -> field_name in to_internal_value\n    3. The serializer can then use the clean field names normally","title":"PublicEvalResultCreate"},"PublicEvalResultDetail":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_by":{"type":["integer","null"]},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"environment":{"type":"string"},"numerical_value":{"type":"number","format":"double"},"string_value":{"type":"string"},"boolean_value":{"type":["boolean","null"]},"categorical_value":{"type":"array","items":{"type":"string"}},"json_value":{"type":"string"},"is_passed":{"type":"boolean"},"cost":{"type":"number","format":"double"},"evaluator_id":{"type":"string"},"evaluator_slug":{"type":"string"},"scorer":{"type":"string"},"log_id":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"dataset_id":{"type":"string"},"status":{"$ref":"#/components/schemas/StatusC33Enum"},"error_message":{"type":["string","null"]},"evaluator":{"$ref":"#/components/schemas/PublicEvaluatorDetail"},"inputs":{"type":"string"}},"required":["id","created_at","updated_by","evaluator","inputs"],"description":"Mixin to handle underscore-prefixed field mapping in serializers.\n\nThis is used when Django annotations require underscore prefixes to avoid\nname conflicts with original column names, but we want to expose the\nclean field names in the API response.\n\nUsage:\n    1. Annotate queryset with underscore prefixes: _field_name\n    2. This mixin automatically maps _field_name -> field_name in to_internal_value\n    3. The serializer can then use the clean field names normally","title":"PublicEvalResultDetail"},"PatchedPublicEvalResultUpdateRequest":{"type":"object","properties":{"organization":{"type":"integer"},"unique_organization_id":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"environment":{"type":"string"},"numerical_value":{"type":"number","format":"double"},"string_value":{"type":"string"},"boolean_value":{"type":["boolean","null"]},"categorical_value":{"type":"array","items":{"type":"string"}},"json_value":{"type":"string"},"is_passed":{"type":"boolean"},"cost":{"type":"number","format":"double"},"evaluator_id":{"type":"string"},"evaluator_slug":{"type":"string"},"scorer":{"type":"string"},"log_id":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"dataset_id":{"type":"string"},"status":{"$ref":"#/components/schemas/StatusC33Enum"},"error_message":{"type":["string","null"]}},"description":"Mixin to handle underscore-prefixed field mapping in serializers.\n\nThis is used when Django annotations require underscore prefixes to avoid\nname conflicts with original column names, but we want to expose the\nclean field names in the API response.\n\nUsage:\n    1. Annotate queryset with underscore prefixes: _field_name\n    2. This mixin automatically maps _field_name -> field_name in to_internal_value\n    3. The serializer can then use the clean field names normally","title":"PatchedPublicEvalResultUpdateRequest"},"PublicEvalResultUpdate":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_by":{"type":["integer","null"]},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"environment":{"type":"string"},"numerical_value":{"type":"number","format":"double"},"string_value":{"type":"string"},"boolean_value":{"type":["boolean","null"]},"categorical_value":{"type":"array","items":{"type":"string"}},"json_value":{"type":"string"},"is_passed":{"type":"boolean"},"cost":{"type":"number","format":"double"},"evaluator_id":{"type":"string"},"evaluator_slug":{"type":"string"},"scorer":{"type":"string"},"log_id":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"dataset_id":{"type":"string"},"status":{"$ref":"#/components/schemas/StatusC33Enum"},"error_message":{"type":["string","null"]}},"required":["id","created_at","updated_by"],"description":"Mixin to handle underscore-prefixed field mapping in serializers.\n\nThis is used when Django annotations require underscore prefixes to avoid\nname conflicts with original column names, but we want to expose the\nclean field names in the API response.\n\nUsage:\n    1. Annotate queryset with underscore prefixes: _field_name\n    2. This mixin automatically maps _field_name -> field_name in to_internal_value\n    3. The serializer can then use the clean field names normally","title":"PublicEvalResultUpdate"},"PublicLogScoreCreateRequest":{"type":"object","properties":{"organization":{"type":"integer"},"unique_organization_id":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"environment":{"type":"string"},"numerical_value":{"type":"number","format":"double"},"string_value":{"type":"string"},"boolean_value":{"type":["boolean","null"]},"categorical_value":{"type":"array","items":{"type":"string"}},"json_value":{"type":"string"},"is_passed":{"type":"boolean"},"cost":{"type":"number","format":"double"},"evaluator_id":{"type":"string"},"evaluator_slug":{"type":"string"},"log_id":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"dataset_id":{"type":"string"},"status":{"$ref":"#/components/schemas/StatusC33Enum"},"error_message":{"type":["string","null"]}},"required":["organization"],"description":"Serializer for creating scores in a specific log.","title":"PublicLogScoreCreateRequest"},"PublicLogScoreCreate":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_by":{"type":["integer","null"]},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"environment":{"type":"string"},"numerical_value":{"type":"number","format":"double"},"string_value":{"type":"string"},"boolean_value":{"type":["boolean","null"]},"categorical_value":{"type":"array","items":{"type":"string"}},"json_value":{"type":"string"},"is_passed":{"type":"boolean"},"cost":{"type":"number","format":"double"},"evaluator_id":{"type":"string"},"evaluator_slug":{"type":"string"},"scorer":{"type":"string"},"log_id":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"dataset_id":{"type":"string"},"status":{"$ref":"#/components/schemas/StatusC33Enum"},"error_message":{"type":["string","null"]}},"required":["id","created_at","updated_by","scorer"],"description":"Serializer for creating scores in a specific log.","title":"PublicLogScoreCreate"},"PaginatedPublicLogScoreListListFiltersData":{"type":"object","properties":{},"title":"PaginatedPublicLogScoreListListFiltersData"},"PublicLogScoreList":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"environment":{"type":"string"},"numerical_value":{"type":"number","format":"double"},"string_value":{"type":"string"},"boolean_value":{"type":["boolean","null"]},"categorical_value":{"type":"array","items":{"type":"string"}},"json_value":{"type":"string"},"is_passed":{"type":"boolean"},"cost":{"type":"number","format":"double"},"evaluator_id":{"type":"string"},"evaluator_slug":{"type":"string"},"scorer":{"type":"string"},"log_id":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"dataset_id":{"type":"string"},"status":{"$ref":"#/components/schemas/StatusC33Enum"},"error_message":{"type":["string","null"]}},"required":["id","created_at"],"description":"Serializer for listing scores in a log.","title":"PublicLogScoreList"},"PaginatedPublicLogScoreListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedPublicLogScoreListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/PublicLogScoreList"}}},"required":["count","results"],"title":"PaginatedPublicLogScoreListList"},"PublicLogScoreDetail":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"environment":{"type":"string"},"numerical_value":{"type":"number","format":"double"},"string_value":{"type":"string"},"boolean_value":{"type":["boolean","null"]},"categorical_value":{"type":"array","items":{"type":"string"}},"json_value":{"type":"string"},"is_passed":{"type":"boolean"},"cost":{"type":"number","format":"double"},"evaluator_id":{"type":"string"},"evaluator_slug":{"type":"string"},"scorer":{"type":"string"},"log_id":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"dataset_id":{"type":"string"},"status":{"$ref":"#/components/schemas/StatusC33Enum"},"error_message":{"type":["string","null"]}},"required":["id","created_at"],"description":"Serializer for retrieving a specific score in a log.","title":"PublicLogScoreDetail"},"PatchedPublicLogScoreUpdateRequest":{"type":"object","properties":{"organization":{"type":"integer"},"unique_organization_id":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"environment":{"type":"string"},"numerical_value":{"type":"number","format":"double"},"string_value":{"type":"string"},"boolean_value":{"type":["boolean","null"]},"categorical_value":{"type":"array","items":{"type":"string"}},"json_value":{"type":"string"},"is_passed":{"type":"boolean"},"cost":{"type":"number","format":"double"},"evaluator_id":{"type":"string"},"evaluator_slug":{"type":"string"},"scorer":{"type":"string"},"log_id":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"dataset_id":{"type":"string"},"status":{"$ref":"#/components/schemas/StatusC33Enum"},"error_message":{"type":["string","null"]}},"description":"Serializer for updating scores in a log.","title":"PatchedPublicLogScoreUpdateRequest"},"PublicLogScoreUpdate":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_by":{"type":["integer","null"]},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"environment":{"type":"string"},"numerical_value":{"type":"number","format":"double"},"string_value":{"type":"string"},"boolean_value":{"type":["boolean","null"]},"categorical_value":{"type":"array","items":{"type":"string"}},"json_value":{"type":"string"},"is_passed":{"type":"boolean"},"cost":{"type":"number","format":"double"},"evaluator_id":{"type":"string"},"evaluator_slug":{"type":"string"},"scorer":{"type":"string"},"log_id":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"dataset_id":{"type":"string"},"status":{"$ref":"#/components/schemas/StatusC33Enum"},"error_message":{"type":["string","null"]}},"required":["id","created_at","updated_by"],"description":"Serializer for updating scores in a log.","title":"PublicLogScoreUpdate"},"PublicLogScoreDetailRequest":{"type":"object","properties":{"organization":{"type":"integer"},"unique_organization_id":{"type":"string"},"updated_by":{"type":["integer","null"]},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"environment":{"type":"string"},"numerical_value":{"type":"number","format":"double"},"string_value":{"type":"string"},"boolean_value":{"type":["boolean","null"]},"categorical_value":{"type":"array","items":{"type":"string"}},"json_value":{"type":"string"},"is_passed":{"type":"boolean"},"cost":{"type":"number","format":"double"},"evaluator_id":{"type":"string"},"evaluator_slug":{"type":"string"},"scorer":{"type":"string"},"log_id":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"dataset_id":{"type":"string"},"status":{"$ref":"#/components/schemas/StatusC33Enum"},"error_message":{"type":["string","null"]}},"required":["organization"],"description":"Serializer for retrieving a specific score in a log.","title":"PublicLogScoreDetailRequest"},"PublicEvalResultDetailRequest":{"type":"object","properties":{"organization":{"type":"integer"},"unique_organization_id":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"environment":{"type":"string"},"numerical_value":{"type":"number","format":"double"},"string_value":{"type":"string"},"boolean_value":{"type":["boolean","null"]},"categorical_value":{"type":"array","items":{"type":"string"}},"json_value":{"type":"string"},"is_passed":{"type":"boolean"},"cost":{"type":"number","format":"double"},"evaluator_id":{"type":"string"},"evaluator_slug":{"type":"string"},"scorer":{"type":"string"},"log_id":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"dataset_id":{"type":"string"},"status":{"$ref":"#/components/schemas/StatusC33Enum"},"error_message":{"type":["string","null"]}},"required":["organization"],"description":"Mixin to handle underscore-prefixed field mapping in serializers.\n\nThis is used when Django annotations require underscore prefixes to avoid\nname conflicts with original column names, but we want to expose the\nclean field names in the API response.\n\nUsage:\n    1. Annotate queryset with underscore prefixes: _field_name\n    2. This mixin automatically maps _field_name -> field_name in to_internal_value\n    3. The serializer can then use the clean field names normally","title":"PublicEvalResultDetailRequest"},"PublicCHEvalResultListRequest":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"type":{"type":"string"},"environment":{"type":"string"},"numerical_value":{"type":"number","format":"double"},"string_value":{"type":"string"},"is_passed":{"type":"boolean"},"cost":{"type":"number","format":"double"},"evaluator_id":{"type":"string"},"log_id":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"dataset_id":{"type":"string"}},"required":["id","created_at","type","environment","numerical_value","string_value","is_passed","cost","evaluator_id","log_id","prompt_id","prompt_version_number","dataset_id"],"description":"Mixin to handle underscore-prefixed field mapping in serializers.\n\nThis is used when Django annotations require underscore prefixes to avoid\nname conflicts with original column names, but we want to expose the\nclean field names in the API response.\n\nUsage:\n    1. Annotate queryset with underscore prefixes: _field_name\n    2. This mixin automatically maps _field_name -> field_name in to_internal_value\n    3. The serializer can then use the clean field names normally","title":"PublicCHEvalResultListRequest"},"PublicCHEvalResultList":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"type":{"type":"string"},"environment":{"type":"string"},"numerical_value":{"type":"number","format":"double"},"string_value":{"type":"string"},"is_passed":{"type":"boolean"},"cost":{"type":"number","format":"double"},"evaluator_id":{"type":"string"},"log_id":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"dataset_id":{"type":"string"}},"required":["id","created_at","type","environment","numerical_value","string_value","is_passed","cost","evaluator_id","log_id","prompt_id","prompt_version_number","dataset_id"],"description":"Mixin to handle underscore-prefixed field mapping in serializers.\n\nThis is used when Django annotations require underscore prefixes to avoid\nname conflicts with original column names, but we want to expose the\nclean field names in the API response.\n\nUsage:\n    1. Annotate queryset with underscore prefixes: _field_name\n    2. This mixin automatically maps _field_name -> field_name in to_internal_value\n    3. The serializer can then use the clean field names normally","title":"PublicCHEvalResultList"},"ExperimentV2CreateRequest":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"dataset":{"type":["string","null"]},"workflow":{"description":"Any type"},"evaluator_slugs":{"type":"array","items":{"type":"string"},"description":"List of evaluators to run for producing scores for comparison"},"evaluator_workflow_ids":{"type":"array","items":{"type":"string"},"description":"List of WorkflowVersion IDs (eval_only) defining evaluator pipelines. Mutually exclusive with evaluator_slugs."},"batch_size":{"type":"integer"},"concurrency":{"type":"integer"},"enable_tracing":{"type":"boolean"},"organization":{"type":"integer"},"project":{"type":["string","null"]},"unique_organization_id":{"type":"string"}},"description":"Write serializer for POST /api/v2/experiments/.\n\nTwo equally-valid create modes, distinguished by payload shape:\n\n- **Draft mode**: send just `name` (plus optional description). Row\n  lands in DRAFT; the client fills in the rest via PATCH and triggers\n  execution via POST /api/v2/experiments/{id}/runs/.\n- **Create-and-run mode**: send `dataset` + non-empty `workflow` +\n  evaluators + config. The view dispatches the Celery workflow task\n  directly after ``super().post()`` returns (same pattern as\n  ``DatasetsView.post()`` in ``dataset/views.py``).\n\nTransforms owned here (no view-side body mutations):\n\n- `experiment_id` → `id` alias (legacy payload shape)\n- `dataset_id` → `dataset` alias (legacy payload shape)\n- `evaluator_ids` → `evaluator_slugs` alias (via ``ExperimentV2WriteMixin``)\n- Workflow step type canonicalization (via ``ExperimentV2WriteMixin``)\n- Default id (falls back to ``generate_unique_id()``)\n- Default name (``f\"Experiment {id[:8]}\"``)\n\nServer-injected by the view (ownership, not transforms):\n\n- `created_by` — view sets ``request.data[\"created_by\"] = request.user.id``\n- `organization`, `unique_organization_id`, `project`, `project_id` —\n  auto-injected by ``SuperAdminMixin.post()`` via\n  ``inject_target_organization``.","title":"ExperimentV2CreateRequest"},"ExperimentV2Create":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"dataset":{"type":["string","null"]},"workflow":{"description":"Any type"},"evaluator_slugs":{"type":"array","items":{"type":"string"},"description":"List of evaluators to run for producing scores for comparison"},"evaluator_workflow_ids":{"type":"array","items":{"type":"string"},"description":"List of WorkflowVersion IDs (eval_only) defining evaluator pipelines. Mutually exclusive with evaluator_slugs."},"batch_size":{"type":"integer"},"concurrency":{"type":"integer"},"enable_tracing":{"type":"boolean"},"organization":{"type":"integer"},"project":{"type":["string","null"]},"unique_organization_id":{"type":"string"},"created_by":{"type":["integer","null"]}},"required":["created_by"],"description":"Write serializer for POST /api/v2/experiments/.\n\nTwo equally-valid create modes, distinguished by payload shape:\n\n- **Draft mode**: send just `name` (plus optional description). Row\n  lands in DRAFT; the client fills in the rest via PATCH and triggers\n  execution via POST /api/v2/experiments/{id}/runs/.\n- **Create-and-run mode**: send `dataset` + non-empty `workflow` +\n  evaluators + config. The view dispatches the Celery workflow task\n  directly after ``super().post()`` returns (same pattern as\n  ``DatasetsView.post()`` in ``dataset/views.py``).\n\nTransforms owned here (no view-side body mutations):\n\n- `experiment_id` → `id` alias (legacy payload shape)\n- `dataset_id` → `dataset` alias (legacy payload shape)\n- `evaluator_ids` → `evaluator_slugs` alias (via ``ExperimentV2WriteMixin``)\n- Workflow step type canonicalization (via ``ExperimentV2WriteMixin``)\n- Default id (falls back to ``generate_unique_id()``)\n- Default name (``f\"Experiment {id[:8]}\"``)\n\nServer-injected by the view (ownership, not transforms):\n\n- `created_by` — view sets ``request.data[\"created_by\"] = request.user.id``\n- `organization`, `unique_organization_id`, `project`, `project_id` —\n  auto-injected by ``SuperAdminMixin.post()`` via\n  ``inject_target_organization``.","title":"ExperimentV2Create"},"ExperimentV2ListRequest":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"dataset":{"type":["string","null"]},"workflow_count":{"type":"integer"},"status":{"$ref":"#/components/schemas/DatasetLLMRunStatusEnum"},"progress":{"type":"number","format":"double"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"description":{"type":"string"},"is_starred":{"type":"boolean"}},"description":"Lighter serializer for listing experiments.","title":"ExperimentV2ListRequest"},"ExperimentV2List":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"dataset":{"type":["string","null"]},"dataset_name":{"type":["string","null"]},"model":{"type":["string","null"]},"workflow_count":{"type":"integer"},"status":{"$ref":"#/components/schemas/DatasetLLMRunStatusEnum"},"progress":{"type":"number","format":"double"},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"}},"description":{"type":"string"},"is_starred":{"type":"boolean"},"prompt_name":{"type":["string","null"]},"evaluator_names":{"type":"array","items":{"type":"string"}},"evaluator_scores":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}}},"required":["dataset_name","model","created_at","tags","prompt_name","evaluator_names","evaluator_scores"],"description":"Lighter serializer for listing experiments.","title":"ExperimentV2List"},"ExperimentV2":{"type":"object","properties":{"id":{"type":"string"},"evaluator_ids":{"type":"string"},"project":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":"string"},"unique_organization_id":{"type":"string"},"workflow":{"description":"Any type"},"workflow_count":{"type":"integer"},"evaluator_slugs":{"type":"array","items":{"type":"string"},"description":"List of evaluators to run for producing scores for comparison"},"evaluator_workflow_ids":{"type":"array","items":{"type":"string"},"description":"List of WorkflowVersion IDs (eval_only) defining evaluator pipelines. Mutually exclusive with evaluator_slugs."},"resource_ids":{"type":"array","items":{"type":"string"},"description":"All resource IDs referenced (evaluators, prompts) for reverse lookup on deletion"},"batch_size":{"type":"integer"},"concurrency":{"type":"integer"},"enable_tracing":{"type":"boolean"},"status":{"$ref":"#/components/schemas/DatasetLLMRunStatusEnum"},"progress":{"type":"number","format":"double"},"metadata":{"description":"Any type"},"is_starred":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"organization":{"type":"integer"},"created_by":{"type":["integer","null"]},"dataset":{"type":["string","null"]},"task_tracker":{"type":["string","null"]}},"required":["id","evaluator_ids","unique_organization_id","created_at","updated_at","organization","created_by"],"description":"Serializer for ExperimentV2 model.\n\nField aliasing:\n- `evaluator_ids` (preferred) - accepts/returns evaluator UUIDs\n- `evaluator_slugs` (deprecated) - alias for backward compatibility\n- workflow `type=\"eval\"` (preferred) - canonical evaluation step name\n- workflow `type=\"evaluator\"` (deprecated) - accepted on input, normalized to `eval`\n\nWrite-side normalization (evaluator_ids → evaluator_slugs, workflow\ntype aliases) lives in `ExperimentV2WriteMixin` and is shared with the\ncreate + update serializers.","title":"ExperimentV2"},"CHDatasetTraceListRequest":{"type":"object","properties":{"id":{"type":"string"},"trace_unique_id":{"type":"string"},"root_span_unique_id":{"type":"string"},"unique_organization_id":{"type":"string"},"environment":{"type":"string"},"customer_identifier":{"type":"string"},"start_time":{"type":"string","format":"date-time"},"end_time":{"type":"string","format":"date-time"},"duration":{"type":"number","format":"double"},"span_count":{"type":"integer"},"llm_call_count":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"total_prompt_tokens":{"type":"integer"},"total_completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"error_count":{"type":"integer"},"name":{"type":"string"},"input":{"type":"string"},"output":{"type":"string"},"storage_object_key":{"type":"string"},"comparison_key":{"type":"string"},"status":{"type":"string"},"expected_output":{"type":"string"},"updated_storage_object_key":{"type":"string"},"latency":{"type":"number","format":"double"}},"required":["id","trace_unique_id"],"description":"Serializer for experiment trace list data.\nUsed by ExperimentLogsListView to serialize aggregated trace data.\n\nInherits all common fields from BaseTraceSerializer (including start_time, end_time, duration)\nand adds:\n- comparison_key: For A/B testing and experiment comparison\n- updated_storage_object_key: Overlay storage key for updated logs\n- scores: Map(String, Variant(Float64, String, Array(String), Int32)) from ClickHouse join\n\nNote: The 'id' field exposes root_span_unique_id for external API consumers.\nThis is CRITICAL for retrieving CHDatasetLog objects by ID in PATCH operations.\nThe query builder annotates 'id' as root_span_unique_id.","title":"CHDatasetTraceListRequest"},"CHDatasetTraceList":{"type":"object","properties":{"id":{"type":"string"},"trace_unique_id":{"type":"string"},"root_span_unique_id":{"type":"string"},"unique_organization_id":{"type":"string"},"environment":{"type":"string"},"customer_identifier":{"type":"string"},"start_time":{"type":"string","format":"date-time"},"end_time":{"type":"string","format":"date-time"},"duration":{"type":"number","format":"double"},"span_count":{"type":"integer"},"llm_call_count":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"total_prompt_tokens":{"type":"integer"},"total_completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"error_count":{"type":"integer"},"name":{"type":"string"},"input":{"type":"string"},"output":{"type":"string"},"storage_object_key":{"type":"string"},"comparison_key":{"type":"string"},"status":{"type":"string"},"expected_output":{"type":"string"},"updated_storage_object_key":{"type":"string"},"latency":{"type":"number","format":"double"},"scores":{"type":"string"}},"required":["id","trace_unique_id","scores"],"description":"Serializer for experiment trace list data.\nUsed by ExperimentLogsListView to serialize aggregated trace data.\n\nInherits all common fields from BaseTraceSerializer (including start_time, end_time, duration)\nand adds:\n- comparison_key: For A/B testing and experiment comparison\n- updated_storage_object_key: Overlay storage key for updated logs\n- scores: Map(String, Variant(Float64, String, Array(String), Int32)) from ClickHouse join\n\nNote: The 'id' field exposes root_span_unique_id for external API consumers.\nThis is CRITICAL for retrieving CHDatasetLog objects by ID in PATCH operations.\nThe query builder annotates 'id' as root_span_unique_id.","title":"CHDatasetTraceList"},"CHDatasetTraceDetail":{"type":"object","properties":{"id":{"type":"string"},"trace_unique_id":{"type":"string"},"root_span_unique_id":{"type":"string"},"unique_organization_id":{"type":"string"},"environment":{"type":"string"},"customer_identifier":{"type":"string"},"start_time":{"type":"string","format":"date-time"},"end_time":{"type":"string","format":"date-time"},"duration":{"type":"number","format":"double"},"span_count":{"type":"integer"},"llm_call_count":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"total_prompt_tokens":{"type":"integer"},"total_completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"error_count":{"type":"integer"},"name":{"type":"string"},"input":{"type":"string"},"output":{"type":"string"},"storage_object_key":{"type":"string"},"comparison_key":{"type":"string"},"status":{"type":"string"},"expected_output":{"type":"string"},"updated_storage_object_key":{"type":"string"},"latency":{"type":"number","format":"double"},"scores":{"type":"string"},"span_tree":{"type":"string"}},"required":["id","trace_unique_id","scores","span_tree"],"description":"Serializer for detailed experiment trace data with span tree.\n\nUses context from SpanTreeSerializerContextMixin to control:\n- span_tree_queryset_class: CH model for querying spans (e.g., CHDatasetLog)\n- span_tree_span_serializer_class: Serializer for individual spans\n- is_enriching_span_tree_with_detail: Whether to enrich spans with storage (controlled by auth type)","title":"CHDatasetTraceDetail"},"PatchedCHDatasetTraceDetailRequest":{"type":"object","properties":{"id":{"type":"string"},"trace_unique_id":{"type":"string"},"root_span_unique_id":{"type":"string"},"unique_organization_id":{"type":"string"},"environment":{"type":"string"},"customer_identifier":{"type":"string"},"start_time":{"type":"string","format":"date-time"},"end_time":{"type":"string","format":"date-time"},"duration":{"type":"number","format":"double"},"span_count":{"type":"integer"},"llm_call_count":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"total_prompt_tokens":{"type":"integer"},"total_completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"error_count":{"type":"integer"},"name":{"type":"string"},"input":{"type":"string"},"output":{"type":"string"},"storage_object_key":{"type":"string"},"comparison_key":{"type":"string"},"status":{"type":"string"},"expected_output":{"type":"string"},"updated_storage_object_key":{"type":"string"},"latency":{"type":"number","format":"double"}},"description":"Serializer for detailed experiment trace data with span tree.\n\nUses context from SpanTreeSerializerContextMixin to control:\n- span_tree_queryset_class: CH model for querying spans (e.g., CHDatasetLog)\n- span_tree_span_serializer_class: Serializer for individual spans\n- is_enriching_span_tree_with_detail: Whether to enrich spans with storage (controlled by auth type)","title":"PatchedCHDatasetTraceDetailRequest"},"Experiments_api_experiments_columns_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Experiments_api_experiments_columns_create_Response_200"},"Experiments_api_experiments_columns_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Experiments_api_experiments_columns_partial_update_Response_200"},"Experiments_api_experiments_rows_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Experiments_api_experiments_rows_create_Response_200"},"Experiments_api_experiments_rows_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Experiments_api_experiments_rows_partial_update_Response_200"},"Experiments_api_experiments_run_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Experiments_api_experiments_run_create_Response_200"},"Experiments_api_experiments_run_evals_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Experiments_api_experiments_run_evals_create_Response_200"},"ExperimentDetail":{"type":"object","properties":{"id":{"type":"string"},"updater":{"type":"string"},"column_count":{"type":"integer"},"columns":{"type":"array","items":{"description":"Any type"}},"created_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"row_count":{"type":"integer"},"rows":{"type":"array","items":{"description":"Any type"}},"status":{"type":"string"},"test_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"variables":{"type":"array","items":{"type":"string"}},"variable_definitions":{"type":"array","items":{"description":"Any type"}},"starred":{"type":"boolean"},"created_by":{"type":"integer"},"organization":{"type":"integer"},"project":{"type":["string","null"]},"updated_by":{"type":["integer","null"]},"tags":{"type":"array","items":{"type":"string"}}},"required":["updater","name","created_by","organization","updated_by"],"title":"ExperimentDetail"},"ExperimentDetailRequest":{"type":"object","properties":{"id":{"type":"string"},"column_count":{"type":"integer"},"columns":{"type":"array","items":{"description":"Any type"}},"created_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"row_count":{"type":"integer"},"rows":{"type":"array","items":{"description":"Any type"}},"status":{"type":"string"},"test_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"variables":{"type":"array","items":{"type":"string"}},"variable_definitions":{"type":"array","items":{"description":"Any type"}},"starred":{"type":"boolean"},"organization":{"type":"integer"},"project":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}}},"required":["name","organization"],"title":"ExperimentDetailRequest"},"PatchedPublicExperimentUpdateRequest":{"type":"object","properties":{"id":{"type":"string"},"column_count":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"row_count":{"type":"integer"},"status":{"type":"string"},"test_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"variables":{"type":"array","items":{"type":"string"}},"variable_definitions":{"type":"array","items":{"description":"Any type"}},"starred":{"type":"boolean"},"created_by":{"type":"integer"},"organization":{"type":"integer"},"project":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}}},"title":"PatchedPublicExperimentUpdateRequest"},"PublicExperimentUpdate":{"type":"object","properties":{"id":{"type":"string"},"column_count":{"type":"integer"},"columns":{"type":"array","items":{"description":"Any type"}},"created_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"row_count":{"type":"integer"},"rows":{"type":"array","items":{"description":"Any type"}},"status":{"type":"string"},"test_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"variables":{"type":"array","items":{"type":"string"}},"variable_definitions":{"type":"array","items":{"description":"Any type"}},"starred":{"type":"boolean"},"created_by":{"type":"integer"},"organization":{"type":"integer"},"project":{"type":["string","null"]},"updated_by":{"type":["integer","null"]},"tags":{"type":"array","items":{"type":"string"}}},"required":["columns","name","rows","created_by","organization","updated_by"],"title":"PublicExperimentUpdate"},"PaginatedExperimentBaseListFiltersData":{"type":"object","properties":{},"title":"PaginatedExperimentBaseListFiltersData"},"ExperimentBase":{"type":"object","properties":{"id":{"type":"string"},"updater":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"}},"project":{"type":["string","null"]},"column_count":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"row_count":{"type":"integer"},"status":{"type":"string"},"test_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"variables":{"type":"array","items":{"type":"string"}},"variable_definitions":{"type":"array","items":{"description":"Any type"}},"starred":{"type":"boolean"},"created_by":{"type":"integer"},"organization":{"type":"integer"},"updated_by":{"type":["integer","null"]}},"required":["updater","tags","name","created_by","organization"],"title":"ExperimentBase"},"PaginatedExperimentBaseList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedExperimentBaseListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/ExperimentBase"}}},"required":["count","results"],"title":"PaginatedExperimentBaseList"},"ExperimentBaseRequest":{"type":"object","properties":{"id":{"type":"string"},"project":{"type":["string","null"]},"column_count":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"row_count":{"type":"integer"},"status":{"type":"string"},"test_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"variables":{"type":"array","items":{"type":"string"}},"variable_definitions":{"type":"array","items":{"description":"Any type"}},"starred":{"type":"boolean"},"created_by":{"type":"integer"},"organization":{"type":"integer"},"updated_by":{"type":["integer","null"]}},"required":["name","created_by","organization"],"title":"ExperimentBaseRequest"},"ExperimentSummaryResponse":{"type":"object","properties":{"total_count":{"type":"integer"}},"required":["total_count"],"title":"ExperimentSummaryResponse"},"ExperimentSummaryResponseRequest":{"type":"object","properties":{"total_count":{"type":"integer"}},"required":["total_count"],"title":"ExperimentSummaryResponseRequest"},"PaginatedTestsetSheetListListFiltersData":{"type":"object","properties":{},"title":"PaginatedTestsetSheetListListFiltersData"},"PaginatedTestsetSheetListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedTestsetSheetListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/TestsetSheetList"}}},"required":["count","results"],"title":"PaginatedTestsetSheetListList"},"PatchedTestsetSheetListRequest":{"type":"object","properties":{"testset_unique_id":{"type":"string"},"project":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"description":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"row_count":{"type":"integer"},"column_count":{"type":"integer"},"max_insertions_before_rebalance":{"type":"integer"},"used_row_indexes":{"type":"array","items":{"type":"number","format":"double"}},"current_max_row_index":{"type":"number","format":"double"},"column_definitions":{"type":"array","items":{"description":"Any type"}},"starred":{"type":"boolean"},"created_by":{"type":["integer","null"]},"organization":{"type":"integer"}},"title":"PatchedTestsetSheetListRequest"},"PatchedTestsetSheetRequest":{"type":"object","properties":{"testset_unique_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"description":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"row_count":{"type":"integer"},"column_count":{"type":"integer"},"max_insertions_before_rebalance":{"type":"integer"},"used_row_indexes":{"type":"array","items":{"type":"number","format":"double"}},"current_max_row_index":{"type":"number","format":"double"},"column_definitions":{"type":"array","items":{"description":"Any type"}},"starred":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}}},"title":"PatchedTestsetSheetRequest"},"PublicTestsetSheetDetailRequest":{"type":"object","properties":{"testset_unique_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"column_definitions":{"type":"array","items":{"description":"Any type"}},"starred":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}}},"required":["name"],"description":"Detail serializer for testsets with masked fields for API key users","title":"PublicTestsetSheetDetailRequest"},"TestsetRow":{"type":"object","properties":{"id":{"type":"integer"},"row_index":{"type":"number","format":"double","default":1},"height":{"type":["integer","null"]},"row_data":{"description":"Any type"},"testset_sheet":{"type":"string"}},"required":["id","testset_sheet"],"title":"TestsetRow"},"TestsetRowRequest":{"type":"object","properties":{"row_index":{"type":"number","format":"double","default":1},"height":{"type":["integer","null"]},"row_data":{"description":"Any type"},"testset_sheet":{"type":"string"}},"required":["testset_sheet"],"title":"TestsetRowRequest"},"PatchedTestsetRowRequest":{"type":"object","properties":{"row_index":{"type":"number","format":"double","default":1},"height":{"type":["integer","null"]},"row_data":{"description":"Any type"},"testset_sheet":{"type":"string"}},"title":"PatchedTestsetRowRequest"},"Experiments_api_testsets_rows_reorder_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Experiments_api_testsets_rows_reorder_create_Response_200"},"Experiments_api_testsets_summary_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Experiments_api_testsets_summary_retrieve_Response_200"},"Experiments_api_testsets_summary_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Experiments_api_testsets_summary_update_Response_200"},"Experiments_api_testsets_summary_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Experiments_api_testsets_summary_partial_update_Response_200"},"PaginatedExperimentV2ListListFiltersData":{"type":"object","properties":{},"title":"PaginatedExperimentV2ListListFiltersData"},"PaginatedExperimentV2ListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedExperimentV2ListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/ExperimentV2List"}}},"required":["count","results"],"title":"PaginatedExperimentV2ListList"},"PatchedExperimentV2ListRequest":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"dataset":{"type":["string","null"]},"workflow_count":{"type":"integer"},"status":{"$ref":"#/components/schemas/DatasetLLMRunStatusEnum"},"progress":{"type":"number","format":"double"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"description":{"type":"string"},"is_starred":{"type":"boolean"}},"description":"Lighter serializer for listing experiments.","title":"PatchedExperimentV2ListRequest"},"ExperimentV2Request":{"type":"object","properties":{"project":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":"string"},"workflow":{"description":"Any type"},"workflow_count":{"type":"integer"},"evaluator_slugs":{"type":"array","items":{"type":"string"},"description":"List of evaluators to run for producing scores for comparison"},"evaluator_workflow_ids":{"type":"array","items":{"type":"string"},"description":"List of WorkflowVersion IDs (eval_only) defining evaluator pipelines. Mutually exclusive with evaluator_slugs."},"resource_ids":{"type":"array","items":{"type":"string"},"description":"All resource IDs referenced (evaluators, prompts) for reverse lookup on deletion"},"batch_size":{"type":"integer"},"concurrency":{"type":"integer"},"enable_tracing":{"type":"boolean"},"status":{"$ref":"#/components/schemas/DatasetLLMRunStatusEnum"},"progress":{"type":"number","format":"double"},"metadata":{"description":"Any type"},"is_starred":{"type":"boolean"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"dataset":{"type":["string","null"]},"task_tracker":{"type":["string","null"]}},"description":"Serializer for ExperimentV2 model.\n\nField aliasing:\n- `evaluator_ids` (preferred) - accepts/returns evaluator UUIDs\n- `evaluator_slugs` (deprecated) - alias for backward compatibility\n- workflow `type=\"eval\"` (preferred) - canonical evaluation step name\n- workflow `type=\"evaluator\"` (deprecated) - accepted on input, normalized to `eval`\n\nWrite-side normalization (evaluator_ids → evaluator_slugs, workflow\ntype aliases) lives in `ExperimentV2WriteMixin` and is shared with the\ncreate + update serializers.","title":"ExperimentV2Request"},"ExperimentV2UpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"dataset":{"type":["string","null"]},"workflow":{"description":"Any type"},"evaluator_slugs":{"type":"array","items":{"type":"string"},"description":"List of evaluators to run for producing scores for comparison"},"evaluator_workflow_ids":{"type":"array","items":{"type":"string"},"description":"List of WorkflowVersion IDs (eval_only) defining evaluator pipelines. Mutually exclusive with evaluator_slugs."},"batch_size":{"type":"integer"},"concurrency":{"type":"integer"},"enable_tracing":{"type":"boolean"},"is_starred":{"type":"boolean"}},"description":"Write serializer for PATCH /api/v2/experiments/{id}/.\n\nThe view blocks PATCH while the experiment has a run in flight so the\nCelery worker never races a mutating write. Ownership fields\n(`created_by`, `organization`) are immutable after creation.","title":"ExperimentV2UpdateRequest"},"ExperimentV2Update":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"dataset":{"type":["string","null"]},"workflow":{"description":"Any type"},"evaluator_slugs":{"type":"array","items":{"type":"string"},"description":"List of evaluators to run for producing scores for comparison"},"evaluator_workflow_ids":{"type":"array","items":{"type":"string"},"description":"List of WorkflowVersion IDs (eval_only) defining evaluator pipelines. Mutually exclusive with evaluator_slugs."},"batch_size":{"type":"integer"},"concurrency":{"type":"integer"},"enable_tracing":{"type":"boolean"},"is_starred":{"type":"boolean"}},"description":"Write serializer for PATCH /api/v2/experiments/{id}/.\n\nThe view blocks PATCH while the experiment has a run in flight so the\nCelery worker never races a mutating write. Ownership fields\n(`created_by`, `organization`) are immutable after creation.","title":"ExperimentV2Update"},"PatchedExperimentV2UpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"dataset":{"type":["string","null"]},"workflow":{"description":"Any type"},"evaluator_slugs":{"type":"array","items":{"type":"string"},"description":"List of evaluators to run for producing scores for comparison"},"evaluator_workflow_ids":{"type":"array","items":{"type":"string"},"description":"List of WorkflowVersion IDs (eval_only) defining evaluator pipelines. Mutually exclusive with evaluator_slugs."},"batch_size":{"type":"integer"},"concurrency":{"type":"integer"},"enable_tracing":{"type":"boolean"},"is_starred":{"type":"boolean"}},"description":"Write serializer for PATCH /api/v2/experiments/{id}/.\n\nThe view blocks PATCH while the experiment has a run in flight so the\nCelery worker never races a mutating write. Ownership fields\n(`created_by`, `organization`) are immutable after creation.","title":"PatchedExperimentV2UpdateRequest"},"Experiments_api_v2_experiments_histogram_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Experiments_api_v2_experiments_histogram_retrieve_Response_200"},"Experiments_filterExperimentScoreHistogram_Response_201":{"type":"object","properties":{},"description":"Empty response body","title":"Experiments_filterExperimentScoreHistogram_Response_201"},"Experiments_api_v2_experiments_histogram_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Experiments_api_v2_experiments_histogram_update_Response_200"},"Experiments_api_v2_experiments_histogram_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Experiments_api_v2_experiments_histogram_partial_update_Response_200"},"CHDatasetTraceDetailRequest":{"type":"object","properties":{"id":{"type":"string"},"trace_unique_id":{"type":"string"},"root_span_unique_id":{"type":"string"},"unique_organization_id":{"type":"string"},"environment":{"type":"string"},"customer_identifier":{"type":"string"},"start_time":{"type":"string","format":"date-time"},"end_time":{"type":"string","format":"date-time"},"duration":{"type":"number","format":"double"},"span_count":{"type":"integer"},"llm_call_count":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"total_prompt_tokens":{"type":"integer"},"total_completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"error_count":{"type":"integer"},"name":{"type":"string"},"input":{"type":"string"},"output":{"type":"string"},"storage_object_key":{"type":"string"},"comparison_key":{"type":"string"},"status":{"type":"string"},"expected_output":{"type":"string"},"updated_storage_object_key":{"type":"string"},"latency":{"type":"number","format":"double"}},"required":["id","trace_unique_id"],"description":"Serializer for detailed experiment trace data with span tree.\n\nUses context from SpanTreeSerializerContextMixin to control:\n- span_tree_queryset_class: CH model for querying spans (e.g., CHDatasetLog)\n- span_tree_span_serializer_class: Serializer for individual spans\n- is_enriching_span_tree_with_detail: Whether to enrich spans with storage (controlled by auth type)","title":"CHDatasetTraceDetailRequest"},"PaginatedChDatasetTraceListListFiltersData":{"type":"object","properties":{},"title":"PaginatedChDatasetTraceListListFiltersData"},"PaginatedCHDatasetTraceListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedChDatasetTraceListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/CHDatasetTraceList"}}},"required":["count","results"],"title":"PaginatedCHDatasetTraceListList"},"PatchedCHDatasetTraceListRequest":{"type":"object","properties":{"id":{"type":"string"},"trace_unique_id":{"type":"string"},"root_span_unique_id":{"type":"string"},"unique_organization_id":{"type":"string"},"environment":{"type":"string"},"customer_identifier":{"type":"string"},"start_time":{"type":"string","format":"date-time"},"end_time":{"type":"string","format":"date-time"},"duration":{"type":"number","format":"double"},"span_count":{"type":"integer"},"llm_call_count":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"total_prompt_tokens":{"type":"integer"},"total_completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"error_count":{"type":"integer"},"name":{"type":"string"},"input":{"type":"string"},"output":{"type":"string"},"storage_object_key":{"type":"string"},"comparison_key":{"type":"string"},"status":{"type":"string"},"expected_output":{"type":"string"},"updated_storage_object_key":{"type":"string"},"latency":{"type":"number","format":"double"}},"description":"Serializer for experiment trace list data.\nUsed by ExperimentLogsListView to serialize aggregated trace data.\n\nInherits all common fields from BaseTraceSerializer (including start_time, end_time, duration)\nand adds:\n- comparison_key: For A/B testing and experiment comparison\n- updated_storage_object_key: Overlay storage key for updated logs\n- scores: Map(String, Variant(Float64, String, Array(String), Int32)) from ClickHouse join\n\nNote: The 'id' field exposes root_span_unique_id for external API consumers.\nThis is CRITICAL for retrieving CHDatasetLog objects by ID in PATCH operations.\nThe query builder annotates 'id' as root_span_unique_id.","title":"PatchedCHDatasetTraceListRequest"},"Experiments_api_v2_experiments_logs_summary_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Experiments_api_v2_experiments_logs_summary_retrieve_Response_200"},"Experiments_filterExperimentSpansSummary_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Experiments_filterExperimentSpansSummary_Response_200"},"Experiments_api_v2_experiments_logs_summary_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Experiments_api_v2_experiments_logs_summary_update_Response_200"},"Experiments_api_v2_experiments_logs_summary_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Experiments_api_v2_experiments_logs_summary_partial_update_Response_200"},"Experiments_api_v2_experiments_runs_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Experiments_api_v2_experiments_runs_create_Response_200"},"Experiments_api_v2_experiments_runs_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Experiments_api_v2_experiments_runs_update_Response_200"},"Experiments_api_v2_experiments_runs_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Experiments_api_v2_experiments_runs_partial_update_Response_200"},"ExperimentV2SummaryResponse":{"type":"object","properties":{"total_count":{"type":"integer"}},"required":["total_count"],"title":"ExperimentV2SummaryResponse"},"ExperimentV2SummaryResponseRequest":{"type":"object","properties":{"total_count":{"type":"integer"}},"required":["total_count"],"title":"ExperimentV2SummaryResponseRequest"},"PatchedExperimentV2SummaryResponseRequest":{"type":"object","properties":{"total_count":{"type":"integer"}},"title":"PatchedExperimentV2SummaryResponseRequest"},"Models_filterModelsSummary_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Models_filterModelsSummary_Response_200"},"AffiliationCategoryEnum":{"type":"string","enum":["custom","keywordsai"],"description":"* `custom` - Custom\n* `keywordsai` - Keywordsai","title":"AffiliationCategoryEnum"},"Status359Enum":{"type":"string","enum":["active","deprecated"],"description":"* `active` - Active\n* `deprecated` - Deprecated","title":"Status359Enum"},"Source7d1Enum":{"type":"string","enum":["hardcoded","db"],"description":"* `hardcoded` - Synced from Code\n* `db` - Database Only","title":"Source7d1Enum"},"ModelTypeEnum":{"type":"string","enum":["chat","embedding","audio"],"description":"* `chat` - Chat\n* `embedding` - Embedding\n* `audio` - Audio","title":"ModelTypeEnum"},"DeepSWEBenchmarkPayload":{"type":"object","properties":{"version":{"type":["string","null"]},"generated_at":{"type":["string","null"]},"n_tasks_in_set":{"type":["integer","null"]},"model":{"type":["string","null"]},"harness":{"type":["string","null"]},"reasoning_effort":{"type":["string","null"]},"config":{"type":["string","null"]},"source":{"type":["string","null"]},"pass_rate":{"type":["number","null"],"format":"double"},"pass_at_1":{"type":["number","null"],"format":"double"},"pass_at_4":{"type":["number","null"],"format":"double"}},"description":"Full DeepSWE v1.1 leaderboard row stored at ``metadata.benchmarks.deepswe``.\n\nIncludes artifact envelope fields (``version``, ``generated_at``, ``n_tasks_in_set``)\nplus the complete best-config row from DeepSWE (``pass_rate``, ``pass_at_4``,\ncost/token aggregates, confidence intervals, etc.).","title":"DeepSWEBenchmarkPayload"},"ModelBenchmarksMetadata":{"type":"object","properties":{"deepswe":{"oneOf":[{"$ref":"#/components/schemas/DeepSWEBenchmarkPayload"},{"type":"null"}]}},"description":"Source-keyed benchmark blobs on ``LLMModel.metadata.benchmarks``.","title":"ModelBenchmarksMetadata"},"PublicModelListRequestMetadata":{"type":"object","properties":{"privacy_policy_url":{"type":["string","null"]},"zero_data_retention":{"type":["boolean","null"]},"prompt_training":{"type":["boolean","null"]},"prompt_logging":{"type":["boolean","null"]},"moderation":{"type":["boolean","null"]},"is_available_on_credits":{"type":["boolean","null"]},"stream_cancellation_supported":{"type":["boolean","null"]},"precision":{"type":["string","null"]},"quantization":{"type":["string","null"]},"release_date":{"type":["string","null"]},"context_size":{"type":["integer","null"]},"weekly_tokens":{"type":["integer","null"]},"daily_tokens":{"type":["integer","null"]},"benchmarks":{"oneOf":[{"$ref":"#/components/schemas/ModelBenchmarksMetadata"},{"type":"null"}]}},"description":"Flexible catalog metadata; known keys are documented, extras allowed.","title":"PublicModelListRequestMetadata"},"PublicModelListRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"affiliation_category":{"$ref":"#/components/schemas/AffiliationCategoryEnum"},"is_managed":{"type":"boolean"},"is_called_by_custom_name":{"type":"boolean"},"model_name":{"type":"string"},"base_model_name":{"type":"string"},"display_name":{"type":"string"},"max_context_window":{"type":"integer"},"input_cost":{"type":"number","format":"double"},"output_cost":{"type":"number","format":"double"},"cache_hit_input_cost":{"type":"number","format":"double"},"cache_creation_input_cost":{"type":"number","format":"double"},"respan_discount_rate":{"type":["number","null"],"format":"double"},"streaming_support":{"type":"integer"},"function_call":{"type":"integer"},"image_support":{"type":"integer"},"overridden_fields":{"type":"array","items":{"type":"string"}},"load_balance_backups":{"description":"Any type"},"status":{"$ref":"#/components/schemas/Status359Enum"},"is_verified":{"type":"boolean","description":"Whether the model's pricing has been human-verified. Unverified auto-discovered models are kept out of the live model dictionary."},"source":{"$ref":"#/components/schemas/Source7d1Enum","description":"Source of truth for this model definition\n\n* `hardcoded` - Synced from Code\n* `db` - Database Only"},"model_type":{"$ref":"#/components/schemas/ModelTypeEnum","description":"Type of model: chat, embedding, or audio\n\n* `chat` - Chat\n* `embedding` - Embedding\n* `audio` - Audio"},"metadata":{"$ref":"#/components/schemas/PublicModelListRequestMetadata","description":"Flexible catalog metadata; known keys are documented, extras allowed."},"organization":{"type":["integer","null"]}},"required":["model_name","organization"],"description":"Public API serializer for listing models - hides internal fields","title":"PublicModelListRequest"},"PublicLLMProvider":{"type":"object","properties":{"project":{"type":["string","null"]},"provider_name":{"type":"string"},"provider_id":{"type":"string"},"extra_kwargs":{"description":"Any type"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"respan_discount_rate":{"type":"number","format":"double"},"models_sync_config":{"description":"Any type"},"id":{"type":"string"}},"required":["provider_name","provider_id","created_at","updated_at","id"],"description":"Public API serializer for nested provider in model responses - hides internal fields","title":"PublicLLMProvider"},"PublicModelListMetadata":{"type":"object","properties":{"privacy_policy_url":{"type":["string","null"]},"zero_data_retention":{"type":["boolean","null"]},"prompt_training":{"type":["boolean","null"]},"prompt_logging":{"type":["boolean","null"]},"moderation":{"type":["boolean","null"]},"is_available_on_credits":{"type":["boolean","null"]},"stream_cancellation_supported":{"type":["boolean","null"]},"precision":{"type":["string","null"]},"quantization":{"type":["string","null"]},"release_date":{"type":["string","null"]},"context_size":{"type":["integer","null"]},"weekly_tokens":{"type":["integer","null"]},"daily_tokens":{"type":["integer","null"]},"benchmarks":{"oneOf":[{"$ref":"#/components/schemas/ModelBenchmarksMetadata"},{"type":"null"}]}},"description":"Flexible catalog metadata; known keys are documented, extras allowed.","title":"PublicModelListMetadata"},"PublicModelList":{"type":"object","properties":{"project":{"type":["string","null"]},"provider":{"$ref":"#/components/schemas/PublicLLMProvider"},"supported_params":{"type":"string"},"affiliation_category":{"$ref":"#/components/schemas/AffiliationCategoryEnum"},"is_managed":{"type":"boolean"},"is_called_by_custom_name":{"type":"boolean"},"model_name":{"type":"string"},"base_model_name":{"type":"string"},"display_name":{"type":"string"},"max_context_window":{"type":"integer"},"input_cost":{"type":"number","format":"double"},"output_cost":{"type":"number","format":"double"},"cache_hit_input_cost":{"type":"number","format":"double"},"cache_creation_input_cost":{"type":"number","format":"double"},"respan_discount_rate":{"type":["number","null"],"format":"double"},"streaming_support":{"type":"integer"},"function_call":{"type":"integer"},"image_support":{"type":"integer"},"overridden_fields":{"type":"array","items":{"type":"string"}},"load_balance_backups":{"description":"Any type"},"status":{"$ref":"#/components/schemas/Status359Enum"},"is_verified":{"type":"boolean","description":"Whether the model's pricing has been human-verified. Unverified auto-discovered models are kept out of the live model dictionary."},"source":{"$ref":"#/components/schemas/Source7d1Enum","description":"Source of truth for this model definition\n\n* `hardcoded` - Synced from Code\n* `db` - Database Only"},"model_type":{"$ref":"#/components/schemas/ModelTypeEnum","description":"Type of model: chat, embedding, or audio\n\n* `chat` - Chat\n* `embedding` - Embedding\n* `audio` - Audio"},"metadata":{"$ref":"#/components/schemas/PublicModelListMetadata","description":"Flexible catalog metadata; known keys are documented, extras allowed."},"id":{"type":"string"},"is_byok":{"type":"boolean"},"effective_discount_rate":{"type":"number","format":"double"}},"required":["provider","supported_params","model_name","id","is_byok","effective_discount_rate"],"description":"Public API serializer for listing models - hides internal fields","title":"PublicModelList"},"Models_listModels_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Models_listModels_Response_200"},"PublicModelDetailMetadata":{"type":"object","properties":{"privacy_policy_url":{"type":["string","null"]},"zero_data_retention":{"type":["boolean","null"]},"prompt_training":{"type":["boolean","null"]},"prompt_logging":{"type":["boolean","null"]},"moderation":{"type":["boolean","null"]},"is_available_on_credits":{"type":["boolean","null"]},"stream_cancellation_supported":{"type":["boolean","null"]},"precision":{"type":["string","null"]},"quantization":{"type":["string","null"]},"release_date":{"type":["string","null"]},"context_size":{"type":["integer","null"]},"weekly_tokens":{"type":["integer","null"]},"daily_tokens":{"type":["integer","null"]},"benchmarks":{"oneOf":[{"$ref":"#/components/schemas/ModelBenchmarksMetadata"},{"type":"null"}]}},"description":"Flexible catalog metadata; known keys are documented, extras allowed.","title":"PublicModelDetailMetadata"},"PublicModelDetail":{"type":"object","properties":{"project":{"type":["string","null"]},"provider":{"$ref":"#/components/schemas/PublicLLMProvider"},"supported_params":{"type":"string"},"affiliation_category":{"$ref":"#/components/schemas/AffiliationCategoryEnum"},"is_managed":{"type":"boolean"},"is_called_by_custom_name":{"type":"boolean"},"model_name":{"type":"string"},"base_model_name":{"type":"string"},"display_name":{"type":"string"},"max_context_window":{"type":"integer"},"input_cost":{"type":"number","format":"double"},"output_cost":{"type":"number","format":"double"},"cache_hit_input_cost":{"type":"number","format":"double"},"cache_creation_input_cost":{"type":"number","format":"double"},"respan_discount_rate":{"type":["number","null"],"format":"double"},"streaming_support":{"type":"integer"},"function_call":{"type":"integer"},"image_support":{"type":"integer"},"overridden_fields":{"type":"array","items":{"type":"string"}},"load_balance_backups":{"description":"Any type"},"status":{"$ref":"#/components/schemas/Status359Enum"},"is_verified":{"type":"boolean","description":"Whether the model's pricing has been human-verified. Unverified auto-discovered models are kept out of the live model dictionary."},"source":{"$ref":"#/components/schemas/Source7d1Enum","description":"Source of truth for this model definition\n\n* `hardcoded` - Synced from Code\n* `db` - Database Only"},"model_type":{"$ref":"#/components/schemas/ModelTypeEnum","description":"Type of model: chat, embedding, or audio\n\n* `chat` - Chat\n* `embedding` - Embedding\n* `audio` - Audio"},"metadata":{"$ref":"#/components/schemas/PublicModelDetailMetadata","description":"Flexible catalog metadata; known keys are documented, extras allowed."},"id":{"type":"string"},"is_byok":{"type":"boolean"},"effective_discount_rate":{"type":"number","format":"double"}},"required":["provider","supported_params","model_name","id","is_byok","effective_discount_rate"],"description":"Public API serializer for model detail - hides internal fields","title":"PublicModelDetail"},"PatchedPublicModelUpdateRequestSupportedParamsOverride":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"PatchedPublicModelUpdateRequestSupportedParamsOverride"},"PatchedPublicModelUpdateRequestMetadata":{"type":"object","properties":{"privacy_policy_url":{"type":["string","null"]},"zero_data_retention":{"type":["boolean","null"]},"prompt_training":{"type":["boolean","null"]},"prompt_logging":{"type":["boolean","null"]},"moderation":{"type":["boolean","null"]},"is_available_on_credits":{"type":["boolean","null"]},"stream_cancellation_supported":{"type":["boolean","null"]},"precision":{"type":["string","null"]},"quantization":{"type":["string","null"]},"release_date":{"type":["string","null"]},"context_size":{"type":["integer","null"]},"weekly_tokens":{"type":["integer","null"]},"daily_tokens":{"type":["integer","null"]},"benchmarks":{"oneOf":[{"$ref":"#/components/schemas/ModelBenchmarksMetadata"},{"type":"null"}]}},"description":"Flexible catalog metadata; known keys are documented, extras allowed.","title":"PatchedPublicModelUpdateRequestMetadata"},"PatchedPublicModelUpdateRequest":{"type":"object","properties":{"supported_params_override":{"$ref":"#/components/schemas/PatchedPublicModelUpdateRequestSupportedParamsOverride"},"affiliation_category":{"$ref":"#/components/schemas/AffiliationCategoryEnum"},"is_managed":{"type":"boolean"},"is_called_by_custom_name":{"type":"boolean"},"base_model_name":{"type":"string"},"display_name":{"type":"string"},"max_context_window":{"type":"integer"},"input_cost":{"type":"number","format":"double"},"output_cost":{"type":"number","format":"double"},"cache_hit_input_cost":{"type":"number","format":"double"},"cache_creation_input_cost":{"type":"number","format":"double"},"respan_discount_rate":{"type":["number","null"],"format":"double"},"streaming_support":{"type":"integer"},"function_call":{"type":"integer"},"image_support":{"type":"integer"},"overridden_fields":{"type":"array","items":{"type":"string"}},"load_balance_backups":{"description":"Any type"},"status":{"$ref":"#/components/schemas/Status359Enum"},"is_verified":{"type":"boolean","description":"Whether the model's pricing has been human-verified. Unverified auto-discovered models are kept out of the live model dictionary."},"source":{"$ref":"#/components/schemas/Source7d1Enum","description":"Source of truth for this model definition\n\n* `hardcoded` - Synced from Code\n* `db` - Database Only"},"model_type":{"$ref":"#/components/schemas/ModelTypeEnum","description":"Type of model: chat, embedding, or audio\n\n* `chat` - Chat\n* `embedding` - Embedding\n* `audio` - Audio"},"metadata":{"$ref":"#/components/schemas/PatchedPublicModelUpdateRequestMetadata","description":"Flexible catalog metadata; known keys are documented, extras allowed."},"provider":{"type":["integer","null"]}},"description":"Public API serializer for updating models - hides internal fields.\n\n``status`` is writable here but the view blocks non-superadmins from\nchanging it (``superadmin_only_fields``).","title":"PatchedPublicModelUpdateRequest"},"PublicModelUpdateMetadata":{"type":"object","properties":{"privacy_policy_url":{"type":["string","null"]},"zero_data_retention":{"type":["boolean","null"]},"prompt_training":{"type":["boolean","null"]},"prompt_logging":{"type":["boolean","null"]},"moderation":{"type":["boolean","null"]},"is_available_on_credits":{"type":["boolean","null"]},"stream_cancellation_supported":{"type":["boolean","null"]},"precision":{"type":["string","null"]},"quantization":{"type":["string","null"]},"release_date":{"type":["string","null"]},"context_size":{"type":["integer","null"]},"weekly_tokens":{"type":["integer","null"]},"daily_tokens":{"type":["integer","null"]},"benchmarks":{"oneOf":[{"$ref":"#/components/schemas/ModelBenchmarksMetadata"},{"type":"null"}]}},"description":"Flexible catalog metadata; known keys are documented, extras allowed.","title":"PublicModelUpdateMetadata"},"PublicModelUpdate":{"type":"object","properties":{"project":{"type":["string","null"]},"affiliation_category":{"$ref":"#/components/schemas/AffiliationCategoryEnum"},"is_managed":{"type":"boolean"},"is_called_by_custom_name":{"type":"boolean"},"model_name":{"type":"string"},"base_model_name":{"type":"string"},"display_name":{"type":"string"},"max_context_window":{"type":"integer"},"input_cost":{"type":"number","format":"double"},"output_cost":{"type":"number","format":"double"},"cache_hit_input_cost":{"type":"number","format":"double"},"cache_creation_input_cost":{"type":"number","format":"double"},"respan_discount_rate":{"type":["number","null"],"format":"double"},"streaming_support":{"type":"integer"},"function_call":{"type":"integer"},"image_support":{"type":"integer"},"overridden_fields":{"type":"array","items":{"type":"string"}},"load_balance_backups":{"description":"Any type"},"status":{"$ref":"#/components/schemas/Status359Enum"},"is_verified":{"type":"boolean","description":"Whether the model's pricing has been human-verified. Unverified auto-discovered models are kept out of the live model dictionary."},"source":{"$ref":"#/components/schemas/Source7d1Enum","description":"Source of truth for this model definition\n\n* `hardcoded` - Synced from Code\n* `db` - Database Only"},"model_type":{"$ref":"#/components/schemas/ModelTypeEnum","description":"Type of model: chat, embedding, or audio\n\n* `chat` - Chat\n* `embedding` - Embedding\n* `audio` - Audio"},"metadata":{"$ref":"#/components/schemas/PublicModelUpdateMetadata","description":"Flexible catalog metadata; known keys are documented, extras allowed."},"provider":{"type":["integer","null"]}},"required":["project","model_name"],"description":"Public API serializer for updating models - hides internal fields.\n\n``status`` is writable here but the view blocks non-superadmins from\nchanging it (``superadmin_only_fields``).","title":"PublicModelUpdate"},"PaginatedPublicCustomProviderListListFiltersData":{"type":"object","properties":{},"title":"PaginatedPublicCustomProviderListListFiltersData"},"PublicCustomProviderList":{"type":"object","properties":{"project":{"type":["string","null"]},"provider_name":{"type":"string"},"provider_id":{"type":"string"},"extra_kwargs":{"description":"Any type"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"respan_discount_rate":{"type":"number","format":"double"},"models_sync_config":{"description":"Any type"},"id":{"type":"string"}},"required":["provider_name","provider_id","created_at","updated_at","id"],"description":"Public API serializer for listing custom providers - hides internal fields, uses provider_id as id","title":"PublicCustomProviderList"},"PaginatedPublicCustomProviderListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedPublicCustomProviderListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/PublicCustomProviderList"}}},"required":["count","results"],"title":"PaginatedPublicCustomProviderListList"},"PublicCustomProviderCreateRequest":{"type":"object","properties":{"provider_name":{"type":"string"},"provider_id":{"type":"string"},"extra_kwargs":{"description":"Any type"},"respan_discount_rate":{"type":"number","format":"double"},"models_sync_config":{"description":"Any type"}},"required":["provider_name","provider_id"],"description":"Public API serializer for creating custom providers - hides internal fields, uses provider_id as id","title":"PublicCustomProviderCreateRequest"},"PublicCustomProviderCreate":{"type":"object","properties":{"project":{"type":["string","null"]},"provider_name":{"type":"string"},"provider_id":{"type":"string"},"extra_kwargs":{"description":"Any type"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"respan_discount_rate":{"type":"number","format":"double"},"models_sync_config":{"description":"Any type"},"id":{"type":"string"}},"required":["project","provider_name","provider_id","created_at","updated_at","id"],"description":"Public API serializer for creating custom providers - hides internal fields, uses provider_id as id","title":"PublicCustomProviderCreate"},"PublicCustomProviderDetail":{"type":"object","properties":{"project":{"type":["string","null"]},"provider_name":{"type":"string"},"provider_id":{"type":"string"},"extra_kwargs":{"description":"Any type"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"respan_discount_rate":{"type":"number","format":"double"},"models_sync_config":{"description":"Any type"},"id":{"type":"string"}},"required":["provider_name","provider_id","created_at","updated_at","id"],"description":"Public API serializer for custom provider detail - hides internal fields, uses provider_id as id","title":"PublicCustomProviderDetail"},"PatchedPublicCustomProviderUpdateRequest":{"type":"object","properties":{"provider_name":{"type":"string"},"extra_kwargs":{"description":"Any type"},"respan_discount_rate":{"type":"number","format":"double"},"models_sync_config":{"description":"Any type"}},"description":"Public API serializer for updating custom providers - hides internal fields, validates managed providers, uses provider_id as id","title":"PatchedPublicCustomProviderUpdateRequest"},"PublicCustomProviderUpdate":{"type":"object","properties":{"project":{"type":["string","null"]},"provider_name":{"type":"string"},"provider_id":{"type":"string"},"extra_kwargs":{"description":"Any type"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"respan_discount_rate":{"type":"number","format":"double"},"models_sync_config":{"description":"Any type"},"id":{"type":"string"}},"required":["project","provider_name","provider_id","created_at","updated_at","id"],"description":"Public API serializer for updating custom providers - hides internal fields, validates managed providers, uses provider_id as id","title":"PublicCustomProviderUpdate"},"PaginatedPublicModelListListFiltersData":{"type":"object","properties":{},"title":"PaginatedPublicModelListListFiltersData"},"PaginatedPublicModelListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedPublicModelListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/PublicModelList"}}},"required":["count","results"],"title":"PaginatedPublicModelListList"},"PatchedPublicModelListRequestMetadata":{"type":"object","properties":{"privacy_policy_url":{"type":["string","null"]},"zero_data_retention":{"type":["boolean","null"]},"prompt_training":{"type":["boolean","null"]},"prompt_logging":{"type":["boolean","null"]},"moderation":{"type":["boolean","null"]},"is_available_on_credits":{"type":["boolean","null"]},"stream_cancellation_supported":{"type":["boolean","null"]},"precision":{"type":["string","null"]},"quantization":{"type":["string","null"]},"release_date":{"type":["string","null"]},"context_size":{"type":["integer","null"]},"weekly_tokens":{"type":["integer","null"]},"daily_tokens":{"type":["integer","null"]},"benchmarks":{"oneOf":[{"$ref":"#/components/schemas/ModelBenchmarksMetadata"},{"type":"null"}]}},"description":"Flexible catalog metadata; known keys are documented, extras allowed.","title":"PatchedPublicModelListRequestMetadata"},"PatchedPublicModelListRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"affiliation_category":{"$ref":"#/components/schemas/AffiliationCategoryEnum"},"is_managed":{"type":"boolean"},"is_called_by_custom_name":{"type":"boolean"},"model_name":{"type":"string"},"base_model_name":{"type":"string"},"display_name":{"type":"string"},"max_context_window":{"type":"integer"},"input_cost":{"type":"number","format":"double"},"output_cost":{"type":"number","format":"double"},"cache_hit_input_cost":{"type":"number","format":"double"},"cache_creation_input_cost":{"type":"number","format":"double"},"respan_discount_rate":{"type":["number","null"],"format":"double"},"streaming_support":{"type":"integer"},"function_call":{"type":"integer"},"image_support":{"type":"integer"},"overridden_fields":{"type":"array","items":{"type":"string"}},"load_balance_backups":{"description":"Any type"},"status":{"$ref":"#/components/schemas/Status359Enum"},"is_verified":{"type":"boolean","description":"Whether the model's pricing has been human-verified. Unverified auto-discovered models are kept out of the live model dictionary."},"source":{"$ref":"#/components/schemas/Source7d1Enum","description":"Source of truth for this model definition\n\n* `hardcoded` - Synced from Code\n* `db` - Database Only"},"model_type":{"$ref":"#/components/schemas/ModelTypeEnum","description":"Type of model: chat, embedding, or audio\n\n* `chat` - Chat\n* `embedding` - Embedding\n* `audio` - Audio"},"metadata":{"$ref":"#/components/schemas/PatchedPublicModelListRequestMetadata","description":"Flexible catalog metadata; known keys are documented, extras allowed."},"organization":{"type":["integer","null"]}},"description":"Public API serializer for listing models - hides internal fields","title":"PatchedPublicModelListRequest"},"LLMProviderRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"provider_name":{"type":"string"},"provider_id":{"type":"string"},"litellm_provider_id":{"type":"string"},"moderation":{"type":"string"},"extra_kwargs":{"description":"Any type"},"is_managed":{"type":"boolean"},"respan_discount_rate":{"type":"number","format":"double"},"models_sync_config":{"description":"Any type"},"organization":{"type":["integer","null"]}},"required":["provider_name","provider_id","organization"],"title":"LLMProviderRequest"},"LlmModelDetailRequestMetadata":{"type":"object","properties":{"privacy_policy_url":{"type":["string","null"]},"zero_data_retention":{"type":["boolean","null"]},"prompt_training":{"type":["boolean","null"]},"prompt_logging":{"type":["boolean","null"]},"moderation":{"type":["boolean","null"]},"is_available_on_credits":{"type":["boolean","null"]},"stream_cancellation_supported":{"type":["boolean","null"]},"precision":{"type":["string","null"]},"quantization":{"type":["string","null"]},"release_date":{"type":["string","null"]},"context_size":{"type":["integer","null"]},"weekly_tokens":{"type":["integer","null"]},"daily_tokens":{"type":["integer","null"]},"benchmarks":{"oneOf":[{"$ref":"#/components/schemas/ModelBenchmarksMetadata"},{"type":"null"}]}},"description":"Flexible catalog metadata; known keys are documented, extras allowed.","title":"LlmModelDetailRequestMetadata"},"LLMModelDetailRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"provider":{"$ref":"#/components/schemas/LLMProviderRequest"},"affiliation_category":{"$ref":"#/components/schemas/AffiliationCategoryEnum"},"is_managed":{"type":"boolean"},"is_called_by_custom_name":{"type":"boolean"},"model_name":{"type":"string"},"base_model_name":{"type":"string"},"display_name":{"type":"string"},"speed":{"type":"number","format":"double"},"max_context_window":{"type":"integer"},"model_size":{"type":"integer"},"mmlu_score":{"type":"number","format":"double"},"mt_bench_score":{"type":"number","format":"double"},"big_bench_score":{"type":"number","format":"double"},"input_cost":{"type":"number","format":"double"},"output_cost":{"type":"number","format":"double"},"cache_hit_input_cost":{"type":"number","format":"double"},"cache_creation_input_cost":{"type":"number","format":"double"},"respan_discount_rate":{"type":["number","null"],"format":"double"},"rate_limit":{"type":"integer"},"token_rate_limit":{"type":"integer"},"multilingual":{"type":"integer"},"streaming_support":{"type":"integer"},"function_call":{"type":"integer"},"enforce_function_call":{"type":"integer"},"weight":{"type":"number","format":"double"},"image_support":{"type":"integer"},"order":{"type":"integer"},"sdk":{"type":"string"},"foundation_model_name":{"type":"string"},"drop_params":{"type":"array","items":{"type":"string"}},"overridden_fields":{"type":"array","items":{"type":"string"}},"load_balance_backups":{"description":"Any type"},"fallbacks":{"description":"Any type"},"deprecated":{"type":"boolean"},"status":{"$ref":"#/components/schemas/Status359Enum"},"is_verified":{"type":"boolean","description":"Whether the model's pricing has been human-verified. Unverified auto-discovered models are kept out of the live model dictionary."},"total_requests":{"type":"integer","format":"int64"},"total_cost":{"type":"number","format":"double"},"total_tokens":{"type":"integer","format":"int64"},"total_completion_tokens":{"type":"integer","format":"int64"},"total_prompt_tokens":{"type":"integer","format":"int64"},"avg_tps":{"type":"number","format":"double"},"source":{"$ref":"#/components/schemas/Source7d1Enum","description":"Source of truth for this model definition\n\n* `hardcoded` - Synced from Code\n* `db` - Database Only"},"model_type":{"$ref":"#/components/schemas/ModelTypeEnum","description":"Type of model: chat, embedding, or audio\n\n* `chat` - Chat\n* `embedding` - Embedding\n* `audio` - Audio"},"metadata":{"$ref":"#/components/schemas/LlmModelDetailRequestMetadata","description":"Flexible catalog metadata; known keys are documented, extras allowed."},"organization":{"type":["integer","null"]},"foundation_model":{"type":["integer","null"]}},"required":["provider","model_name","organization"],"description":"Injects the typed ``metadata`` field so the OpenAPI schema reflects the\ndocumented :class:`LLMModelMetadata` shape (on both read and write\nserializers) instead of a free-form object.\n\nInjected via ``get_fields`` (not a declared class attribute) because DRF's\n``SerializerMetaclass`` only collects declared fields from bases that are\nthemselves serializers — same plain-mixin pattern as\n``ModelEffectiveDiscountMixin`` / ``PublicAPIIdMixin``. The guard keeps the\nfield absent on serializers that deliberately exclude it.","title":"LLMModelDetailRequest"},"LLMProvider":{"type":"object","properties":{"id":{"type":"integer"},"project":{"type":["string","null"]},"provider_name":{"type":"string"},"provider_id":{"type":"string"},"litellm_provider_id":{"type":"string"},"moderation":{"type":"string"},"extra_kwargs":{"description":"Any type"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"is_managed":{"type":"boolean"},"respan_discount_rate":{"type":"number","format":"double"},"models_sync_config":{"description":"Any type"}},"required":["id","provider_name","provider_id","created_at","updated_at"],"title":"LLMProvider"},"LlmModelDetailMetadata":{"type":"object","properties":{"privacy_policy_url":{"type":["string","null"]},"zero_data_retention":{"type":["boolean","null"]},"prompt_training":{"type":["boolean","null"]},"prompt_logging":{"type":["boolean","null"]},"moderation":{"type":["boolean","null"]},"is_available_on_credits":{"type":["boolean","null"]},"stream_cancellation_supported":{"type":["boolean","null"]},"precision":{"type":["string","null"]},"quantization":{"type":["string","null"]},"release_date":{"type":["string","null"]},"context_size":{"type":["integer","null"]},"weekly_tokens":{"type":["integer","null"]},"daily_tokens":{"type":["integer","null"]},"benchmarks":{"oneOf":[{"$ref":"#/components/schemas/ModelBenchmarksMetadata"},{"type":"null"}]}},"description":"Flexible catalog metadata; known keys are documented, extras allowed.","title":"LlmModelDetailMetadata"},"LLMModelDetail":{"type":"object","properties":{"id":{"type":"integer"},"project":{"type":["string","null"]},"provider":{"$ref":"#/components/schemas/LLMProvider"},"supported_params":{"type":"string"},"affiliation_category":{"$ref":"#/components/schemas/AffiliationCategoryEnum"},"is_managed":{"type":"boolean"},"is_called_by_custom_name":{"type":"boolean"},"model_name":{"type":"string"},"base_model_name":{"type":"string"},"display_name":{"type":"string"},"speed":{"type":"number","format":"double"},"max_context_window":{"type":"integer"},"model_size":{"type":"integer"},"mmlu_score":{"type":"number","format":"double"},"mt_bench_score":{"type":"number","format":"double"},"big_bench_score":{"type":"number","format":"double"},"input_cost":{"type":"number","format":"double"},"output_cost":{"type":"number","format":"double"},"cache_hit_input_cost":{"type":"number","format":"double"},"cache_creation_input_cost":{"type":"number","format":"double"},"respan_discount_rate":{"type":["number","null"],"format":"double"},"rate_limit":{"type":"integer"},"token_rate_limit":{"type":"integer"},"multilingual":{"type":"integer"},"streaming_support":{"type":"integer"},"function_call":{"type":"integer"},"enforce_function_call":{"type":"integer"},"weight":{"type":"number","format":"double"},"image_support":{"type":"integer"},"order":{"type":"integer"},"sdk":{"type":"string"},"foundation_model_name":{"type":"string"},"drop_params":{"type":"array","items":{"type":"string"}},"overridden_fields":{"type":"array","items":{"type":"string"}},"load_balance_backups":{"description":"Any type"},"fallbacks":{"description":"Any type"},"deprecated":{"type":"boolean"},"status":{"$ref":"#/components/schemas/Status359Enum"},"is_verified":{"type":"boolean","description":"Whether the model's pricing has been human-verified. Unverified auto-discovered models are kept out of the live model dictionary."},"total_requests":{"type":"integer","format":"int64"},"total_cost":{"type":"number","format":"double"},"total_tokens":{"type":"integer","format":"int64"},"total_completion_tokens":{"type":"integer","format":"int64"},"total_prompt_tokens":{"type":"integer","format":"int64"},"avg_tps":{"type":"number","format":"double"},"source":{"$ref":"#/components/schemas/Source7d1Enum","description":"Source of truth for this model definition\n\n* `hardcoded` - Synced from Code\n* `db` - Database Only"},"model_type":{"$ref":"#/components/schemas/ModelTypeEnum","description":"Type of model: chat, embedding, or audio\n\n* `chat` - Chat\n* `embedding` - Embedding\n* `audio` - Audio"},"metadata":{"$ref":"#/components/schemas/LlmModelDetailMetadata","description":"Flexible catalog metadata; known keys are documented, extras allowed."},"foundation_model":{"type":["integer","null"]},"is_byok":{"type":"boolean"},"effective_discount_rate":{"type":"number","format":"double"}},"required":["id","provider","supported_params","model_name","is_byok","effective_discount_rate"],"description":"Injects the typed ``metadata`` field so the OpenAPI schema reflects the\ndocumented :class:`LLMModelMetadata` shape (on both read and write\nserializers) instead of a free-form object.\n\nInjected via ``get_fields`` (not a declared class attribute) because DRF's\n``SerializerMetaclass`` only collects declared fields from bases that are\nthemselves serializers — same plain-mixin pattern as\n``ModelEffectiveDiscountMixin`` / ``PublicAPIIdMixin``. The guard keeps the\nfield absent on serializers that deliberately exclude it.","title":"LLMModelDetail"},"PublicModelUpdateRequestSupportedParamsOverride":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"PublicModelUpdateRequestSupportedParamsOverride"},"PublicModelUpdateRequestMetadata":{"type":"object","properties":{"privacy_policy_url":{"type":["string","null"]},"zero_data_retention":{"type":["boolean","null"]},"prompt_training":{"type":["boolean","null"]},"prompt_logging":{"type":["boolean","null"]},"moderation":{"type":["boolean","null"]},"is_available_on_credits":{"type":["boolean","null"]},"stream_cancellation_supported":{"type":["boolean","null"]},"precision":{"type":["string","null"]},"quantization":{"type":["string","null"]},"release_date":{"type":["string","null"]},"context_size":{"type":["integer","null"]},"weekly_tokens":{"type":["integer","null"]},"daily_tokens":{"type":["integer","null"]},"benchmarks":{"oneOf":[{"$ref":"#/components/schemas/ModelBenchmarksMetadata"},{"type":"null"}]}},"description":"Flexible catalog metadata; known keys are documented, extras allowed.","title":"PublicModelUpdateRequestMetadata"},"PublicModelUpdateRequest":{"type":"object","properties":{"supported_params_override":{"$ref":"#/components/schemas/PublicModelUpdateRequestSupportedParamsOverride"},"affiliation_category":{"$ref":"#/components/schemas/AffiliationCategoryEnum"},"is_managed":{"type":"boolean"},"is_called_by_custom_name":{"type":"boolean"},"base_model_name":{"type":"string"},"display_name":{"type":"string"},"max_context_window":{"type":"integer"},"input_cost":{"type":"number","format":"double"},"output_cost":{"type":"number","format":"double"},"cache_hit_input_cost":{"type":"number","format":"double"},"cache_creation_input_cost":{"type":"number","format":"double"},"respan_discount_rate":{"type":["number","null"],"format":"double"},"streaming_support":{"type":"integer"},"function_call":{"type":"integer"},"image_support":{"type":"integer"},"overridden_fields":{"type":"array","items":{"type":"string"}},"load_balance_backups":{"description":"Any type"},"status":{"$ref":"#/components/schemas/Status359Enum"},"is_verified":{"type":"boolean","description":"Whether the model's pricing has been human-verified. Unverified auto-discovered models are kept out of the live model dictionary."},"source":{"$ref":"#/components/schemas/Source7d1Enum","description":"Source of truth for this model definition\n\n* `hardcoded` - Synced from Code\n* `db` - Database Only"},"model_type":{"$ref":"#/components/schemas/ModelTypeEnum","description":"Type of model: chat, embedding, or audio\n\n* `chat` - Chat\n* `embedding` - Embedding\n* `audio` - Audio"},"metadata":{"$ref":"#/components/schemas/PublicModelUpdateRequestMetadata","description":"Flexible catalog metadata; known keys are documented, extras allowed."},"provider":{"type":["integer","null"]}},"description":"Public API serializer for updating models - hides internal fields.\n\n``status`` is writable here but the view blocks non-superadmins from\nchanging it (``superadmin_only_fields``).","title":"PublicModelUpdateRequest"},"ApiModelsModelNameStatusGetParametersTimeTick":{"type":"string","enum":["minute","hour","day"],"default":"day","title":"ApiModelsModelNameStatusGetParametersTimeTick"},"TimeTickEnum":{"type":"string","enum":["minute","hour","day"],"description":"* `minute` - minute\n* `hour` - hour\n* `day` - day","title":"TimeTickEnum"},"ModelStatusBucket":{"type":"object","properties":{"date_group":{"type":"string","format":"date-time","description":"Start of the time bucket (UTC). One bucket per `time_tick` step."},"uptime":{"type":["number","null"],"format":"double","description":"Uptime fraction for the bucket in [0, 1]; `null` when the bucket had no traffic. For the per-provider `data` series this is `(requests - down) / requests`; for `respan_uptime` it is `up_requests / (up_requests + down_requests)` (user-error-only requests excluded)."},"total_count":{"type":"integer","description":"Admin-only. Denominator request count for the bucket. Omitted for public callers (volume is revenue-inferable)."},"down_count":{"type":"integer","description":"Admin-only. Requests counted as down (HTTP 5xx or 408 timeout) in the bucket. Omitted for public callers."}},"required":["date_group","uptime"],"description":"One time bucket of an uptime series; the bucket size is `time_tick`\n(minute / hour / day).","title":"ModelStatusBucket"},"ModelMetricsSeriesBucket":{"type":"object","properties":{"date_group":{"type":"string","format":"date-time","description":"Start of the time bucket (UTC). One bucket per `time_tick` step."},"average_tps":{"type":["number","null"],"format":"double","description":"Average output tokens/second in the bucket; `null` if no traffic."},"average_ttft":{"type":["number","null"],"format":"double","description":"Average time-to-first-token (seconds) in the bucket, streaming requests only; `null` if none."},"average_latency":{"type":["number","null"],"format":"double","description":"Average end-to-end latency (seconds) in the bucket; `null` if no traffic."},"cache_hit_percentage":{"type":["number","null"],"format":"double","description":"Prompt-cache hit rate (% of prompt tokens) in the bucket; `null` if no traffic."},"number_of_requests":{"type":"integer","description":"Admin-only. Request count in the bucket. Omitted for public callers (volume is revenue-inferable)."},"cost":{"type":["number","null"],"format":"double","description":"Admin-only. Spend (USD) in the bucket. Omitted for public callers."}},"required":["date_group"],"description":"One time bucket of the performance metrics series (`metrics_series`); the\nbucket size is `time_tick`. Normalized rate fields are public; volume fields\n(`number_of_requests`, `cost`) are admin-only and omitted for public callers\n— hence `required=False`. Empty buckets carry `null` rates and 0 requests.","title":"ModelMetricsSeriesBucket"},"ModelStatusSummary":{"type":"object","properties":{"uptime_percent":{"type":["number","null"],"format":"double","description":"Uptime over the window, 0-100; `null` when there was no traffic."},"average_tps":{"type":["number","null"],"format":"double","description":"Average output tokens/second over the window."},"average_ttft":{"type":["number","null"],"format":"double","description":"Average time-to-first-token in seconds over the window (streaming requests only)."},"average_latency":{"type":["number","null"],"format":"double","description":"Average end-to-end latency in seconds over the window."},"cache_hit_percentage":{"type":["number","null"],"format":"double","description":"Prompt-cache hit rate (% of prompt tokens) over the window."},"input_cost":{"type":["number","null"],"format":"double","description":"Catalog list price for input tokens (published per-token pricing from the model dictionary). Public — this is list price, not revenue."},"number_of_requests":{"type":["integer","null"],"description":"Admin-only. Total requests over the window. Omitted for public callers so traffic volume can't be used to infer revenue."},"cost":{"type":["number","null"],"format":"double","description":"Admin-only. Total spend (USD) over the window. Omitted for public callers."}},"description":"Scalar 'current status' for the model over the whole window. Normalized\nrate/price fields are public; volume fields (`number_of_requests`, `cost`)\nare admin-only and omitted for public callers — hence all `required=False`.","title":"ModelStatusSummary"},"ModelStatusResponse":{"type":"object","properties":{"model":{"type":"string","description":"The model string from the URL path."},"provider_id":{"type":["string","null"],"description":"Echo of the `provider_id` filter, if one was supplied."},"time_tick":{"$ref":"#/components/schemas/TimeTickEnum","description":"Time-bucket size of the series (minute / hour / day).\n\n* `minute` - minute\n* `hour` - hour\n* `day` - day"},"start_time":{"type":"string","format":"date-time","description":"Window start (UTC, inclusive)."},"end_time":{"type":"string","format":"date-time","description":"Window end (UTC, exclusive)."},"data":{"type":"array","items":{"$ref":"#/components/schemas/ModelStatusBucket"},"description":"Per-provider uptime time series (per-attempt grain). Scoped to `provider_id` when that filter is supplied, else cross-provider."},"respan_uptime":{"type":"array","items":{"$ref":"#/components/schemas/ModelStatusBucket"},"description":"Request-grain 'via Respan' uptime time series: one verdict per client call, UP if ANY retry/fallback attempt succeeded. Reflects failover, so it sits at or above the per-provider `data` line. Same bucket shape as `data`. Omitted when a `provider_id` filter is supplied because the series is cross-provider."},"metrics_series":{"type":"array","items":{"$ref":"#/components/schemas/ModelMetricsSeriesBucket"},"description":"Per-bucket performance metrics over the window (tps, ttft, latency, cache-hit %, + admin-only counts/cost) — the other metrics plotted over time like uptime. Scoped to `provider_id` when that filter is supplied, else cross-provider. Volume fields within are admin-only."},"status":{"$ref":"#/components/schemas/ModelStatusSummary","description":"Scalar model-wide status over the whole window (uptime %, throughput/latency, cache-hit %, catalog list price). Omitted when a `provider_id` filter is supplied (it is cross-provider). Volume fields within are admin-only."}},"required":["model","time_tick","start_time","end_time","data"],"title":"ModelStatusResponse"},"ModelStatusRequestRequest":{"type":"object","properties":{"provider_id":{"type":["string","null"]},"start_time":{"type":"string"},"end_time":{"type":"string"},"time_tick":{"$ref":"#/components/schemas/TimeTickEnum"}},"required":["start_time","end_time"],"description":"Filters for the per-model status resource. The model itself is the URL\npath segment, not a body/query field.","title":"ModelStatusRequestRequest"},"Models_api_models_summary_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Models_api_models_summary_retrieve_Response_200"},"ProviderCredentialFieldList":{"type":"object","properties":{"id":{"type":"integer"},"is_secret":{"type":"boolean"},"title":{"type":"string"},"field_name":{"type":"string"},"description":{"type":"string"},"required":{"type":"boolean"},"type":{"type":"string"},"order":{"type":"integer"},"default":{"type":"string"},"placeholder":{"type":"string"}},"required":["id","title","field_name"],"title":"ProviderCredentialFieldList"},"IntegrationEnvironment":{"oneOf":[{"$ref":"#/components/schemas/EnvironmentA4fEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"IntegrationEnvironment"},"Integration":{"type":"object","properties":{"id":{"type":"integer"},"masked_extra_kwargs":{"type":"string"},"provider":{"type":["string","null"]},"project":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"type":{"type":"string"},"name":{"type":"string"},"available_models":{"type":"array","items":{"type":"string"}},"excluded_models":{"type":"array","items":{"type":"string"}},"weight":{"type":"number","format":"double"},"is_active":{"type":"boolean"},"is_managed":{"type":"boolean"},"environment":{"$ref":"#/components/schemas/IntegrationEnvironment"},"title":{"type":"string"},"integration_unique_id":{"type":["string","null"]},"user":{"type":["integer","null"]}},"required":["id","masked_extra_kwargs","created_at","updated_at"],"title":"Integration"},"LLMProviderIntegration":{"type":"object","properties":{"id":{"type":"integer"},"project":{"type":["string","null"]},"credential_fields":{"type":"array","items":{"$ref":"#/components/schemas/ProviderCredentialFieldList"}},"integration_id":{"type":"integer"},"provider_integrations":{"type":"array","items":{"$ref":"#/components/schemas/Integration"}},"active_integrations_count":{"type":"integer"},"provider_name":{"type":"string"},"provider_id":{"type":"string"},"litellm_provider_id":{"type":"string"},"moderation":{"type":"string"},"extra_kwargs":{"description":"Any type"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"is_managed":{"type":"boolean"},"respan_discount_rate":{"type":"number","format":"double"},"models_sync_config":{"description":"Any type"}},"required":["id","credential_fields","provider_integrations","provider_name","provider_id","created_at","updated_at"],"title":"LLMProviderIntegration"},"ProviderCredentialFieldListRequest":{"type":"object","properties":{"is_secret":{"type":"boolean"},"title":{"type":"string"},"field_name":{"type":"string"},"description":{"type":"string"},"required":{"type":"boolean"},"type":{"type":"string"},"order":{"type":"integer"},"default":{"type":"string"},"placeholder":{"type":"string"}},"required":["title","field_name"],"title":"ProviderCredentialFieldListRequest"},"LLMProviderIntegrationRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"credential_fields":{"type":"array","items":{"$ref":"#/components/schemas/ProviderCredentialFieldListRequest"}},"integration_id":{"type":"integer"},"active_integrations_count":{"type":"integer"},"provider_name":{"type":"string"},"provider_id":{"type":"string"},"litellm_provider_id":{"type":"string"},"moderation":{"type":"string"},"extra_kwargs":{"description":"Any type"},"is_managed":{"type":"boolean"},"respan_discount_rate":{"type":"number","format":"double"},"models_sync_config":{"description":"Any type"},"organization":{"type":["integer","null"]}},"required":["credential_fields","provider_name","provider_id","organization"],"title":"LLMProviderIntegrationRequest"},"PublicCustomProviderListRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"provider_name":{"type":"string"},"provider_id":{"type":"string"},"extra_kwargs":{"description":"Any type"},"respan_discount_rate":{"type":"number","format":"double"},"models_sync_config":{"description":"Any type"},"organization":{"type":["integer","null"]}},"required":["provider_name","provider_id","organization"],"description":"Public API serializer for listing custom providers - hides internal fields, uses provider_id as id","title":"PublicCustomProviderListRequest"},"PatchedPublicCustomProviderListRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"provider_name":{"type":"string"},"provider_id":{"type":"string"},"extra_kwargs":{"description":"Any type"},"respan_discount_rate":{"type":"number","format":"double"},"models_sync_config":{"description":"Any type"},"organization":{"type":["integer","null"]}},"description":"Public API serializer for listing custom providers - hides internal fields, uses provider_id as id","title":"PatchedPublicCustomProviderListRequest"},"PublicCustomProviderDetailRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"provider_name":{"type":"string"},"provider_id":{"type":"string"},"extra_kwargs":{"description":"Any type"},"respan_discount_rate":{"type":"number","format":"double"},"models_sync_config":{"description":"Any type"},"organization":{"type":["integer","null"]}},"required":["provider_name","provider_id","organization"],"description":"Public API serializer for custom provider detail - hides internal fields, uses provider_id as id","title":"PublicCustomProviderDetailRequest"},"PublicCustomProviderUpdateRequest":{"type":"object","properties":{"provider_name":{"type":"string"},"extra_kwargs":{"description":"Any type"},"respan_discount_rate":{"type":"number","format":"double"},"models_sync_config":{"description":"Any type"}},"required":["provider_name"],"description":"Public API serializer for updating custom providers - hides internal fields, validates managed providers, uses provider_id as id","title":"PublicCustomProviderUpdateRequest"},"LLMFoundationModelDetail":{"type":"object","properties":{"id":{"type":"integer"},"variants":{"type":"string"},"model_name":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"display_name":{"type":"string"},"speed":{"type":"number","format":"double"},"max_context_window":{"type":"integer"},"model_size":{"type":"integer"},"mmlu_score":{"type":"number","format":"double"},"mt_bench_score":{"type":"number","format":"double"},"big_bench_score":{"type":"number","format":"double"},"input_cost":{"type":"number","format":"double"},"output_cost":{"type":"number","format":"double"},"rate_limit":{"type":"integer"},"token_rate_limit":{"type":"integer"},"multilingual":{"type":"integer"},"streaming_support":{"type":"integer"},"function_call":{"type":"integer"},"enforce_function_call":{"type":"integer"},"weight":{"type":"number","format":"double"},"image_support":{"type":"integer"},"hf_url":{"type":"string","format":"uri"},"model_description":{"type":"string"},"model_params":{"type":"array","items":{"type":"string"}},"total_requests":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"total_tokens":{"type":"integer","format":"int64"},"total_completion_tokens":{"type":"integer","format":"int64"},"total_prompt_tokens":{"type":"integer","format":"int64"},"avg_tps":{"type":"number","format":"double"}},"required":["id","variants","model_name","updated_at"],"title":"LLMFoundationModelDetail"},"LLMFoundationModel":{"type":"object","properties":{"id":{"type":"integer"},"model_name":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"display_name":{"type":"string"},"speed":{"type":"number","format":"double"},"max_context_window":{"type":"integer"},"model_size":{"type":"integer"},"mmlu_score":{"type":"number","format":"double"},"mt_bench_score":{"type":"number","format":"double"},"big_bench_score":{"type":"number","format":"double"},"input_cost":{"type":"number","format":"double"},"output_cost":{"type":"number","format":"double"},"rate_limit":{"type":"integer"},"token_rate_limit":{"type":"integer"},"multilingual":{"type":"integer"},"streaming_support":{"type":"integer"},"function_call":{"type":"integer"},"enforce_function_call":{"type":"integer"},"weight":{"type":"number","format":"double"},"image_support":{"type":"integer"},"hf_url":{"type":"string","format":"uri"},"model_description":{"type":"string"},"model_params":{"type":"array","items":{"type":"string"}},"total_requests":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"total_tokens":{"type":"integer","format":"int64"},"total_completion_tokens":{"type":"integer","format":"int64"},"total_prompt_tokens":{"type":"integer","format":"int64"},"avg_tps":{"type":"number","format":"double"}},"required":["id","model_name","updated_at"],"title":"LLMFoundationModel"},"LLMFoundationModelRequest":{"type":"object","properties":{"model_name":{"type":"string"},"display_name":{"type":"string"},"speed":{"type":"number","format":"double"},"max_context_window":{"type":"integer"},"model_size":{"type":"integer"},"mmlu_score":{"type":"number","format":"double"},"mt_bench_score":{"type":"number","format":"double"},"big_bench_score":{"type":"number","format":"double"},"input_cost":{"type":"number","format":"double"},"output_cost":{"type":"number","format":"double"},"rate_limit":{"type":"integer"},"token_rate_limit":{"type":"integer"},"multilingual":{"type":"integer"},"streaming_support":{"type":"integer"},"function_call":{"type":"integer"},"enforce_function_call":{"type":"integer"},"weight":{"type":"number","format":"double"},"image_support":{"type":"integer"},"hf_url":{"type":"string","format":"uri"},"model_description":{"type":"string"},"model_params":{"type":"array","items":{"type":"string"}},"total_requests":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"total_tokens":{"type":"integer","format":"int64"},"total_completion_tokens":{"type":"integer","format":"int64"},"total_prompt_tokens":{"type":"integer","format":"int64"},"avg_tps":{"type":"number","format":"double"}},"required":["model_name"],"title":"LLMFoundationModelRequest"},"PaginatedLlmFoundationModelListFiltersData":{"type":"object","properties":{},"title":"PaginatedLlmFoundationModelListFiltersData"},"PaginatedLLMFoundationModelList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedLlmFoundationModelListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/LLMFoundationModel"}}},"required":["count","results"],"title":"PaginatedLLMFoundationModelList"},"LlmModelsModelsModelNameStatusGetParametersTimeTick":{"type":"string","enum":["minute","hour","day"],"default":"day","title":"LlmModelsModelsModelNameStatusGetParametersTimeTick"},"Models_llm_models_models_summary_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Models_llm_models_models_summary_retrieve_Response_200"},"Models_llm_models_models_summary_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Models_llm_models_models_summary_create_Response_200"},"PatchedLLMProviderRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"provider_name":{"type":"string"},"provider_id":{"type":"string"},"litellm_provider_id":{"type":"string"},"moderation":{"type":"string"},"extra_kwargs":{"description":"Any type"},"is_managed":{"type":"boolean"},"respan_discount_rate":{"type":"number","format":"double"},"models_sync_config":{"description":"Any type"},"organization":{"type":["integer","null"]}},"title":"PatchedLLMProviderRequest"},"PaginatedLlmProviderListFiltersData":{"type":"object","properties":{},"title":"PaginatedLlmProviderListFiltersData"},"PaginatedLLMProviderList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedLlmProviderListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/LLMProvider"}}},"required":["count","results"],"title":"PaginatedLLMProviderList"},"Models_llm_models_validate_api_key_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Models_llm_models_validate_api_key_create_Response_200"},"OpenAI Batch_uploadFile_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"OpenAI Batch_uploadFile_Response_200"},"OpenAI Batch_listFiles_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"OpenAI Batch_listFiles_Response_200"},"OpenAI Batch_retrieveFile_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"OpenAI Batch_retrieveFile_Response_200"},"OpenAI Batch_retrieveFileContent_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"OpenAI Batch_retrieveFileContent_Response_200"},"OpenAI Batch_createBatch_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"OpenAI Batch_createBatch_Response_200"},"OpenAI Batch_retrieveBatch_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"OpenAI Batch_retrieveBatch_Response_200"},"OpenAI Batch_cancelBatch_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"OpenAI Batch_cancelBatch_Response_200"},"BatchJobListStatusEnum":{"type":"string","enum":["pending","validating","in_progress","finalizing","completed","failed","cancelling","cancelled","expired"],"description":"* `pending` - Pending\n* `validating` - Validating\n* `in_progress` - In Progress\n* `finalizing` - Finalizing\n* `completed` - Completed\n* `failed` - Failed\n* `cancelling` - Cancelling\n* `cancelled` - Cancelled\n* `expired` - Expired","title":"BatchJobListStatusEnum"},"BatchJobListRequest":{"type":"object","properties":{"id":{"type":"string","description":"Provider's batch ID (e.g., batch_...)"},"provider_id":{"type":"string","description":"Provider ID matching litellm_provider_id (e.g., 'openai', 'parasail')"},"status":{"$ref":"#/components/schemas/BatchJobListStatusEnum","description":"Batch job status (OpenAI-compatible)\n\n* `pending` - Pending\n* `validating` - Validating\n* `in_progress` - In Progress\n* `finalizing` - Finalizing\n* `completed` - Completed\n* `failed` - Failed\n* `cancelling` - Cancelling\n* `cancelled` - Cancelled\n* `expired` - Expired"},"request_count":{"type":"integer"},"completed_count":{"type":"integer"},"failed_count":{"type":"integer"},"total_cost":{"type":"number","format":"double","description":"Total cost calculated from output (populated on completion)"},"completed_at":{"type":["string","null"],"format":"date-time","description":"When batch reached terminal status"},"last_polled_at":{"type":["string","null"],"format":"date-time","description":"Last time status was polled (for smart backoff)"},"start_log_unique_id":{"type":"string","description":"unique_id of the start log (log_type=BATCH)"},"completion_log_unique_id":{"type":"string","description":"unique_id of the completion log (populated when status=completed and logged)"},"provider_data":{"description":"Provider metadata (input_file_id, endpoint, etc.)"}},"required":["id","provider_id","start_log_unique_id"],"description":"Serializer for batch job list view with summarized information.","title":"BatchJobListRequest"},"BatchJobList":{"type":"object","properties":{"id":{"type":"string","description":"Provider's batch ID (e.g., batch_...)"},"provider_id":{"type":"string","description":"Provider ID matching litellm_provider_id (e.g., 'openai', 'parasail')"},"status":{"$ref":"#/components/schemas/BatchJobListStatusEnum","description":"Batch job status (OpenAI-compatible)\n\n* `pending` - Pending\n* `validating` - Validating\n* `in_progress` - In Progress\n* `finalizing` - Finalizing\n* `completed` - Completed\n* `failed` - Failed\n* `cancelling` - Cancelling\n* `cancelled` - Cancelled\n* `expired` - Expired"},"request_count":{"type":"integer"},"completed_count":{"type":"integer"},"failed_count":{"type":"integer"},"total_cost":{"type":"number","format":"double","description":"Total cost calculated from output (populated on completion)"},"is_usage_tracked":{"type":"string"},"is_active":{"type":"string"},"is_terminal":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time","description":"When batch reached terminal status"},"last_polled_at":{"type":["string","null"],"format":"date-time","description":"Last time status was polled (for smart backoff)"},"start_log_unique_id":{"type":"string","description":"unique_id of the start log (log_type=BATCH)"},"completion_log_unique_id":{"type":"string","description":"unique_id of the completion log (populated when status=completed and logged)"},"provider_data":{"description":"Provider metadata (input_file_id, endpoint, etc.)"}},"required":["id","provider_id","is_usage_tracked","is_active","is_terminal","created_at","updated_at","start_log_unique_id"],"description":"Serializer for batch job list view with summarized information.","title":"BatchJobList"},"OpenAI Batch_filterBatchJobsSummary_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"OpenAI Batch_filterBatchJobsSummary_Response_200"},"ApiEmbeddingsPostParametersFormat":{"type":"string","enum":["json","txt"],"title":"ApiEmbeddingsPostParametersFormat"},"Multimodal_createEmbeddings_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Multimodal_createEmbeddings_Response_200"},"Multimodal_speechToText_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Multimodal_speechToText_Response_200"},"ApiAudioSpeechPostParametersFormat":{"type":"string","enum":["binary","json"],"title":"ApiAudioSpeechPostParametersFormat"},"Multimodal_textToSpeech_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Multimodal_textToSpeech_Response_200"},"Multimodal_retrieveAssemblyaiTranscript_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Multimodal_retrieveAssemblyaiTranscript_Response_200"},"PaginatedCreditTransactionListListFiltersData":{"type":"object","properties":{},"title":"PaginatedCreditTransactionListListFiltersData"},"CreditTransactionList":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number","format":"double"},"transaction_type":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"description":{"type":"string"}},"required":["id","amount","transaction_type","created_at","description"],"description":"List view of credit transactions (summarized) — reads ``ch_billing_event``.","title":"CreditTransactionList"},"PaginatedCreditTransactionListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedCreditTransactionListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/CreditTransactionList"}}},"required":["count","results"],"title":"PaginatedCreditTransactionListList"},"CreditTransactionDetail":{"type":"object","properties":{"id":{"type":"string"},"unique_organization_id":{"type":"string"},"amount":{"type":"number","format":"double"},"transaction_type":{"type":"string"},"billable_type":{"type":"string"},"source_id":{"type":"string"},"credit_amount":{"type":"number","format":"double"},"debit_amount":{"type":"number","format":"double"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["id","unique_organization_id","amount","transaction_type","billable_type","source_id","credit_amount","debit_amount","description","created_at"],"description":"Detail view of credit transactions (full information) — reads ``ch_billing_event``.","title":"CreditTransactionDetail"},"ClickHouseRequestLogAggregatedRequest":{"type":"object","properties":{"date_group":{"type":"string","format":"date-time"},"number_of_requests":{"type":["integer","null"]},"total_cost":{"type":["number","null"],"format":"double"},"total_prompt_tokens":{"type":["integer","null"]},"total_completion_tokens":{"type":["integer","null"]},"total_tokens":{"type":["integer","null"]},"max_tpm":{"type":["integer","null"]},"error_count":{"type":["integer","null"]},"error_percentage":{"type":["number","null"],"format":"double"},"average_prompt_tokens":{"type":["integer","null"]},"average_completion_tokens":{"type":["integer","null"]},"average_tokens":{"type":["integer","null"]},"average_cost":{"type":["number","null"],"format":"double"},"average_latency":{"type":["number","null"],"format":"double"},"average_tps":{"type":["number","null"],"format":"double"},"average_ttft":{"type":["number","null"],"format":"double"},"prompt_cache_hit_tokens":{"type":["integer","null"]},"reasoning_tokens":{"type":["integer","null"]},"max_cost":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"max_latency":{"type":["number","null"],"format":"double"},"unique_customers":{"type":["integer","null"]},"latency_p_50":{"type":["number","null"],"format":"double"},"latency_p_95":{"type":["number","null"],"format":"double"},"latency_p_99":{"type":["number","null"],"format":"double"},"cache_hit_percentage":{"type":["number","null"],"format":"double"},"requests_per_second":{"type":["number","null"],"format":"double"}},"required":["date_group"],"description":"All fields are optional, the DB will only aggregate the fields that are required to aggregate.\n\nMetric fields are auto-generated from the dashboard metric registry.\nTo add a new metric, add it to DASHBOARD_METRICS in utils/dashboard/metric_registry.py.","title":"ClickHouseRequestLogAggregatedRequest"},"ClickHouseRequestLogAggregated":{"type":"object","properties":{"date_group":{"type":"string","format":"date-time"},"number_of_requests":{"type":["integer","null"]},"total_cost":{"type":["number","null"],"format":"double"},"total_prompt_tokens":{"type":["integer","null"]},"total_completion_tokens":{"type":["integer","null"]},"total_tokens":{"type":["integer","null"]},"max_tpm":{"type":["integer","null"]},"error_count":{"type":["integer","null"]},"error_percentage":{"type":["number","null"],"format":"double"},"average_prompt_tokens":{"type":["integer","null"]},"average_completion_tokens":{"type":["integer","null"]},"average_tokens":{"type":["integer","null"]},"average_cost":{"type":["number","null"],"format":"double"},"average_latency":{"type":["number","null"],"format":"double"},"average_tps":{"type":["number","null"],"format":"double"},"average_ttft":{"type":["number","null"],"format":"double"},"prompt_cache_hit_tokens":{"type":["integer","null"]},"reasoning_tokens":{"type":["integer","null"]},"max_cost":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"max_latency":{"type":["number","null"],"format":"double"},"unique_customers":{"type":["integer","null"]},"latency_p_50":{"type":["number","null"],"format":"double"},"latency_p_95":{"type":["number","null"],"format":"double"},"latency_p_99":{"type":["number","null"],"format":"double"},"cache_hit_percentage":{"type":["number","null"],"format":"double"},"requests_per_second":{"type":["number","null"],"format":"double"}},"required":["date_group"],"description":"All fields are optional, the DB will only aggregate the fields that are required to aggregate.\n\nMetric fields are auto-generated from the dashboard metric registry.\nTo add a new metric, add it to DASHBOARD_METRICS in utils/dashboard/metric_registry.py.","title":"ClickHouseRequestLogAggregated"},"CHQuantilesRequest":{"type":"object","properties":{"date_group":{"type":"string","format":"date-time"},"latency_quantiles":{"type":"array","items":{"description":"Any type"}},"ttft_quantiles":{"type":"array","items":{"description":"Any type"}},"tps_quantiles":{"type":"array","items":{"description":"Any type"}},"prompt_tokens_quantiles":{"type":"array","items":{"description":"Any type"}},"completion_tokens_quantiles":{"type":"array","items":{"description":"Any type"}}},"required":["date_group"],"title":"CHQuantilesRequest"},"CHQuantiles":{"type":"object","properties":{"date_group":{"type":"string","format":"date-time"},"latency_quantiles":{"type":"array","items":{"description":"Any type"}},"ttft_quantiles":{"type":"array","items":{"description":"Any type"}},"tps_quantiles":{"type":"array","items":{"description":"Any type"}},"prompt_tokens_quantiles":{"type":"array","items":{"description":"Any type"}},"completion_tokens_quantiles":{"type":"array","items":{"description":"Any type"}}},"required":["date_group"],"title":"CHQuantiles"},"Dashboard_listActiveUsers_Response_201":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_listActiveUsers_Response_201"},"Dashboard_getTotalUsers_Response_201":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_getTotalUsers_Response_201"},"Dashboard_getPlatformStats_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_getPlatformStats_Response_200"},"CustomerUserGraph":{"type":"object","properties":{"total_customers":{"type":"integer"},"total_users":{"type":"integer"},"previous_total_users":{"type":"integer"},"active_users":{"type":"integer"},"average_cost_per_user":{"type":"number","format":"double"},"average_user_sentiment":{"type":"number","format":"double"},"date_group":{"type":"string","format":"date-time"},"total_requests":{"type":"integer"}},"title":"CustomerUserGraph"},"CustomerUserGraphRequest":{"type":"object","properties":{"total_customers":{"type":"integer"},"total_users":{"type":"integer"},"previous_total_users":{"type":"integer"},"active_users":{"type":"integer"},"average_cost_per_user":{"type":"number","format":"double"},"average_user_sentiment":{"type":"number","format":"double"},"date_group":{"type":"string","format":"date-time"},"total_requests":{"type":"integer"}},"title":"CustomerUserGraphRequest"},"Dashboard_api_dashboard_breakdown_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_api_dashboard_breakdown_retrieve_Response_200"},"Dashboard_api_dashboard_breakdown_create_Response_201":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_api_dashboard_breakdown_create_Response_201"},"Dashboard_api_dashboard_breakdown_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_api_dashboard_breakdown_update_Response_200"},"Dashboard_api_dashboard_breakdown_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_api_dashboard_breakdown_partial_update_Response_200"},"PatchedClickHouseRequestLogAggregatedRequest":{"type":"object","properties":{"date_group":{"type":"string","format":"date-time"},"number_of_requests":{"type":["integer","null"]},"total_cost":{"type":["number","null"],"format":"double"},"total_prompt_tokens":{"type":["integer","null"]},"total_completion_tokens":{"type":["integer","null"]},"total_tokens":{"type":["integer","null"]},"max_tpm":{"type":["integer","null"]},"error_count":{"type":["integer","null"]},"error_percentage":{"type":["number","null"],"format":"double"},"average_prompt_tokens":{"type":["integer","null"]},"average_completion_tokens":{"type":["integer","null"]},"average_tokens":{"type":["integer","null"]},"average_cost":{"type":["number","null"],"format":"double"},"average_latency":{"type":["number","null"],"format":"double"},"average_tps":{"type":["number","null"],"format":"double"},"average_ttft":{"type":["number","null"],"format":"double"},"prompt_cache_hit_tokens":{"type":["integer","null"]},"reasoning_tokens":{"type":["integer","null"]},"max_cost":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"max_latency":{"type":["number","null"],"format":"double"},"unique_customers":{"type":["integer","null"]},"latency_p_50":{"type":["number","null"],"format":"double"},"latency_p_95":{"type":["number","null"],"format":"double"},"latency_p_99":{"type":["number","null"],"format":"double"},"cache_hit_percentage":{"type":["number","null"],"format":"double"},"requests_per_second":{"type":["number","null"],"format":"double"}},"description":"All fields are optional, the DB will only aggregate the fields that are required to aggregate.\n\nMetric fields are auto-generated from the dashboard metric registry.\nTo add a new metric, add it to DASHBOARD_METRICS in utils/dashboard/metric_registry.py.","title":"PatchedClickHouseRequestLogAggregatedRequest"},"PatchedCHQuantilesRequest":{"type":"object","properties":{"date_group":{"type":"string","format":"date-time"},"latency_quantiles":{"type":"array","items":{"description":"Any type"}},"ttft_quantiles":{"type":"array","items":{"description":"Any type"}},"tps_quantiles":{"type":"array","items":{"description":"Any type"}},"prompt_tokens_quantiles":{"type":"array","items":{"description":"Any type"}},"completion_tokens_quantiles":{"type":"array","items":{"description":"Any type"}}},"title":"PatchedCHQuantilesRequest"},"Dashboard_api_dashboard_total_users_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_api_dashboard_total_users_retrieve_Response_200"},"Dashboard_api_dashboard_total_users_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_api_dashboard_total_users_update_Response_200"},"Dashboard_api_dashboard_total_users_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_api_dashboard_total_users_partial_update_Response_200"},"Dashboard_api_dashboard_users_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_api_dashboard_users_retrieve_Response_200"},"Dashboard_api_dashboard_users_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_api_dashboard_users_update_Response_200"},"Dashboard_api_dashboard_users_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_api_dashboard_users_partial_update_Response_200"},"PaginatedDashboardListListFiltersData":{"type":"object","properties":{},"title":"PaginatedDashboardListListFiltersData"},"DashboardList":{"type":"object","properties":{"id":{"type":"string"},"project":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"saved_filter":{"type":["string","null"]},"default_time_range":{"type":"object","additionalProperties":{"description":"Any type"}},"default_time_tick":{"type":"string"},"created_by":{"$ref":"#/components/schemas/Editor"},"updated_by":{"$ref":"#/components/schemas/Editor"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","project","name","description","saved_filter","default_time_range","default_time_tick","created_by","updated_by","created_at","updated_at"],"title":"DashboardList"},"PaginatedDashboardListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedDashboardListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/DashboardList"}}},"required":["count","results"],"title":"PaginatedDashboardListList"},"DashboardCreateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"saved_filter":{"type":["string","null"]},"widgets":{"description":"Any type"},"default_time_range":{"type":"object","additionalProperties":{"description":"Any type"}},"default_time_tick":{"type":"string"}},"required":["name"],"title":"DashboardCreateRequest"},"DashboardCreate":{"type":"object","properties":{"id":{"type":"string"},"project":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":"string"},"saved_filter":{"type":["string","null"]},"widgets":{"description":"Any type"},"default_time_range":{"type":"object","additionalProperties":{"description":"Any type"}},"default_time_tick":{"type":"string"},"created_by":{"type":["integer","null"]},"updated_by":{"type":["integer","null"]}},"required":["id","project","name","created_by","updated_by"],"title":"DashboardCreate"},"DashboardDetail":{"type":"object","properties":{"id":{"type":"string"},"project":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"saved_filter":{"type":["string","null"]},"default_time_range":{"type":"object","additionalProperties":{"description":"Any type"}},"default_time_tick":{"type":"string"},"created_by":{"$ref":"#/components/schemas/Editor"},"updated_by":{"$ref":"#/components/schemas/Editor"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"widgets":{"type":"string"}},"required":["id","project","name","description","saved_filter","default_time_range","default_time_tick","created_by","updated_by","created_at","updated_at","widgets"],"title":"DashboardDetail"},"DashboardUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"saved_filter":{"type":["string","null"]},"widgets":{"description":"Any type"},"default_time_range":{"type":"object","additionalProperties":{"description":"Any type"}},"default_time_tick":{"type":"string"}},"required":["name"],"title":"DashboardUpdateRequest"},"DashboardUpdate":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"saved_filter":{"type":["string","null"]},"widgets":{"description":"Any type"},"default_time_range":{"type":"object","additionalProperties":{"description":"Any type"}},"default_time_tick":{"type":"string"},"updated_by":{"type":["integer","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","updated_by","created_at","updated_at"],"title":"DashboardUpdate"},"PatchedDashboardUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"saved_filter":{"type":["string","null"]},"widgets":{"description":"Any type"},"default_time_range":{"type":"object","additionalProperties":{"description":"Any type"}},"default_time_tick":{"type":"string"}},"title":"PatchedDashboardUpdateRequest"},"Dashboard_clickhouse_dashboard_breakdown_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_clickhouse_dashboard_breakdown_retrieve_Response_200"},"Dashboard_clickhouse_dashboard_breakdown_create_Response_201":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_clickhouse_dashboard_breakdown_create_Response_201"},"Dashboard_clickhouse_dashboard_breakdown_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_clickhouse_dashboard_breakdown_update_Response_200"},"Dashboard_clickhouse_dashboard_breakdown_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_clickhouse_dashboard_breakdown_partial_update_Response_200"},"Dashboard_clickhouse_dashboard_total_users_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_clickhouse_dashboard_total_users_retrieve_Response_200"},"Dashboard_clickhouse_dashboard_total_users_create_Response_201":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_clickhouse_dashboard_total_users_create_Response_201"},"Dashboard_clickhouse_dashboard_total_users_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_clickhouse_dashboard_total_users_update_Response_200"},"Dashboard_clickhouse_dashboard_total_users_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_clickhouse_dashboard_total_users_partial_update_Response_200"},"Dashboard_clickhouse_dashboard_users_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_clickhouse_dashboard_users_retrieve_Response_200"},"Dashboard_clickhouse_dashboard_users_create_Response_201":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_clickhouse_dashboard_users_create_Response_201"},"Dashboard_clickhouse_dashboard_users_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_clickhouse_dashboard_users_update_Response_200"},"Dashboard_clickhouse_dashboard_users_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Dashboard_clickhouse_dashboard_users_partial_update_Response_200"},"Health_root_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Health_root_retrieve_Response_200"},"Health_apiHealthCheck_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Health_apiHealthCheck_Response_200"},"Health_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Health_retrieve_Response_200"},"Health_deepRetrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Health_deepRetrieve_Response_200"},"Health_ready_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Health_ready_retrieve_Response_200"},"TurnRequestRequest":{"type":"object","properties":{"input":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"timezone":{"type":"string","default":"UTC"},"conversation":{"type":["string","null"]},"parent_message_id":{"type":["string","null"]},"model":{"type":["string","null"]},"page_context":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"skill_ids":{"type":"array","items":{"type":"string"}},"is_read_only":{"type":"boolean","default":false}},"required":["input"],"title":"TurnRequestRequest"},"agents_chatCreate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"agents_chatCreate_Response_200"},"PaginatedConversationListListFiltersData":{"type":"object","properties":{},"title":"PaginatedConversationListListFiltersData"},"ConversationList":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","title","created_at","updated_at"],"title":"ConversationList"},"PaginatedConversationListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedConversationListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/ConversationList"}}},"required":["count","results"],"title":"PaginatedConversationListList"},"ConversationCreateRequestRequest":{"type":"object","properties":{"title":{"type":"string"}},"description":"Schema-only serializer for the POST /agents/conversations/ request body.","title":"ConversationCreateRequestRequest"},"ConversationCreate":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"organization":{"type":"integer"},"created_by":{"type":"integer"}},"required":["id","organization","created_by"],"title":"ConversationCreate"},"Message":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string"},"content":{"description":"Any type"},"parent_id":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"metadata":{"description":"Any type"}},"required":["id","role","content","parent_id","created_at","metadata"],"title":"Message"},"ConversationDetail":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"orphaned_messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"truncated":{"type":"boolean"}},"required":["id","title","created_at","updated_at","messages","orphaned_messages","truncated"],"title":"ConversationDetail"},"ConversationUpdateRequest":{"type":"object","properties":{"title":{"type":"string"}},"title":"ConversationUpdateRequest"},"ConversationUpdate":{"type":"object","properties":{"title":{"type":"string"}},"title":"ConversationUpdate"},"PatchedConversationUpdateRequest":{"type":"object","properties":{"title":{"type":"string"}},"title":"PatchedConversationUpdateRequest"},"AgentFileUploadResponse":{"type":"object","properties":{"file_id":{"type":"string"},"filename":{"type":"string"},"content_type":{"type":"string"},"size_bytes":{"type":"integer"},"kind":{"type":"string"}},"required":["file_id","filename","content_type","size_bytes","kind"],"description":"Response schema for POST /agents/files/.","title":"AgentFileUploadResponse"},"agents_filesCreate2_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"agents_filesCreate2_Response_200"},"agents_filesUpdate2_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"agents_filesUpdate2_Response_200"},"agents_filesPartialUpdate2_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"agents_filesPartialUpdate2_Response_200"},"agents_sessionsCreate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"agents_sessionsCreate_Response_200"},"agents_sessionsTurnsCreate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"agents_sessionsTurnsCreate_Response_200"},"PaginatedAgentSkillListListFiltersData":{"type":"object","properties":{},"title":"PaginatedAgentSkillListListFiltersData"},"AgentSkillList":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"context_attachments":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"project":{"type":["string","null"]},"created_by":{"$ref":"#/components/schemas/Editor"},"updated_by":{"$ref":"#/components/schemas/Editor"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","description","context_attachments","project","created_by","updated_by","created_at","updated_at"],"description":"Lightweight serializer for saved agent skills.","title":"AgentSkillList"},"PaginatedAgentSkillListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedAgentSkillListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/AgentSkillList"}}},"required":["count","results"],"title":"PaginatedAgentSkillListList"},"AgentSkillCreateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"},"context_attachments":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}}},"required":["name","instructions"],"description":"Write serializer for creating saved agent skills.","title":"AgentSkillCreateRequest"},"AgentSkillCreate":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"},"context_attachments":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"project":{"type":["string","null"]},"created_by":{"type":"integer"},"updated_by":{"type":"integer"}},"required":["id","name","instructions","project","created_by","updated_by"],"description":"Write serializer for creating saved agent skills.","title":"AgentSkillCreate"},"AgentSkillDetail":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"},"context_attachments":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"project":{"type":["string","null"]},"created_by":{"$ref":"#/components/schemas/Editor"},"updated_by":{"$ref":"#/components/schemas/Editor"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","description","instructions","context_attachments","project","created_by","updated_by","created_at","updated_at"],"description":"Full serializer for retrieving saved agent skills.","title":"AgentSkillDetail"},"AgentSkillUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"},"context_attachments":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}}},"required":["name","instructions"],"description":"Write serializer for updating saved agent skills.","title":"AgentSkillUpdateRequest"},"AgentSkillUpdate":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"},"context_attachments":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"updated_by":{"type":["integer","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","instructions","updated_by","created_at","updated_at"],"description":"Write serializer for updating saved agent skills.","title":"AgentSkillUpdate"},"PatchedAgentSkillUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"},"context_attachments":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}}},"description":"Write serializer for updating saved agent skills.","title":"PatchedAgentSkillUpdateRequest"},"AgentSkillFilterRequestRequest":{"type":"object","properties":{"filters":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Filter parameters keyed by field name."}},"description":"Request body for POST-for-filtering on /agents/skills/list/.","title":"AgentSkillFilterRequestRequest"},"agents_v2SessionsCreate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"agents_v2SessionsCreate_Response_200"},"agents_v2SessionsTurnsCreate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"agents_v2SessionsTurnsCreate_Response_200"},"Platform API_api_traces_create_2_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_traces_create_2_Response_200"},"Platform API_api_traces_update_2_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_traces_update_2_Response_200"},"Platform API_api_traces_partial_update_2_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_traces_partial_update_2_Response_200"},"PaginatedStaffGroupListFiltersData":{"type":"object","properties":{},"title":"PaginatedStaffGroupListFiltersData"},"StaffGroup":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"permissions_override":{"type":"array","items":{"type":"string"}},"granted_by":{"type":["integer","null"]},"granted_at":{"type":"string","format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"},"revoked_by_email":{"type":["string","null"]},"member_count":{"type":"integer","description":"Active (non-revoked) members of this group. Tiny — staff\nroster is bounded, so the COUNT runs without a separate query\nwhen the queryset annotates it; otherwise it's a cheap COUNT."}},"required":["id","name","granted_by","granted_at","revoked_at","revoked_by_email","member_count"],"description":"Group CRUD shape. ``name`` is the external identifier; the UUID\n``id`` is read-only.\n\nPOST body:\n    {\n        \"name\": \"engineering_admins\",\n        \"permissions_override\": [\"staff_read\", \"staff_write\"],\n        \"description\": \"Engineering team admins\"\n    }\n\nPATCH body: any subset of {permissions_override, description}.\nRenaming a group is allowed via PATCH(name); the UUID stays\nstable so existing memberships don't break.","title":"StaffGroup"},"PaginatedStaffGroupList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedStaffGroupListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/StaffGroup"}}},"required":["count","results"],"title":"PaginatedStaffGroupList"},"StaffGroupRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"permissions_override":{"type":"array","items":{"type":"string"}}},"required":["name"],"description":"Group CRUD shape. ``name`` is the external identifier; the UUID\n``id`` is read-only.\n\nPOST body:\n    {\n        \"name\": \"engineering_admins\",\n        \"permissions_override\": [\"staff_read\", \"staff_write\"],\n        \"description\": \"Engineering team admins\"\n    }\n\nPATCH body: any subset of {permissions_override, description}.\nRenaming a group is allowed via PATCH(name); the UUID stays\nstable so existing memberships don't break.","title":"StaffGroupRequest"},"PatchedStaffGroupRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"permissions_override":{"type":"array","items":{"type":"string"}}},"description":"Group CRUD shape. ``name`` is the external identifier; the UUID\n``id`` is read-only.\n\nPOST body:\n    {\n        \"name\": \"engineering_admins\",\n        \"permissions_override\": [\"staff_read\", \"staff_write\"],\n        \"description\": \"Engineering team admins\"\n    }\n\nPATCH body: any subset of {permissions_override, description}.\nRenaming a group is allowed via PATCH(name); the UUID stays\nstable so existing memberships don't break.","title":"PatchedStaffGroupRequest"},"StaffGroupMembershipCreateRequest":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"],"description":"POST /api/admin/staff-groups/{name}/memberships/  body: {\"email\": \"alice@x\"}\n\nCreates or reinstates a membership linking ``email`` to the\ngroup identified by the URL path. Group must be active; user\nmust already exist (no signup flow).\n\nSelf-grant block fires here too — a principal cannot add themselves\nto a group, even one they already belong to.","title":"StaffGroupMembershipCreateRequest"},"StaffGroupMembershipCreate":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"],"description":"POST /api/admin/staff-groups/{name}/memberships/  body: {\"email\": \"alice@x\"}\n\nCreates or reinstates a membership linking ``email`` to the\ngroup identified by the URL path. Group must be active; user\nmust already exist (no signup flow).\n\nSelf-grant block fires here too — a principal cannot add themselves\nto a group, even one they already belong to.","title":"StaffGroupMembershipCreate"},"PaginatedStaffMembershipReadListFiltersData":{"type":"object","properties":{},"title":"PaginatedStaffMembershipReadListFiltersData"},"StaffMembershipRead":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"group_name":{"type":"string"},"granted_by_email":{"type":["string","null"]},"granted_at":{"type":"string","format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"},"revoked_by_email":{"type":["string","null"]}},"required":["id","email","group_name","granted_by_email","granted_at","revoked_at","revoked_by_email"],"description":"Read-side shape for membership rows. Exposes the user's email\nand the group's name — internal IDs stay hidden behind the\nexternal identifiers the caller actually uses.","title":"StaffMembershipRead"},"PaginatedStaffMembershipReadList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedStaffMembershipReadListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/StaffMembershipRead"}}},"required":["count","results"],"title":"PaginatedStaffMembershipReadList"},"EntitlementStatusEnum":{"type":"string","enum":["active","trialing","past_due","canceled","none"],"description":"* `active` - active\n* `trialing` - trialing\n* `past_due` - past_due\n* `canceled` - canceled\n* `none` - none","title":"EntitlementStatusEnum"},"DataPlaneDeployment":{"type":"object","properties":{"id":{"type":"integer"},"data_plane_url":{"type":"string","format":"uri"},"token_prefix":{"type":"string"},"entitlement_status":{"$ref":"#/components/schemas/EntitlementStatusEnum"},"last_heartbeat_at":{"type":["string","null"],"format":"date-time"},"token_expires_at":{"type":["string","null"],"format":"date-time"},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","data_plane_url","token_prefix","entitlement_status","last_heartbeat_at","token_expires_at","is_active","created_at","updated_at"],"description":"Read serializer for a deployment — never exposes the token hash.","title":"DataPlaneDeployment"},"DataPlaneRegistrationRequest":{"type":"object","properties":{"data_plane_url":{"type":"string","format":"uri"},"rotate_token":{"type":"boolean","default":false,"description":"Rotate the service token on an existing deployment."}},"description":"Input for registering / updating an org's data plane (org admin, JWT).","title":"DataPlaneRegistrationRequest"},"DataPlaneRegistrationResponse":{"type":"object","properties":{"id":{"type":"integer"},"data_plane_url":{"type":"string","format":"uri"},"token_prefix":{"type":"string"},"entitlement_status":{"$ref":"#/components/schemas/EntitlementStatusEnum"},"last_heartbeat_at":{"type":["string","null"],"format":"date-time"},"token_expires_at":{"type":["string","null"],"format":"date-time"},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"service_token":{"type":"string","description":"Plaintext service token — present only on first registration or rotation, and shown ONCE; only its hash is stored."}},"required":["id","data_plane_url","token_prefix","entitlement_status","last_heartbeat_at","token_expires_at","is_active","created_at","updated_at"],"description":"POST /api/byoc/deployment/ response — the deployment plus the one-time token.","title":"DataPlaneRegistrationResponse"},"TelemetryRequest":{"type":"object","properties":{"schema_version":{"type":"integer","default":1},"app_version":{"type":"string"},"metrics":{"type":"object","additionalProperties":{"type":"number","format":"double"}}},"description":"Health/usage telemetry the data plane reports with a heartbeat.\n\nThe payload is customer-data-plane-controlled, so every field is bounded and\nonly known keys survive — `metrics` is a small map of named numeric gauges\n(request counts, indexing lag, …) the data plane can extend without a schema\nchange, capped so a compromised/misconfigured plane can't bloat storage.","title":"TelemetryRequest"},"HeartbeatRequestRequest":{"type":"object","properties":{"telemetry":{"$ref":"#/components/schemas/TelemetryRequest"}},"description":"Request body for POST /api/byoc/heartbeat/ — optional telemetry.","title":"HeartbeatRequestRequest"},"HeartbeatResponse":{"type":"object","properties":{"state":{"type":"string","description":"Entitlement state machine value."},"is_entitled":{"type":"boolean"},"note":{"type":["string","null"]},"license_key":{"type":["string","null"],"description":"Fresh entitlement token; null when not entitled."},"token_expires_at":{"type":["string","null"],"format":"date-time"},"grace_days":{"type":"integer"},"next_heartbeat_seconds":{"type":"integer"}},"required":["state","is_entitled","note","license_key","token_expires_at","grace_days","next_heartbeat_seconds"],"description":"Response for POST /api/byoc/heartbeat/ (mirrors ``process_heartbeat``).","title":"HeartbeatResponse"},"Platform API_api_internal_span_behaviors_custom_heads_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_internal_span_behaviors_custom_heads_retrieve_Response_200"},"Platform API_api_license_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_license_retrieve_Response_200"},"PaginatedLimitPolicyListListFiltersData":{"type":"object","properties":{},"title":"PaginatedLimitPolicyListListFiltersData"},"MetricEnum":{"type":"string","enum":["cost","request_count","token_count"],"description":"* `cost` - Cost\n* `request_count` - Request count\n* `token_count` - Token count","title":"MetricEnum"},"AlgorithmEnum":{"type":"string","enum":["balance_fixed_window","token_bucket"],"description":"* `balance_fixed_window` - Balance fixed window\n* `token_bucket` - Token bucket","title":"AlgorithmEnum"},"LimitPolicyCurrentState":{"type":"object","properties":{"meter_id":{"type":"string","description":"Instance-level meter id — ``{meter_definition_id}:{window_start_epoch}``. Empty when the current window can't be computed (e.g. unsupported algorithm)."},"interval_start":{"type":["integer","null"],"description":"Epoch seconds. Inclusive start of the window instance the counter accumulates into. Null for algorithms without a window (``token_bucket``) or when fail-open fell through."},"interval_end":{"type":["integer","null"],"description":"Epoch seconds. Exclusive end — ``interval_start + period_seconds``. Null under the same conditions as ``interval_start``."},"current_value":{"type":"number","format":"double","description":"Consumed value in the current window (same unit as ``threshold_value``). ``0.0`` for missing counter keys (no events yet in this window) and for every fail-open branch so the FE gauge degrades gracefully instead of surfacing an error."}},"required":["meter_id","interval_start","interval_end","current_value"],"description":"Live counter state for ONE policy in its current window.\n\nNested on ``LimitPolicyListSerializer`` / ``LimitPolicyDetailSerializer``.\nProduced by one Redis ``HGET limit:fw:{meter_id} counter`` — the detail\nendpoint knows the exact ``meter_definition_id`` so it can skip CH and\nhit Redis directly. The list endpoint batches the HGETs into a single\npipeline RTT via ``LimitPoliciesView``'s prefetch hook so every row in\na page resolves without N round-trips.\n\nSame field names as the per-row live fields on\n``LimitPolicyStateRowSerializer`` so the FE reuses one gauge\ncomponent across both shapes.\n\nFail-open: Redis errors, unresolvable period, unsupported\nalgorithm (``token_bucket`` is stubbed in v1) all collapse to\nzeros + null bounds rather than 5xx-ing the config read.","title":"LimitPolicyCurrentState"},"LimitPolicyList":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"scope":{"type":"string"},"scope_value":{"type":"string"},"compose":{"type":"array","items":{"type":"string"}},"metric":{"$ref":"#/components/schemas/MetricEnum"},"algorithm":{"$ref":"#/components/schemas/AlgorithmEnum"},"period":{"type":["string","null"]},"effective_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"priority":{"type":"integer"},"is_active":{"type":"boolean"},"threshold_value":{"type":"number","format":"double"},"meter_definition_id":{"type":"string"},"updated_by":{"$ref":"#/components/schemas/Editor"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_state":{"$ref":"#/components/schemas/LimitPolicyCurrentState","description":"Live counter state for the policy's current window. Sourced from Redis (same key ``apply_limits`` evaluates against). Populated by the view's bulk prefetch on list responses; falls back to a single HGET on detail."},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"},"description":"``GenericTag`` rows assigned to this policy. Managed via ``/api/tag-assignments/limit_policies/...`` — read-only here."}},"required":["id","name","scope","scope_value","compose","metric","algorithm","period","effective_at","expires_at","priority","is_active","threshold_value","meter_definition_id","updated_by","created_at","updated_at","current_state","tags"],"description":"Standard CRUD list — PG fields + live counter state + tags.\n\n``threshold_value`` is derived from ``rules`` (there is no stand-\nalone ``amount`` column after #2333 — \"rules dominate\"). Picks\nthe first hard rule's counter trigger value, or the largest soft\nrule value if no hard rule is present. The helper lives in\n``limit.utils.enrichment`` so the live-``/list/`` endpoint and\nthis CRUD list surface the same field semantics.\n\n``current_state`` exposes the live Redis counter so the FE table can\nrender usage / threshold without a second round-trip. ``tags`` is the\n``GenericTag`` rows assigned to this policy via the generic tag-\nassignment system (``feature_type=limit_policies``).","title":"LimitPolicyList"},"PaginatedLimitPolicyListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedLimitPolicyListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/LimitPolicyList"}}},"required":["count","results"],"title":"PaginatedLimitPolicyListList"},"AnchorEnum":{"type":"string","enum":["calendar","first_event","explicit_ts"],"description":"* `calendar` - Calendar\n* `first_event` - First event\n* `explicit_ts` - Explicit timestamp","title":"AnchorEnum"},"LimitPolicyCreateRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"name":{"type":"string"},"scope":{"type":"string"},"scope_value":{"type":"string"},"compose":{"type":"array","items":{"type":"string"}},"metric":{"$ref":"#/components/schemas/MetricEnum"},"algorithm":{"$ref":"#/components/schemas/AlgorithmEnum"},"period":{"type":["string","null"]},"effective_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"anchor":{"$ref":"#/components/schemas/AnchorEnum"},"anchor_at":{"type":["string","null"],"format":"date-time"},"refill_rate":{"type":["number","null"],"format":"double"},"rules":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"priority":{"type":"integer"},"is_active":{"type":"boolean"},"include_existing_usage":{"type":"boolean","default":false,"description":"When true on creation, SUMs matching CHLogV3 history into the live counter so the cap starts at the historical total. For lifetime policies (period=null) the SUM covers all history up to creation time. For rolling policies the SUM covers only the current window — when the window rolls over the seeded counter naturally ages out and the next window starts fresh. Idempotent via the row's ``seeded_at`` audit column."}},"required":["scope_value"],"description":"Write serializer for creation.\n\n``project`` is server-injected via ``request.data``\n(OrganizationInjectionMixin + view ``post()``). It MUST be writable\non this serializer for DRF deserialization to pick up the injected\nvalue (a read-only field is stripped from ``validated_data`` and\nnever reaches ``Model.objects.create()`` — leaving ``project_id =\nNULL`` which then makes every regular-user GET/PATCH 404).\n\n``updated_by`` is ``read_only`` — it's stamped server-side at\n``perform_create`` via the view's ``create_stamped_fields``\n(ServerStampedFieldsMixin), never accepted from the client.\n\n``project`` is marked ``required=False`` + ``write_only=True`` +\n``allow_null=True`` so the generated TS ``CreateRequest`` type doesn't\nlist it as a mandatory client-facing field (FE never sends it); read\nresponses use the separate List/Detail serializers (which expose\n``updated_by`` as the enriched editor object).\nPattern mirrors ``SavedFilterCreateSerializer`` in ``api/serializers.py``.","title":"LimitPolicyCreateRequest"},"LimitPolicyDetail":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"scope":{"type":"string"},"scope_value":{"type":"string"},"compose":{"type":"array","items":{"type":"string"}},"metric":{"$ref":"#/components/schemas/MetricEnum"},"algorithm":{"$ref":"#/components/schemas/AlgorithmEnum"},"period":{"type":["string","null"]},"effective_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"priority":{"type":"integer"},"is_active":{"type":"boolean"},"threshold_value":{"type":"number","format":"double"},"meter_definition_id":{"type":"string"},"updated_by":{"$ref":"#/components/schemas/Editor"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_state":{"$ref":"#/components/schemas/LimitPolicyCurrentState","description":"Live counter state for the policy's current window. Sourced from Redis (same key ``apply_limits`` evaluates against). Populated by the view's bulk prefetch on list responses; falls back to a single HGET on detail."},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"},"description":"``GenericTag`` rows assigned to this policy. Managed via ``/api/tag-assignments/limit_policies/...`` — read-only here."},"rules":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"anchor":{"$ref":"#/components/schemas/AnchorEnum"},"anchor_at":{"type":["string","null"],"format":"date-time"},"refill_rate":{"type":["number","null"],"format":"double"}},"required":["id","name","scope","scope_value","compose","metric","algorithm","period","effective_at","expires_at","priority","is_active","threshold_value","meter_definition_id","updated_by","created_at","updated_at","current_state","tags","rules","anchor","anchor_at","refill_rate"],"description":"Detail adds the full config blobs for the edit view. ``current_state``\nand ``tags`` are inherited from the list shape — same Redis HGET +\ncached-tags resolution as a list row.","title":"LimitPolicyDetail"},"LimitPolicyUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"scope":{"type":"string"},"rules":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"priority":{"type":"integer"},"is_active":{"type":"boolean"}},"description":"Only mutable fields + the server-injected audit owner.\n\nIdentity fields (``scope_value``, ``metric``, ``algorithm``,\n``period``, ``effective_at``, ``expires_at``, ``anchor``,\n``anchor_at``) are intentionally omitted — editing any of them\nwould change ``meter_definition_id`` and create a different policy;\ncreate a new row instead.\n\n``updated_by`` is ``read_only`` — it's stamped server-side at\n``perform_update`` via the view's ``update_stamped_fields``\n(ServerStampedFieldsMixin routes ``request.user.id`` → the\n``updated_by_id`` FK save kwarg), never accepted from the client.\nAnti-spoof guarantee: the field is never deserialized from the body,\nso a client-supplied ``updated_by`` is silently ignored.","title":"LimitPolicyUpdateRequest"},"PatchedLimitPolicyUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"scope":{"type":"string"},"rules":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"priority":{"type":"integer"},"is_active":{"type":"boolean"}},"description":"Only mutable fields + the server-injected audit owner.\n\nIdentity fields (``scope_value``, ``metric``, ``algorithm``,\n``period``, ``effective_at``, ``expires_at``, ``anchor``,\n``anchor_at``) are intentionally omitted — editing any of them\nwould change ``meter_definition_id`` and create a different policy;\ncreate a new row instead.\n\n``updated_by`` is ``read_only`` — it's stamped server-side at\n``perform_update`` via the view's ``update_stamped_fields``\n(ServerStampedFieldsMixin routes ``request.user.id`` → the\n``updated_by_id`` FK save kwarg), never accepted from the client.\nAnti-spoof guarantee: the field is never deserialized from the body,\nso a client-supplied ``updated_by`` is silently ignored.","title":"PatchedLimitPolicyUpdateRequest"},"PaginatedLimitPolicyStateRowListFiltersData":{"type":"object","properties":{},"title":"PaginatedLimitPolicyStateRowListFiltersData"},"LimitPolicyStateRow":{"type":"object","properties":{"policy_id":{"type":"string","description":"``LimitPolicy.id`` (UUID)."},"policy_name":{"type":"string","description":"Human-readable label — e.g. ``API Key: acme-prod`` for a single-dim policy, or ``API Key: acme × Model: gpt-4o`` for a composite. Resolved from PG reference tables by the ``enrich_policy_names`` pass."},"scope":{"type":"string","description":"Free-form display label set on the policy (``API Key``, ``Model``, ``Custom × Model``). Not used for matching."},"scope_value":{"type":"string","description":"The identity being metered. For composite policies (``compose`` length > 1) this is a canonical JSON list — decode with ``limit/utils/composite.py::decode_composite_scope_value``."},"compose":{"type":"array","items":{"type":"string"},"description":"Dimensions the policy composes (empty list for single-dim policies). Known dims: ``organization_id``, ``api_key_id``, ``user_id``, ``customer_identifier``, ``model``, ``endpoint``."},"metric":{"type":"string","description":"``cost`` | ``request_count`` | ``token_count`` — which ch_meter column ``current_value`` was picked from."},"algorithm":{"type":"string","description":"``balance_fixed_window`` | ``token_bucket``."},"period":{"type":"string","description":"Named bucket (``minute``/``hour``/``day``/``week``/``month``) or stringified seconds for custom windows."},"anchor":{"type":"string","description":"``calendar`` | ``first_event`` | ``explicit_ts`` — how fixed windows line up against the epoch."},"priority":{"type":"integer","description":"Policy priority (higher = checked first)."},"is_active":{"type":"boolean"},"meter_definition_id":{"type":"string","description":"Stable hash of the identity tuple. Joins this row to the policy-side config — useful if the FE needs a URL-safe handle for the metered definition independent of the window instance."},"threshold_value":{"type":"number","format":"double","description":"Derived from ``rules`` — first hard rule's counter trigger value, or largest soft rule value if no hard rule is present. FE gauge shows ``current_value / threshold_value`` as consumed fraction. (After #2333 ``LimitPolicy`` no longer stores a standalone ``amount`` column — rules dominate.)"},"meter_id":{"type":"string","description":"Runtime meter id for this row's window instance — ``{meter_definition_id}:{window_start_epoch}``."},"interval_start":{"type":["integer","null"],"description":"Epoch seconds. Inclusive start of the window instance this row aggregates. Null for algorithms without a window (e.g., token_bucket)."},"interval_end":{"type":["integer","null"],"description":"Epoch seconds. Exclusive end of the window instance (= ``interval_start + period_seconds`` for fixed windows). Null for algorithms without a window."},"current_value":{"type":"number","format":"double","description":"Consumed value (same unit as ``threshold_value``). For ``balance_fixed_window``: accumulated SUM of ``metric`` over this window instance. For ``token_bucket``: ``capacity - tokens_remaining`` so the FE gauge fills the same direction as fixed-window regardless of algorithm."},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"},"description":"``GenericTag`` rows assigned to this policy via ``feature_type=limit_policies``. Managed through ``/api/tag-assignments/limit_policies/...``."}},"required":["policy_id","policy_name","scope","scope_value","compose","metric","algorithm","period","anchor","priority","is_active","meter_definition_id","threshold_value","meter_id","interval_start","interval_end","current_value","tags"],"description":"One row of ``GET/POST /api/limit-policies/list/``.\n\nThis is the **FE-facing contract** — ``LimitPoliciesListView``\nproduces this shape by joining ONE ClickHouse grouped-SUM over\n``ch_meter`` with ONE PostgreSQL ``IN`` query over\n``LimitPolicy``, then a compose-dim display-name enrichment.\n\nPure ``Serializer`` (not ``ModelSerializer``) because the shape\nspans two stores — no single Django model owns it.","title":"LimitPolicyStateRow"},"PaginatedLimitPolicyStateRowList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedLimitPolicyStateRowListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/LimitPolicyStateRow"}}},"required":["count","results"],"title":"PaginatedLimitPolicyStateRowList"},"LimitPolicyFilterRequestRequest":{"type":"object","properties":{"filters":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Filter parameters keyed by metric name. See ``LIMIT_POLICY_FILTERS`` in ``utils/filter/constants.py`` for the allowlist of filterable fields."}},"description":"Request body for ``POST /api/limit-policies/list/`` and\n``POST /api/limit-policies/summary/`` — both use POST for filtering,\ndelegated internally to GET.\n\nMatches ``DatasetFilterRequestSerializer`` and every other\nPOST-for-filtering route in the codebase.","title":"LimitPolicyFilterRequestRequest"},"LimitPolicyId":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"description":"Minimal pre-enrichment serializer for the ``/list/`` route.\n\n``DataEnrichmentMixin.list()`` serializes the page **once** with the\nview's ``serializer_class`` before ``enrich_results`` rebuilds each\nrow from scratch (one PG IN-refetch + one pipelined Redis HGET +\none TagManager IN-query for the whole page). If we used the full\n``LimitPolicyListSerializer`` for that first pass, every row's\n``current_state`` SerializerMethodField would fire a Redis HGET and\nevery ``tags`` SerializerMethodField would fire a TagManager query —\nN+1 work that ``enrich_results`` immediately discards.\n\nThis serializer emits **only** ``id`` because that is all\n``LimitPoliciesListView.enrich_results`` reads off the dict\n(``policy_ids = [row.get(\"id\") for row in results …]``). The\nOpenAPI response contract is declared via ``@extend_schema(\nresponses=LimitPolicyStateRowSerializer)`` on the view, so codegen\ntypes still reflect the merged shape.","title":"LimitPolicyId"},"LimitPolicySummaryResponse":{"type":"object","properties":{"total_count":{"type":"integer","description":"Number of ``LimitPolicy`` rows matching the ``filters`` payload (or the unfiltered count)."}},"required":["total_count"],"description":"Response body for ``GET/POST /api/limit-policies/summary/``.","title":"LimitPolicySummaryResponse"},"Platform API_api_limit_policies_summary_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_limit_policies_summary_update_Response_200"},"Platform API_api_limit_policies_summary_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_limit_policies_summary_partial_update_Response_200"},"PaginatedLlmPresetListListFiltersData":{"type":"object","properties":{},"title":"PaginatedLlmPresetListListFiltersData"},"LLMPresetList":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"created_by":{"$ref":"#/components/schemas/Editor"}},"required":["id","name","created_at","updated_at","created_by"],"description":"Lightweight serializer for dropdown listing of LLM presets.","title":"LLMPresetList"},"PaginatedLLMPresetListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedLlmPresetListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/LLMPresetList"}}},"required":["count","results"],"title":"PaginatedLLMPresetListList"},"LLMPresetCreateRequest":{"type":"object","properties":{"name":{"type":"string"},"project":{"type":["string","null"]},"model_config":{"description":"Any type"},"variable_values":{"description":"Any type"}},"required":["name"],"description":"Write serializer for creating LLM presets.\n\n``project`` is server-injected by ``OrganizationInjectionMixin``;\n``created_by`` is stamped at save time via ``ServerStampedFieldsMixin``\n(``LLMPresetsView.create_stamped_fields``) and is ``read_only`` here so the\nclient can never set it.","title":"LLMPresetCreateRequest"},"LLMPresetCreate":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"project":{"type":["string","null"]},"created_by":{"type":["integer","null"]},"model_config":{"description":"Any type"},"variable_values":{"description":"Any type"}},"required":["id","name","created_by"],"description":"Write serializer for creating LLM presets.\n\n``project`` is server-injected by ``OrganizationInjectionMixin``;\n``created_by`` is stamped at save time via ``ServerStampedFieldsMixin``\n(``LLMPresetsView.create_stamped_fields``) and is ``read_only`` here so the\nclient can never set it.","title":"LLMPresetCreate"},"LLMPresetListRequest":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"description":"Lightweight serializer for dropdown listing of LLM presets.","title":"LLMPresetListRequest"},"PatchedLLMPresetListRequest":{"type":"object","properties":{"name":{"type":"string"}},"description":"Lightweight serializer for dropdown listing of LLM presets.","title":"PatchedLLMPresetListRequest"},"LLMPresetDetail":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"model_config":{"description":"Any type"},"variable_values":{"description":"Any type"},"created_by":{"$ref":"#/components/schemas/Editor"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","created_by","created_at","updated_at"],"description":"Full detail serializer for LLM preset retrieve/update responses.","title":"LLMPresetDetail"},"LLMPresetDetailRequest":{"type":"object","properties":{"name":{"type":"string"},"model_config":{"description":"Any type"},"variable_values":{"description":"Any type"}},"required":["name"],"description":"Full detail serializer for LLM preset retrieve/update responses.","title":"LLMPresetDetailRequest"},"LLMPresetUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"model_config":{"description":"Any type"},"variable_values":{"description":"Any type"}},"required":["name"],"description":"Write serializer for partial updates to LLM presets.","title":"LLMPresetUpdateRequest"},"LLMPresetUpdate":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"model_config":{"description":"Any type"},"variable_values":{"description":"Any type"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","created_at","updated_at"],"description":"Write serializer for partial updates to LLM presets.","title":"LLMPresetUpdate"},"PatchedLLMPresetUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"model_config":{"description":"Any type"},"variable_values":{"description":"Any type"}},"description":"Write serializer for partial updates to LLM presets.","title":"PatchedLLMPresetUpdateRequest"},"TransactionTypeEnum":{"type":"string","enum":["grant","redeem"],"description":"* `grant` - grant\n* `redeem` - redeem","title":"TransactionTypeEnum"},"PointsTransactionCreateRequest":{"type":"object","properties":{"transaction_type":{"$ref":"#/components/schemas/TransactionTypeEnum"},"amount":{"type":"number","format":"double"},"conversion_rate":{"type":["number","null"],"format":"double"},"description":{"type":"string","default":""},"source_id":{"type":"string","default":""},"event_time":{"type":"string","format":"date-time"}},"required":["transaction_type","amount"],"description":"Request body for the single admin Respan Points CREATE endpoint.\n\nMirrors the credit ledger's ONE create endpoint: the action (grant vs\nredeem) is a ``transaction_type`` FIELD the FE classifies, not a separate\nURL. ``transaction_type`` is normalized to the canonical points event\nclass and the view dispatches to ``assign_points`` / ``spend_points``.\n\nAction contract:\n    - ``grant``: add points. ``conversion_rate`` OPTIONAL (falls back to\n      the configured default rate).\n    - ``redeem``: remove points. ``conversion_rate`` REQUIRED —\n      ``spend_points`` deliberately has no default rate, since a redeem\n      must state the USD rate the points are valued out at (otherwise the\n      USD book value stays inflated).\n\nIdempotency: a retrying caller MUST supply BOTH a stable ``source_id``\nAND a stable ``event_time`` — the ``ch_billing_event`` RMT dedup key is\n``(org, event_time, event_class, billable_type, source_id)``, so a retry\nwith a fresh timestamp would dodge dedup and double-write points. When\n``event_time`` is omitted it defaults to ``now()``, which is correct ONLY\nfor distinct one-off admin writes (each with its own unique source_id).","title":"PointsTransactionCreateRequest"},"PointsTransactionCreate":{"type":"object","properties":{"transaction_type":{"$ref":"#/components/schemas/TransactionTypeEnum"},"amount":{"type":"number","format":"double"},"conversion_rate":{"type":["number","null"],"format":"double"},"description":{"type":"string","default":""},"source_id":{"type":"string","default":""},"event_time":{"type":"string","format":"date-time"}},"required":["transaction_type","amount"],"description":"Request body for the single admin Respan Points CREATE endpoint.\n\nMirrors the credit ledger's ONE create endpoint: the action (grant vs\nredeem) is a ``transaction_type`` FIELD the FE classifies, not a separate\nURL. ``transaction_type`` is normalized to the canonical points event\nclass and the view dispatches to ``assign_points`` / ``spend_points``.\n\nAction contract:\n    - ``grant``: add points. ``conversion_rate`` OPTIONAL (falls back to\n      the configured default rate).\n    - ``redeem``: remove points. ``conversion_rate`` REQUIRED —\n      ``spend_points`` deliberately has no default rate, since a redeem\n      must state the USD rate the points are valued out at (otherwise the\n      USD book value stays inflated).\n\nIdempotency: a retrying caller MUST supply BOTH a stable ``source_id``\nAND a stable ``event_time`` — the ``ch_billing_event`` RMT dedup key is\n``(org, event_time, event_class, billable_type, source_id)``, so a retry\nwith a fresh timestamp would dodge dedup and double-write points. When\n``event_time`` is omitted it defaults to ``now()``, which is correct ONLY\nfor distinct one-off admin writes (each with its own unique source_id).","title":"PointsTransactionCreate"},"PatchedPointsTransactionCreateRequest":{"type":"object","properties":{"transaction_type":{"$ref":"#/components/schemas/TransactionTypeEnum"},"amount":{"type":"number","format":"double"},"conversion_rate":{"type":["number","null"],"format":"double"},"description":{"type":"string","default":""},"source_id":{"type":"string","default":""},"event_time":{"type":"string","format":"date-time"}},"description":"Request body for the single admin Respan Points CREATE endpoint.\n\nMirrors the credit ledger's ONE create endpoint: the action (grant vs\nredeem) is a ``transaction_type`` FIELD the FE classifies, not a separate\nURL. ``transaction_type`` is normalized to the canonical points event\nclass and the view dispatches to ``assign_points`` / ``spend_points``.\n\nAction contract:\n    - ``grant``: add points. ``conversion_rate`` OPTIONAL (falls back to\n      the configured default rate).\n    - ``redeem``: remove points. ``conversion_rate`` REQUIRED —\n      ``spend_points`` deliberately has no default rate, since a redeem\n      must state the USD rate the points are valued out at (otherwise the\n      USD book value stays inflated).\n\nIdempotency: a retrying caller MUST supply BOTH a stable ``source_id``\nAND a stable ``event_time`` — the ``ch_billing_event`` RMT dedup key is\n``(org, event_time, event_class, billable_type, source_id)``, so a retry\nwith a fresh timestamp would dodge dedup and double-write points. When\n``event_time`` is omitted it defaults to ``now()``, which is correct ONLY\nfor distinct one-off admin writes (each with its own unique source_id).","title":"PatchedPointsTransactionCreateRequest"},"PointsTransactionDetail":{"type":"object","properties":{"id":{"type":"string"},"unique_organization_id":{"type":"string"},"points_amount":{"type":"number","format":"double"},"event_class":{"type":"string"},"event_time":{"type":"string","format":"date-time"},"description":{"type":"string"},"source_id":{"type":"string"},"credit_amount":{"type":"number","format":"double"},"debit_amount":{"type":"number","format":"double"},"points_conversion_rate":{"type":"number","format":"double"}},"required":["id","unique_organization_id","points_amount","event_class","event_time","description","source_id","credit_amount","debit_amount","points_conversion_rate"],"description":"Detail view of points transactions (full row) — reads ``ch_billing_event``.","title":"PointsTransactionDetail"},"PaginatedPointsTransactionListListFiltersData":{"type":"object","properties":{},"title":"PaginatedPointsTransactionListListFiltersData"},"PointsTransactionList":{"type":"object","properties":{"id":{"type":"string"},"points_amount":{"type":"number","format":"double"},"event_class":{"type":"string"},"event_time":{"type":"string","format":"date-time"},"description":{"type":"string"}},"required":["id","points_amount","event_class","event_time","description"],"description":"List view of points transactions — reads ``ch_billing_event``.","title":"PointsTransactionList"},"PaginatedPointsTransactionListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedPointsTransactionListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/PointsTransactionList"}}},"required":["count","results"],"title":"PaginatedPointsTransactionListList"},"Platform API_api_points_transactions_summary_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_points_transactions_summary_retrieve_Response_200"},"Platform API_api_points_transactions_summary_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_points_transactions_summary_create_Response_200"},"Platform API_api_points_transactions_summary_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_points_transactions_summary_update_Response_200"},"Platform API_api_points_transactions_summary_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_points_transactions_summary_partial_update_Response_200"},"PaginatedProjectListListFiltersData":{"type":"object","properties":{},"title":"PaginatedProjectListListFiltersData"},"CompanyOrganizationMini":{"type":"object","properties":{"id":{"type":"string"},"unique_company_organization_id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"description":"Lean company-org identity for embedding in other payloads (grouping key).\n\nKept intentionally minimal — just the identity + display name — so it can be\nprejoined onto per-team rows (see the ``/auth/teams/`` payload) without\nleaking billing fields or bloating the response.","title":"CompanyOrganizationMini"},"ProjectListCompanyOrganization":{"oneOf":[{"$ref":"#/components/schemas/CompanyOrganizationMini"},{"description":"Any type"}],"title":"ProjectListCompanyOrganization"},"ProjectList":{"type":"object","properties":{"id":{"type":"string"},"unique_organization_id":{"type":"string"},"name":{"type":"string"},"logo":{"type":["string","null"],"format":"uri"},"company_organization":{"$ref":"#/components/schemas/ProjectListCompanyOrganization"}},"required":["id","unique_organization_id","name","logo","company_organization"],"description":"List serializer for a project (a.k.a. organization/team).\n\nUsed by the flat ``/api/projects/list/`` endpoint. Each row carries its\nparent workspace (``company_organization``) so the FE can group a flat,\ncross-workspace project list by workspace from a single call. ``None`` for\nsolo projects with no parent workspace. The view select_relateds\n``company_organization`` so this stays N+1-free.","title":"ProjectList"},"PaginatedProjectListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedProjectListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/ProjectList"}}},"required":["count","results"],"title":"PaginatedProjectListList"},"ProjectListRequest":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"description":"List serializer for a project (a.k.a. organization/team).\n\nUsed by the flat ``/api/projects/list/`` endpoint. Each row carries its\nparent workspace (``company_organization``) so the FE can group a flat,\ncross-workspace project list by workspace from a single call. ``None`` for\nsolo projects with no parent workspace. The view select_relateds\n``company_organization`` so this stays N+1-free.","title":"ProjectListRequest"},"Platform API_api_pulses_behaviors_create_Response_201":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_pulses_behaviors_create_Response_201"},"PaginatedCustomBehaviorListListFiltersData":{"type":"object","properties":{},"title":"PaginatedCustomBehaviorListListFiltersData"},"PolarityEnum":{"type":"string","enum":["positive","negative","neutral"],"description":"* `positive` - Positive\n* `negative` - Negative\n* `neutral` - Neutral","title":"PolarityEnum"},"Status59fEnum":{"type":"string","enum":["draft","training","ready","failed"],"description":"* `draft` - Draft\n* `training` - Training\n* `ready` - Ready\n* `failed` - Failed","title":"Status59fEnum"},"CustomBehaviorList":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"polarity":{"$ref":"#/components/schemas/PolarityEnum"},"status":{"$ref":"#/components/schemas/Status59fEnum"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"}}},"required":["id","name","description","polarity","status","created_at","updated_at","tags"],"title":"CustomBehaviorList"},"PaginatedCustomBehaviorListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedCustomBehaviorListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/CustomBehaviorList"}}},"required":["count","results"],"title":"PaginatedCustomBehaviorListList"},"LabelEnum":{"type":"string","enum":["0","1"],"description":"* `0` - 0\n* `1` - 1","title":"LabelEnum"},"CustomBehaviorExampleRequest":{"type":"object","properties":{"text":{"type":"string"},"label":{"$ref":"#/components/schemas/LabelEnum"},"source_id":{"type":"string"}},"required":["text","label"],"description":"A reviewed log example persisted with a custom behavior draft.","title":"CustomBehaviorExampleRequest"},"CustomBehaviorCreateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"polarity":{"$ref":"#/components/schemas/PolarityEnum"},"examples":{"type":"array","items":{"$ref":"#/components/schemas/CustomBehaviorExampleRequest"}}},"required":["name"],"description":"Create a custom behavior draft with optional partial review marks.","title":"CustomBehaviorCreateRequest"},"CustomBehaviorExample":{"type":"object","properties":{"text":{"type":"string"},"label":{"$ref":"#/components/schemas/LabelEnum"},"source_id":{"type":"string"}},"required":["text","label"],"description":"A reviewed log example persisted with a custom behavior draft.","title":"CustomBehaviorExample"},"CustomBehaviorCreate":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"polarity":{"$ref":"#/components/schemas/PolarityEnum"},"examples":{"type":"array","items":{"$ref":"#/components/schemas/CustomBehaviorExample"}},"status":{"$ref":"#/components/schemas/Status59fEnum"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","status","created_at","updated_at"],"description":"Create a custom behavior draft with optional partial review marks.","title":"CustomBehaviorCreate"},"CustomBehaviorDetail":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"polarity":{"$ref":"#/components/schemas/PolarityEnum"},"examples":{"type":"array","items":{"$ref":"#/components/schemas/CustomBehaviorExample"}},"status":{"$ref":"#/components/schemas/Status59fEnum"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"}},"augmented_count":{"type":"integer"},"feedback_count":{"type":"integer"},"augmentation":{"type":["object","null"],"additionalProperties":{"description":"Any type"}}},"required":["id","name","examples","status","created_at","updated_at","tags","augmented_count","feedback_count","augmentation"],"title":"CustomBehaviorDetail"},"PatchedCustomBehaviorUpdateRequest":{"type":"object","properties":{"description":{"type":"string"},"polarity":{"$ref":"#/components/schemas/PolarityEnum"},"examples":{"type":"array","items":{"$ref":"#/components/schemas/CustomBehaviorExampleRequest"}}},"description":"Update custom-behavior metadata or persisted draft review marks.","title":"PatchedCustomBehaviorUpdateRequest"},"CustomBehaviorUpdate":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"polarity":{"$ref":"#/components/schemas/PolarityEnum"},"examples":{"type":"array","items":{"$ref":"#/components/schemas/CustomBehaviorExample"}},"status":{"$ref":"#/components/schemas/Status59fEnum"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","status","created_at","updated_at"],"description":"Update custom-behavior metadata or persisted draft review marks.","title":"CustomBehaviorUpdate"},"CustomBehaviorAugmentResponse":{"type":"object","properties":{"detail":{"type":"string"},"augmented_count":{"type":"integer"},"last_run":{"type":["object","null"],"additionalProperties":{"description":"Any type"}}},"required":["detail","augmented_count","last_run"],"description":"POST /augment/ response envelope (queued flag + counts + last run).","title":"CustomBehaviorAugmentResponse"},"PaginatedCustomBehaviorFeedbackListFiltersData":{"type":"object","properties":{},"title":"PaginatedCustomBehaviorFeedbackListFiltersData"},"ResolutionEnum":{"type":"string","enum":["pending","applied","error"],"description":"* `pending` - Pending\n* `applied` - Applied\n* `error` - Error","title":"ResolutionEnum"},"CustomBehaviorFeedback":{"type":"object","properties":{"id":{"type":"string"},"unique_id":{"type":"string"},"classifier_label":{"type":"integer"},"classifier_prob":{"type":"number","format":"double"},"span_text":{"type":"string"},"resolution":{"$ref":"#/components/schemas/ResolutionEnum"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","unique_id","classifier_label","classifier_prob","span_text","resolution","created_at","updated_at"],"description":"Read view of one flagged span verdict + its resolution.","title":"CustomBehaviorFeedback"},"PaginatedCustomBehaviorFeedbackList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedCustomBehaviorFeedbackListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/CustomBehaviorFeedback"}}},"required":["count","results"],"title":"PaginatedCustomBehaviorFeedbackList"},"CustomBehaviorFeedbackCreateResponse":{"type":"object","properties":{"created":{"type":"boolean"},"feedback":{"$ref":"#/components/schemas/CustomBehaviorFeedback"}},"required":["created","feedback"],"description":"POST /flag-span/ response envelope (created flag + the row).","title":"CustomBehaviorFeedbackCreateResponse"},"Platform API_pulses_custom_behavior_unflag_span_Response_202":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_pulses_custom_behavior_unflag_span_Response_202"},"CustomBehaviorTrainingValidationErrorResponse":{"type":"object","properties":{"examples":{"type":"array","items":{"type":"string"}}},"required":["examples"],"title":"CustomBehaviorTrainingValidationErrorResponse"},"CustomBehaviorTrainingConflictResponse":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"],"title":"CustomBehaviorTrainingConflictResponse"},"Platform API_api_pulses_behaviors_grouped_create_Response_201":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_pulses_behaviors_grouped_create_Response_201"},"Platform API_api_pulses_behaviors_logs_create_Response_201":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_pulses_behaviors_logs_create_Response_201"},"Platform API_api_pulses_behaviors_timeseries_create_Response_201":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_pulses_behaviors_timeseries_create_Response_201"},"Platform API_api_pulses_errors_create_Response_201":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_pulses_errors_create_Response_201"},"Platform API_api_pulses_errors_create_2_Response_201":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_pulses_errors_create_2_Response_201"},"Platform API_api_pulses_errors_resolution_create_Response_201":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_pulses_errors_resolution_create_Response_201"},"Platform API_api_pulses_errors_grouped_create_Response_201":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_pulses_errors_grouped_create_Response_201"},"Platform API_api_pulses_errors_timeseries_create_Response_201":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_pulses_errors_timeseries_create_Response_201"},"PaginatedResponseFormatPresetListListFiltersData":{"type":"object","properties":{},"title":"PaginatedResponseFormatPresetListListFiltersData"},"ResponseFormatPresetList":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_by":{"$ref":"#/components/schemas/Editor"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","created_by","created_at","updated_at"],"description":"Lightweight serializer for saved response-format preset listings.","title":"ResponseFormatPresetList"},"PaginatedResponseFormatPresetListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedResponseFormatPresetListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/ResponseFormatPresetList"}}},"required":["count","results"],"title":"PaginatedResponseFormatPresetListList"},"ResponseFormatPresetCreateRequest":{"type":"object","properties":{"name":{"type":"string"},"response_format_content":{"type":"string"},"is_enforcing_response_format":{"type":"boolean"}},"required":["name","response_format_content"],"description":"Write serializer for creating saved response-format presets.","title":"ResponseFormatPresetCreateRequest"},"ResponseFormatPresetCreate":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"project":{"type":["string","null"]},"created_by":{"type":"integer"},"response_format_content":{"type":"string"},"is_enforcing_response_format":{"type":"boolean"}},"required":["id","name","project","created_by","response_format_content"],"description":"Write serializer for creating saved response-format presets.","title":"ResponseFormatPresetCreate"},"ResponseFormatPresetDetail":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"response_format_content":{"type":"string"},"is_enforcing_response_format":{"type":"boolean"},"created_by":{"$ref":"#/components/schemas/Editor"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","response_format_content","created_by","created_at","updated_at"],"description":"Full serializer for retrieving saved response-format presets.","title":"ResponseFormatPresetDetail"},"PatchedResponseFormatPresetUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"response_format_content":{"type":"string"},"is_enforcing_response_format":{"type":"boolean"}},"description":"Write serializer for partial saved response-format preset updates.","title":"PatchedResponseFormatPresetUpdateRequest"},"ResponseFormatPresetUpdate":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"response_format_content":{"type":"string"},"is_enforcing_response_format":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","response_format_content","created_at","updated_at"],"description":"Write serializer for partial saved response-format preset updates.","title":"ResponseFormatPresetUpdate"},"ApiUsageBreakdownsListGetParametersBreakdownBy":{"type":"string","enum":["provider_id","model","deployment_name","feature"],"default":"provider_id","title":"ApiUsageBreakdownsListGetParametersBreakdownBy"},"ApiUsageBreakdownsListGetParametersSortBy":{"type":"string","enum":["number_of_requests","total_cost"],"default":"number_of_requests","title":"ApiUsageBreakdownsListGetParametersSortBy"},"UsageBreakdownItem":{"type":"object","properties":{"name":{"type":"string","description":"Breakdown dimension value"},"total_cost":{"type":"number","format":"double"},"number_of_requests":{"type":"integer"},"cost":{"type":"number","format":"double","description":"Alias of total_cost for FE compat"}},"required":["name","total_cost","number_of_requests","cost"],"description":"A single row in the usage breakdown table.","title":"UsageBreakdownItem"},"UsageBreakdownSummary":{"type":"object","properties":{"cost":{"type":"number","format":"double"},"name":{"type":"string"},"number_of_requests":{"type":"integer"}},"required":["cost","name","number_of_requests"],"description":"Totals across all breakdown rows.","title":"UsageBreakdownSummary"},"BillingPeriod":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"required":["start","end"],"description":"A single billing period (ISO-8601 datetime strings).","title":"BillingPeriod"},"UsageBreakdownResponse":{"type":"object","properties":{"breakdown_by":{"type":"string"},"breakdown_items":{"type":"array","items":{"$ref":"#/components/schemas/UsageBreakdownItem"}},"summary":{"$ref":"#/components/schemas/UsageBreakdownSummary"},"billing_periods":{"type":"array","items":{"$ref":"#/components/schemas/BillingPeriod"}},"start_time":{"type":"string"},"end_time":{"type":"string"}},"required":["breakdown_by","breakdown_items","summary","billing_periods","start_time","end_time"],"description":"Response for GET /payment/usage-breakdown/\n\nUses a fixed 'breakdown_items' key instead of a dynamic key.\nThe 'breakdown_by' field tells the client which dimension was used.","title":"UsageBreakdownResponse"},"Platform API_api_usage_breakdowns_list_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_usage_breakdowns_list_create_Response_200"},"Platform API_api_usage_breakdowns_list_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_usage_breakdowns_list_update_Response_200"},"Platform API_api_usage_breakdowns_list_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_usage_breakdowns_list_partial_update_Response_200"},"Platform API_api_validate_api_key_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_validate_api_key_create_Response_200"},"WorkflowRunCreateRequest":{"type":"object","properties":{"workflow_id":{"type":"string","description":"Workflow ID (or versioned ID 'workflow_id:version') to execute."},"payload":{"type":"object","additionalProperties":{"description":"Any type"}},"event_type":{"type":["string","null"]}},"required":["workflow_id"],"description":"Request payload for creating a workflow run.\n\nPOST /api/workflow-runs/\n\nResume/cancel is handled by PATCH on /api/workflow-runs/{run_id}/.","title":"WorkflowRunCreateRequest"},"WorkflowRunExecutionResponse":{"type":"object","properties":{"status":{"type":"string","description":"'completed' or 'paused'."},"results":{"description":"Final output(s) on sync completion."},"workflow_run_id":{"type":"string","description":"Run id to resume later (paused runs only)."},"paused_at_step":{"type":["string","null"],"description":"Label of the step that paused the run."}},"required":["status"],"description":"Response for POST /api/workflow-runs/ (manual run).\n\nCovers both outcomes from run_workflow_manually:\n- completed → {status, results}\n- paused    → {status, workflow_run_id, paused_at_step}","title":"WorkflowRunExecutionResponse"},"Platform API_api_workflow_runs_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_workflow_runs_update_Response_200"},"Platform API_api_workflow_runs_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_workflow_runs_partial_update_Response_200"},"WorkflowRunReadStatusEnum":{"type":"string","enum":["pending","running","paused","completed","failed","cancelled","timeout"],"description":"* `pending` - Pending\n* `running` - Running\n* `paused` - Paused\n* `completed` - Completed\n* `failed` - Failed\n* `cancelled` - Cancelled\n* `timeout` - Timeout","title":"WorkflowRunReadStatusEnum"},"WorkflowRunRead":{"type":"object","properties":{"id":{"type":"string"},"workflow_type":{"type":"string"},"status":{"$ref":"#/components/schemas/WorkflowRunReadStatusEnum"},"current_step_index":{"type":"integer"},"step_results":{"description":"Any type"},"error_message":{"type":["string","null"]},"paused_at":{"type":["string","null"],"format":"date-time"},"trace_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","workflow_type","status","current_step_index","step_results","error_message","paused_at","trace_id","created_at","updated_at"],"description":"Read serializer for WorkflowRun resource (GET response).","title":"WorkflowRunRead"},"WorkflowRunBulkCreateRequest":{"type":"object","properties":{"workflow_id":{"type":"string","description":"Workflow ID (or versioned ID 'workflow_id:version') to execute."},"source_items":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}},"description":"List of source items (same contract as annotation-items/bulk)."},"event_type":{"type":["string","null"]},"is_persistency_enabled":{"type":"boolean","default":true,"description":"When True, eval results are persisted as EvalResult records."}},"required":["workflow_id","source_items"],"description":"Bulk dispatch workflow runs from log references.\n\nPOST /api/workflow-runs/bulk/\n\nFollows the same source_items contract as AnnotationItemBulkCreateSerializer.","title":"WorkflowRunBulkCreateRequest"},"WorkflowRunBulkResponse":{"type":"object","properties":{"success_count":{"type":"integer"},"error_count":{"type":"integer"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/BulkItemError"}},"dispatched":{"type":"integer","description":"Number of runs dispatched (== success_count)."},"total_requested":{"type":"integer","description":"Number of source items requested."},"workflow_version_id":{"type":"string","description":"Resolved workflow version id the runs were dispatched for."}},"required":["success_count","error_count","errors","dispatched","total_requested"],"description":"Response for POST /api/workflow-runs/bulk/.\n\nExtends the canonical bulk envelope with the async-dispatch extras that\nrun_bulk_async_dispatch attaches (dispatched, total_requested) plus the\nresolved workflow_version_id.","title":"WorkflowRunBulkResponse"},"Platform API_api_workflow_runs_bulk_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_workflow_runs_bulk_update_Response_200"},"Platform API_api_workflow_runs_bulk_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Platform API_api_workflow_runs_bulk_partial_update_Response_200"},"PaginatedWorkspaceListListFiltersData":{"type":"object","properties":{},"title":"PaginatedWorkspaceListListFiltersData"},"WorkspaceList":{"type":"object","properties":{"id":{"type":"string"},"unique_company_organization_id":{"type":"string"},"name":{"type":"string"},"plan":{"$ref":"#/components/schemas/PlanEnum"},"plan_level":{"type":"integer"},"created_at":{"type":"string","format":"date-time"}},"required":["id","unique_company_organization_id","name","plan","plan_level","created_at"],"description":"Lean workspace (company org) row for the ``/api/workspaces/list/`` view.\n\nDeliberately whitelists identity + plan only — it does NOT inherit the\nbilling internals (``stripe_customer_id``, ``llm_gateway_markup_rate``,\n``credit_*``, ``email_domain``) that ``CompanyOrganizationListSerializer``\nexposes via ``exclude=[\"users\"]``. A workspace list any member can read\nshould not leak those.","title":"WorkspaceList"},"PaginatedWorkspaceListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedWorkspaceListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceList"}}},"required":["count","results"],"title":"PaginatedWorkspaceListList"},"PaginatedActivityListListFiltersData":{"type":"object","properties":{},"title":"PaginatedActivityListListFiltersData"},"ActivityTypeEnum":{"type":"string","enum":["creation","update","deletion","commit","title_change","comment","interaction","version_comment","deployment","version_creation","enabled","disabled","staff_membership_granted","staff_membership_role_changed","staff_membership_permissions_changed","staff_membership_revoked","staff_group_created","staff_group_permissions_changed","staff_group_updated","staff_group_revoked","staff_group_reinstated"],"description":"* `creation` - Creation\n* `update` - Update\n* `deletion` - Deletion\n* `commit` - Commit\n* `title_change` - Title Change\n* `comment` - Comment\n* `interaction` - Interaction\n* `version_comment` - Version Comment\n* `deployment` - Deployment\n* `version_creation` - Version Creation\n* `enabled` - Enabled\n* `disabled` - Disabled\n* `staff_membership_granted` - Staff Membership Granted\n* `staff_membership_role_changed` - Staff Membership Role Changed\n* `staff_membership_permissions_changed` - Staff Membership Permissions Changed\n* `staff_membership_revoked` - Staff Membership Revoked\n* `staff_group_created` - Staff Group Created\n* `staff_group_permissions_changed` - Staff Group Permissions Changed\n* `staff_group_updated` - Staff Group Updated\n* `staff_group_revoked` - Staff Group Revoked\n* `staff_group_reinstated` - Staff Group Reinstated","title":"ActivityTypeEnum"},"ActorTypeEnum":{"type":"string","enum":["user","staff","system"],"description":"* `user` - User\n* `staff` - Staff\n* `system` - System","title":"ActorTypeEnum"},"ActivityList":{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"feature_type":{"$ref":"#/components/schemas/FeatureTypeEnum","description":"Which feature this activity belongs to (e.g. prompts, automations)\n\n* `logs` - Logs\n* `threads` - Threads\n* `datasets` - Datasets\n* `dataset_logs` - Dataset Logs\n* `scores` - Scores\n* `evaluators` - Evaluators\n* `experiments` - Experiments\n* `testsets` - Testsets\n* `prompts` - Prompts\n* `models` - Models\n* `providers` - Providers\n* `credentials` - Credentials\n* `members` - Members\n* `api_keys` - Api Keys\n* `customer_users` - Customer Users\n* `monitors` - Monitors\n* `automations` - Automations\n* `workflows` - Workflows\n* `conditions` - Conditions\n* `notification_methods` - Notification Methods\n* `webhooks` - Webhooks\n* `export_sinks` - Export Sinks\n* `caches` - Caches\n* `custom_behaviors` - Custom Behaviors\n* `behaviors` - Behaviors\n* `errors` - Errors\n* `credit_transactions` - Credit Transactions\n* `annotation_items` - Annotation Items\n* `users` - Users\n* `saved_filters` - Saved Filters\n* `trackers` - Trackers\n* `traces` - Traces\n* `dashboard` - Dashboard\n* `agent_conversations` - Agent Conversations\n* `agent_skills` - Agent Skills\n* `limit_policies` - Limit Policies\n* `staff_memberships` - Staff Memberships\n* `organizations` - Organizations\n* `experiments_v2` - Experiments V2"},"object_id":{"type":"string","description":"ID of the parent entity (prompt id, workflow family id, etc.)"},"version_id":{"type":["string","null"],"description":"Optional version reference (prompt_version id, workflow_version id)"},"activity_type":{"$ref":"#/components/schemas/ActivityTypeEnum"},"message":{"type":"string"},"prev_state":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"new_state":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"actor_type":{"$ref":"#/components/schemas/ActorTypeEnum","description":"Who acted: user, staff (Respan admin), or system (cron/Celery).\n\n* `user` - User\n* `staff` - Staff\n* `system` - System"},"actor_id":{"type":["string","null"],"description":"Actor's user_unique_id (string) for user/staff actors; null for system."},"actor_name":{"type":"string","description":"Display name captured at write time (survives actor changes)."},"user_id":{"type":"integer"},"user_name":{"type":"string"},"user_username":{"type":"string","default":""},"user_first_name":{"type":"string","default":""},"user_last_name":{"type":"string","default":""},"is_respan_staff":{"type":"boolean"}},"required":["timestamp","feature_type","object_id","activity_type","prev_state","new_state","user_id","user_name","user_username","user_first_name","user_last_name","is_respan_staff"],"description":"GET list responses and parent embedding.\n\nLegacy ``user_*`` keys (``user_id`` numeric, ``user_name``,\n``user_username`` / ``user_first_name`` / ``user_last_name``,\n``is_respan_staff``) come from the ``user`` FK via\n``UserFlatIdentityFieldsMixin`` — unchanged response contract. The\ndenormalized ``actor_*`` columns (``actor_type`` / ``actor_id`` (string\n``user_unique_id``) / ``actor_name``) are exposed alongside as the new\ncanonical, join-free shape that also survives the actor's deletion.\n\nQuerysets feeding this serializer must ``select_related(\"user\")`` +\n``prefetch_related(STAFF_ROLE_PREFETCH)`` to keep the mixin O(1) per row.","title":"ActivityList"},"PaginatedActivityListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedActivityListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/ActivityList"}}},"required":["count","results"],"title":"PaginatedActivityListList"},"ActivityCreateRequest":{"type":"object","properties":{"activity_type":{"$ref":"#/components/schemas/ActivityTypeEnum"},"message":{"type":"string"},"version_id":{"type":["string","null"],"description":"Optional version reference (prompt_version id, workflow_version id)"}},"required":["activity_type"],"description":"POST — only client-writable fields; server injects user, org, feature_type, object_id via perform_create.","title":"ActivityCreateRequest"},"ActivityCreate":{"type":"object","properties":{"id":{"type":"string"},"activity_type":{"$ref":"#/components/schemas/ActivityTypeEnum"},"message":{"type":"string"},"version_id":{"type":["string","null"],"description":"Optional version reference (prompt_version id, workflow_version id)"}},"required":["id","activity_type"],"description":"POST — only client-writable fields; server injects user, org, feature_type, object_id via perform_create.","title":"ActivityCreate"},"Activities_api_activities_objects_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Activities_api_activities_objects_retrieve_Response_200"},"Activities_api_activities_objects_create_2_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Activities_api_activities_objects_create_2_Response_200"},"ActivityUpdateRequest":{"type":"object","properties":{"message":{"type":"string"}},"description":"PATCH/PUT — only message is editable.","title":"ActivityUpdateRequest"},"ActivityUpdate":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"}},"required":["id"],"description":"PATCH/PUT — only message is editable.","title":"ActivityUpdate"},"PatchedActivityUpdateRequest":{"type":"object","properties":{"message":{"type":"string"}},"description":"PATCH/PUT — only message is editable.","title":"PatchedActivityUpdateRequest"},"Activities_api_activities_objects_list_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Activities_api_activities_objects_list_retrieve_Response_200"},"ActivityFilterRequestRequest":{"type":"object","properties":{"filters":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Filter parameters keyed by field name."}},"description":"Request body for POST-for-filtering activity endpoints.","title":"ActivityFilterRequestRequest"},"ActivitySummaryResponse":{"type":"object","properties":{"total_count":{"type":"integer","description":"Total number of activities matching the scoped resource."}},"required":["total_count"],"description":"Response body for activity summary endpoints.","title":"ActivitySummaryResponse"},"ApiActivitiesObjectInteractionsGetParametersSortBy":{"type":"string","enum":["-interaction_count","-last_interaction_at"],"title":"ApiActivitiesObjectInteractionsGetParametersSortBy"},"PaginatedObjectInteractionListFiltersData":{"type":"object","properties":{},"title":"PaginatedObjectInteractionListFiltersData"},"ObjectInteraction":{"type":"object","properties":{"feature_type":{"type":"string","description":"The resource kind (datasets, prompts, ...)."},"object_id":{"type":"string","description":"The resource's id (dataset id, prompt_id, ...)."},"name":{"type":["string","null"],"description":"Display name of the resource; null when it no longer exists."},"interaction_count":{"type":"integer","description":"Recorded interactions for the object (count(id) on ch_activity_event)."},"last_interaction_at":{"type":["string","null"],"format":"date-time","description":"Timestamp of the most recent interaction, or null."}},"required":["feature_type","object_id","interaction_count","last_interaction_at"],"description":"One object-interaction aggregate row, enriched with the resource name.\n\nOne row per object the user has interacted with: the\n``ObjectInteractionsQueryBuilder`` aggregate columns plus an enriched\n``name``. ``name`` is attached after serialization (the view's\n``enrich_results``) so it is absent on the raw row; it is null when the object\nwas deleted after its interactions were recorded, or its feature_type has no\nname lookup (the row is still returned). Row order follows the requested\n``sort_by`` (recency by default); the serializer preserves it.","title":"ObjectInteraction"},"PaginatedObjectInteractionList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedObjectInteractionListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/ObjectInteraction"}}},"required":["count","results"],"title":"PaginatedObjectInteractionList"},"ApiActivitiesObjectInteractionsPostParametersSortBy":{"type":"string","enum":["-interaction_count","-last_interaction_at"],"title":"ApiActivitiesObjectInteractionsPostParametersSortBy"},"SourceTypeC74Enum":{"type":"string","enum":["logs","dataset_logs","threads"],"description":"* `logs` - Logs\n* `dataset_logs` - Dataset Logs\n* `threads` - Threads","title":"SourceTypeC74Enum"},"AnnotationItemList":{"type":"object","properties":{"id":{"type":"string"},"source_id":{"type":"string"},"source_type":{"$ref":"#/components/schemas/SourceTypeC74Enum"},"source_dataset_id":{"type":["string","null"]},"assignee":{"$ref":"#/components/schemas/Editor"},"created_by":{"$ref":"#/components/schemas/Editor"},"status":{"$ref":"#/components/schemas/Status66cEnum"},"evaluator_ids":{"type":"array","items":{"type":"string"},"description":"List of evaluator IDs that define which scoring criteria the assignee should fill out"},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"}},"required":["source_id","source_type","assignee","created_by","created_at"],"description":"Lightweight serializer for LIST view (admin management).\nShows basic item info WITHOUT full_object (for table/overview display).\n\nUsed for: /api/annotation-items/list/ (paginated, filterable admin view)","title":"AnnotationItemList"},"AnnotationItemListRequest":{"type":"object","properties":{"id":{"type":"string"},"source_id":{"type":"string"},"source_type":{"$ref":"#/components/schemas/SourceTypeC74Enum"},"source_dataset_id":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/Status66cEnum"},"evaluator_ids":{"type":"array","items":{"type":"string"},"description":"List of evaluator IDs that define which scoring criteria the assignee should fill out"},"completed_at":{"type":["string","null"],"format":"date-time"}},"required":["source_id","source_type"],"description":"Lightweight serializer for LIST view (admin management).\nShows basic item info WITHOUT full_object (for table/overview display).\n\nUsed for: /api/annotation-items/list/ (paginated, filterable admin view)","title":"AnnotationItemListRequest"},"PatchedAnnotationItemListRequest":{"type":"object","properties":{"id":{"type":"string"},"source_id":{"type":"string"},"source_type":{"$ref":"#/components/schemas/SourceTypeC74Enum"},"source_dataset_id":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/Status66cEnum"},"evaluator_ids":{"type":"array","items":{"type":"string"},"description":"List of evaluator IDs that define which scoring criteria the assignee should fill out"},"completed_at":{"type":["string","null"],"format":"date-time"}},"description":"Lightweight serializer for LIST view (admin management).\nShows basic item info WITHOUT full_object (for table/overview display).\n\nUsed for: /api/annotation-items/list/ (paginated, filterable admin view)","title":"PatchedAnnotationItemListRequest"},"AnnotationItemDetail":{"type":"object","properties":{"id":{"type":"string"},"assignee":{"$ref":"#/components/schemas/Editor"},"created_by":{"$ref":"#/components/schemas/Editor"},"project":{"type":["string","null"]},"source_id":{"type":"string"},"source_type":{"$ref":"#/components/schemas/SourceTypeC74Enum"},"source_dataset_id":{"type":["string","null"]},"evaluator_ids":{"type":"array","items":{"type":"string"},"description":"List of evaluator IDs that define which scoring criteria the assignee should fill out"},"status":{"$ref":"#/components/schemas/Status66cEnum"},"full_object":{"description":"Any type"},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"organization":{"type":"integer"}},"required":["id","assignee","created_by","source_id","source_type","source_dataset_id","evaluator_ids","full_object","created_at","updated_at","organization"],"description":"Detail serializer (same as base - both have full_object).\n\nUsed for: GET /api/annotation-items/{id}/","title":"AnnotationItemDetail"},"AnnotationItemDetailRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/Status66cEnum"},"completed_at":{"type":["string","null"],"format":"date-time"}},"description":"Detail serializer (same as base - both have full_object).\n\nUsed for: GET /api/annotation-items/{id}/","title":"AnnotationItemDetailRequest"},"Evaluations_api_annotation_items_partial_update_2_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Evaluations_api_annotation_items_partial_update_2_Response_200"},"Evaluations_api_annotation_items_bulk_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Evaluations_api_annotation_items_bulk_create_Response_200"},"PaginatedAnnotationItemListListFiltersData":{"type":"object","properties":{},"title":"PaginatedAnnotationItemListListFiltersData"},"PaginatedAnnotationItemListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedAnnotationItemListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/AnnotationItemList"}}},"required":["count","results"],"title":"PaginatedAnnotationItemListList"},"PaginatedAnnotationItemQueueListFiltersData":{"type":"object","properties":{},"title":"PaginatedAnnotationItemQueueListFiltersData"},"AnnotationItemQueue":{"type":"object","properties":{"id":{"type":"string"},"source_id":{"type":"string"},"source_type":{"$ref":"#/components/schemas/SourceTypeC74Enum"},"source_dataset_id":{"type":["string","null"]},"created_by":{"$ref":"#/components/schemas/Editor"},"status":{"$ref":"#/components/schemas/Status66cEnum"},"evaluator_ids":{"type":"array","items":{"type":"string"},"description":"List of evaluator IDs that define which scoring criteria the assignee should fill out"},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"full_object":{"description":"Any type"},"scores":{"type":"object","additionalProperties":{"description":"Any type"}}},"required":["source_id","source_type","created_by","created_at","full_object","scores"],"description":"Queue serializer WITH full_object + enriched scores.\n\nUsed for: /api/annotation-items/queue/ (worker annotation workflow)\n\nPerformance critical:\n- Prefetches ALL assigned items with full_object in ONE request\n- Enables instant client-side navigation (0ms)\n- Enriched with worker's OWN scores (privacy)\n\nNotes:\n- No assignee field (it's always \"me\" - the current user)\n- created_by uses EditorSerializer (first_name, last_name, email)\n- Scores format: dict keyed by evaluator_id (unified format, see scores_api_docs.md)","title":"AnnotationItemQueue"},"PaginatedAnnotationItemQueueList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedAnnotationItemQueueListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/AnnotationItemQueue"}}},"required":["count","results"],"title":"PaginatedAnnotationItemQueueList"},"AnnotationItemQueueRequest":{"type":"object","properties":{"id":{"type":"string"},"source_id":{"type":"string"},"source_type":{"$ref":"#/components/schemas/SourceTypeC74Enum"},"source_dataset_id":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/Status66cEnum"},"evaluator_ids":{"type":"array","items":{"type":"string"},"description":"List of evaluator IDs that define which scoring criteria the assignee should fill out"},"completed_at":{"type":["string","null"],"format":"date-time"},"full_object":{"description":"Any type"}},"required":["source_id","source_type","full_object"],"description":"Queue serializer WITH full_object + enriched scores.\n\nUsed for: /api/annotation-items/queue/ (worker annotation workflow)\n\nPerformance critical:\n- Prefetches ALL assigned items with full_object in ONE request\n- Enables instant client-side navigation (0ms)\n- Enriched with worker's OWN scores (privacy)\n\nNotes:\n- No assignee field (it's always \"me\" - the current user)\n- created_by uses EditorSerializer (first_name, last_name, email)\n- Scores format: dict keyed by evaluator_id (unified format, see scores_api_docs.md)","title":"AnnotationItemQueueRequest"},"Evaluations_api_annotation_items_queue_summary_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Evaluations_api_annotation_items_queue_summary_retrieve_Response_200"},"Evaluations_api_annotation_items_summary_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Evaluations_api_annotation_items_summary_retrieve_Response_200"},"Evaluations_api_annotation_items_summary_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Evaluations_api_annotation_items_summary_create_Response_200"},"Evaluations_api_annotation_items_summary_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Evaluations_api_annotation_items_summary_update_Response_200"},"Evaluations_api_annotation_items_summary_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Evaluations_api_annotation_items_summary_partial_update_Response_200"},"PaginatedPublicEvaluatorListListFiltersData":{"type":"object","properties":{},"title":"PaginatedPublicEvaluatorListListFiltersData"},"PaginatedPublicEvaluatorListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedPublicEvaluatorListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/PublicEvaluatorList"}}},"required":["count","results"],"title":"PaginatedPublicEvaluatorListList"},"PatchedPublicEvaluatorCreateRequest":{"type":"object","properties":{"version_id":{"type":"string"},"configurations":{"type":"object","additionalProperties":{"description":"Any type"}},"categorical_choices":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"score_config":{"type":"object","additionalProperties":{"description":"Any type"}},"passing_conditions":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"llm_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"code_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"project":{"type":["string","null"]},"eval_class":{"type":"string"},"id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"version_description":{"type":"string"},"evaluator_slug":{"type":"string"},"name":{"type":"string"},"unique_organization_id":{"type":["string","null"]},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"score_value_type":{"$ref":"#/components/schemas/ScoreValueTypeEnum"},"custom_required_fields":{"type":"array","items":{"type":"string"}},"starred":{"type":"boolean"},"organization":{"type":["integer","null"]}},"description":"User-friendly serializer for creating evaluators via API.\nAccepts configurations as a simple dict of field values.\nAutomatically infers evaluator type based on eval_class.","title":"PatchedPublicEvaluatorCreateRequest"},"PublicEvaluatorDetailRequest":{"type":"object","properties":{"version_id":{"type":"string"},"configurations":{"type":"object","additionalProperties":{"description":"Any type"}},"categorical_choices":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"score_config":{"type":"object","additionalProperties":{"description":"Any type"}},"passing_conditions":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"llm_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"code_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"project":{"type":["string","null"]},"eval_class":{"type":"string"},"id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"version_description":{"type":"string"},"evaluator_slug":{"type":"string"},"name":{"type":"string"},"unique_organization_id":{"type":["string","null"]},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"score_value_type":{"$ref":"#/components/schemas/ScoreValueTypeEnum"},"custom_required_fields":{"type":"array","items":{"type":"string"}},"starred":{"type":"boolean"},"organization":{"type":["integer","null"]}},"required":["name"],"description":"User-friendly serializer for evaluator detail view via API.","title":"PublicEvaluatorDetailRequest"},"PublicEvaluatorVersionListRequest":{"type":"object","properties":{"id":{"type":"string"},"version_id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"version_description":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"score_value_type":{"$ref":"#/components/schemas/ScoreValueTypeEnum"}},"required":["name"],"description":"Serializer for listing all versions of an evaluator.\nUsed for GET /evaluators/{id}/versions/","title":"PublicEvaluatorVersionListRequest"},"PatchedPublicEvaluatorVersionListRequest":{"type":"object","properties":{"id":{"type":"string"},"version_id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"version_description":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"score_value_type":{"$ref":"#/components/schemas/ScoreValueTypeEnum"}},"description":"Serializer for listing all versions of an evaluator.\nUsed for GET /evaluators/{id}/versions/","title":"PatchedPublicEvaluatorVersionListRequest"},"PatchedPublicEvaluatorListRequestEvalClass":{"oneOf":[{"$ref":"#/components/schemas/EvalClassEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"PatchedPublicEvaluatorListRequestEvalClass"},"PatchedPublicEvaluatorListRequest":{"type":"object","properties":{"version_id":{"type":"string"},"configurations":{"type":"object","additionalProperties":{"description":"Any type"}},"score_config":{"type":"object","additionalProperties":{"description":"Any type"}},"passing_conditions":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"llm_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"code_config":{"type":["object","null"],"additionalProperties":{"description":"Any type"}},"project":{"type":["string","null"]},"id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"version_description":{"type":"string"},"evaluator_slug":{"type":"string"},"name":{"type":"string"},"unique_organization_id":{"type":["string","null"]},"description":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"score_value_type":{"$ref":"#/components/schemas/ScoreValueTypeEnum"},"eval_class":{"$ref":"#/components/schemas/PatchedPublicEvaluatorListRequestEvalClass"},"custom_required_fields":{"type":"array","items":{"type":"string"}},"starred":{"type":"boolean"},"organization":{"type":["integer","null"]}},"description":"User-friendly serializer for evaluator list view via API.","title":"PatchedPublicEvaluatorListRequest"},"Evaluations_api_evaluators_summary_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Evaluations_api_evaluators_summary_retrieve_Response_200"},"Evaluations_api_evaluators_summary_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Evaluations_api_evaluators_summary_update_Response_200"},"Evaluations_api_evaluators_summary_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Evaluations_api_evaluators_summary_partial_update_Response_200"},"PaginatedPublicChEvalResultListListFiltersData":{"type":"object","properties":{},"title":"PaginatedPublicChEvalResultListListFiltersData"},"PaginatedPublicCHEvalResultListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedPublicChEvalResultListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/PublicCHEvalResultList"}}},"required":["count","results"],"title":"PaginatedPublicCHEvalResultListList"},"PatchedPublicCHEvalResultListRequest":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"type":{"type":"string"},"environment":{"type":"string"},"numerical_value":{"type":"number","format":"double"},"string_value":{"type":"string"},"is_passed":{"type":"boolean"},"cost":{"type":"number","format":"double"},"evaluator_id":{"type":"string"},"log_id":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"dataset_id":{"type":"string"}},"description":"Mixin to handle underscore-prefixed field mapping in serializers.\n\nThis is used when Django annotations require underscore prefixes to avoid\nname conflicts with original column names, but we want to expose the\nclean field names in the API response.\n\nUsage:\n    1. Annotate queryset with underscore prefixes: _field_name\n    2. This mixin automatically maps _field_name -> field_name in to_internal_value\n    3. The serializer can then use the clean field names normally","title":"PatchedPublicCHEvalResultListRequest"},"ChEvalResultListEvalClass":{"oneOf":[{"$ref":"#/components/schemas/EvalClassEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"ChEvalResultListEvalClass"},"CHEvalResultList":{"type":"object","properties":{"id":{"type":"string"},"passed":{"type":"string"},"eval_result_unique_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"run_at":{"type":"string","format":"date-time"},"log_timestamp":{"type":["string","null"],"format":"date-time"},"unique_organization_id":{"type":"string"},"environment":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"eval_set_id":{"type":"string"},"evaluator_id":{"type":"string"},"workflow_version_id":{"type":"string"},"automation_id":{"type":"string"},"source":{"type":"string"},"eval_class":{"$ref":"#/components/schemas/ChEvalResultListEvalClass"},"evaluator_slug":{"type":"string"},"evaluator_name":{"type":"string"},"scorer":{"type":"string"},"log_unique_id":{"type":"string"},"customer_identifier":{"type":"string"},"pipeline_run_id":{"type":"string"},"primary_score":{"type":"number","format":"double"},"string_value":{"type":["string","null"]},"json_value":{"type":"string"},"boolean_value":{"type":"integer"},"cost":{"type":"number","format":"double"},"status":{"type":"string"},"error_message":{"type":"string"},"storage_object_key":{"type":"string"}},"required":["id","passed"],"description":"Mixin to handle underscore-prefixed field mapping in serializers.\n\nThis is used when Django annotations require underscore prefixes to avoid\nname conflicts with original column names, but we want to expose the\nclean field names in the API response.\n\nUsage:\n    1. Annotate queryset with underscore prefixes: _field_name\n    2. This mixin automatically maps _field_name -> field_name in to_internal_value\n    3. The serializer can then use the clean field names normally","title":"CHEvalResultList"},"ChEvalResultListRequestEvalClass":{"oneOf":[{"$ref":"#/components/schemas/EvalClassEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"ChEvalResultListRequestEvalClass"},"CHEvalResultListRequest":{"type":"object","properties":{"id":{"type":"string"},"eval_result_unique_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"run_at":{"type":"string","format":"date-time"},"log_timestamp":{"type":["string","null"],"format":"date-time"},"unique_organization_id":{"type":"string"},"environment":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"eval_set_id":{"type":"string"},"evaluator_id":{"type":"string"},"workflow_version_id":{"type":"string"},"automation_id":{"type":"string"},"source":{"type":"string"},"eval_class":{"$ref":"#/components/schemas/ChEvalResultListRequestEvalClass"},"evaluator_slug":{"type":"string"},"evaluator_name":{"type":"string"},"scorer":{"type":"string"},"log_unique_id":{"type":"string"},"customer_identifier":{"type":"string"},"pipeline_run_id":{"type":"string"},"primary_score":{"type":"number","format":"double"},"string_value":{"type":["string","null"]},"json_value":{"type":"string"},"boolean_value":{"type":"integer"},"cost":{"type":"number","format":"double"},"status":{"type":"string"},"error_message":{"type":"string"},"storage_object_key":{"type":"string"}},"required":["id"],"description":"Mixin to handle underscore-prefixed field mapping in serializers.\n\nThis is used when Django annotations require underscore prefixes to avoid\nname conflicts with original column names, but we want to expose the\nclean field names in the API response.\n\nUsage:\n    1. Annotate queryset with underscore prefixes: _field_name\n    2. This mixin automatically maps _field_name -> field_name in to_internal_value\n    3. The serializer can then use the clean field names normally","title":"CHEvalResultListRequest"},"PatchedChEvalResultListRequestEvalClass":{"oneOf":[{"$ref":"#/components/schemas/EvalClassEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"PatchedChEvalResultListRequestEvalClass"},"PatchedCHEvalResultListRequest":{"type":"object","properties":{"id":{"type":"string"},"eval_result_unique_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"run_at":{"type":"string","format":"date-time"},"log_timestamp":{"type":["string","null"],"format":"date-time"},"unique_organization_id":{"type":"string"},"environment":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"eval_set_id":{"type":"string"},"evaluator_id":{"type":"string"},"workflow_version_id":{"type":"string"},"automation_id":{"type":"string"},"source":{"type":"string"},"eval_class":{"$ref":"#/components/schemas/PatchedChEvalResultListRequestEvalClass"},"evaluator_slug":{"type":"string"},"evaluator_name":{"type":"string"},"scorer":{"type":"string"},"log_unique_id":{"type":"string"},"customer_identifier":{"type":"string"},"pipeline_run_id":{"type":"string"},"primary_score":{"type":"number","format":"double"},"string_value":{"type":["string","null"]},"json_value":{"type":"string"},"boolean_value":{"type":"integer"},"cost":{"type":"number","format":"double"},"status":{"type":"string"},"error_message":{"type":"string"},"storage_object_key":{"type":"string"}},"description":"Mixin to handle underscore-prefixed field mapping in serializers.\n\nThis is used when Django annotations require underscore prefixes to avoid\nname conflicts with original column names, but we want to expose the\nclean field names in the API response.\n\nUsage:\n    1. Annotate queryset with underscore prefixes: _field_name\n    2. This mixin automatically maps _field_name -> field_name in to_internal_value\n    3. The serializer can then use the clean field names normally","title":"PatchedCHEvalResultListRequest"},"PaginatedAnnotationListFiltersData":{"type":"object","properties":{},"title":"PaginatedAnnotationListFiltersData"},"AnnotationTypeEnum":{"type":"string","enum":["numerical","categorical","boolean"],"description":"* `numerical` - Numerical\n* `categorical` - Categorical\n* `boolean` - Boolean","title":"AnnotationTypeEnum"},"Annotation":{"type":"object","properties":{"id":{"type":"string"},"project":{"type":["string","null"]},"type":{"$ref":"#/components/schemas/AnnotationTypeEnum"},"numerical_value":{"type":["number","null"],"format":"double"},"string_value":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"annotation_config":{"type":"string"},"log":{"type":["integer","null"]},"testset_row":{"type":["integer","null"]},"created_by":{"type":"integer"},"updated_by":{"type":["integer","null"]},"organization":{"type":"integer"}},"required":["created_at","updated_at","annotation_config","created_by","updated_by","organization"],"title":"Annotation"},"PaginatedAnnotationList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedAnnotationListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Annotation"}}},"required":["count","results"],"title":"PaginatedAnnotationList"},"AnnotationRequest":{"type":"object","properties":{"id":{"type":"string"},"project":{"type":["string","null"]},"type":{"$ref":"#/components/schemas/AnnotationTypeEnum"},"numerical_value":{"type":["number","null"],"format":"double"},"string_value":{"type":["string","null"]},"annotation_config":{"type":"string"},"log":{"type":["integer","null"]},"testset_row":{"type":["integer","null"]},"organization":{"type":"integer"}},"required":["annotation_config","organization"],"title":"AnnotationRequest"},"PatchedAnnotationRequest":{"type":"object","properties":{"id":{"type":"string"},"project":{"type":["string","null"]},"type":{"$ref":"#/components/schemas/AnnotationTypeEnum"},"numerical_value":{"type":["number","null"],"format":"double"},"string_value":{"type":["string","null"]},"annotation_config":{"type":"string"},"log":{"type":["integer","null"]},"testset_row":{"type":["integer","null"]},"organization":{"type":"integer"}},"title":"PatchedAnnotationRequest"},"DatasetTaskTrackerRunEvaluationDetail":{"type":"object","properties":{"task_id":{"type":"string"},"name":{"type":"string"},"dataset_id":{"type":"string"},"dataset_name":{"type":"string"},"dataset_description":{"type":"string"},"type":{"$ref":"#/components/schemas/Type0cbEnum"},"status":{"$ref":"#/components/schemas/Status66cEnum"},"progress_percentage":{"type":"string"},"processed_count":{"type":"string"},"total_count":{"type":"string"},"evaluator_name":{"type":"string"},"evaluator_slug":{"type":"string"},"evaluator_description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"error_message":{"type":"string"},"metadata":{"description":"Any type"}},"required":["task_id","name","dataset_id","dataset_name","dataset_description","progress_percentage","processed_count","total_count","evaluator_name","evaluator_slug","evaluator_description","created_at"],"description":"Serializer for detailed dataset evaluation task view.","title":"DatasetTaskTrackerRunEvaluationDetail"},"DatasetTaskTrackerRunEvaluationDetailRequest":{"type":"object","properties":{"task_id":{"type":"string"},"name":{"type":"string"},"dataset_id":{"type":"string"},"type":{"$ref":"#/components/schemas/Type0cbEnum"},"status":{"$ref":"#/components/schemas/Status66cEnum"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"error_message":{"type":"string"},"metadata":{"description":"Any type"}},"required":["task_id","name","dataset_id"],"description":"Serializer for detailed dataset evaluation task view.","title":"DatasetTaskTrackerRunEvaluationDetailRequest"},"PatchedDatasetTaskTrackerRunEvaluationDetailRequest":{"type":"object","properties":{"task_id":{"type":"string"},"name":{"type":"string"},"dataset_id":{"type":"string"},"type":{"$ref":"#/components/schemas/Type0cbEnum"},"status":{"$ref":"#/components/schemas/Status66cEnum"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"error_message":{"type":"string"},"metadata":{"description":"Any type"}},"description":"Serializer for detailed dataset evaluation task view.","title":"PatchedDatasetTaskTrackerRunEvaluationDetailRequest"},"DatasetTaskTrackerRunEvalListRequest":{"type":"object","properties":{"task_id":{"type":"string"},"name":{"type":"string"},"dataset_id":{"type":"string"},"type":{"$ref":"#/components/schemas/Type0cbEnum"},"status":{"$ref":"#/components/schemas/Status66cEnum"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"error_message":{"type":"string"},"result_count":{"type":"integer"},"primary_score_avg":{"type":"number","format":"double"},"run_at":{"type":"string","format":"date-time"},"evaluator_id":{"type":"string"}},"required":["task_id","name","dataset_id"],"description":"Serializer for listing dataset evaluation tasks.","title":"DatasetTaskTrackerRunEvalListRequest"},"PaginatedDatasetTaskTrackerRunLogsListListFiltersData":{"type":"object","properties":{},"title":"PaginatedDatasetTaskTrackerRunLogsListListFiltersData"},"DatasetTaskTrackerRunLogsList":{"type":"object","properties":{"task_id":{"type":"string"},"name":{"type":"string"},"dataset_id":{"type":"string"},"dataset_name":{"type":"string"},"type":{"$ref":"#/components/schemas/Type0cbEnum"},"status":{"$ref":"#/components/schemas/Status66cEnum"},"progress_percentage":{"type":"string"},"processed_count":{"type":"string"},"total_count":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"error_message":{"type":"string"},"id":{"type":"string"},"run_at":{"type":"string","format":"date-time"}},"required":["task_id","name","dataset_id","dataset_name","progress_percentage","processed_count","total_count","created_at","id"],"description":"Serializer for listing dataset evaluation tasks.","title":"DatasetTaskTrackerRunLogsList"},"PaginatedDatasetTaskTrackerRunLogsListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedDatasetTaskTrackerRunLogsListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/DatasetTaskTrackerRunLogsList"}}},"required":["count","results"],"title":"PaginatedDatasetTaskTrackerRunLogsListList"},"DatasetTaskTrackerRunLogsCreateRequest":{"type":"object","properties":{"dataset_id":{"type":"string"},"unique_organization_id":{"type":"string"}},"required":["dataset_id","unique_organization_id"],"description":"Serializer for creating dataset run logs tasks.","title":"DatasetTaskTrackerRunLogsCreateRequest"},"DatasetTaskTrackerRunLogsCreate":{"type":"object","properties":{"dataset_id":{"type":"string"},"unique_organization_id":{"type":"string"},"task_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"status":{"$ref":"#/components/schemas/Status66cEnum"}},"required":["dataset_id","unique_organization_id","task_id","created_at","name","status"],"description":"Serializer for creating dataset run logs tasks.","title":"DatasetTaskTrackerRunLogsCreate"},"DatasetTaskTrackerRunLogsDetail":{"type":"object","properties":{"task_id":{"type":"string"},"name":{"type":"string"},"dataset_id":{"type":"string"},"dataset_name":{"type":"string"},"dataset_description":{"type":"string"},"type":{"$ref":"#/components/schemas/Type0cbEnum"},"status":{"$ref":"#/components/schemas/Status66cEnum"},"progress_percentage":{"type":"string"},"processed_count":{"type":"string"},"total_count":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"error_message":{"type":"string"},"metadata":{"description":"Any type"}},"required":["task_id","name","dataset_id","dataset_name","dataset_description","progress_percentage","processed_count","total_count","created_at"],"description":"Serializer for detailed dataset run logs task view.","title":"DatasetTaskTrackerRunLogsDetail"},"DatasetTaskTrackerRunLogsDetailRequest":{"type":"object","properties":{"task_id":{"type":"string"},"name":{"type":"string"},"dataset_id":{"type":"string"},"type":{"$ref":"#/components/schemas/Type0cbEnum"},"status":{"$ref":"#/components/schemas/Status66cEnum"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"error_message":{"type":"string"},"metadata":{"description":"Any type"}},"required":["task_id","name","dataset_id"],"description":"Serializer for detailed dataset run logs task view.","title":"DatasetTaskTrackerRunLogsDetailRequest"},"PatchedDatasetTaskTrackerRunLogsDetailRequest":{"type":"object","properties":{"task_id":{"type":"string"},"name":{"type":"string"},"dataset_id":{"type":"string"},"type":{"$ref":"#/components/schemas/Type0cbEnum"},"status":{"$ref":"#/components/schemas/Status66cEnum"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"error_message":{"type":"string"},"metadata":{"description":"Any type"}},"description":"Serializer for detailed dataset run logs task view.","title":"PatchedDatasetTaskTrackerRunLogsDetailRequest"},"DatasetTaskTrackerRunLogsListRequest":{"type":"object","properties":{"task_id":{"type":"string"},"name":{"type":"string"},"dataset_id":{"type":"string"},"type":{"$ref":"#/components/schemas/Type0cbEnum"},"status":{"$ref":"#/components/schemas/Status66cEnum"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"error_message":{"type":"string"},"run_at":{"type":"string","format":"date-time"}},"required":["task_id","name","dataset_id"],"description":"Serializer for listing dataset evaluation tasks.","title":"DatasetTaskTrackerRunLogsListRequest"},"Evaluations_evaluatorsSummaryRetrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Evaluations_evaluatorsSummaryRetrieve_Response_200"},"Evaluations_evaluatorsSummaryCreate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Evaluations_evaluatorsSummaryCreate_Response_200"},"Evaluations_evaluatorsSummaryUpdate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Evaluations_evaluatorsSummaryUpdate_Response_200"},"Evaluations_evaluatorsSummaryPartialUpdate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Evaluations_evaluatorsSummaryPartialUpdate_Response_200"},"PaginatedEvaluatorTagListFiltersData":{"type":"object","properties":{},"title":"PaginatedEvaluatorTagListFiltersData"},"EvaluatorTag":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"organization":{"type":"integer"}},"required":["id","created_at","updated_at","organization"],"title":"EvaluatorTag"},"PaginatedEvaluatorTagList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedEvaluatorTagListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/EvaluatorTag"}}},"required":["count","results"],"title":"PaginatedEvaluatorTagList"},"EvaluatorTagRequest":{"type":"object","properties":{"name":{"type":"string"},"color":{"type":"string"},"organization":{"type":"integer"}},"required":["organization"],"title":"EvaluatorTagRequest"},"PatchedEvaluatorTagRequest":{"type":"object","properties":{"name":{"type":"string"},"color":{"type":"string"},"organization":{"type":"integer"}},"title":"PatchedEvaluatorTagRequest"},"EvaluatorDetailPassingConditions":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"EvaluatorDetailPassingConditions"},"EvaluatorDetailLlmConfig":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"EvaluatorDetailLlmConfig"},"EvaluatorDetailCodeConfig":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"EvaluatorDetailCodeConfig"},"EvaluatorDetail":{"type":"object","properties":{"version_id":{"type":"string"},"eval_class":{"$ref":"#/components/schemas/EvalClassEnum"},"editor":{"$ref":"#/components/schemas/Editor"},"id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"version_description":{"type":"string"},"evaluator_slug":{"type":"string"},"name":{"type":"string"},"unique_organization_id":{"type":["string","null"]},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"score_config":{"description":"Any type"},"passing_conditions":{"$ref":"#/components/schemas/EvaluatorDetailPassingConditions"},"llm_config":{"$ref":"#/components/schemas/EvaluatorDetailLlmConfig"},"code_config":{"$ref":"#/components/schemas/EvaluatorDetailCodeConfig"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"score_value_type":{"$ref":"#/components/schemas/ScoreValueTypeEnum"},"configurations":{"description":"Any type"},"custom_required_fields":{"type":"array","items":{"type":"string"}},"categorical_choices":{"type":"array","items":{"description":"Any type"}},"starred":{"type":"boolean"},"organization":{"type":["integer","null"]},"project":{"type":["string","null"]}},"required":["eval_class","editor","name","created_at","updated_at"],"description":"Mixin for internal evaluator serializers that work with full configuration format.","title":"EvaluatorDetail"},"EvalResultDetail":{"type":"object","properties":{"id":{"type":"string"},"evaluation_id":{"type":"string"},"human_text_value":{"type":"string"},"project":{"type":["string","null"]},"results":{"type":"string"},"evaluator":{"$ref":"#/components/schemas/EvaluatorDetail"},"results_id":{"type":"integer"},"inputs":{"type":"string"},"eval_result_unique_id":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"environment":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"unique_organization_id":{"type":"string"},"eval_class":{"$ref":"#/components/schemas/EvalClassEnum"},"evaluator_slug":{"type":"string"},"evaluator_name":{"type":["string","null"]},"scorer":{"type":"string"},"workflow_version_id":{"type":"string"},"source":{"type":"string"},"cost":{"type":"number","format":"double"},"evaluation_identifier":{"type":["string","null"]},"log_unique_id":{"type":["string","null"]},"customer_identifier":{"type":["string","null"]},"eval_set_id":{"type":["string","null"]},"log_timestamp":{"type":["string","null"],"format":"date-time"},"prompt_version_id":{"type":["string","null"]},"pipeline_run_id":{"type":"string"},"automation_id":{"type":["string","null"]},"primary_score":{"type":["number","null"],"format":"double"},"string_value":{"type":["string","null"]},"json_value":{"type":"string"},"boolean_value":{"type":["boolean","null"]},"categorical_value":{"type":"array","items":{"type":"string"}},"secondary_score":{"type":["number","null"],"format":"double"},"tertiary_score":{"type":["number","null"],"format":"double"},"quaternary_score":{"type":["number","null"],"format":"double"},"score_mapping":{"description":"Any type"},"human_numerical_value":{"type":["number","null"],"format":"double"},"human_categorical_value":{"type":["string","null"]},"passed":{"type":["boolean","null"]},"status":{"$ref":"#/components/schemas/StatusC33Enum"},"error_message":{"type":["string","null"]},"storage_object_key":{"type":"string"},"updated_by":{"type":["integer","null"]},"organization":{"type":"integer"},"evaluation":{"type":["string","null"]},"annotation_config":{"type":["string","null"]},"log":{"type":["integer","null"]}},"required":["id","evaluation_id","results","evaluator","results_id","inputs","created_at","updated_at","eval_class","updated_by","organization"],"description":"Mixin to handle underscore-prefixed field mapping in serializers.\n\nThis is used when Django annotations require underscore prefixes to avoid\nname conflicts with original column names, but we want to expose the\nclean field names in the API response.\n\nUsage:\n    1. Annotate queryset with underscore prefixes: _field_name\n    2. This mixin automatically maps _field_name -> field_name in to_internal_value\n    3. The serializer can then use the clean field names normally","title":"EvalResultDetail"},"EvalResultDetailRequest":{"type":"object","properties":{"human_text_value":{"type":"string"},"project":{"type":["string","null"]},"eval_result_unique_id":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"environment":{"type":"string"},"unique_organization_id":{"type":"string"},"evaluator_slug":{"type":"string"},"evaluator_name":{"type":["string","null"]},"scorer":{"type":"string"},"workflow_version_id":{"type":"string"},"source":{"type":"string"},"cost":{"type":"number","format":"double"},"evaluation_identifier":{"type":["string","null"]},"log_unique_id":{"type":["string","null"]},"customer_identifier":{"type":["string","null"]},"eval_set_id":{"type":["string","null"]},"log_timestamp":{"type":["string","null"],"format":"date-time"},"prompt_version_id":{"type":["string","null"]},"pipeline_run_id":{"type":"string"},"automation_id":{"type":["string","null"]},"primary_score":{"type":["number","null"],"format":"double"},"string_value":{"type":["string","null"]},"json_value":{"type":"string"},"boolean_value":{"type":["boolean","null"]},"categorical_value":{"type":"array","items":{"type":"string"}},"secondary_score":{"type":["number","null"],"format":"double"},"tertiary_score":{"type":["number","null"],"format":"double"},"quaternary_score":{"type":["number","null"],"format":"double"},"score_mapping":{"description":"Any type"},"human_numerical_value":{"type":["number","null"],"format":"double"},"human_categorical_value":{"type":["string","null"]},"passed":{"type":["boolean","null"]},"status":{"$ref":"#/components/schemas/StatusC33Enum"},"error_message":{"type":["string","null"]},"storage_object_key":{"type":"string"},"organization":{"type":"integer"},"evaluation":{"type":["string","null"]},"annotation_config":{"type":["string","null"]},"log":{"type":["integer","null"]}},"required":["organization"],"description":"Mixin to handle underscore-prefixed field mapping in serializers.\n\nThis is used when Django annotations require underscore prefixes to avoid\nname conflicts with original column names, but we want to expose the\nclean field names in the API response.\n\nUsage:\n    1. Annotate queryset with underscore prefixes: _field_name\n    2. This mixin automatically maps _field_name -> field_name in to_internal_value\n    3. The serializer can then use the clean field names normally","title":"EvalResultDetailRequest"},"PatchedEvalResultDetailRequest":{"type":"object","properties":{"human_text_value":{"type":"string"},"project":{"type":["string","null"]},"eval_result_unique_id":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"environment":{"type":"string"},"unique_organization_id":{"type":"string"},"evaluator_slug":{"type":"string"},"evaluator_name":{"type":["string","null"]},"scorer":{"type":"string"},"workflow_version_id":{"type":"string"},"source":{"type":"string"},"cost":{"type":"number","format":"double"},"evaluation_identifier":{"type":["string","null"]},"log_unique_id":{"type":["string","null"]},"customer_identifier":{"type":["string","null"]},"eval_set_id":{"type":["string","null"]},"log_timestamp":{"type":["string","null"],"format":"date-time"},"prompt_version_id":{"type":["string","null"]},"pipeline_run_id":{"type":"string"},"automation_id":{"type":["string","null"]},"primary_score":{"type":["number","null"],"format":"double"},"string_value":{"type":["string","null"]},"json_value":{"type":"string"},"boolean_value":{"type":["boolean","null"]},"categorical_value":{"type":"array","items":{"type":"string"}},"secondary_score":{"type":["number","null"],"format":"double"},"tertiary_score":{"type":["number","null"],"format":"double"},"quaternary_score":{"type":["number","null"],"format":"double"},"score_mapping":{"description":"Any type"},"human_numerical_value":{"type":["number","null"],"format":"double"},"human_categorical_value":{"type":["string","null"]},"passed":{"type":["boolean","null"]},"status":{"$ref":"#/components/schemas/StatusC33Enum"},"error_message":{"type":["string","null"]},"storage_object_key":{"type":"string"},"organization":{"type":"integer"},"evaluation":{"type":["string","null"]},"annotation_config":{"type":["string","null"]},"log":{"type":["integer","null"]}},"description":"Mixin to handle underscore-prefixed field mapping in serializers.\n\nThis is used when Django annotations require underscore prefixes to avoid\nname conflicts with original column names, but we want to expose the\nclean field names in the API response.\n\nUsage:\n    1. Annotate queryset with underscore prefixes: _field_name\n    2. This mixin automatically maps _field_name -> field_name in to_internal_value\n    3. The serializer can then use the clean field names normally","title":"PatchedEvalResultDetailRequest"},"PaginatedEvalWithResultsListFiltersData":{"type":"object","properties":{},"title":"PaginatedEvalWithResultsListFiltersData"},"EvalWithResultsPassingConditions":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"EvalWithResultsPassingConditions"},"EvalWithResultsLlmConfig":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"EvalWithResultsLlmConfig"},"EvalWithResultsCodeConfig":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"EvalWithResultsCodeConfig"},"EvalWithResults":{"type":"object","properties":{"version_id":{"type":"string"},"eval_class":{"$ref":"#/components/schemas/EvalClassEnum"},"evaluation_id":{"type":"string"},"results_id":{"type":"integer"},"results":{"type":"string"},"required_fields":{"type":"string"},"passed":{"type":"boolean"},"human_numerical_value":{"type":"number","format":"double"},"human_categorical_value":{"type":"string"},"human_text_value":{"type":"string"},"id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"version_description":{"type":"string"},"evaluator_slug":{"type":"string"},"name":{"type":"string"},"unique_organization_id":{"type":["string","null"]},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"score_config":{"description":"Any type"},"passing_conditions":{"$ref":"#/components/schemas/EvalWithResultsPassingConditions"},"llm_config":{"$ref":"#/components/schemas/EvalWithResultsLlmConfig"},"code_config":{"$ref":"#/components/schemas/EvalWithResultsCodeConfig"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"score_value_type":{"$ref":"#/components/schemas/ScoreValueTypeEnum"},"custom_required_fields":{"type":"array","items":{"type":"string"}},"categorical_choices":{"type":"array","items":{"description":"Any type"}},"starred":{"type":"boolean"},"organization":{"type":["integer","null"]},"project":{"type":["string","null"]}},"required":["eval_class","evaluation_id","results_id","results","required_fields","passed","human_numerical_value","human_categorical_value","human_text_value","name","created_at","updated_at"],"description":"Mixin for internal evaluator serializers that work with full configuration format.","title":"EvalWithResults"},"PaginatedEvalWithResultsList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedEvalWithResultsListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/EvalWithResults"}}},"required":["count","results"],"title":"PaginatedEvalWithResultsList"},"EvalResultCreateRequest":{"type":"object","properties":{"human_text_value":{"type":"string"},"project":{"type":["string","null"]},"eval_result_unique_id":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"environment":{"type":"string"},"unique_organization_id":{"type":"string"},"inputs":{"description":"Any type"},"evaluator_slug":{"type":"string"},"evaluator_name":{"type":["string","null"]},"scorer":{"type":"string"},"workflow_version_id":{"type":"string"},"source":{"type":"string"},"cost":{"type":"number","format":"double"},"evaluation_identifier":{"type":["string","null"]},"log_unique_id":{"type":["string","null"]},"customer_identifier":{"type":["string","null"]},"eval_set_id":{"type":["string","null"]},"log_timestamp":{"type":["string","null"],"format":"date-time"},"prompt_version_id":{"type":["string","null"]},"pipeline_run_id":{"type":"string"},"automation_id":{"type":["string","null"]},"primary_score":{"type":["number","null"],"format":"double"},"string_value":{"type":["string","null"]},"json_value":{"type":"string"},"boolean_value":{"type":["boolean","null"]},"categorical_value":{"type":"array","items":{"type":"string"}},"secondary_score":{"type":["number","null"],"format":"double"},"tertiary_score":{"type":["number","null"],"format":"double"},"quaternary_score":{"type":["number","null"],"format":"double"},"score_mapping":{"description":"Any type"},"human_numerical_value":{"type":["number","null"],"format":"double"},"human_categorical_value":{"type":["string","null"]},"passed":{"type":["boolean","null"]},"status":{"$ref":"#/components/schemas/StatusC33Enum"},"error_message":{"type":["string","null"]},"storage_object_key":{"type":"string"},"organization":{"type":"integer"},"evaluation":{"type":["string","null"]},"annotation_config":{"type":["string","null"]},"log":{"type":["integer","null"]}},"required":["organization"],"title":"EvalResultCreateRequest"},"EvalResultCreate":{"type":"object","properties":{"id":{"type":"integer"},"evaluation_id":{"type":"string"},"human_text_value":{"type":"string"},"project":{"type":["string","null"]},"results_id":{"type":"integer"},"eval_result_unique_id":{"type":"string"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"environment":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"unique_organization_id":{"type":"string"},"inputs":{"description":"Any type"},"eval_class":{"$ref":"#/components/schemas/EvalClassEnum"},"evaluator_slug":{"type":"string"},"evaluator_name":{"type":["string","null"]},"scorer":{"type":"string"},"workflow_version_id":{"type":"string"},"source":{"type":"string"},"cost":{"type":"number","format":"double"},"evaluation_identifier":{"type":["string","null"]},"log_unique_id":{"type":["string","null"]},"customer_identifier":{"type":["string","null"]},"eval_set_id":{"type":["string","null"]},"log_timestamp":{"type":["string","null"],"format":"date-time"},"prompt_version_id":{"type":["string","null"]},"pipeline_run_id":{"type":"string"},"automation_id":{"type":["string","null"]},"primary_score":{"type":["number","null"],"format":"double"},"string_value":{"type":["string","null"]},"json_value":{"type":"string"},"boolean_value":{"type":["boolean","null"]},"categorical_value":{"type":"array","items":{"type":"string"}},"secondary_score":{"type":["number","null"],"format":"double"},"tertiary_score":{"type":["number","null"],"format":"double"},"quaternary_score":{"type":["number","null"],"format":"double"},"score_mapping":{"description":"Any type"},"human_numerical_value":{"type":["number","null"],"format":"double"},"human_categorical_value":{"type":["string","null"]},"passed":{"type":["boolean","null"]},"status":{"$ref":"#/components/schemas/StatusC33Enum"},"error_message":{"type":["string","null"]},"storage_object_key":{"type":"string"},"updated_by":{"type":["integer","null"]},"organization":{"type":"integer"},"evaluation":{"type":["string","null"]},"annotation_config":{"type":["string","null"]},"log":{"type":["integer","null"]}},"required":["id","evaluation_id","results_id","created_at","updated_at","eval_class","updated_by","organization"],"title":"EvalResultCreate"},"EvalWithResultsRequestPassingConditions":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"EvalWithResultsRequestPassingConditions"},"EvalWithResultsRequestLlmConfig":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"EvalWithResultsRequestLlmConfig"},"EvalWithResultsRequestCodeConfig":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"EvalWithResultsRequestCodeConfig"},"EvalWithResultsRequest":{"type":"object","properties":{"version_id":{"type":"string"},"id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"version_description":{"type":"string"},"evaluator_slug":{"type":"string"},"name":{"type":"string"},"unique_organization_id":{"type":["string","null"]},"description":{"type":"string"},"score_config":{"description":"Any type"},"passing_conditions":{"$ref":"#/components/schemas/EvalWithResultsRequestPassingConditions"},"llm_config":{"$ref":"#/components/schemas/EvalWithResultsRequestLlmConfig"},"code_config":{"$ref":"#/components/schemas/EvalWithResultsRequestCodeConfig"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"score_value_type":{"$ref":"#/components/schemas/ScoreValueTypeEnum"},"custom_required_fields":{"type":"array","items":{"type":"string"}},"categorical_choices":{"type":"array","items":{"description":"Any type"}},"starred":{"type":"boolean"},"organization":{"type":["integer","null"]},"project":{"type":["string","null"]}},"required":["name"],"description":"Mixin for internal evaluator serializers that work with full configuration format.","title":"EvalWithResultsRequest"},"PatchedEvalWithResultsRequestPassingConditions":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"PatchedEvalWithResultsRequestPassingConditions"},"PatchedEvalWithResultsRequestLlmConfig":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"PatchedEvalWithResultsRequestLlmConfig"},"PatchedEvalWithResultsRequestCodeConfig":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"PatchedEvalWithResultsRequestCodeConfig"},"PatchedEvalWithResultsRequest":{"type":"object","properties":{"version_id":{"type":"string"},"id":{"type":"string"},"version":{"type":"integer"},"is_read_only":{"type":"boolean"},"version_description":{"type":"string"},"evaluator_slug":{"type":"string"},"name":{"type":"string"},"unique_organization_id":{"type":["string","null"]},"description":{"type":"string"},"score_config":{"description":"Any type"},"passing_conditions":{"$ref":"#/components/schemas/PatchedEvalWithResultsRequestPassingConditions"},"llm_config":{"$ref":"#/components/schemas/PatchedEvalWithResultsRequestLlmConfig"},"code_config":{"$ref":"#/components/schemas/PatchedEvalWithResultsRequestCodeConfig"},"type":{"$ref":"#/components/schemas/Type4e2Enum"},"score_value_type":{"$ref":"#/components/schemas/ScoreValueTypeEnum"},"custom_required_fields":{"type":"array","items":{"type":"string"}},"categorical_choices":{"type":"array","items":{"description":"Any type"}},"starred":{"type":"boolean"},"organization":{"type":["integer","null"]},"project":{"type":["string","null"]}},"description":"Mixin for internal evaluator serializers that work with full configuration format.","title":"PatchedEvalWithResultsRequest"},"Evaluations_testRunCreate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Evaluations_testRunCreate_Response_200"},"Evaluations_testRunCreate2_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Evaluations_testRunCreate2_Response_200"},"ApiAnthropicPassthroughV1MessagesPostParametersFormat":{"type":"string","enum":["json","txt"],"title":"ApiAnthropicPassthroughV1MessagesPostParametersFormat"},"Proxy_api_anthropic_passthrough_v1_messages_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Proxy_api_anthropic_passthrough_v1_messages_create_Response_200"},"ApiAnthropicV1MessagesPostParametersFormat":{"type":"string","enum":["json","txt"],"title":"ApiAnthropicV1MessagesPostParametersFormat"},"Proxy_api_anthropic_v1_messages_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Proxy_api_anthropic_v1_messages_create_Response_200"},"Proxy_api_assemblyai_v2_transcript_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Proxy_api_assemblyai_v2_transcript_retrieve_Response_200"},"Proxy_api_assemblyai_v2_transcript_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Proxy_api_assemblyai_v2_transcript_create_Response_200"},"Proxy_api_assemblyai_v2_transcript_create_2_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Proxy_api_assemblyai_v2_transcript_create_2_Response_200"},"ApiChatCompletionsV1PostParametersFormat":{"type":"string","enum":["json","txt"],"title":"ApiChatCompletionsV1PostParametersFormat"},"Proxy_api_chat_completions_v1_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Proxy_api_chat_completions_v1_create_Response_200"},"Proxy_api_generate_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Proxy_api_generate_create_Response_200"},"ApiGoogleSdkTypeV1BetaModelsModelNameRenderFormatPostParametersFormat":{"type":"string","enum":["json","txt"],"title":"ApiGoogleSdkTypeV1BetaModelsModelNameRenderFormatPostParametersFormat"},"Proxy_api_google_v1beta_models_:_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Proxy_api_google_v1beta_models_:_create_Response_200"},"ApiGoogleModelsModelNameRenderFormatPostParametersFormat":{"type":"string","enum":["json","txt"],"title":"ApiGoogleModelsModelNameRenderFormatPostParametersFormat"},"Proxy_api_google_models_:_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Proxy_api_google_models_:_create_Response_200"},"Proxy_api_playground_ask_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Proxy_api_playground_ask_create_Response_200"},"Proxy_api_playground_chat_completions_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Proxy_api_playground_chat_completions_create_Response_200"},"Proxy_api_v1_batches_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Proxy_api_v1_batches_retrieve_Response_200"},"Proxy_api_v1_batches_create_2_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Proxy_api_v1_batches_create_2_Response_200"},"Proxy_api_v1_batches_cancel_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Proxy_api_v1_batches_cancel_retrieve_Response_200"},"PaginatedBatchJobListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/BatchJobList"}}},"required":["count","results"],"title":"PaginatedBatchJobListList"},"Proxy_api_v1_batches_summary_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Proxy_api_v1_batches_summary_retrieve_Response_200"},"ApiV1ChatCompletionsPostParametersFormat":{"type":"string","enum":["json","txt"],"title":"ApiV1ChatCompletionsPostParametersFormat"},"Proxy_api_v1_chat_completions_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Proxy_api_v1_chat_completions_create_Response_200"},"ChatCompletionsPostParametersFormat":{"type":"string","enum":["json","txt"],"title":"ChatCompletionsPostParametersFormat"},"Proxy_chat_completions_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Proxy_chat_completions_create_Response_200"},"PublicCachedResponseDetailPromptMessages":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"PublicCachedResponseDetailPromptMessages"},"PublicCachedResponseDetail":{"type":"object","properties":{"cache_key":{"type":["string","null"]},"cache_key_by_org_uuid":{"type":["string","null"]},"request_content":{"type":"string"},"prompt_content":{"type":"string"},"response_content":{"type":"string"},"prompt_messages":{"$ref":"#/components/schemas/PublicCachedResponseDetailPromptMessages"},"full_response":{"description":"Any type"},"hit_count":{"type":"integer"},"response_time":{"type":"number","format":"double"},"timestamp":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"expiry_date":{"type":["string","null"],"format":"date-time"}},"required":["request_content","prompt_content","response_content"],"description":"Strip org-internal fields and present a single cache_key for the public API.\n\nThe PG ORM has two fields:\n- cache_key: internal key with integer org ID (legacy, used by CH enrichment)\n- cache_key_by_org_uuid: UUID-based key (safe to expose)\n\nThe public API exposes ONE \"cache_key\" field whose value comes from\ncache_key_by_org_uuid. The internal cache_key and the raw\ncache_key_by_org_uuid field are both removed from the response.","title":"PublicCachedResponseDetail"},"PublicCachedResponseListRequest":{"type":"object","properties":{"cache_key":{"type":["string","null"]},"cache_key_by_org_uuid":{"type":["string","null"]},"hit_count":{"type":"integer"},"timestamp":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"expiry_date":{"type":["string","null"],"format":"date-time"}},"description":"Strip org-internal fields and present a single cache_key for the public API.\n\nThe PG ORM has two fields:\n- cache_key: internal key with integer org ID (legacy, used by CH enrichment)\n- cache_key_by_org_uuid: UUID-based key (safe to expose)\n\nThe public API exposes ONE \"cache_key\" field whose value comes from\ncache_key_by_org_uuid. The internal cache_key and the raw\ncache_key_by_org_uuid field are both removed from the response.","title":"PublicCachedResponseListRequest"},"PublicCachedResponseList":{"type":"object","properties":{"id":{"type":"integer"},"cache_key":{"type":["string","null"]},"cache_key_by_org_uuid":{"type":["string","null"]},"prompt_content":{"type":"string"},"response_content":{"type":"string"},"hit_count":{"type":"integer"},"timestamp":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"expiry_date":{"type":["string","null"],"format":"date-time"}},"required":["id","prompt_content","response_content"],"description":"Strip org-internal fields and present a single cache_key for the public API.\n\nThe PG ORM has two fields:\n- cache_key: internal key with integer org ID (legacy, used by CH enrichment)\n- cache_key_by_org_uuid: UUID-based key (safe to expose)\n\nThe public API exposes ONE \"cache_key\" field whose value comes from\ncache_key_by_org_uuid. The internal cache_key and the raw\ncache_key_by_org_uuid field are both removed from the response.","title":"PublicCachedResponseList"},"Caches_getFilteredCachedResponsesSummary_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Caches_getFilteredCachedResponsesSummary_Response_200"},"PublicCachedResponseDetailRequestPromptMessages":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"PublicCachedResponseDetailRequestPromptMessages"},"PublicCachedResponseDetailRequest":{"type":"object","properties":{"cache_key":{"type":["string","null"]},"cache_key_by_org_uuid":{"type":["string","null"]},"prompt_messages":{"$ref":"#/components/schemas/PublicCachedResponseDetailRequestPromptMessages"},"full_response":{"description":"Any type"},"hit_count":{"type":"integer"},"response_time":{"type":"number","format":"double"},"timestamp":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"expiry_date":{"type":["string","null"],"format":"date-time"}},"description":"Strip org-internal fields and present a single cache_key for the public API.\n\nThe PG ORM has two fields:\n- cache_key: internal key with integer org ID (legacy, used by CH enrichment)\n- cache_key_by_org_uuid: UUID-based key (safe to expose)\n\nThe public API exposes ONE \"cache_key\" field whose value comes from\ncache_key_by_org_uuid. The internal cache_key and the raw\ncache_key_by_org_uuid field are both removed from the response.","title":"PublicCachedResponseDetailRequest"},"PatchedPublicCachedResponseDetailRequestPromptMessages":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"PatchedPublicCachedResponseDetailRequestPromptMessages"},"PatchedPublicCachedResponseDetailRequest":{"type":"object","properties":{"cache_key":{"type":["string","null"]},"cache_key_by_org_uuid":{"type":["string","null"]},"prompt_messages":{"$ref":"#/components/schemas/PatchedPublicCachedResponseDetailRequestPromptMessages"},"full_response":{"description":"Any type"},"hit_count":{"type":"integer"},"response_time":{"type":"number","format":"double"},"timestamp":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"expiry_date":{"type":["string","null"],"format":"date-time"}},"description":"Strip org-internal fields and present a single cache_key for the public API.\n\nThe PG ORM has two fields:\n- cache_key: internal key with integer org ID (legacy, used by CH enrichment)\n- cache_key_by_org_uuid: UUID-based key (safe to expose)\n\nThe public API exposes ONE \"cache_key\" field whose value comes from\ncache_key_by_org_uuid. The internal cache_key and the raw\ncache_key_by_org_uuid field are both removed from the response.","title":"PatchedPublicCachedResponseDetailRequest"},"PaginatedPublicCachedResponseListListFiltersData":{"type":"object","properties":{},"title":"PaginatedPublicCachedResponseListListFiltersData"},"PaginatedPublicCachedResponseListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedPublicCachedResponseListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/PublicCachedResponseList"}}},"required":["count","results"],"title":"PaginatedPublicCachedResponseListList"},"PatchedPublicCachedResponseListRequest":{"type":"object","properties":{"cache_key":{"type":["string","null"]},"cache_key_by_org_uuid":{"type":["string","null"]},"hit_count":{"type":"integer"},"timestamp":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"expiry_date":{"type":["string","null"],"format":"date-time"}},"description":"Strip org-internal fields and present a single cache_key for the public API.\n\nThe PG ORM has two fields:\n- cache_key: internal key with integer org ID (legacy, used by CH enrichment)\n- cache_key_by_org_uuid: UUID-based key (safe to expose)\n\nThe public API exposes ONE \"cache_key\" field whose value comes from\ncache_key_by_org_uuid. The internal cache_key and the raw\ncache_key_by_org_uuid field are both removed from the response.","title":"PatchedPublicCachedResponseListRequest"},"Logs_api_caches_summary_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_api_caches_summary_retrieve_Response_200"},"Logs_api_caches_summary_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_api_caches_summary_update_Response_200"},"Logs_api_caches_summary_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_api_caches_summary_partial_update_Response_200"},"PaginatedPublicChLogV2DetailListFiltersData":{"type":"object","properties":{},"title":"PaginatedPublicChLogV2DetailListFiltersData"},"PaginatedPublicCHLogV2DetailList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedPublicChLogV2DetailListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/PublicCHLogV2Detail"}}},"required":["count","results"],"title":"PaginatedPublicCHLogV2DetailList"},"PatchedPublicCHLogV2DetailRequest":{"type":"object","properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"unique_organization_id":{"type":"string"},"error_message":{"type":"string"},"completion_messages":{"description":"Any type"},"input":{"type":"string"},"output":{"type":"string"},"variables":{"description":"Any type"},"temperature":{"type":"number","format":"double"},"max_tokens":{"type":"integer"},"top_p":{"type":"number","format":"double"},"frequency_penalty":{"type":"number","format":"double"},"presence_penalty":{"type":"number","format":"double"},"stop":{"type":"string"},"response_format":{"description":"Any type"},"matched_meter_ids":{"type":"array","items":{"description":"Any type"}},"unit_prices":{"type":"object","additionalProperties":{"description":"Any type"}},"component_costs":{"type":"object","additionalProperties":{"description":"Any type"}},"custom_identifier":{"type":"string"},"group_identifier":{"type":"string"},"blurred":{"type":"boolean"},"start_time":{"type":"string","format":"date-time"},"timestamp":{"type":"string","format":"date-time"},"load_balance_group_id":{"type":"string"},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"prompt_cache_hit_tokens":{"type":"integer"},"prompt_cache_creation_tokens":{"type":"integer"},"reasoning_tokens":{"type":"integer"},"total_request_tokens":{"type":"integer"},"cost":{"type":"number","format":"double"},"llm_gateway_markup_rate":{"type":"number","format":"double"},"service_tier":{"type":"string"},"model_discount":{"type":"number","format":"double"},"pricing_tier":{"type":"string"},"audio_input_file":{"type":"string"},"audio_output_file":{"type":"string"},"organization_key_id":{"type":"string"},"user_email":{"type":"string"},"model":{"type":"string"},"provider_id":{"type":"string"},"category":{"type":"string"},"properties":{"type":"string"},"cache_bit":{"type":"integer"},"cache_miss_bit":{"type":"integer"},"cache_key":{"type":"string"},"latency":{"type":"number","format":"double"},"tokens_per_second":{"type":"number","format":"double"},"time_to_first_token":{"type":"number","format":"double"},"routing_time":{"type":"number","format":"double"},"status":{"type":"string"},"has_tool_calls":{"type":"boolean"},"status_code":{"type":"integer"},"log_method":{"type":"string"},"log_type":{"type":"string"},"environment":{"type":"string"},"stream":{"type":"boolean"},"evaluation_identifier":{"type":"string"},"customer_identifier":{"type":"string"},"customer_email":{"type":"string"},"customer_name":{"type":"string"},"customer_user_unique_id":{"type":"string"},"used_custom_credential":{"type":"boolean"},"deployment_name":{"type":"string"},"deployment_id":{"type":"string"},"prompt_name":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"system_text":{"type":"string"},"prompt_text":{"type":"string"},"completion_text":{"type":"string"},"prompt_message_count":{"type":"integer"},"completion_message_count":{"type":"integer"},"trace_unique_id":{"type":"string"},"span_unique_id":{"type":"string"},"span_name":{"type":"string"},"span_parent_id":{"type":"string"},"span_workflow_name":{"type":"string"},"session_identifier":{"type":"string"},"span_links":{"type":"string"},"trace_group_identifier":{"type":"string"},"thread_identifier":{"type":"string"},"thread_unique_id":{"type":"string"},"storage_object_key":{"type":"string"},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":"string","format":"date-time"},"unique_id":{"type":"string"},"respan_gateway_request_id":{"type":"string"},"full_text":{"type":"string"}},"description":"Mixin for serializers to provide generic field retrieval methods\nwith backward compatibility and input/output parsing support.","title":"PatchedPublicCHLogV2DetailRequest"},"CHThreadDetail":{"type":"object","properties":{"id":{"type":"string"},"thread_identifier":{"type":"string"},"thread_unique_id":{"type":"string"},"organization_name":{"type":"string"},"environment":{"type":"string"},"organization_id":{"type":"string"},"unique_organization_id":{"type":"string"},"organization_key_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"timestamp":{"type":"string","format":"date-time"},"log_count":{"type":"integer"},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"tokens":{"type":"integer"},"cost":{"type":"number","format":"double"},"tokens_per_second":{"type":"number","format":"double"},"latency":{"type":"number","format":"double"},"time_to_first_token":{"type":"number","format":"double"},"prompt":{"type":"string"},"completion":{"type":"string"},"system":{"type":"string"},"input":{"type":"string","default":""},"output":{"type":"string","default":""},"storage_object_key":{"type":"string"},"prompt_messages":{"description":"Any type"},"completion_message":{"description":"Any type"},"completion_messages":{"description":"Any type"},"tools":{"type":"string"},"tool_calls":{"type":"string"},"full_request":{"type":"string"},"full_response":{"type":"string"},"metadata":{"type":"string"}},"required":["id","thread_identifier","log_count","prompt_tokens","completion_tokens","tokens","cost","tokens_per_second","latency","time_to_first_token","prompt","completion","system","tools","tool_calls","full_request","full_response","metadata"],"description":"Serializer for detailed thread data from CHThread model.\nIncludes full text content and thread logs functionality.","title":"CHThreadDetail"},"CHThreadDetailRequest":{"type":"object","properties":{"id":{"type":"string"},"thread_identifier":{"type":"string"},"thread_unique_id":{"type":"string"},"organization_name":{"type":"string"},"environment":{"type":"string"},"organization_id":{"type":"string"},"unique_organization_id":{"type":"string"},"organization_key_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"timestamp":{"type":"string","format":"date-time"},"log_count":{"type":"integer"},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"tokens":{"type":"integer"},"cost":{"type":"number","format":"double"},"tokens_per_second":{"type":"number","format":"double"},"latency":{"type":"number","format":"double"},"time_to_first_token":{"type":"number","format":"double"},"input":{"type":"string","default":""},"output":{"type":"string","default":""},"storage_object_key":{"type":"string"},"prompt_messages":{"description":"Any type"},"completion_message":{"description":"Any type"},"completion_messages":{"description":"Any type"}},"required":["id","thread_identifier","log_count","prompt_tokens","completion_tokens","tokens","cost","tokens_per_second","latency","time_to_first_token"],"description":"Serializer for detailed thread data from CHThread model.\nIncludes full text content and thread logs functionality.","title":"CHThreadDetailRequest"},"PatchedCHThreadDetailRequest":{"type":"object","properties":{"id":{"type":"string"},"thread_identifier":{"type":"string"},"thread_unique_id":{"type":"string"},"organization_name":{"type":"string"},"environment":{"type":"string"},"organization_id":{"type":"string"},"unique_organization_id":{"type":"string"},"organization_key_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"timestamp":{"type":"string","format":"date-time"},"log_count":{"type":"integer"},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"tokens":{"type":"integer"},"cost":{"type":"number","format":"double"},"tokens_per_second":{"type":"number","format":"double"},"latency":{"type":"number","format":"double"},"time_to_first_token":{"type":"number","format":"double"},"input":{"type":"string","default":""},"output":{"type":"string","default":""},"storage_object_key":{"type":"string"},"prompt_messages":{"description":"Any type"},"completion_message":{"description":"Any type"},"completion_messages":{"description":"Any type"}},"description":"Serializer for detailed thread data from CHThread model.\nIncludes full text content and thread logs functionality.","title":"PatchedCHThreadDetailRequest"},"PaginatedChThreadListListFiltersData":{"type":"object","properties":{},"title":"PaginatedChThreadListListFiltersData"},"PaginatedCHThreadListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedChThreadListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/CHThreadList"}}},"required":["count","results"],"title":"PaginatedCHThreadListList"},"PatchedCHThreadListRequest":{"type":"object","properties":{"id":{"type":"string"},"thread_identifier":{"type":"string"},"thread_unique_id":{"type":"string"},"organization_name":{"type":"string"},"environment":{"type":"string"},"organization_id":{"type":"string"},"unique_organization_id":{"type":"string"},"organization_key_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"timestamp":{"type":"string","format":"date-time"},"log_count":{"type":"integer"},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"tokens":{"type":"integer"},"cost":{"type":"number","format":"double"},"tokens_per_second":{"type":"number","format":"double"},"latency":{"type":"number","format":"double"},"time_to_first_token":{"type":"number","format":"double"},"input":{"type":"string","default":""},"output":{"type":"string","default":""},"storage_object_key":{"type":"string"}},"description":"Serializer for thread list data from the CTE query.\nHandles the output from _get_thread_queryset.","title":"PatchedCHThreadListRequest"},"Logs_api_openai_v1_traces_ingest_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_api_openai_v1_traces_ingest_create_Response_200"},"PaginatedRequestLogCreateListFiltersData":{"type":"object","properties":{},"title":"PaginatedRequestLogCreateListFiltersData"},"PaginatedRequestLogCreateList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedRequestLogCreateListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/RequestLogCreate"}}},"required":["count","results"],"title":"PaginatedRequestLogCreateList"},"CHLogV2DetailRequest":{"type":"object","properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"unique_organization_id":{"type":"string"},"organization_name":{"type":"string"},"error_message":{"type":"string"},"completion_messages":{"description":"Any type"},"input":{"type":"string"},"output":{"type":"string"},"variables":{"description":"Any type"},"temperature":{"type":"number","format":"double"},"max_tokens":{"type":"integer"},"top_p":{"type":"number","format":"double"},"frequency_penalty":{"type":"number","format":"double"},"presence_penalty":{"type":"number","format":"double"},"stop":{"type":"string"},"response_format":{"description":"Any type"},"matched_meter_ids":{"type":"array","items":{"description":"Any type"}},"unit_prices":{"type":"object","additionalProperties":{"description":"Any type"}},"component_costs":{"type":"object","additionalProperties":{"description":"Any type"}},"custom_identifier":{"type":"string"},"group_identifier":{"type":"string"},"blurred":{"type":"boolean"},"start_time":{"type":"string","format":"date-time"},"timestamp":{"type":"string","format":"date-time"},"load_balance_group_id":{"type":"string"},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"prompt_cache_hit_tokens":{"type":"integer"},"prompt_cache_creation_tokens":{"type":"integer"},"reasoning_tokens":{"type":"integer"},"total_request_tokens":{"type":"integer"},"is_token_count_estimated":{"type":"integer"},"cost":{"type":"number","format":"double"},"llm_gateway_markup_rate":{"type":"number","format":"double"},"service_tier":{"type":"string"},"model_discount":{"type":"number","format":"double"},"pricing_tier":{"type":"string"},"audio_input_file":{"type":"string"},"audio_output_file":{"type":"string"},"organization_key_id":{"type":"string"},"user_email":{"type":"string"},"model":{"type":"string"},"provider_id":{"type":"string"},"category":{"type":"string"},"properties":{"type":"string"},"cache_bit":{"type":"integer"},"cache_miss_bit":{"type":"integer"},"cache_key":{"type":"string"},"latency":{"type":"number","format":"double"},"tokens_per_second":{"type":"number","format":"double"},"time_to_first_token":{"type":"number","format":"double"},"routing_time":{"type":"number","format":"double"},"status":{"type":"string"},"has_tool_calls":{"type":"boolean"},"status_code":{"type":"integer"},"log_method":{"type":"string"},"log_type":{"type":"string"},"environment":{"type":"string"},"stream":{"type":"boolean"},"evaluation_identifier":{"type":"string"},"customer_identifier":{"type":"string"},"customer_email":{"type":"string"},"customer_name":{"type":"string"},"customer_user_unique_id":{"type":"string"},"used_custom_credential":{"type":"boolean"},"deployment_name":{"type":"string"},"deployment_id":{"type":"string"},"prompt_name":{"type":"string"},"prompt_id":{"type":"string"},"prompt_version_number":{"type":"integer"},"system_text":{"type":"string"},"prompt_text":{"type":"string"},"completion_text":{"type":"string"},"prompt_message_count":{"type":"integer"},"completion_message_count":{"type":"integer"},"trace_unique_id":{"type":"string"},"span_unique_id":{"type":"string"},"span_name":{"type":"string"},"span_parent_id":{"type":"string"},"span_workflow_name":{"type":"string"},"session_identifier":{"type":"string"},"span_links":{"type":"string"},"trace_group_identifier":{"type":"string"},"thread_identifier":{"type":"string"},"thread_unique_id":{"type":"string"},"storage_object_key":{"type":"string"},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":"string","format":"date-time"},"unique_id":{"type":"string"},"respan_gateway_request_id":{"type":"string"},"full_text":{"type":"string"}},"required":["id","organization_id"],"description":"Mixin for serializers to provide generic field retrieval methods\nwith backward compatibility and input/output parsing support.","title":"CHLogV2DetailRequest"},"ApiRequestLogsGroupsGetParametersGroupBy":{"type":"string","enum":["custom_identifier","customer_identifier","deployment_id","deployment_name","model","organization_key_id","prompt_id","provider_id","thread","trace"],"title":"ApiRequestLogsGroupsGetParametersGroupBy"},"PaginatedClickHouseRequestLogAggregatedListFiltersData":{"type":"object","properties":{},"title":"PaginatedClickHouseRequestLogAggregatedListFiltersData"},"PaginatedClickHouseRequestLogAggregatedList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedClickHouseRequestLogAggregatedListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/ClickHouseRequestLogAggregated"}}},"required":["count","results"],"title":"PaginatedClickHouseRequestLogAggregatedList"},"CHRequestLogModelBreakdownRequest":{"type":"object","properties":{"date_group":{"type":"string","format":"date-time"},"number_of_requests":{"type":["integer","null"]},"total_cost":{"type":["number","null"],"format":"double"},"total_prompt_tokens":{"type":["integer","null"]},"total_completion_tokens":{"type":["integer","null"]},"total_tokens":{"type":["integer","null"]},"max_tpm":{"type":["integer","null"]},"error_count":{"type":["integer","null"]},"error_percentage":{"type":["number","null"],"format":"double"},"average_prompt_tokens":{"type":["integer","null"]},"average_completion_tokens":{"type":["integer","null"]},"average_tokens":{"type":["integer","null"]},"average_cost":{"type":["number","null"],"format":"double"},"average_latency":{"type":["number","null"],"format":"double"},"average_tps":{"type":["number","null"],"format":"double"},"average_ttft":{"type":["number","null"],"format":"double"},"prompt_cache_hit_tokens":{"type":["integer","null"]},"reasoning_tokens":{"type":["integer","null"]},"max_cost":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"max_latency":{"type":["number","null"],"format":"double"},"unique_customers":{"type":["integer","null"]},"latency_p_50":{"type":["number","null"],"format":"double"},"latency_p_95":{"type":["number","null"],"format":"double"},"latency_p_99":{"type":["number","null"],"format":"double"},"cache_hit_percentage":{"type":["number","null"],"format":"double"},"requests_per_second":{"type":["number","null"],"format":"double"},"model":{"type":"string"}},"required":["date_group"],"description":"All fields are optional, the DB will only aggregate the fields that are required to aggregate.\n\nMetric fields are auto-generated from the dashboard metric registry.\nTo add a new metric, add it to DASHBOARD_METRICS in utils/dashboard/metric_registry.py.","title":"CHRequestLogModelBreakdownRequest"},"CHRequestLogModelBreakdown":{"type":"object","properties":{"date_group":{"type":"string","format":"date-time"},"number_of_requests":{"type":["integer","null"]},"total_cost":{"type":["number","null"],"format":"double"},"total_prompt_tokens":{"type":["integer","null"]},"total_completion_tokens":{"type":["integer","null"]},"total_tokens":{"type":["integer","null"]},"max_tpm":{"type":["integer","null"]},"error_count":{"type":["integer","null"]},"error_percentage":{"type":["number","null"],"format":"double"},"average_prompt_tokens":{"type":["integer","null"]},"average_completion_tokens":{"type":["integer","null"]},"average_tokens":{"type":["integer","null"]},"average_cost":{"type":["number","null"],"format":"double"},"average_latency":{"type":["number","null"],"format":"double"},"average_tps":{"type":["number","null"],"format":"double"},"average_ttft":{"type":["number","null"],"format":"double"},"prompt_cache_hit_tokens":{"type":["integer","null"]},"reasoning_tokens":{"type":["integer","null"]},"max_cost":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"max_latency":{"type":["number","null"],"format":"double"},"unique_customers":{"type":["integer","null"]},"latency_p_50":{"type":["number","null"],"format":"double"},"latency_p_95":{"type":["number","null"],"format":"double"},"latency_p_99":{"type":["number","null"],"format":"double"},"cache_hit_percentage":{"type":["number","null"],"format":"double"},"requests_per_second":{"type":["number","null"],"format":"double"},"model":{"type":"string"}},"required":["date_group"],"description":"All fields are optional, the DB will only aggregate the fields that are required to aggregate.\n\nMetric fields are auto-generated from the dashboard metric registry.\nTo add a new metric, add it to DASHBOARD_METRICS in utils/dashboard/metric_registry.py.","title":"CHRequestLogModelBreakdown"},"PatchedCHRequestLogModelBreakdownRequest":{"type":"object","properties":{"date_group":{"type":"string","format":"date-time"},"number_of_requests":{"type":["integer","null"]},"total_cost":{"type":["number","null"],"format":"double"},"total_prompt_tokens":{"type":["integer","null"]},"total_completion_tokens":{"type":["integer","null"]},"total_tokens":{"type":["integer","null"]},"max_tpm":{"type":["integer","null"]},"error_count":{"type":["integer","null"]},"error_percentage":{"type":["number","null"],"format":"double"},"average_prompt_tokens":{"type":["integer","null"]},"average_completion_tokens":{"type":["integer","null"]},"average_tokens":{"type":["integer","null"]},"average_cost":{"type":["number","null"],"format":"double"},"average_latency":{"type":["number","null"],"format":"double"},"average_tps":{"type":["number","null"],"format":"double"},"average_ttft":{"type":["number","null"],"format":"double"},"prompt_cache_hit_tokens":{"type":["integer","null"]},"reasoning_tokens":{"type":["integer","null"]},"max_cost":{"type":["number","null"],"format":"double"},"max_tokens":{"type":["integer","null"]},"max_latency":{"type":["number","null"],"format":"double"},"unique_customers":{"type":["integer","null"]},"latency_p_50":{"type":["number","null"],"format":"double"},"latency_p_95":{"type":["number","null"],"format":"double"},"latency_p_99":{"type":["number","null"],"format":"double"},"cache_hit_percentage":{"type":["number","null"],"format":"double"},"requests_per_second":{"type":["number","null"],"format":"double"},"model":{"type":"string"}},"description":"All fields are optional, the DB will only aggregate the fields that are required to aggregate.\n\nMetric fields are auto-generated from the dashboard metric registry.\nTo add a new metric, add it to DASHBOARD_METRICS in utils/dashboard/metric_registry.py.","title":"PatchedCHRequestLogModelBreakdownRequest"},"Logs_api_request_logs_render_with_variables_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_api_request_logs_render_with_variables_create_Response_200"},"PatchedCHLogV2ListRequest":{"type":"object","properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"organization_key_id":{"type":"string"},"environment":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"start_time":{"type":"string","format":"date-time"},"prompt_id":{"type":"string"},"prompt_name":{"type":"string"},"trace_unique_id":{"type":"string"},"customer_identifier":{"type":"string"},"customer_name":{"type":"string"},"customer_email":{"type":"string"},"thread_identifier":{"type":"string"},"custom_identifier":{"type":"string"},"unique_organization_id":{"type":"string"},"log_type":{"type":"string"},"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_request_tokens":{"type":"integer"},"prompt_cache_hit_tokens":{"type":"integer"},"prompt_cache_creation_tokens":{"type":"integer"},"reasoning_tokens":{"type":"integer"},"cost":{"type":"number","format":"double"},"model":{"type":"string"},"latency":{"type":"number","format":"double"},"tokens_per_second":{"type":"number","format":"double"},"time_to_first_token":{"type":"number","format":"double"},"routing_time":{"type":"number","format":"double"},"status_code":{"type":"integer"},"status":{"type":"string"},"blurred":{"type":"boolean"},"storage_object_key":{"type":"string"},"updated_storage_object_key":{"type":"string"},"span_workflow_name":{"type":"string"},"span_name":{"type":"string"},"note":{"type":"string"}},"description":"Mixin to handle underscore-prefixed field mapping in serializers.\n\nThis is used when Django annotations require underscore prefixes to avoid\nname conflicts with original column names, but we want to expose the\nclean field names in the API response.\n\nUsage:\n    1. Annotate queryset with underscore prefixes: _field_name\n    2. This mixin automatically maps _field_name -> field_name in to_internal_value\n    3. The serializer can then use the clean field names normally","title":"PatchedCHLogV2ListRequest"},"PaginatedChEvalResultListListFiltersData":{"type":"object","properties":{},"title":"PaginatedChEvalResultListListFiltersData"},"PaginatedCHEvalResultListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedChEvalResultListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/CHEvalResultList"}}},"required":["count","results"],"title":"PaginatedCHEvalResultListList"},"Logs_api_traces_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_api_traces_create_Response_200"},"Logs_api_traces_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_api_traces_update_Response_200"},"Logs_api_traces_bulk_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_api_traces_bulk_update_Response_200"},"Logs_api_traces_bulk_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_api_traces_bulk_partial_update_Response_200"},"Logs_api_traces_bulk_delete_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_api_traces_bulk_delete_create_Response_200"},"Logs_api_traces_bulk_delete_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_api_traces_bulk_delete_update_Response_200"},"Logs_api_traces_bulk_delete_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_api_traces_bulk_delete_partial_update_Response_200"},"PaginatedChTraceListListFiltersData":{"type":"object","properties":{},"title":"PaginatedChTraceListListFiltersData"},"PaginatedCHTraceListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedChTraceListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/CHTraceList"}}},"required":["count","results"],"title":"PaginatedCHTraceListList"},"PatchedCHTraceListRequest":{"type":"object","properties":{"id":{"type":"string"},"trace_unique_id":{"type":"string"},"root_span_unique_id":{"type":"string"},"unique_organization_id":{"type":"string"},"environment":{"type":"string"},"customer_identifier":{"type":"string"},"start_time":{"type":"string","format":"date-time"},"end_time":{"type":"string","format":"date-time"},"duration":{"type":"number","format":"double"},"span_count":{"type":"integer"},"llm_call_count":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"total_prompt_tokens":{"type":"integer"},"total_completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"error_count":{"type":"integer"},"name":{"type":"string"},"input":{"type":"string"},"output":{"type":"string"},"storage_object_key":{"type":"string"},"organization_name":{"type":"string"},"organization_id":{"type":"string"},"organization_key_id":{"type":"string"},"metadata":{"description":"Any type"},"trace_group_identifier":{"type":"string"},"session_identifier":{"type":"string"},"model":{"type":"string"}},"description":"Serializer for trace list data from the CTE query.\nHandles the output from _get_trace_queryset_with_cte.\n\nInherits all common fields from BaseTraceSerializer and adds:\n- organization_name, organization_key_id: Organization details\n- metadata: Trace metadata\n- trace_group_identifier: For grouping related traces\n- model: Model information","title":"PatchedCHTraceListRequest"},"Logs_api_update_cache_archive_duration_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_api_update_cache_archive_duration_partial_update_Response_200"},"Logs_api_v1_metrics_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_api_v1_metrics_create_Response_200"},"Logs_api_v1_traces_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_api_v1_traces_create_Response_200"},"CHLogAnnotation":{"type":"object","properties":{"id":{"type":"integer"},"positive_feedback":{"type":"string"},"unique_organization_id":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"log_unique_id":{"type":"string"},"is_positive_feedback":{"type":"integer"},"note":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","positive_feedback"],"title":"CHLogAnnotation"},"CHLogAnnotationRequest":{"type":"object","properties":{"unique_organization_id":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"log_unique_id":{"type":"string"},"is_positive_feedback":{"type":"integer"},"note":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"title":"CHLogAnnotationRequest"},"PatchedCHLogAnnotationRequest":{"type":"object","properties":{"unique_organization_id":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"log_unique_id":{"type":"string"},"is_positive_feedback":{"type":"integer"},"note":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"title":"PatchedCHLogAnnotationRequest"},"ClickhouseRequestLogsGroupsGetParametersGroupBy":{"type":"string","enum":["custom_identifier","customer_identifier","deployment_id","deployment_name","model","organization_key_id","prompt_id","provider_id","thread","trace"],"title":"ClickhouseRequestLogsGroupsGetParametersGroupBy"},"Logs_clickhouse_threads_summary_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_clickhouse_threads_summary_retrieve_Response_200"},"Logs_clickhouse_threads_summary_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_clickhouse_threads_summary_create_Response_200"},"Logs_clickhouse_threads_summary_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_clickhouse_threads_summary_update_Response_200"},"Logs_clickhouse_threads_summary_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_clickhouse_threads_summary_partial_update_Response_200"},"Logs_clickhouse_traces_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_clickhouse_traces_retrieve_Response_200"},"Logs_clickhouse_traces_create_2_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_clickhouse_traces_create_2_Response_200"},"Logs_clickhouse_traces_update_2_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_clickhouse_traces_update_2_Response_200"},"Logs_clickhouse_traces_partial_update_2_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_clickhouse_traces_partial_update_2_Response_200"},"Logs_clickhouse_traces_summary_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_clickhouse_traces_summary_retrieve_Response_200"},"Logs_clickhouse_traces_summary_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_clickhouse_traces_summary_create_Response_200"},"Logs_clickhouse_traces_summary_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_clickhouse_traces_summary_update_Response_200"},"Logs_clickhouse_traces_summary_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Logs_clickhouse_traces_summary_partial_update_Response_200"},"CreditBalanceSummary":{"type":"object","properties":{"current_credit_balance":{"type":"number","format":"double"}},"required":["current_credit_balance"],"description":"Basic-mode response for GET /api/credit-transactions/summary/.","title":"CreditBalanceSummary"},"Billing_api_credit_transactions_summary_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Billing_api_credit_transactions_summary_create_Response_200"},"Billing_api_credit_transactions_summary_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Billing_api_credit_transactions_summary_update_Response_200"},"Billing_api_credit_transactions_summary_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Billing_api_credit_transactions_summary_partial_update_Response_200"},"MessageResponse":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"],"description":"Single-message response keyed by ERROR_RESPONSE_KEY (\"detail\"), e.g.\nPOST /payment/cancel-subscription/ returns {\"detail\": \"Subscription cancelled\"}.","title":"MessageResponse"},"PaymentSessionResponse":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"}},"required":["id","url"],"description":"Response for POST /payment/create-payment-session/ (Stripe Checkout).","title":"PaymentSessionResponse"},"CreditTransactionCreate":{"type":"object","properties":{"id":{"type":"string"},"unique_organization_id":{"type":"string"},"amount":{"type":"number","format":"double"},"transaction_type":{"type":"string"},"description":{"type":"string"},"source_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["id","unique_organization_id","amount","transaction_type","description","source_id","created_at"],"description":"Response projection for an admin credit grant — the ``CHBillingEvent``\nrow written by ``write_credit_event``. (Input is read from\n``request.data`` in the view, not validated through this serializer.)","title":"CreditTransactionCreate"},"Billing_payment_credit_transactions_summary_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Billing_payment_credit_transactions_summary_create_Response_200"},"Billing_payment_credit_transactions_summary_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Billing_payment_credit_transactions_summary_update_Response_200"},"Billing_payment_credit_transactions_summary_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Billing_payment_credit_transactions_summary_partial_update_Response_200"},"PaginatedOrganizationSubscriptionDetailListFiltersData":{"type":"object","properties":{},"title":"PaginatedOrganizationSubscriptionDetailListFiltersData"},"OrganizationSubscriptionDetailPlan":{"oneOf":[{"$ref":"#/components/schemas/PlanEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"OrganizationSubscriptionDetailPlan"},"OrganizationSubscriptionDetail":{"type":"object","properties":{"id":{"type":"integer"},"project":{"type":["string","null"]},"subscription_unique_id":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"subscribed_at":{"type":["string","null"],"format":"date-time"},"free_trial_end_at":{"type":["string","null"],"format":"date-time"},"log_visibility_cutoff_at":{"type":["string","null"],"format":"date-time"},"plan":{"$ref":"#/components/schemas/OrganizationSubscriptionDetailPlan"},"deal_id":{"type":"string"},"monthly_recurring_revenue":{"type":"number","format":"double"},"expected_annual_contract_value":{"type":"number","format":"double"},"customer_ids":{"type":"array","items":{"type":"string"}},"metered_item_id":{"type":["string","null"]},"seat_based_item_id":{"type":["string","null"]},"base_item_id":{"type":["string","null"]},"stripe_customer_id":{"type":"string"},"usage_report_subscription_id":{"type":"string"},"subscription_id":{"type":"string"},"current_period_start":{"type":"number","format":"double"},"current_period_end":{"type":"number","format":"double"},"current_usage_period_start":{"type":"number","format":"double"},"current_usage_period_end":{"type":"number","format":"double"},"usage_in_period":{"type":"number","format":"double"},"keywordsai_llm_credentials_usage_in_period":{"type":"number","format":"double"},"keywordsai_llm_credentials_usage_last_period":{"type":"number","format":"double"},"logs_in_period":{"type":"integer"},"logs_in_last_period":{"type":"integer"},"logs_three_months_ago":{"type":"integer"},"customer_user_count":{"type":"integer"},"prompt_count":{"type":"integer"},"evals_in_period":{"type":"integer"},"evals_in_last_period":{"type":"integer"},"member_count":{"type":"integer"},"past_billing_periods":{"type":"array","items":{"description":"Any type"}},"last_usage_reported":{"type":"number","format":"double"},"last_reconciled_at":{"type":["number","null"],"format":"double"},"billing_method":{"$ref":"#/components/schemas/BillingMethodEnum"},"billing_period":{"$ref":"#/components/schemas/BillingPeriodEnum"},"usage_report_interval":{"$ref":"#/components/schemas/UsageReportIntervalEnum"},"current_period_invoice_amount":{"type":"number","format":"double"},"last_period_invoice_amount":{"type":"number","format":"double"},"budget":{"type":["number","null"],"format":"double"},"credit_balance":{"type":"number","format":"double","description":"Current available Keywords AI credit balance in USD"},"custom_log_limit":{"type":["integer","null"]},"custom_plan_name":{"type":"string"},"custom_monthly_cost":{"type":["number","null"],"format":"double"},"custom_yearly_cost":{"type":["number","null"],"format":"double"},"deprecated_subscription_ids":{"description":"Any type"},"subscription_bool":{"type":"boolean"},"custom_subscription":{"description":"Any type"},"custom_bundle":{"description":"Any type"},"accumulative_balance":{"type":"number","format":"double"},"periodic_invoice_amount":{"type":"number","format":"double"},"org":{"type":["integer","null"]},"company_organization":{"type":["integer","null"]},"billing_subscription":{"type":["integer","null"],"description":"If set, credits and billing are managed by this subscription (company-level billing). NULL means this subscription manages its own billing (is a primary billing subscription)."},"organization":{"type":["integer","null"]}},"required":["id","created_at","log_visibility_cutoff_at"],"title":"OrganizationSubscriptionDetail"},"PaginatedOrganizationSubscriptionDetailList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedOrganizationSubscriptionDetailListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationSubscriptionDetail"}}},"required":["count","results"],"title":"PaginatedOrganizationSubscriptionDetailList"},"OrganizationSubscriptionDetailRequestPlan":{"oneOf":[{"$ref":"#/components/schemas/PlanEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"OrganizationSubscriptionDetailRequestPlan"},"OrganizationSubscriptionDetailRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"subscription_unique_id":{"type":["string","null"]},"subscribed_at":{"type":["string","null"],"format":"date-time"},"free_trial_end_at":{"type":["string","null"],"format":"date-time"},"plan":{"$ref":"#/components/schemas/OrganizationSubscriptionDetailRequestPlan"},"deal_id":{"type":"string"},"monthly_recurring_revenue":{"type":"number","format":"double"},"expected_annual_contract_value":{"type":"number","format":"double"},"customer_ids":{"type":"array","items":{"type":"string"}},"metered_item_id":{"type":["string","null"]},"seat_based_item_id":{"type":["string","null"]},"base_item_id":{"type":["string","null"]},"stripe_customer_id":{"type":"string"},"usage_report_subscription_id":{"type":"string"},"subscription_id":{"type":"string"},"current_period_start":{"type":"number","format":"double"},"current_period_end":{"type":"number","format":"double"},"current_usage_period_start":{"type":"number","format":"double"},"current_usage_period_end":{"type":"number","format":"double"},"usage_in_period":{"type":"number","format":"double"},"keywordsai_llm_credentials_usage_in_period":{"type":"number","format":"double"},"keywordsai_llm_credentials_usage_last_period":{"type":"number","format":"double"},"logs_in_period":{"type":"integer"},"logs_in_last_period":{"type":"integer"},"logs_three_months_ago":{"type":"integer"},"customer_user_count":{"type":"integer"},"prompt_count":{"type":"integer"},"evals_in_period":{"type":"integer"},"evals_in_last_period":{"type":"integer"},"member_count":{"type":"integer"},"past_billing_periods":{"type":"array","items":{"description":"Any type"}},"last_usage_reported":{"type":"number","format":"double"},"last_reconciled_at":{"type":["number","null"],"format":"double"},"billing_method":{"$ref":"#/components/schemas/BillingMethodEnum"},"billing_period":{"$ref":"#/components/schemas/BillingPeriodEnum"},"usage_report_interval":{"$ref":"#/components/schemas/UsageReportIntervalEnum"},"current_period_invoice_amount":{"type":"number","format":"double"},"last_period_invoice_amount":{"type":"number","format":"double"},"budget":{"type":["number","null"],"format":"double"},"credit_balance":{"type":"number","format":"double","description":"Current available Keywords AI credit balance in USD"},"custom_log_limit":{"type":["integer","null"]},"custom_plan_name":{"type":"string"},"custom_monthly_cost":{"type":["number","null"],"format":"double"},"custom_yearly_cost":{"type":["number","null"],"format":"double"},"deprecated_subscription_ids":{"description":"Any type"},"subscription_bool":{"type":"boolean"},"custom_subscription":{"description":"Any type"},"custom_bundle":{"description":"Any type"},"accumulative_balance":{"type":"number","format":"double"},"periodic_invoice_amount":{"type":"number","format":"double"},"org":{"type":["integer","null"]},"company_organization":{"type":["integer","null"]},"billing_subscription":{"type":["integer","null"],"description":"If set, credits and billing are managed by this subscription (company-level billing). NULL means this subscription manages its own billing (is a primary billing subscription)."},"organization":{"type":["integer","null"]}},"title":"OrganizationSubscriptionDetailRequest"},"PatchedOrganizationSubscriptionDetailRequestPlan":{"oneOf":[{"$ref":"#/components/schemas/PlanEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"PatchedOrganizationSubscriptionDetailRequestPlan"},"PatchedOrganizationSubscriptionDetailRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"subscription_unique_id":{"type":["string","null"]},"subscribed_at":{"type":["string","null"],"format":"date-time"},"free_trial_end_at":{"type":["string","null"],"format":"date-time"},"plan":{"$ref":"#/components/schemas/PatchedOrganizationSubscriptionDetailRequestPlan"},"deal_id":{"type":"string"},"monthly_recurring_revenue":{"type":"number","format":"double"},"expected_annual_contract_value":{"type":"number","format":"double"},"customer_ids":{"type":"array","items":{"type":"string"}},"metered_item_id":{"type":["string","null"]},"seat_based_item_id":{"type":["string","null"]},"base_item_id":{"type":["string","null"]},"stripe_customer_id":{"type":"string"},"usage_report_subscription_id":{"type":"string"},"subscription_id":{"type":"string"},"current_period_start":{"type":"number","format":"double"},"current_period_end":{"type":"number","format":"double"},"current_usage_period_start":{"type":"number","format":"double"},"current_usage_period_end":{"type":"number","format":"double"},"usage_in_period":{"type":"number","format":"double"},"keywordsai_llm_credentials_usage_in_period":{"type":"number","format":"double"},"keywordsai_llm_credentials_usage_last_period":{"type":"number","format":"double"},"logs_in_period":{"type":"integer"},"logs_in_last_period":{"type":"integer"},"logs_three_months_ago":{"type":"integer"},"customer_user_count":{"type":"integer"},"prompt_count":{"type":"integer"},"evals_in_period":{"type":"integer"},"evals_in_last_period":{"type":"integer"},"member_count":{"type":"integer"},"past_billing_periods":{"type":"array","items":{"description":"Any type"}},"last_usage_reported":{"type":"number","format":"double"},"last_reconciled_at":{"type":["number","null"],"format":"double"},"billing_method":{"$ref":"#/components/schemas/BillingMethodEnum"},"billing_period":{"$ref":"#/components/schemas/BillingPeriodEnum"},"usage_report_interval":{"$ref":"#/components/schemas/UsageReportIntervalEnum"},"current_period_invoice_amount":{"type":"number","format":"double"},"last_period_invoice_amount":{"type":"number","format":"double"},"budget":{"type":["number","null"],"format":"double"},"credit_balance":{"type":"number","format":"double","description":"Current available Keywords AI credit balance in USD"},"custom_log_limit":{"type":["integer","null"]},"custom_plan_name":{"type":"string"},"custom_monthly_cost":{"type":["number","null"],"format":"double"},"custom_yearly_cost":{"type":["number","null"],"format":"double"},"deprecated_subscription_ids":{"description":"Any type"},"subscription_bool":{"type":"boolean"},"custom_subscription":{"description":"Any type"},"custom_bundle":{"description":"Any type"},"accumulative_balance":{"type":"number","format":"double"},"periodic_invoice_amount":{"type":"number","format":"double"},"org":{"type":["integer","null"]},"company_organization":{"type":["integer","null"]},"billing_subscription":{"type":["integer","null"],"description":"If set, credits and billing are managed by this subscription (company-level billing). NULL means this subscription manages its own billing (is a primary billing subscription)."},"organization":{"type":["integer","null"]}},"title":"PatchedOrganizationSubscriptionDetailRequest"},"PaidBillItem":{"type":"object","properties":{"id":{"type":"string","description":"Stripe charge id"},"amount":{"type":"integer","description":"Charge amount in cents"},"created":{"type":"integer","description":"Unix timestamp (seconds)"},"receipt_url":{"type":["string","null"],"format":"uri"}},"required":["id","amount","created"],"description":"A single Stripe charge as consumed by the billing history list.","title":"PaidBillItem"},"PaidBillsResponseCurrentBilling":{"oneOf":[{"$ref":"#/components/schemas/PaidBillItem"},{"description":"Any type"}],"title":"PaidBillsResponseCurrentBilling"},"PaidBillsResponse":{"type":"object","properties":{"billings":{"type":"array","items":{"$ref":"#/components/schemas/PaidBillItem"}},"current_billing":{"$ref":"#/components/schemas/PaidBillsResponseCurrentBilling"}},"required":["billings","current_billing"],"description":"Response for GET /payment/paid-bills.","title":"PaidBillsResponse"},"PaymentMethodCard":{"type":"object","properties":{"brand":{"type":["string","null"]},"last4":{"type":["string","null"]},"exp_month":{"type":["integer","null"]},"exp_year":{"type":["integer","null"]},"funding":{"type":["string","null"]}},"description":"Mirrors the Pydantic ``StripeCardDetails``.","title":"PaymentMethodCard"},"PaymentMethod":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"card":{"$ref":"#/components/schemas/PaymentMethodCard"},"is_default":{"type":"boolean"},"created":{"type":["integer","null"]}},"required":["id","type","card","is_default"],"description":"Mirrors the Pydantic ``StripePaymentMethodResponse``.","title":"PaymentMethod"},"PaymentMethodsListResponse":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}}},"required":["results"],"description":"Response for GET /payment/payment-methods/.","title":"PaymentMethodsListResponse"},"DefaultPaymentMethodResponse":{"type":"object","properties":{"is_default":{"type":"boolean"}},"required":["is_default"],"description":"Response for PATCH /payment/payment-methods/<pm_id>/.","title":"DefaultPaymentMethodResponse"},"PaymentUsageBreakdownGetParametersBreakdownBy":{"type":"string","enum":["provider_id","model","deployment_name","feature"],"default":"provider_id","title":"PaymentUsageBreakdownGetParametersBreakdownBy"},"PaymentUsageBreakdownGetParametersSortBy":{"type":"string","enum":["number_of_requests","total_cost"],"default":"number_of_requests","title":"PaymentUsageBreakdownGetParametersSortBy"},"UsageFeatureItem":{"type":"object","properties":{"name":{"type":"string"},"cost":{"type":"number","format":"double"},"number_of_requests":{"type":"integer"}},"required":["name","cost","number_of_requests"],"description":"A single feature cost row (logging, proxy, or total).","title":"UsageFeatureItem"},"UsageBreakdownByFeatureResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UsageFeatureItem"}},"billing_periods":{"type":"array","items":{"$ref":"#/components/schemas/BillingPeriod"}},"start_time":{"type":"string"},"end_time":{"type":"string"}},"required":["data","billing_periods","start_time","end_time"],"description":"Response for GET /payment/usage-breakdown-by-feature/","title":"UsageBreakdownByFeatureResponse"},"Billing_payment_webhooks_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Billing_payment_webhooks_create_Response_200"},"PaginatedExportJobListListFiltersData":{"type":"object","properties":{},"title":"PaginatedExportJobListListFiltersData"},"ExportFormatEnum":{"type":"string","enum":["csv","json","jsonl"],"description":"* `csv` - Csv\n* `json` - Json\n* `jsonl` - Jsonl","title":"ExportFormatEnum"},"ExportJobList":{"type":"object","properties":{"id":{"type":"integer"},"project":{"type":["string","null"]},"created_by":{"type":"string"},"exported_chunks":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"status":{"$ref":"#/components/schemas/Status66cEnum"},"export_format":{"$ref":"#/components/schemas/ExportFormatEnum"},"export_check_point_at":{"type":["string","null"],"format":"date-time"},"exported_chunk_count":{"type":"integer"},"export_progress_percentage":{"type":"number","format":"double"},"estimated_entry_count":{"type":"integer"},"exported_record_count":{"type":"integer"},"query_params":{"description":"Any type"},"post_params":{"description":"Any type"},"celery_task_id":{"type":"string"},"list_type":{"type":"string"},"failed_reason":{"type":"string"},"warnings":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"generated_sql":{"type":"string"},"dispatch_generation":{"type":"integer"},"source_workflow_version_id":{"type":["string","null"]},"user":{"type":["integer","null"]}},"required":["id","project","created_by","exported_chunks","created_at","updated_at","export_check_point_at","exported_chunk_count","export_progress_percentage","estimated_entry_count","exported_record_count","celery_task_id","failed_reason","warnings","generated_sql","dispatch_generation","user"],"title":"ExportJobList"},"PaginatedExportJobListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedExportJobListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/ExportJobList"}}},"required":["count","results"],"title":"PaginatedExportJobListList"},"ExportJobDetailRequest":{"type":"object","properties":{"name":{"type":"string"},"status":{"$ref":"#/components/schemas/Status66cEnum"},"export_format":{"$ref":"#/components/schemas/ExportFormatEnum"},"query_params":{"description":"Any type"},"post_params":{"description":"Any type"},"list_type":{"type":"string"},"source_workflow_version_id":{"type":["string","null"]}},"title":"ExportJobDetailRequest"},"ExportJobDetail":{"type":"object","properties":{"id":{"type":"integer"},"project":{"type":["string","null"]},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"status":{"$ref":"#/components/schemas/Status66cEnum"},"export_format":{"$ref":"#/components/schemas/ExportFormatEnum"},"export_check_point_at":{"type":["string","null"],"format":"date-time"},"exported_chunks":{"type":"array","items":{"description":"Any type"}},"exported_chunk_count":{"type":"integer"},"export_progress_percentage":{"type":"number","format":"double"},"estimated_entry_count":{"type":"integer"},"exported_record_count":{"type":"integer"},"query_params":{"description":"Any type"},"post_params":{"description":"Any type"},"celery_task_id":{"type":"string"},"list_type":{"type":"string"},"failed_reason":{"type":"string"},"warnings":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"generated_sql":{"type":"string"},"dispatch_generation":{"type":"integer"},"source_workflow_version_id":{"type":["string","null"]},"user":{"type":["integer","null"]}},"required":["id","project","created_at","updated_at","export_check_point_at","exported_chunks","exported_chunk_count","export_progress_percentage","estimated_entry_count","exported_record_count","celery_task_id","failed_reason","warnings","generated_sql","dispatch_generation","user"],"title":"ExportJobDetail"},"PatchedExportJobDetailRequest":{"type":"object","properties":{"name":{"type":"string"},"status":{"$ref":"#/components/schemas/Status66cEnum"},"export_format":{"$ref":"#/components/schemas/ExportFormatEnum"},"query_params":{"description":"Any type"},"post_params":{"description":"Any type"},"list_type":{"type":"string"},"source_workflow_version_id":{"type":["string","null"]}},"title":"PatchedExportJobDetailRequest"},"Exports_api_export_jobs_chunks_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Exports_api_export_jobs_chunks_retrieve_Response_200"},"Exports_api_export_jobs_download_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Exports_api_export_jobs_download_retrieve_Response_200"},"Exports_api_export_jobs_download_retrieve_2_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Exports_api_export_jobs_download_retrieve_2_Response_200"},"ExportJobListRequest":{"type":"object","properties":{"name":{"type":"string"},"status":{"$ref":"#/components/schemas/Status66cEnum"},"export_format":{"$ref":"#/components/schemas/ExportFormatEnum"},"query_params":{"description":"Any type"},"post_params":{"description":"Any type"},"list_type":{"type":"string"},"source_workflow_version_id":{"type":["string","null"]}},"title":"ExportJobListRequest"},"PatchedExportJobListRequest":{"type":"object","properties":{"name":{"type":"string"},"status":{"$ref":"#/components/schemas/Status66cEnum"},"export_format":{"$ref":"#/components/schemas/ExportFormatEnum"},"query_params":{"description":"Any type"},"post_params":{"description":"Any type"},"list_type":{"type":"string"},"source_workflow_version_id":{"type":["string","null"]}},"title":"PatchedExportJobListRequest"},"Exports_api_files_create_2_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Exports_api_files_create_2_Response_200"},"Exports_api_files_content_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Exports_api_files_content_create_Response_200"},"ApiFiltersGetResponsesContentApplicationJsonSchemaOperatorChoicesItemsValue":{"type":"string","enum":["","=","==","eq","equals","in","not","contains","icontains","startswith","endswith","gt","gte","lt","lte","isnull","regex","ilike","trigram_word_similar","full_text_search","empty","notEmpty","not_empty"],"title":"ApiFiltersGetResponsesContentApplicationJsonSchemaOperatorChoicesItemsValue"},"ApiFiltersGetResponsesContentApplicationJsonSchemaOperatorChoicesItems":{"type":"object","properties":{"name":{"type":"string"},"value":{"$ref":"#/components/schemas/ApiFiltersGetResponsesContentApplicationJsonSchemaOperatorChoicesItemsValue"}},"required":["name","value"],"title":"ApiFiltersGetResponsesContentApplicationJsonSchemaOperatorChoicesItems"},"ChoiceTypeValue":{"oneOf":[{"type":"string"},{"type":"integer"},{"type":"number","format":"double"},{"type":"boolean"},{"type":"object","additionalProperties":{"description":"Any type"}}],"title":"ChoiceTypeValue"},"ChoiceTypeValence":{"type":"string","enum":["positive","negative","neutral"],"title":"ChoiceTypeValence"},"ChoiceType":{"type":"object","properties":{"name":{"type":"string"},"value":{"oneOf":[{"$ref":"#/components/schemas/ChoiceTypeValue"},{"type":"null"}]},"valence":{"$ref":"#/components/schemas/ChoiceTypeValence"}},"required":["name","value"],"title":"ChoiceType"},"ApiFiltersGetResponsesContentApplicationJsonSchemaValueFieldType":{"type":"string","enum":["text","selection","datetime-local","number","boolean"],"title":"ApiFiltersGetResponsesContentApplicationJsonSchemaValueFieldType"},"ApiFiltersGetResponsesContentApplicationJsonSchema":{"type":"object","properties":{"display_name":{"type":"string","description":"Legacy UI copy, kept for backward compatibility. Frontend presentation config is the source of truth for known metrics."},"metric":{"type":"string"},"operator_choices":{"type":"array","items":{"$ref":"#/components/schemas/ApiFiltersGetResponsesContentApplicationJsonSchemaOperatorChoicesItems"}},"value_choices":{"type":"array","items":{"$ref":"#/components/schemas/ChoiceType"}},"value_field_type":{"$ref":"#/components/schemas/ApiFiltersGetResponsesContentApplicationJsonSchemaValueFieldType"},"hidden":{"type":"boolean"}},"required":["metric","operator_choices","value_choices","value_field_type"],"title":"ApiFiltersGetResponsesContentApplicationJsonSchema"},"Filters_api_filters_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Filters_api_filters_create_Response_200"},"MetricFilterValueOneOf3Items":{"oneOf":[{"type":"string"},{"type":"number","format":"double"},{"type":"boolean"}],"title":"MetricFilterValueOneOf3Items"},"MetricFilterValue3":{"type":"array","items":{"$ref":"#/components/schemas/MetricFilterValueOneOf3Items"},"title":"MetricFilterValue3"},"MetricFilterValue":{"oneOf":[{"type":"string"},{"type":"number","format":"double"},{"type":"boolean"},{"$ref":"#/components/schemas/MetricFilterValue3"}],"title":"MetricFilterValue"},"FilterOperatorEnum":{"type":"string","enum":["=","==","eq","equals","in","not","contains","icontains","startswith","endswith","gt","gte","lt","lte","isnull","regex","ilike","trigram_word_similar","full_text_search","empty","notEmpty","not_empty"],"description":"* `` - \n* `=` - =\n* `==` - ==\n* `eq` - eq\n* `equals` - equals\n* `in` - in\n* `not` - not\n* `contains` - contains\n* `icontains` - icontains\n* `startswith` - startswith\n* `endswith` - endswith\n* `gt` - gt\n* `gte` - gte\n* `lt` - lt\n* `lte` - lte\n* `isnull` - isnull\n* `regex` - regex\n* `ilike` - ilike\n* `trigram_word_similar` - trigram_word_similar\n* `full_text_search` - full_text_search\n* `empty` - empty\n* `notEmpty` - notEmpty\n* `not_empty` - not_empty","title":"FilterOperatorEnum"},"ActiveFilterItemOperator":{"oneOf":[{"$ref":"#/components/schemas/FilterOperatorEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"ActiveFilterItemOperator"},"FilterFieldTypeEnum":{"type":"string","enum":["text","selection","datetime-local","number","boolean"],"description":"* `text` - text\n* `selection` - selection\n* `datetime-local` - datetime-local\n* `number` - number\n* `boolean` - boolean","title":"FilterFieldTypeEnum"},"ConnectorEnum":{"type":"string","enum":["OR","AND"],"description":"* `OR` - OR\n* `AND` - AND","title":"ConnectorEnum"},"ActiveFilterItem":{"type":"object","properties":{"id":{"type":"string"},"metric":{"type":"string"},"value":{"$ref":"#/components/schemas/MetricFilterValue"},"operator":{"$ref":"#/components/schemas/ActiveFilterItemOperator"},"display_name":{"type":"string","description":"Deprecated: legacy label snapshot captured at save time. Frontend presentation config is the source of truth for known metrics."},"value_field_type":{"$ref":"#/components/schemas/FilterFieldTypeEnum"},"fromURL":{"type":"boolean"},"connector":{"$ref":"#/components/schemas/ConnectorEnum"}},"required":["id","metric","value","operator","value_field_type"],"description":"Schema for user-applied filter items stored in SavedFilter.filters.","title":"ActiveFilterItem"},"SavedFilterDetailEnvironment":{"oneOf":[{"$ref":"#/components/schemas/EnvironmentA4fEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}],"title":"SavedFilterDetailEnvironment"},"DisplaySettings":{"type":"object","properties":{"visible_columns":{"type":["array","null"],"items":{"type":"string"}},"column_order":{"type":["array","null"],"items":{"type":"string"}},"column_widths":{"type":["object","null"],"additionalProperties":{"type":"number","format":"double"}},"group_by":{"type":["string","null"]},"sub_group_by":{"type":["string","null"]}},"description":"Schema for SavedFilter.display_settings — typed for OpenAPI.\n\nAll fields are optional: old views with null/empty display_settings\nfall back to page defaults on the frontend.","title":"DisplaySettings"},"SavedFilterDetailDisplaySettings":{"oneOf":[{"$ref":"#/components/schemas/DisplaySettings"},{"description":"Any type"}],"title":"SavedFilterDetailDisplaySettings"},"SavedFilterDetail":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ActiveFilterItem"}},"view_type":{"type":"string"},"start_time":{"type":["string","null"],"format":"date-time"},"end_time":{"type":["string","null"],"format":"date-time"},"time_range_preset":{"type":["string","null"]},"sort_by":{"type":["string","null"]},"environment":{"$ref":"#/components/schemas/SavedFilterDetailEnvironment"},"display_settings":{"$ref":"#/components/schemas/SavedFilterDetailDisplaySettings"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"starred":{"type":"boolean"},"created_by":{"$ref":"#/components/schemas/Editor"}},"required":["name","filters","view_type","created_at","updated_at","created_by"],"title":"SavedFilterDetail"},"ActiveFilterItemRequestOperator":{"oneOf":[{"$ref":"#/components/schemas/FilterOperatorEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"ActiveFilterItemRequestOperator"},"ActiveFilterItemRequest":{"type":"object","properties":{"id":{"type":"string"},"metric":{"type":"string"},"value":{"$ref":"#/components/schemas/MetricFilterValue"},"operator":{"$ref":"#/components/schemas/ActiveFilterItemRequestOperator"},"display_name":{"type":"string","description":"Deprecated: legacy label snapshot captured at save time. Frontend presentation config is the source of truth for known metrics."},"value_field_type":{"$ref":"#/components/schemas/FilterFieldTypeEnum"},"fromURL":{"type":"boolean"},"connector":{"$ref":"#/components/schemas/ConnectorEnum"}},"required":["id","metric","value","operator","value_field_type"],"description":"Schema for user-applied filter items stored in SavedFilter.filters.","title":"ActiveFilterItemRequest"},"SavedFilterUpdateRequestEnvironment":{"oneOf":[{"$ref":"#/components/schemas/EnvironmentA4fEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}],"title":"SavedFilterUpdateRequestEnvironment"},"DisplaySettingsRequest":{"type":"object","properties":{"visible_columns":{"type":["array","null"],"items":{"type":"string"}},"column_order":{"type":["array","null"],"items":{"type":"string"}},"column_widths":{"type":["object","null"],"additionalProperties":{"type":"number","format":"double"}},"group_by":{"type":["string","null"]},"sub_group_by":{"type":["string","null"]}},"description":"Schema for SavedFilter.display_settings — typed for OpenAPI.\n\nAll fields are optional: old views with null/empty display_settings\nfall back to page defaults on the frontend.","title":"DisplaySettingsRequest"},"SavedFilterUpdateRequestDisplaySettings":{"oneOf":[{"$ref":"#/components/schemas/DisplaySettingsRequest"},{"description":"Any type"}],"title":"SavedFilterUpdateRequestDisplaySettings"},"SavedFilterUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"view_type":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ActiveFilterItemRequest"}},"start_time":{"type":["string","null"],"format":"date-time"},"end_time":{"type":["string","null"],"format":"date-time"},"time_range_preset":{"type":["string","null"]},"sort_by":{"type":["string","null"]},"environment":{"$ref":"#/components/schemas/SavedFilterUpdateRequestEnvironment"},"display_settings":{"$ref":"#/components/schemas/SavedFilterUpdateRequestDisplaySettings"},"starred":{"type":"boolean"}},"required":["name","view_type","filters"],"title":"SavedFilterUpdateRequest"},"SavedFilterUpdateEnvironment":{"oneOf":[{"$ref":"#/components/schemas/EnvironmentA4fEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}],"title":"SavedFilterUpdateEnvironment"},"SavedFilterUpdateDisplaySettings":{"oneOf":[{"$ref":"#/components/schemas/DisplaySettings"},{"description":"Any type"}],"title":"SavedFilterUpdateDisplaySettings"},"SavedFilterUpdate":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"view_type":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ActiveFilterItem"}},"start_time":{"type":["string","null"],"format":"date-time"},"end_time":{"type":["string","null"],"format":"date-time"},"time_range_preset":{"type":["string","null"]},"sort_by":{"type":["string","null"]},"environment":{"$ref":"#/components/schemas/SavedFilterUpdateEnvironment"},"display_settings":{"$ref":"#/components/schemas/SavedFilterUpdateDisplaySettings"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"starred":{"type":"boolean"}},"required":["id","name","view_type","filters","created_at","updated_at"],"title":"SavedFilterUpdate"},"PatchedSavedFilterUpdateRequestEnvironment":{"oneOf":[{"$ref":"#/components/schemas/EnvironmentA4fEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}],"title":"PatchedSavedFilterUpdateRequestEnvironment"},"PatchedSavedFilterUpdateRequestDisplaySettings":{"oneOf":[{"$ref":"#/components/schemas/DisplaySettingsRequest"},{"description":"Any type"}],"title":"PatchedSavedFilterUpdateRequestDisplaySettings"},"PatchedSavedFilterUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"view_type":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ActiveFilterItemRequest"}},"start_time":{"type":["string","null"],"format":"date-time"},"end_time":{"type":["string","null"],"format":"date-time"},"time_range_preset":{"type":["string","null"]},"sort_by":{"type":["string","null"]},"environment":{"$ref":"#/components/schemas/PatchedSavedFilterUpdateRequestEnvironment"},"display_settings":{"$ref":"#/components/schemas/PatchedSavedFilterUpdateRequestDisplaySettings"},"starred":{"type":"boolean"}},"title":"PatchedSavedFilterUpdateRequest"},"PaginatedSavedFilterListListFiltersData":{"type":"object","properties":{},"title":"PaginatedSavedFilterListListFiltersData"},"SavedFilterListEnvironment":{"oneOf":[{"$ref":"#/components/schemas/EnvironmentA4fEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}],"title":"SavedFilterListEnvironment"},"SavedFilterListDisplaySettings":{"oneOf":[{"$ref":"#/components/schemas/DisplaySettings"},{"description":"Any type"}],"title":"SavedFilterListDisplaySettings"},"SavedFilterList":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"view_type":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ActiveFilterItem"}},"start_time":{"type":["string","null"],"format":"date-time"},"end_time":{"type":["string","null"],"format":"date-time"},"time_range_preset":{"type":["string","null"]},"sort_by":{"type":["string","null"]},"environment":{"$ref":"#/components/schemas/SavedFilterListEnvironment"},"display_settings":{"$ref":"#/components/schemas/SavedFilterListDisplaySettings"},"starred":{"type":"boolean"},"created_by":{"$ref":"#/components/schemas/Editor"}},"required":["name","view_type","created_at","updated_at","filters","created_by"],"title":"SavedFilterList"},"PaginatedSavedFilterListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedSavedFilterListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/SavedFilterList"}}},"required":["count","results"],"title":"PaginatedSavedFilterListList"},"SavedFilterCreateRequestEnvironment":{"oneOf":[{"$ref":"#/components/schemas/EnvironmentA4fEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}],"title":"SavedFilterCreateRequestEnvironment"},"SavedFilterCreateRequestDisplaySettings":{"oneOf":[{"$ref":"#/components/schemas/DisplaySettingsRequest"},{"description":"Any type"}],"title":"SavedFilterCreateRequestDisplaySettings"},"SavedFilterCreateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ActiveFilterItemRequest"}},"view_type":{"type":"string"},"start_time":{"type":["string","null"],"format":"date-time"},"end_time":{"type":["string","null"],"format":"date-time"},"time_range_preset":{"type":["string","null"]},"sort_by":{"type":["string","null"]},"environment":{"$ref":"#/components/schemas/SavedFilterCreateRequestEnvironment"},"display_settings":{"$ref":"#/components/schemas/SavedFilterCreateRequestDisplaySettings"},"starred":{"type":"boolean"},"organization":{"type":"integer"}},"required":["name","filters","view_type","organization"],"title":"SavedFilterCreateRequest"},"SavedFilterCreateEnvironment":{"oneOf":[{"$ref":"#/components/schemas/EnvironmentA4fEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}],"title":"SavedFilterCreateEnvironment"},"SavedFilterCreateDisplaySettings":{"oneOf":[{"$ref":"#/components/schemas/DisplaySettings"},{"description":"Any type"}],"title":"SavedFilterCreateDisplaySettings"},"SavedFilterCreate":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ActiveFilterItem"}},"view_type":{"type":"string"},"id":{"type":"string"},"start_time":{"type":["string","null"],"format":"date-time"},"end_time":{"type":["string","null"],"format":"date-time"},"time_range_preset":{"type":["string","null"]},"sort_by":{"type":["string","null"]},"environment":{"$ref":"#/components/schemas/SavedFilterCreateEnvironment"},"display_settings":{"$ref":"#/components/schemas/SavedFilterCreateDisplaySettings"},"starred":{"type":"boolean"},"created_by":{"type":"integer"}},"required":["name","filters","view_type","id","created_by"],"title":"SavedFilterCreate"},"SavedFilterListRequestEnvironment":{"oneOf":[{"$ref":"#/components/schemas/EnvironmentA4fEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}],"title":"SavedFilterListRequestEnvironment"},"SavedFilterListRequestDisplaySettings":{"oneOf":[{"$ref":"#/components/schemas/DisplaySettingsRequest"},{"description":"Any type"}],"title":"SavedFilterListRequestDisplaySettings"},"SavedFilterListRequest":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"view_type":{"type":"string"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ActiveFilterItemRequest"}},"start_time":{"type":["string","null"],"format":"date-time"},"end_time":{"type":["string","null"],"format":"date-time"},"time_range_preset":{"type":["string","null"]},"sort_by":{"type":["string","null"]},"environment":{"$ref":"#/components/schemas/SavedFilterListRequestEnvironment"},"display_settings":{"$ref":"#/components/schemas/SavedFilterListRequestDisplaySettings"},"starred":{"type":"boolean"}},"required":["name","view_type","filters"],"title":"SavedFilterListRequest"},"SavedFiltersSummaryResponse":{"type":"object","properties":{"total_count":{"type":"integer"}},"required":["total_count"],"description":"Response schema for GET /api/saved-filters/summary/.","title":"SavedFiltersSummaryResponse"},"PaginatedIntegrationListFiltersData":{"type":"object","properties":{},"title":"PaginatedIntegrationListFiltersData"},"PaginatedIntegrationList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedIntegrationListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Integration"}}},"required":["count","results"],"title":"PaginatedIntegrationList"},"IntegrationRequestExtraKwargs":{"type":"object","properties":{},"title":"IntegrationRequestExtraKwargs"},"IntegrationRequestCredentials":{"type":"object","properties":{},"title":"IntegrationRequestCredentials"},"IntegrationRequestEnvironment":{"oneOf":[{"$ref":"#/components/schemas/EnvironmentA4fEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"IntegrationRequestEnvironment"},"IntegrationRequest":{"type":"object","properties":{"extra_kwargs":{"$ref":"#/components/schemas/IntegrationRequestExtraKwargs"},"credentials":{"$ref":"#/components/schemas/IntegrationRequestCredentials"},"provider":{"type":["string","null"]},"project":{"type":["string","null"]},"type":{"type":"string"},"name":{"type":"string"},"available_models":{"type":"array","items":{"type":"string"}},"excluded_models":{"type":"array","items":{"type":"string"}},"weight":{"type":"number","format":"double"},"is_active":{"type":"boolean"},"is_managed":{"type":"boolean"},"environment":{"$ref":"#/components/schemas/IntegrationRequestEnvironment"},"title":{"type":"string"},"integration_unique_id":{"type":["string","null"]},"user":{"type":["integer","null"]},"organization":{"type":["integer","null"]}},"title":"IntegrationRequest"},"PatchedIntegrationRequestExtraKwargs":{"type":"object","properties":{},"title":"PatchedIntegrationRequestExtraKwargs"},"PatchedIntegrationRequestCredentials":{"type":"object","properties":{},"title":"PatchedIntegrationRequestCredentials"},"PatchedIntegrationRequestEnvironment":{"oneOf":[{"$ref":"#/components/schemas/EnvironmentA4fEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"title":"PatchedIntegrationRequestEnvironment"},"PatchedIntegrationRequest":{"type":"object","properties":{"extra_kwargs":{"$ref":"#/components/schemas/PatchedIntegrationRequestExtraKwargs"},"credentials":{"$ref":"#/components/schemas/PatchedIntegrationRequestCredentials"},"provider":{"type":["string","null"]},"project":{"type":["string","null"]},"type":{"type":"string"},"name":{"type":"string"},"available_models":{"type":"array","items":{"type":"string"}},"excluded_models":{"type":"array","items":{"type":"string"}},"weight":{"type":"number","format":"double"},"is_active":{"type":"boolean"},"is_managed":{"type":"boolean"},"environment":{"$ref":"#/components/schemas/PatchedIntegrationRequestEnvironment"},"title":{"type":"string"},"integration_unique_id":{"type":["string","null"]},"user":{"type":["integer","null"]},"organization":{"type":["integer","null"]}},"title":"PatchedIntegrationRequest"},"Integrations_api_integrations_test_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Integrations_api_integrations_test_create_Response_200"},"Integrations_api_integrations_test_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Integrations_api_integrations_test_update_Response_200"},"Integrations_api_integrations_test_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Integrations_api_integrations_test_partial_update_Response_200"},"ProviderKeyEnum":{"type":"string","enum":["slack","gmail","google_calendar","microsoft_teams"],"description":"* `slack` - Slack\n* `gmail` - Gmail\n* `google_calendar` - Google Calendar\n* `microsoft_teams` - Microsoft Teams","title":"ProviderKeyEnum"},"OAuthIntegration":{"type":"object","properties":{"id":{"type":"string"},"provider_key":{"$ref":"#/components/schemas/ProviderKeyEnum"},"external_team_id":{"type":"string"},"external_team_name":{"type":"string"},"external_user_id":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"is_active":{"type":"boolean"},"is_token_expired":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","provider_key","external_team_id","external_team_name","external_user_id","scopes","is_active","is_token_expired","created_at","updated_at"],"description":"Read-only serializer — never exposes raw tokens.","title":"OAuthIntegration"},"OAuthAuthorizeUrl":{"type":"object","properties":{"authorize_url":{"type":"string","format":"uri"}},"required":["authorize_url"],"description":"Response shape for the authorize endpoint — the signed provider URL.","title":"OAuthAuthorizeUrl"},"Integrations_api_integrations_oauth_callback_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Integrations_api_integrations_oauth_callback_retrieve_Response_200"},"PaginatedResourceListFiltersData":{"type":"object","properties":{},"title":"PaginatedResourceListFiltersData"},"Resource":{"type":"object","properties":{"external_id":{"type":"string"},"name":{"type":"string"},"resource_type":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"description":"Any type"}}},"required":["external_id","name","resource_type","metadata"],"description":"Serializes external resources (channels, calendars, etc.).","title":"Resource"},"PaginatedResourceList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedResourceListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Resource"}}},"required":["count","results"],"title":"PaginatedResourceList"},"Integrations_api_integrations_slack_events_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Integrations_api_integrations_slack_events_create_Response_200"},"Integrations_api_integrations_summary_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Integrations_api_integrations_summary_retrieve_Response_200"},"Integrations_api_integrations_summary_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Integrations_api_integrations_summary_create_Response_200"},"Integrations_api_integrations_summary_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Integrations_api_integrations_summary_update_Response_200"},"Integrations_api_integrations_summary_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Integrations_api_integrations_summary_partial_update_Response_200"},"Integrations_api_integrations_v1_traces_ingest_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Integrations_api_integrations_v1_traces_ingest_create_Response_200"},"LLMProviderDetail":{"type":"object","properties":{"id":{"type":"integer"},"project":{"type":["string","null"]},"credential_fields":{"type":"array","items":{"$ref":"#/components/schemas/ProviderCredentialFieldList"}},"provider_name":{"type":"string"},"provider_id":{"type":"string"},"litellm_provider_id":{"type":"string"},"moderation":{"type":"string"},"extra_kwargs":{"description":"Any type"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"is_managed":{"type":"boolean"},"respan_discount_rate":{"type":"number","format":"double"},"models_sync_config":{"description":"Any type"}},"required":["id","credential_fields","provider_name","provider_id","created_at","updated_at"],"title":"LLMProviderDetail"},"LoadBalanceModel":{"type":"object","properties":{"id":{"type":"integer"},"provider":{"$ref":"#/components/schemas/LLMProviderDetail"},"masked_credentials":{"type":"string"},"model":{"type":"string"},"weight":{"type":"number","format":"double"},"is_active":{"type":"boolean"},"name":{"type":"string"},"group":{"type":["integer","null"]}},"required":["id","provider","masked_credentials","model"],"title":"LoadBalanceModel"},"LoadBalanceGroupDetail":{"type":"object","properties":{"id":{"type":"integer"},"load_balance_models":{"type":"array","items":{"$ref":"#/components/schemas/LoadBalanceModel"}},"project":{"type":["string","null"]},"group_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","load_balance_models","project","group_id"],"title":"LoadBalanceGroupDetail"},"LLMProviderDetailRequest":{"type":"object","properties":{"project":{"type":["string","null"]},"credential_fields":{"type":"array","items":{"$ref":"#/components/schemas/ProviderCredentialFieldListRequest"}},"provider_name":{"type":"string"},"provider_id":{"type":"string"},"litellm_provider_id":{"type":"string"},"moderation":{"type":"string"},"extra_kwargs":{"description":"Any type"},"is_managed":{"type":"boolean"},"respan_discount_rate":{"type":"number","format":"double"},"models_sync_config":{"description":"Any type"},"organization":{"type":["integer","null"]}},"required":["credential_fields","provider_name","provider_id","organization"],"title":"LLMProviderDetailRequest"},"LoadBalanceModelRequestCredentials":{"type":"object","properties":{},"title":"LoadBalanceModelRequestCredentials"},"LoadBalanceModelRequest":{"type":"object","properties":{"provider":{"$ref":"#/components/schemas/LLMProviderDetailRequest"},"credentials":{"$ref":"#/components/schemas/LoadBalanceModelRequestCredentials"},"model":{"type":"string"},"weight":{"type":"number","format":"double"},"is_active":{"type":"boolean"},"name":{"type":"string"},"group":{"type":["integer","null"]}},"required":["provider","model"],"title":"LoadBalanceModelRequest"},"PatchedLoadBalanceGroupDetailRequest":{"type":"object","properties":{"load_balance_models":{"type":"array","items":{"$ref":"#/components/schemas/LoadBalanceModelRequest"}},"name":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"title":"PatchedLoadBalanceGroupDetailRequest"},"LoadBalanceGroupCreate":{"type":"object","properties":{"id":{"type":"integer"},"load_balance_models":{"type":"array","items":{"$ref":"#/components/schemas/LoadBalanceModel"}},"active_models_count":{"type":"integer"},"project":{"type":["string","null"]},"group_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","load_balance_models","active_models_count","project","group_id"],"title":"LoadBalanceGroupCreate"},"LoadBalanceGroupCreateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"title":"LoadBalanceGroupCreateRequest"},"LoadBalanceModelUpdate":{"type":"object","properties":{"id":{"type":"integer"},"masked_credentials":{"type":"string"},"model":{"type":"string"},"weight":{"type":"number","format":"double"},"is_active":{"type":"boolean"},"name":{"type":"string"},"provider":{"type":["integer","null"]},"group":{"type":["integer","null"]}},"required":["id","masked_credentials","model"],"title":"LoadBalanceModelUpdate"},"PatchedLoadBalanceModelUpdateRequestCredentials":{"type":"object","properties":{},"title":"PatchedLoadBalanceModelUpdateRequestCredentials"},"PatchedLoadBalanceModelUpdateRequest":{"type":"object","properties":{"credentials":{"$ref":"#/components/schemas/PatchedLoadBalanceModelUpdateRequestCredentials"},"model":{"type":"string"},"weight":{"type":"number","format":"double"},"is_active":{"type":"boolean"},"name":{"type":"string"},"provider":{"type":["integer","null"]},"group":{"type":["integer","null"]}},"title":"PatchedLoadBalanceModelUpdateRequest"},"LoadBalanceCreateModel":{"type":"object","properties":{"id":{"type":"integer"},"masked_credentials":{"type":"string"},"model":{"type":"string"},"weight":{"type":"number","format":"double"},"is_active":{"type":"boolean"},"name":{"type":"string"},"provider":{"type":["integer","null"]},"group":{"type":["integer","null"]}},"required":["id","masked_credentials","model"],"title":"LoadBalanceCreateModel"},"LoadBalanceCreateModelRequestCredentials":{"type":"object","properties":{},"title":"LoadBalanceCreateModelRequestCredentials"},"LoadBalanceCreateModelRequest":{"type":"object","properties":{"credentials":{"$ref":"#/components/schemas/LoadBalanceCreateModelRequestCredentials"},"model":{"type":"string"},"weight":{"type":"number","format":"double"},"is_active":{"type":"boolean"},"name":{"type":"string"},"provider":{"type":["integer","null"]},"group":{"type":["integer","null"]}},"required":["model"],"title":"LoadBalanceCreateModelRequest"},"Integrations_api_validate_load_balance_model_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Integrations_api_validate_load_balance_model_create_Response_200"},"Integrations_vendor_integration_integrations_summary_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Integrations_vendor_integration_integrations_summary_retrieve_Response_200"},"Integrations_vendor_integration_integrations_summary_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Integrations_vendor_integration_integrations_summary_create_Response_200"},"Integrations_vendor_integration_integrations_summary_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Integrations_vendor_integration_integrations_summary_update_Response_200"},"Integrations_vendor_integration_integrations_summary_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Integrations_vendor_integration_integrations_summary_partial_update_Response_200"},"PaginatedTechnicalPartnershipIntegrationListFiltersData":{"type":"object","properties":{},"title":"PaginatedTechnicalPartnershipIntegrationListFiltersData"},"ProviderNameEnum":{"type":"string","enum":["mem0","linkup","moda","hyperspell","posthog"],"description":"* `mem0` - Mem0 - Memory Management\n* `linkup` - Linkup - Search Augmentation\n* `moda` - Moda - Observability & Analytics\n* `hyperspell` - Hyperspell - Data Integrations\n* `posthog` - PostHog - Product Analytics","title":"ProviderNameEnum"},"TechnicalPartnershipIntegrationProviderName":{"oneOf":[{"$ref":"#/components/schemas/ProviderNameEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"description":"Technical partner provider identifier (e.g., mem0, linkup, moda)\n\n* `mem0` - Mem0 - Memory Management\n* `linkup` - Linkup - Search Augmentation\n* `moda` - Moda - Observability & Analytics\n* `hyperspell` - Hyperspell - Data Integrations\n* `posthog` - PostHog - Product Analytics","title":"TechnicalPartnershipIntegrationProviderName"},"TechnicalPartnershipIntegration":{"type":"object","properties":{"id":{"type":"string"},"masked_configs":{"type":"object","additionalProperties":{"type":"string"},"description":"Provider-specific config key-value pairs (e.g. api_key, host)."},"project":{"type":["string","null"]},"provider_name":{"$ref":"#/components/schemas/TechnicalPartnershipIntegrationProviderName","description":"Technical partner provider identifier (e.g., mem0, linkup, moda)\n\n* `mem0` - Mem0 - Memory Management\n* `linkup` - Linkup - Search Augmentation\n* `moda` - Moda - Observability & Analytics\n* `hyperspell` - Hyperspell - Data Integrations\n* `posthog` - PostHog - Product Analytics"}},"required":["masked_configs"],"description":"Serializer for TechnicalPartnershipIntegration model.\n\nHandles CRUD for technical partner integrations (mem0, linkup, moda).\nMasks sensitive config values (api_key) in responses.","title":"TechnicalPartnershipIntegration"},"PaginatedTechnicalPartnershipIntegrationList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedTechnicalPartnershipIntegrationListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/TechnicalPartnershipIntegration"}}},"required":["count","results"],"title":"PaginatedTechnicalPartnershipIntegrationList"},"TechnicalPartnershipIntegrationRequestProviderName":{"oneOf":[{"$ref":"#/components/schemas/ProviderNameEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"description":"Technical partner provider identifier (e.g., mem0, linkup, moda)\n\n* `mem0` - Mem0 - Memory Management\n* `linkup` - Linkup - Search Augmentation\n* `moda` - Moda - Observability & Analytics\n* `hyperspell` - Hyperspell - Data Integrations\n* `posthog` - PostHog - Product Analytics","title":"TechnicalPartnershipIntegrationRequestProviderName"},"TechnicalPartnershipIntegrationRequest":{"type":"object","properties":{"id":{"type":"string"},"configs":{"type":"object","additionalProperties":{"type":"string"}},"project":{"type":["string","null"]},"provider_name":{"$ref":"#/components/schemas/TechnicalPartnershipIntegrationRequestProviderName","description":"Technical partner provider identifier (e.g., mem0, linkup, moda)\n\n* `mem0` - Mem0 - Memory Management\n* `linkup` - Linkup - Search Augmentation\n* `moda` - Moda - Observability & Analytics\n* `hyperspell` - Hyperspell - Data Integrations\n* `posthog` - PostHog - Product Analytics"},"organization":{"type":["integer","null"]}},"description":"Serializer for TechnicalPartnershipIntegration model.\n\nHandles CRUD for technical partner integrations (mem0, linkup, moda).\nMasks sensitive config values (api_key) in responses.","title":"TechnicalPartnershipIntegrationRequest"},"PatchedTechnicalPartnershipIntegrationRequestProviderName":{"oneOf":[{"$ref":"#/components/schemas/ProviderNameEnum"},{"$ref":"#/components/schemas/BlankEnum"}],"description":"Technical partner provider identifier (e.g., mem0, linkup, moda)\n\n* `mem0` - Mem0 - Memory Management\n* `linkup` - Linkup - Search Augmentation\n* `moda` - Moda - Observability & Analytics\n* `hyperspell` - Hyperspell - Data Integrations\n* `posthog` - PostHog - Product Analytics","title":"PatchedTechnicalPartnershipIntegrationRequestProviderName"},"PatchedTechnicalPartnershipIntegrationRequest":{"type":"object","properties":{"id":{"type":"string"},"configs":{"type":"object","additionalProperties":{"type":"string"}},"project":{"type":["string","null"]},"provider_name":{"$ref":"#/components/schemas/PatchedTechnicalPartnershipIntegrationRequestProviderName","description":"Technical partner provider identifier (e.g., mem0, linkup, moda)\n\n* `mem0` - Mem0 - Memory Management\n* `linkup` - Linkup - Search Augmentation\n* `moda` - Moda - Observability & Analytics\n* `hyperspell` - Hyperspell - Data Integrations\n* `posthog` - PostHog - Product Analytics"},"organization":{"type":["integer","null"]}},"description":"Serializer for TechnicalPartnershipIntegration model.\n\nHandles CRUD for technical partner integrations (mem0, linkup, moda).\nMasks sensitive config values (api_key) in responses.","title":"PatchedTechnicalPartnershipIntegrationRequest"},"Integrations_vendor_integration_validate_api_key_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Integrations_vendor_integration_validate_api_key_create_Response_200"},"PaginatedPlaygroundListListFiltersData":{"type":"object","properties":{},"title":"PaginatedPlaygroundListListFiltersData"},"PlaygroundList":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"dataset_id":{"type":"string"},"state_version":{"type":"integer"},"created_by":{"$ref":"#/components/schemas/Editor"},"updated_by":{"$ref":"#/components/schemas/Editor"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"}}},"required":["id","name","dataset_id","created_by","updated_by","created_at","updated_at","tags"],"title":"PlaygroundList"},"PaginatedPlaygroundListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedPlaygroundListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/PlaygroundList"}}},"required":["count","results"],"title":"PaginatedPlaygroundListList"},"PlaygroundCreateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":["string","null"]}},"required":["name"],"title":"PlaygroundCreateRequest"},"PlaygroundCreate":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"dataset_id":{"type":"string"},"project":{"type":["string","null"]},"created_by":{"type":["integer","null"]}},"required":["id","name","dataset_id","project","created_by"],"title":"PlaygroundCreate"},"ColumnTypeEnum":{"type":"string","enum":["prompt"],"description":"* `prompt` - Prompt","title":"ColumnTypeEnum"},"SourceType775Enum":{"type":"string","enum":["prompt","log","scratch"],"description":"* `prompt` - Prompt\n* `log` - Log\n* `scratch` - Scratch","title":"SourceType775Enum"},"PlaygroundColumnDetail":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"order":{"type":"integer"},"column_type":{"$ref":"#/components/schemas/ColumnTypeEnum"},"source_type":{"$ref":"#/components/schemas/SourceType775Enum"},"linked_prompt_id":{"type":"string"},"linked_prompt_version":{"type":["integer","null"]},"experiment_id":{"type":"string"},"task_tracker_id":{"type":["string","null"]},"run_status":{"type":"string"},"run_progress":{"type":"string"},"run_error_message":{"type":"string"},"prompt":{"description":"Any type"},"is_archived":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","linked_prompt_id","task_tracker_id","run_status","run_progress","run_error_message","created_at","updated_at"],"title":"PlaygroundColumnDetail"},"PlaygroundDetail":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"dataset_id":{"type":"string"},"state_version":{"type":"integer"},"created_by":{"$ref":"#/components/schemas/Editor"},"updated_by":{"$ref":"#/components/schemas/Editor"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/GenericTagDisplay"}},"columns":{"type":"array","items":{"$ref":"#/components/schemas/PlaygroundColumnDetail"}}},"required":["id","name","dataset_id","created_by","updated_by","created_at","updated_at","tags","columns"],"title":"PlaygroundDetail"},"PlaygroundUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":["string","null"]}},"required":["name"],"title":"PlaygroundUpdateRequest"},"PatchedPlaygroundUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":["string","null"]}},"title":"PatchedPlaygroundUpdateRequest"},"PlaygroundColumnList":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"order":{"type":"integer"},"column_type":{"$ref":"#/components/schemas/ColumnTypeEnum"},"source_type":{"$ref":"#/components/schemas/SourceType775Enum"},"linked_prompt_id":{"type":"string"},"linked_prompt_version":{"type":["integer","null"]},"experiment_id":{"type":"string"},"task_tracker_id":{"type":["string","null"]},"run_status":{"type":"string"},"run_progress":{"type":"string"},"run_error_message":{"type":"string"},"prompt":{"description":"Any type"},"is_archived":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","linked_prompt_id","task_tracker_id","run_status","run_progress","run_error_message","created_at","updated_at"],"title":"PlaygroundColumnList"},"PlaygroundColumnCreateRequest":{"type":"object","properties":{"playground":{"type":"string"},"name":{"type":"string"},"order":{"type":"integer","default":0},"column_type":{"$ref":"#/components/schemas/ColumnTypeEnum"},"source_type":{"$ref":"#/components/schemas/SourceType775Enum"},"linked_prompt_id":{"type":["string","null"]},"linked_prompt_version":{"type":["integer","null"]},"prompt":{"description":"Any type"},"is_archived":{"type":"boolean"}},"required":["playground","name"],"title":"PlaygroundColumnCreateRequest"},"PlaygroundColumnCreate":{"type":"object","properties":{"id":{"type":"string"},"playground":{"type":"string"},"name":{"type":"string"},"order":{"type":"integer","default":0},"column_type":{"$ref":"#/components/schemas/ColumnTypeEnum"},"source_type":{"$ref":"#/components/schemas/SourceType775Enum"},"linked_prompt_id":{"type":["string","null"]},"linked_prompt_version":{"type":["integer","null"]},"prompt":{"description":"Any type"},"is_archived":{"type":"boolean"}},"required":["id","playground","name"],"title":"PlaygroundColumnCreate"},"PlaygroundColumnUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"order":{"type":"integer"},"column_type":{"$ref":"#/components/schemas/ColumnTypeEnum"},"source_type":{"$ref":"#/components/schemas/SourceType775Enum"},"linked_prompt_id":{"type":["string","null"]},"linked_prompt_version":{"type":["integer","null"]},"prompt":{"description":"Any type"},"is_archived":{"type":"boolean"}},"required":["name"],"title":"PlaygroundColumnUpdateRequest"},"PatchedPlaygroundColumnUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"order":{"type":"integer"},"column_type":{"$ref":"#/components/schemas/ColumnTypeEnum"},"source_type":{"$ref":"#/components/schemas/SourceType775Enum"},"linked_prompt_id":{"type":["string","null"]},"linked_prompt_version":{"type":["integer","null"]},"prompt":{"description":"Any type"},"is_archived":{"type":"boolean"}},"title":"PatchedPlaygroundColumnUpdateRequest"},"PlaygroundRowListInput":{"oneOf":[{"type":"object","additionalProperties":{"description":"Any type"}},{"type":"array","items":{"description":"Any type"}},{"type":"string"},{"type":"number","format":"double"},{"type":"boolean"},{"description":"Any type"}],"title":"PlaygroundRowListInput"},"PlaygroundRowListExpectedOutput":{"oneOf":[{"type":"object","additionalProperties":{"description":"Any type"}},{"type":"array","items":{"description":"Any type"}},{"type":"string"},{"type":"number","format":"double"},{"type":"boolean"},{"description":"Any type"}],"title":"PlaygroundRowListExpectedOutput"},"PlaygroundRowListCellsOutput":{"oneOf":[{"type":"object","additionalProperties":{"description":"Any type"}},{"type":"array","items":{"description":"Any type"}},{"type":"string"},{"type":"number","format":"double"},{"type":"boolean"},{"description":"Any type"}],"title":"PlaygroundRowListCellsOutput"},"PlaygroundRowListCells":{"type":"object","properties":{"output":{"$ref":"#/components/schemas/PlaygroundRowListCellsOutput"},"status":{"type":["string","null"]},"trace_unique_id":{"type":["string","null"]},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["output"],"title":"PlaygroundRowListCells"},"PlaygroundRowList":{"type":"object","properties":{"id":{"type":"string"},"comparison_key":{"type":"string"},"input":{"$ref":"#/components/schemas/PlaygroundRowListInput"},"expected_output":{"$ref":"#/components/schemas/PlaygroundRowListExpectedOutput"},"updated_at":{"type":["string","null"],"format":"date-time"},"cells":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlaygroundRowListCells"}}},"required":["id","comparison_key","input","expected_output","cells"],"title":"PlaygroundRowList"},"PlaygroundRowsListResponse":{"type":"object","properties":{"count":{"type":"integer"},"total_count":{"type":"integer"},"next":{"type":["string","null"]},"previous":{"type":["string","null"]},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"type":"object","additionalProperties":{"description":"Any type"}},"results":{"type":"array","items":{"$ref":"#/components/schemas/PlaygroundRowList"}}},"required":["count","total_count","results"],"title":"PlaygroundRowsListResponse"},"PlaygroundRowsSummary":{"type":"object","properties":{"total_count":{"type":"integer"}},"required":["total_count"],"title":"PlaygroundRowsSummary"},"PlaygroundRun":{"type":"object","properties":{"dataset_id":{"type":"string"},"id":{"type":"string"},"state_version":{"type":"integer"},"columns":{"type":"array","items":{"$ref":"#/components/schemas/PlaygroundColumnList"}}},"required":["dataset_id","id","state_version","columns"],"title":"PlaygroundRun"},"GenerationMethodEnum":{"type":"string","enum":["auto","llm","code","human","predefined","noop"],"description":"* `auto` - auto\n* `llm` - llm\n* `code` - code\n* `human` - human\n* `predefined` - predefined\n* `noop` - noop","title":"GenerationMethodEnum"},"PlaygroundRunRequestRequest":{"type":"object","properties":{"column_ids":{"type":"array","items":{"type":"string"}},"row_ids":{"type":"array","items":{"type":"string"}},"batch_size":{"type":"integer","default":100},"concurrency":{"type":"integer","default":50},"is_tracing_enabled":{"type":"boolean","default":true},"generation_method":{"$ref":"#/components/schemas/GenerationMethodEnum"}},"title":"PlaygroundRunRequestRequest"},"Webhooks_api_test_webhook_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Webhooks_api_test_webhook_create_Response_200"},"Webhooks_api_test_webhook_read_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Webhooks_api_test_webhook_read_retrieve_Response_200"},"Authentication_auth_check_user_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Authentication_auth_check_user_create_Response_200"},"Authentication_auth_current_organization_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Authentication_auth_current_organization_retrieve_Response_200"},"TimeRangeType":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"description":"Schema-only shape of one ``APIUser.time_range_types`` entry.\n\nThe model property renders ``APIUser.DropdownChoice.__dict__`` per entry, so\nthe wire shape is a fixed ``{name, value}`` pair.","title":"TimeRangeType"},"UserPreferenceSettings":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"UserPreferenceSettings"},"User":{"type":"object","properties":{"id":{"type":"integer"},"organization_role":{"$ref":"#/components/schemas/OrganizationUserRole"},"invitations":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InvitationList"}},"is_organization_admin":{"type":"boolean"},"time_range_types":{"type":"array","items":{"$ref":"#/components/schemas/TimeRangeType"}},"is_being_impersonated":{"type":"boolean"},"is_superadmin":{"type":"boolean"},"last_login":{"type":["string","null"],"format":"date-time"},"active_duration":{"type":["string","null"]},"last_active":{"type":["string","null"],"format":"date-time"},"user_unique_id":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"email":{"type":"string"},"placeholder":{"type":"boolean"},"name":{"type":"string"},"username":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"sql_prompt_active":{"type":"boolean"},"sql_schema":{"description":"Any type"},"system_prompt_active":{"type":"boolean"},"system_prompt":{"description":"Any type"},"integration_time":{"type":"integer"},"onboarding_start":{"type":"string","format":"date-time"},"onboarding_end":{"type":["string","null"],"format":"date-time"},"onboarding_completed_at":{"type":["string","null"],"format":"date-time"},"is_active":{"type":"boolean"},"status":{"$ref":"#/components/schemas/Status719Enum"},"tokens_valid_after":{"type":["string","null"],"format":"date-time"},"is_admin":{"type":"boolean"},"last_conversation":{"type":"integer"},"plans":{"type":"array","items":{"type":"string"}},"file_prompt":{"description":"Any type"},"user_file_index":{"type":"string"},"current_file":{"type":"string"},"payments":{"type":"array","items":{"description":"Any type"}},"display_properties":{"type":"array","items":{"type":"string"}},"request_log_sort_by":{"type":"string"},"time_range_type":{"type":"string"},"group_by":{"type":"string"},"request_log_filters":{"description":"Any type"},"last_request_log_export_start":{"type":"string","format":"date-time"},"last_request_log_export_end":{"type":"string","format":"date-time"},"exporting_logs":{"type":"boolean"},"dashboard_filters":{"description":"Any type"},"dashboard_selected_charts":{"type":"array","items":{"type":"string"}},"user_page_filters":{"description":"Any type"},"thread_filters":{"description":"Any type"},"thread_sort_by":{"type":"string"},"thread_group_by":{"type":"string"},"last_thread_export_start":{"type":"string","format":"date-time"},"last_thread_export_end":{"type":"string","format":"date-time"},"exporting_threads":{"type":"boolean"},"model_page_filters":{"description":"Any type"},"model_page_sort_by":{"type":"string"},"model_list_filters":{"description":"Any type"},"model_list_sort_by":{"type":"string"},"model_list_group_by":{"type":"string"},"customer_page_filters":{"description":"Any type"},"customer_page_sort_by":{"type":"string"},"customer_page_group_by":{"type":"string"},"last_editing_prompt_version":{"type":"integer"},"latest_frontend_version":{"type":"string"},"preference_settings":{"$ref":"#/components/schemas/UserPreferenceSettings"},"theme":{"type":"string"},"profile_color":{"type":"string"},"curr_org":{"type":["integer","null"]}},"required":["id","organization_role","invitations","is_organization_admin","time_range_types","is_being_impersonated","is_superadmin","active_duration","user_unique_id","created_at","email","is_active","status","is_admin","latest_frontend_version","curr_org"],"title":"User"},"UserRequestPreferenceSettings":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"UserRequestPreferenceSettings"},"UserRequest":{"type":"object","properties":{"organization_role":{"$ref":"#/components/schemas/OrganizationUserRoleRequest"},"is_organization_admin":{"type":"boolean"},"last_login":{"type":["string","null"],"format":"date-time"},"last_active":{"type":["string","null"],"format":"date-time"},"placeholder":{"type":"boolean"},"name":{"type":"string"},"username":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"sql_prompt_active":{"type":"boolean"},"sql_schema":{"description":"Any type"},"system_prompt_active":{"type":"boolean"},"system_prompt":{"description":"Any type"},"integration_time":{"type":"integer"},"onboarding_start":{"type":"string","format":"date-time"},"onboarding_end":{"type":["string","null"],"format":"date-time"},"onboarding_completed_at":{"type":["string","null"],"format":"date-time"},"tokens_valid_after":{"type":["string","null"],"format":"date-time"},"last_conversation":{"type":"integer"},"plans":{"type":"array","items":{"type":"string"}},"file_prompt":{"description":"Any type"},"user_file_index":{"type":"string"},"current_file":{"type":"string"},"payments":{"type":"array","items":{"description":"Any type"}},"display_properties":{"type":"array","items":{"type":"string"}},"request_log_sort_by":{"type":"string"},"time_range_type":{"type":"string"},"group_by":{"type":"string"},"request_log_filters":{"description":"Any type"},"last_request_log_export_start":{"type":"string","format":"date-time"},"last_request_log_export_end":{"type":"string","format":"date-time"},"exporting_logs":{"type":"boolean"},"dashboard_filters":{"description":"Any type"},"dashboard_selected_charts":{"type":"array","items":{"type":"string"}},"user_page_filters":{"description":"Any type"},"thread_filters":{"description":"Any type"},"thread_sort_by":{"type":"string"},"thread_group_by":{"type":"string"},"last_thread_export_start":{"type":"string","format":"date-time"},"last_thread_export_end":{"type":"string","format":"date-time"},"exporting_threads":{"type":"boolean"},"model_page_filters":{"description":"Any type"},"model_page_sort_by":{"type":"string"},"model_list_filters":{"description":"Any type"},"model_list_sort_by":{"type":"string"},"model_list_group_by":{"type":"string"},"customer_page_filters":{"description":"Any type"},"customer_page_sort_by":{"type":"string"},"customer_page_group_by":{"type":"string"},"last_editing_prompt_version":{"type":"integer"},"preference_settings":{"$ref":"#/components/schemas/UserRequestPreferenceSettings"},"theme":{"type":"string"},"profile_color":{"type":"string"}},"required":["organization_role","is_organization_admin"],"title":"UserRequest"},"PatchedUserRequestPreferenceSettings":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"PatchedUserRequestPreferenceSettings"},"PatchedUserRequest":{"type":"object","properties":{"organization_role":{"$ref":"#/components/schemas/OrganizationUserRoleRequest"},"is_organization_admin":{"type":"boolean"},"last_login":{"type":["string","null"],"format":"date-time"},"last_active":{"type":["string","null"],"format":"date-time"},"placeholder":{"type":"boolean"},"name":{"type":"string"},"username":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"sql_prompt_active":{"type":"boolean"},"sql_schema":{"description":"Any type"},"system_prompt_active":{"type":"boolean"},"system_prompt":{"description":"Any type"},"integration_time":{"type":"integer"},"onboarding_start":{"type":"string","format":"date-time"},"onboarding_end":{"type":["string","null"],"format":"date-time"},"onboarding_completed_at":{"type":["string","null"],"format":"date-time"},"tokens_valid_after":{"type":["string","null"],"format":"date-time"},"last_conversation":{"type":"integer"},"plans":{"type":"array","items":{"type":"string"}},"file_prompt":{"description":"Any type"},"user_file_index":{"type":"string"},"current_file":{"type":"string"},"payments":{"type":"array","items":{"description":"Any type"}},"display_properties":{"type":"array","items":{"type":"string"}},"request_log_sort_by":{"type":"string"},"time_range_type":{"type":"string"},"group_by":{"type":"string"},"request_log_filters":{"description":"Any type"},"last_request_log_export_start":{"type":"string","format":"date-time"},"last_request_log_export_end":{"type":"string","format":"date-time"},"exporting_logs":{"type":"boolean"},"dashboard_filters":{"description":"Any type"},"dashboard_selected_charts":{"type":"array","items":{"type":"string"}},"user_page_filters":{"description":"Any type"},"thread_filters":{"description":"Any type"},"thread_sort_by":{"type":"string"},"thread_group_by":{"type":"string"},"last_thread_export_start":{"type":"string","format":"date-time"},"last_thread_export_end":{"type":"string","format":"date-time"},"exporting_threads":{"type":"boolean"},"model_page_filters":{"description":"Any type"},"model_page_sort_by":{"type":"string"},"model_list_filters":{"description":"Any type"},"model_list_sort_by":{"type":"string"},"model_list_group_by":{"type":"string"},"customer_page_filters":{"description":"Any type"},"customer_page_sort_by":{"type":"string"},"customer_page_group_by":{"type":"string"},"last_editing_prompt_version":{"type":"integer"},"preference_settings":{"$ref":"#/components/schemas/PatchedUserRequestPreferenceSettings"},"theme":{"type":"string"},"profile_color":{"type":"string"}},"title":"PatchedUserRequest"},"Authentication_auth_impersonate_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Authentication_auth_impersonate_create_Response_200"},"Authentication_auth_impersonate_switch_org_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Authentication_auth_impersonate_switch_org_partial_update_Response_200"},"Authentication_auth_jwt_revoke_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Authentication_auth_jwt_revoke_create_Response_200"},"CustomTokenObtainPairRequest":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"],"title":"CustomTokenObtainPairRequest"},"Authentication_auth_jwt_create_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Authentication_auth_jwt_create_create_Response_200"},"RespanTokenRefreshRequest":{"type":"object","properties":{"refresh":{"type":"string"}},"required":["refresh"],"description":"Refresh serializer that uses deployment-scoped tokens for graceful\ncross-deployment issuer validation during migration.","title":"RespanTokenRefreshRequest"},"RespanTokenRefresh":{"type":"object","properties":{"refresh":{"type":"string"},"access":{"type":"string"}},"required":["refresh","access"],"description":"Refresh serializer that uses deployment-scoped tokens for graceful\ncross-deployment issuer validation during migration.","title":"RespanTokenRefresh"},"Authentication_auth_jwt_scope_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Authentication_auth_jwt_scope_create_Response_200"},"TokenVerifyRequest":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"],"title":"TokenVerifyRequest"},"Authentication_auth_jwt_verify_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Authentication_auth_jwt_verify_create_Response_200"},"Authentication_auth_login_activate_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Authentication_auth_login_activate_create_Response_200"},"Authentication_auth_logout_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Authentication_auth_logout_create_Response_200"},"ProviderAuth":{"type":"object","properties":{"access":{"type":"string"},"refresh":{"type":"string"},"user":{"type":"string"}},"required":["access","refresh","user"],"title":"ProviderAuth"},"Authentication_auth_organization_retrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Authentication_auth_organization_retrieve_Response_200"},"Authentication_auth_password_verify_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Authentication_auth_password_verify_create_Response_200"},"TeamRoleRole":{"oneOf":[{"$ref":"#/components/schemas/RoleEnum"},{"$ref":"#/components/schemas/NullEnum"}],"title":"TeamRoleRole"},"TeamRoleCompanyOrganization":{"oneOf":[{"$ref":"#/components/schemas/CompanyOrganizationMini"},{"description":"Any type"}],"title":"TeamRoleCompanyOrganization"},"TeamRole":{"type":"object","properties":{"id":{"type":["integer","null"]},"role":{"$ref":"#/components/schemas/TeamRoleRole"},"organization":{"$ref":"#/components/schemas/OrganizationList"},"company_organization":{"$ref":"#/components/schemas/TeamRoleCompanyOrganization"}},"required":["id","role","organization","company_organization"],"description":"Schema-only shape of one ``GET /auth/teams/`` row.\n\nNever used at runtime — the view returns OrganizationUserRoleTeamSerializer\nrows plus synthesized sibling-org rows (``id=None, role=None`` — orgs in the\ncompany the user has no membership in); this documents that union so the\ngenerated client stops emitting a bodiless response.","title":"TeamRole"},"Authentication_auth_teams_create_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Authentication_auth_teams_create_Response_200"},"Authentication_auth_teams_partial_update_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Authentication_auth_teams_partial_update_Response_200"},"CustomUserCreateRequest":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"password":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"}},"required":["email","password"],"title":"CustomUserCreateRequest"},"CustomUserCreate":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"username":{"type":"string"}},"required":["email","id"],"title":"CustomUserCreate"},"ActivationRequest":{"type":"object","properties":{"uid":{"type":"string"},"token":{"type":"string"}},"required":["uid","token"],"title":"ActivationRequest"},"Activation":{"type":"object","properties":{"uid":{"type":"string"},"token":{"type":"string"}},"required":["uid","token"],"title":"Activation"},"MePreferenceSettings":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"MePreferenceSettings"},"Me":{"type":"object","properties":{"id":{"type":"integer"},"organization_role":{"$ref":"#/components/schemas/OrganizationUserRole"},"invitations":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InvitationList"}},"is_organization_admin":{"type":"boolean"},"time_range_types":{"type":"array","items":{"$ref":"#/components/schemas/TimeRangeType"}},"is_being_impersonated":{"type":"boolean"},"is_superadmin":{"type":"boolean"},"organization":{"$ref":"#/components/schemas/Organization"},"last_login":{"type":["string","null"],"format":"date-time"},"active_duration":{"type":["string","null"]},"last_active":{"type":["string","null"],"format":"date-time"},"user_unique_id":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"email":{"type":"string"},"placeholder":{"type":"boolean"},"name":{"type":"string"},"username":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"sql_prompt_active":{"type":"boolean"},"sql_schema":{"description":"Any type"},"system_prompt_active":{"type":"boolean"},"system_prompt":{"description":"Any type"},"integration_time":{"type":"integer"},"onboarding_start":{"type":"string","format":"date-time"},"onboarding_end":{"type":["string","null"],"format":"date-time"},"onboarding_completed_at":{"type":["string","null"],"format":"date-time"},"is_active":{"type":"boolean"},"status":{"$ref":"#/components/schemas/Status719Enum"},"tokens_valid_after":{"type":["string","null"],"format":"date-time"},"is_admin":{"type":"boolean"},"last_conversation":{"type":"integer"},"plans":{"type":"array","items":{"type":"string"}},"file_prompt":{"description":"Any type"},"user_file_index":{"type":"string"},"current_file":{"type":"string"},"payments":{"type":"array","items":{"description":"Any type"}},"display_properties":{"type":"array","items":{"type":"string"}},"request_log_sort_by":{"type":"string"},"time_range_type":{"type":"string"},"group_by":{"type":"string"},"request_log_filters":{"description":"Any type"},"last_request_log_export_start":{"type":"string","format":"date-time"},"last_request_log_export_end":{"type":"string","format":"date-time"},"exporting_logs":{"type":"boolean"},"dashboard_filters":{"description":"Any type"},"dashboard_selected_charts":{"type":"array","items":{"type":"string"}},"user_page_filters":{"description":"Any type"},"thread_filters":{"description":"Any type"},"thread_sort_by":{"type":"string"},"thread_group_by":{"type":"string"},"last_thread_export_start":{"type":"string","format":"date-time"},"last_thread_export_end":{"type":"string","format":"date-time"},"exporting_threads":{"type":"boolean"},"model_page_filters":{"description":"Any type"},"model_page_sort_by":{"type":"string"},"model_list_filters":{"description":"Any type"},"model_list_sort_by":{"type":"string"},"model_list_group_by":{"type":"string"},"customer_page_filters":{"description":"Any type"},"customer_page_sort_by":{"type":"string"},"customer_page_group_by":{"type":"string"},"last_editing_prompt_version":{"type":"integer"},"latest_frontend_version":{"type":"string"},"preference_settings":{"$ref":"#/components/schemas/MePreferenceSettings"},"theme":{"type":"string"},"profile_color":{"type":"string"},"curr_org":{"type":["integer","null"]}},"required":["id","organization_role","invitations","is_organization_admin","time_range_types","is_being_impersonated","is_superadmin","organization","active_duration","user_unique_id","created_at","email","is_active","status","is_admin","latest_frontend_version","curr_org"],"description":"Single-call bootstrap serializer for ``GET /auth/users/me/``.\n\nExtends ``UserSerializer`` with the current organization nested inline\n(including company, subscription, and sibling orgs).  Replaces the\nsequential ``current-user`` + ``current-organization`` fetch pattern.","title":"Me"},"MeRequestPreferenceSettings":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"MeRequestPreferenceSettings"},"MeRequest":{"type":"object","properties":{"organization_role":{"$ref":"#/components/schemas/OrganizationUserRoleRequest"},"is_organization_admin":{"type":"boolean"},"last_login":{"type":["string","null"],"format":"date-time"},"last_active":{"type":["string","null"],"format":"date-time"},"placeholder":{"type":"boolean"},"name":{"type":"string"},"username":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"sql_prompt_active":{"type":"boolean"},"sql_schema":{"description":"Any type"},"system_prompt_active":{"type":"boolean"},"system_prompt":{"description":"Any type"},"integration_time":{"type":"integer"},"onboarding_start":{"type":"string","format":"date-time"},"onboarding_end":{"type":["string","null"],"format":"date-time"},"onboarding_completed_at":{"type":["string","null"],"format":"date-time"},"tokens_valid_after":{"type":["string","null"],"format":"date-time"},"last_conversation":{"type":"integer"},"plans":{"type":"array","items":{"type":"string"}},"file_prompt":{"description":"Any type"},"user_file_index":{"type":"string"},"current_file":{"type":"string"},"payments":{"type":"array","items":{"description":"Any type"}},"display_properties":{"type":"array","items":{"type":"string"}},"request_log_sort_by":{"type":"string"},"time_range_type":{"type":"string"},"group_by":{"type":"string"},"request_log_filters":{"description":"Any type"},"last_request_log_export_start":{"type":"string","format":"date-time"},"last_request_log_export_end":{"type":"string","format":"date-time"},"exporting_logs":{"type":"boolean"},"dashboard_filters":{"description":"Any type"},"dashboard_selected_charts":{"type":"array","items":{"type":"string"}},"user_page_filters":{"description":"Any type"},"thread_filters":{"description":"Any type"},"thread_sort_by":{"type":"string"},"thread_group_by":{"type":"string"},"last_thread_export_start":{"type":"string","format":"date-time"},"last_thread_export_end":{"type":"string","format":"date-time"},"exporting_threads":{"type":"boolean"},"model_page_filters":{"description":"Any type"},"model_page_sort_by":{"type":"string"},"model_list_filters":{"description":"Any type"},"model_list_sort_by":{"type":"string"},"model_list_group_by":{"type":"string"},"customer_page_filters":{"description":"Any type"},"customer_page_sort_by":{"type":"string"},"customer_page_group_by":{"type":"string"},"last_editing_prompt_version":{"type":"integer"},"preference_settings":{"$ref":"#/components/schemas/MeRequestPreferenceSettings"},"theme":{"type":"string"},"profile_color":{"type":"string"}},"required":["organization_role","is_organization_admin"],"description":"Single-call bootstrap serializer for ``GET /auth/users/me/``.\n\nExtends ``UserSerializer`` with the current organization nested inline\n(including company, subscription, and sibling orgs).  Replaces the\nsequential ``current-user`` + ``current-organization`` fetch pattern.","title":"MeRequest"},"PatchedMeRequestPreferenceSettings":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"PatchedMeRequestPreferenceSettings"},"PatchedMeRequest":{"type":"object","properties":{"organization_role":{"$ref":"#/components/schemas/OrganizationUserRoleRequest"},"is_organization_admin":{"type":"boolean"},"last_login":{"type":["string","null"],"format":"date-time"},"last_active":{"type":["string","null"],"format":"date-time"},"placeholder":{"type":"boolean"},"name":{"type":"string"},"username":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"sql_prompt_active":{"type":"boolean"},"sql_schema":{"description":"Any type"},"system_prompt_active":{"type":"boolean"},"system_prompt":{"description":"Any type"},"integration_time":{"type":"integer"},"onboarding_start":{"type":"string","format":"date-time"},"onboarding_end":{"type":["string","null"],"format":"date-time"},"onboarding_completed_at":{"type":["string","null"],"format":"date-time"},"tokens_valid_after":{"type":["string","null"],"format":"date-time"},"last_conversation":{"type":"integer"},"plans":{"type":"array","items":{"type":"string"}},"file_prompt":{"description":"Any type"},"user_file_index":{"type":"string"},"current_file":{"type":"string"},"payments":{"type":"array","items":{"description":"Any type"}},"display_properties":{"type":"array","items":{"type":"string"}},"request_log_sort_by":{"type":"string"},"time_range_type":{"type":"string"},"group_by":{"type":"string"},"request_log_filters":{"description":"Any type"},"last_request_log_export_start":{"type":"string","format":"date-time"},"last_request_log_export_end":{"type":"string","format":"date-time"},"exporting_logs":{"type":"boolean"},"dashboard_filters":{"description":"Any type"},"dashboard_selected_charts":{"type":"array","items":{"type":"string"}},"user_page_filters":{"description":"Any type"},"thread_filters":{"description":"Any type"},"thread_sort_by":{"type":"string"},"thread_group_by":{"type":"string"},"last_thread_export_start":{"type":"string","format":"date-time"},"last_thread_export_end":{"type":"string","format":"date-time"},"exporting_threads":{"type":"boolean"},"model_page_filters":{"description":"Any type"},"model_page_sort_by":{"type":"string"},"model_list_filters":{"description":"Any type"},"model_list_sort_by":{"type":"string"},"model_list_group_by":{"type":"string"},"customer_page_filters":{"description":"Any type"},"customer_page_sort_by":{"type":"string"},"customer_page_group_by":{"type":"string"},"last_editing_prompt_version":{"type":"integer"},"preference_settings":{"$ref":"#/components/schemas/PatchedMeRequestPreferenceSettings"},"theme":{"type":"string"},"profile_color":{"type":"string"}},"description":"Single-call bootstrap serializer for ``GET /auth/users/me/``.\n\nExtends ``UserSerializer`` with the current organization nested inline\n(including company, subscription, and sibling orgs).  Replaces the\nsequential ``current-user`` + ``current-organization`` fetch pattern.","title":"PatchedMeRequest"},"SendEmailResetRequest":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"],"title":"SendEmailResetRequest"},"SendEmailReset":{"type":"object","properties":{"email":{"type":"string","format":"email"}},"required":["email"],"title":"SendEmailReset"},"UsernameResetConfirmRequest":{"type":"object","properties":{"new_email":{"type":"string"}},"required":["new_email"],"title":"UsernameResetConfirmRequest"},"UsernameResetConfirm":{"type":"object","properties":{"new_email":{"type":"string"}},"required":["new_email"],"title":"UsernameResetConfirm"},"PasswordResetConfirmRequest":{"type":"object","properties":{"uid":{"type":"string"},"token":{"type":"string"},"new_password":{"type":"string"}},"required":["uid","token","new_password"],"title":"PasswordResetConfirmRequest"},"PasswordResetConfirm":{"type":"object","properties":{"uid":{"type":"string"},"token":{"type":"string"},"new_password":{"type":"string"}},"required":["uid","token","new_password"],"title":"PasswordResetConfirm"},"SetUsernameRequest":{"type":"object","properties":{"current_password":{"type":"string"},"new_email":{"type":"string"}},"required":["current_password","new_email"],"title":"SetUsernameRequest"},"SetUsername":{"type":"object","properties":{"current_password":{"type":"string"},"new_email":{"type":"string"}},"required":["current_password","new_email"],"title":"SetUsername"},"SetPasswordRequest":{"type":"object","properties":{"new_password":{"type":"string"},"current_password":{"type":"string"}},"required":["new_password","current_password"],"title":"SetPasswordRequest"},"SetPassword":{"type":"object","properties":{"new_password":{"type":"string"},"current_password":{"type":"string"}},"required":["new_password","current_password"],"title":"SetPassword"},"automations_conditionsSimulateCreate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"automations_conditionsSimulateCreate_Response_200"},"automations_conditionsValidateCreate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"automations_conditionsValidateCreate_Response_200"},"PaginatedCustomIdentifierListListFiltersData":{"type":"object","properties":{},"title":"PaginatedCustomIdentifierListListFiltersData"},"CustomIdentifierList":{"type":"object","properties":{"id":{"type":"string"},"custom_identifier":{"type":"string"},"unique_organization_id":{"type":"string"},"environment":{"type":"string"},"number_of_requests":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"total_tokens":{"type":"integer"},"total_prompt_tokens":{"type":"integer"},"total_completion_tokens":{"type":"integer"},"error_count":{"type":"integer"},"average_latency":{"type":"number","format":"double"},"average_ttft":{"type":"number","format":"double"},"average_tps":{"type":"number","format":"double"},"first_seen":{"type":"string","format":"date-time"},"last_active":{"type":"string","format":"date-time"}},"required":["id","custom_identifier","environment","number_of_requests","total_cost","total_tokens","total_prompt_tokens","total_completion_tokens","error_count","average_latency","average_ttft","average_tps","first_seen","last_active"],"description":"Serializer for custom_identifier list responses from ClickHouse.","title":"CustomIdentifierList"},"PaginatedCustomIdentifierListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedCustomIdentifierListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/CustomIdentifierList"}}},"required":["count","results"],"title":"PaginatedCustomIdentifierListList"},"CustomIdentifierListRequest":{"type":"object","properties":{"id":{"type":"string"},"custom_identifier":{"type":"string"},"unique_organization_id":{"type":"string"},"environment":{"type":"string"},"number_of_requests":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"total_tokens":{"type":"integer"},"total_prompt_tokens":{"type":"integer"},"total_completion_tokens":{"type":"integer"},"error_count":{"type":"integer"},"average_latency":{"type":"number","format":"double"},"average_ttft":{"type":"number","format":"double"},"average_tps":{"type":"number","format":"double"},"first_seen":{"type":"string","format":"date-time"},"last_active":{"type":"string","format":"date-time"}},"required":["id","custom_identifier","environment","number_of_requests","total_cost","total_tokens","total_prompt_tokens","total_completion_tokens","error_count","average_latency","average_ttft","average_tps","first_seen","last_active"],"description":"Serializer for custom_identifier list responses from ClickHouse.","title":"CustomIdentifierListRequest"},"PatchedCustomIdentifierListRequest":{"type":"object","properties":{"id":{"type":"string"},"custom_identifier":{"type":"string"},"unique_organization_id":{"type":"string"},"environment":{"type":"string"},"number_of_requests":{"type":"integer"},"total_cost":{"type":"number","format":"double"},"total_tokens":{"type":"integer"},"total_prompt_tokens":{"type":"integer"},"total_completion_tokens":{"type":"integer"},"error_count":{"type":"integer"},"average_latency":{"type":"number","format":"double"},"average_ttft":{"type":"number","format":"double"},"average_tps":{"type":"number","format":"double"},"first_seen":{"type":"string","format":"date-time"},"last_active":{"type":"string","format":"date-time"}},"description":"Serializer for custom_identifier list responses from ClickHouse.","title":"PatchedCustomIdentifierListRequest"},"clickhouse_customIdentifiersSummaryRetrieve_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"clickhouse_customIdentifiersSummaryRetrieve_Response_200"},"clickhouse_customIdentifiersSummaryCreate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"clickhouse_customIdentifiersSummaryCreate_Response_200"},"clickhouse_customIdentifiersSummaryUpdate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"clickhouse_customIdentifiersSummaryUpdate_Response_200"},"clickhouse_customIdentifiersSummaryPartialUpdate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"clickhouse_customIdentifiersSummaryPartialUpdate_Response_200"},"SavedSqlQueryCreateRequestPlottingConfig":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"SavedSqlQueryCreateRequestPlottingConfig"},"Source141Enum":{"type":"string","enum":["sql_editor","dashboard_custom_chart"],"description":"* `sql_editor` - SQL editor\n* `dashboard_custom_chart` - Dashboard custom chart","title":"Source141Enum"},"SavedSQLQueryCreateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"query":{"type":"string"},"plotting_config":{"$ref":"#/components/schemas/SavedSqlQueryCreateRequestPlottingConfig"},"source":{"$ref":"#/components/schemas/Source141Enum"},"organization":{"type":"integer"},"project":{"type":["string","null"]}},"required":["name","query"],"description":"Shared validation for create/update serializers.","title":"SavedSQLQueryCreateRequest"},"SavedSqlQueryCreatePlottingConfig":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"SavedSqlQueryCreatePlottingConfig"},"SavedSQLQueryCreate":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"query":{"type":"string"},"plotting_config":{"$ref":"#/components/schemas/SavedSqlQueryCreatePlottingConfig"},"source":{"$ref":"#/components/schemas/Source141Enum"},"created_by":{"type":["integer","null"]}},"required":["id","name","query","created_by"],"description":"Shared validation for create/update serializers.","title":"SavedSQLQueryCreate"},"PatchedSavedSqlQueryCreateRequestPlottingConfig":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"PatchedSavedSqlQueryCreateRequestPlottingConfig"},"PatchedSavedSQLQueryCreateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"query":{"type":"string"},"plotting_config":{"$ref":"#/components/schemas/PatchedSavedSqlQueryCreateRequestPlottingConfig"},"source":{"$ref":"#/components/schemas/Source141Enum"},"organization":{"type":"integer"},"project":{"type":["string","null"]}},"description":"Shared validation for create/update serializers.","title":"PatchedSavedSQLQueryCreateRequest"},"SavedSqlQueryListPlottingConfig":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"SavedSqlQueryListPlottingConfig"},"SavedSQLQueryList":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"query":{"type":"string"},"plotting_config":{"$ref":"#/components/schemas/SavedSqlQueryListPlottingConfig"},"source":{"$ref":"#/components/schemas/Source141Enum"},"project":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"created_by":{"$ref":"#/components/schemas/Editor"}},"required":["id","name","query","project","created_at","updated_at","created_by"],"title":"SavedSQLQueryList"},"SavedSqlQueryListRequestPlottingConfig":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"SavedSqlQueryListRequestPlottingConfig"},"SavedSQLQueryListRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"query":{"type":"string"},"plotting_config":{"$ref":"#/components/schemas/SavedSqlQueryListRequestPlottingConfig"},"source":{"$ref":"#/components/schemas/Source141Enum"}},"required":["name","query"],"title":"SavedSQLQueryListRequest"},"SavedSqlQueryUpdateRequestPlottingConfig":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"SavedSqlQueryUpdateRequestPlottingConfig"},"SavedSQLQueryUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"query":{"type":"string"},"plotting_config":{"$ref":"#/components/schemas/SavedSqlQueryUpdateRequestPlottingConfig"}},"required":["name","query"],"description":"Shared validation for create/update serializers.","title":"SavedSQLQueryUpdateRequest"},"SavedSqlQueryUpdatePlottingConfig":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"SavedSqlQueryUpdatePlottingConfig"},"SavedSQLQueryUpdate":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"query":{"type":"string"},"plotting_config":{"$ref":"#/components/schemas/SavedSqlQueryUpdatePlottingConfig"},"source":{"$ref":"#/components/schemas/Source141Enum"}},"required":["id","name","query","source"],"description":"Shared validation for create/update serializers.","title":"SavedSQLQueryUpdate"},"PatchedSavedSqlQueryUpdateRequestPlottingConfig":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"PatchedSavedSqlQueryUpdateRequestPlottingConfig"},"PatchedSavedSQLQueryUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"query":{"type":"string"},"plotting_config":{"$ref":"#/components/schemas/PatchedSavedSqlQueryUpdateRequestPlottingConfig"}},"description":"Shared validation for create/update serializers.","title":"PatchedSavedSQLQueryUpdateRequest"},"PaginatedSavedSqlQueryListListFiltersData":{"type":"object","properties":{},"title":"PaginatedSavedSqlQueryListListFiltersData"},"PaginatedSavedSQLQueryListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedSavedSqlQueryListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/SavedSQLQueryList"}}},"required":["count","results"],"title":"PaginatedSavedSQLQueryListList"},"PatchedSavedSqlQueryListRequestPlottingConfig":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"PatchedSavedSqlQueryListRequestPlottingConfig"},"PatchedSavedSQLQueryListRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"query":{"type":"string"},"plotting_config":{"$ref":"#/components/schemas/PatchedSavedSqlQueryListRequestPlottingConfig"},"source":{"$ref":"#/components/schemas/Source141Enum"}},"title":"PatchedSavedSQLQueryListRequest"},"SavedSQLQuerySummary":{"type":"object","properties":{"total_count":{"type":"integer","description":"Total number of saved queries."},"filters_data":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Filter operator/value choices for the FE filter picker; shape matches FilterOptionsMixin.get_filter_options()."}},"required":["total_count"],"description":"Response serializer for the saved SQL queries summary endpoint.","title":"SavedSQLQuerySummary"},"clickhouse_savedSqlQueriesSummaryUpdate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"clickhouse_savedSqlQueriesSummaryUpdate_Response_200"},"clickhouse_savedSqlQueriesSummaryPartialUpdate_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"clickhouse_savedSqlQueriesSummaryPartialUpdate_Response_200"},"SQLQueryRequestEnvironmentEnum":{"type":"string","enum":["all","prod","test"],"description":"* `all` - all\n* `prod` - prod\n* `test` - test","title":"SQLQueryRequestEnvironmentEnum"},"TableEnum":{"type":"string","enum":["annotations","eval_results","latency_quantiles_hourly","latency_quantiles_minute","log_metrics","log_metrics_hourly","logs","organization","traces"],"description":"* `annotations` - annotations\n* `eval_results` - eval_results\n* `latency_quantiles_hourly` - latency_quantiles_hourly\n* `latency_quantiles_minute` - latency_quantiles_minute\n* `log_metrics` - log_metrics\n* `log_metrics_hourly` - log_metrics_hourly\n* `logs` - logs\n* `organization` - organization\n* `traces` - traces","title":"TableEnum"},"DashboardFilteringRequest":{"type":"object","properties":{"enabled":{"type":"boolean"},"table":{"$ref":"#/components/schemas/TableEnum"},"alias":{"type":["string","null"]}},"required":["enabled"],"title":"DashboardFilteringRequest"},"SQLQueryRequestRequest":{"type":"object","properties":{"query":{"type":"string","description":"ClickHouse SQL query. Only SELECT statements allowed."},"start_time":{"type":"string","format":"date-time","description":"Optional. Bound into `{{ start_time }}` references."},"end_time":{"type":"string","format":"date-time","description":"Optional. Bound into `{{ end_time }}` references. Must be after start_time when both are set."},"environment":{"$ref":"#/components/schemas/SQLQueryRequestEnvironmentEnum","description":"Optional environment filter; non-`all` is injected into the rewritten SQL as an equality filter on `environment`.\n\n* `all` - all\n* `prod` - prod\n* `test` - test"},"filters":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Optional dashboard filters for saved SQL queries that opt in."},"dashboard_filtering":{"$ref":"#/components/schemas/DashboardFilteringRequest","description":"Optional dashboard filter context for saved SQL execution."}},"required":["query"],"description":"Request serializer for the SQL Query Editor endpoint.\n\n`start_time` / `end_time` / `environment` are optional execution parameters.\nWhen supplied, the server renders any `{{ start_time }}` / `{{ end_time }}`\nreferences in the query through `fill_variables` (Jinja) before execution.\nThis is how dashboard charts reuse a saved query as a parametric \"view\":\nthe FE fetches the saved query text, then posts it here with the time\nwindow to render.\n\n`filters` / `dashboard_filtering` are optional and only used when a saved\nSQL query explicitly opts into `{{ dashboard_filters }}`.","title":"SQLQueryRequestRequest"},"SQLQueryResponse":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"string"},"description":"Column names in the result set."},"rows":{"type":"array","items":{"type":"array","items":{"description":"Any type"}},"description":"Result rows (each row is an array of values)."},"row_count":{"type":"integer","description":"Number of rows returned."},"execution_time_ms":{"type":"integer","description":"Server-side query execution time in milliseconds."},"warnings":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}},"description":"Non-fatal dashboard filter warnings."}},"required":["columns","rows","row_count","execution_time_ms"],"description":"Response serializer for the SQL Query Editor endpoint.","title":"SQLQueryResponse"},"CodeEnum":{"type":"string","enum":["syntax_error","table_not_found","column_not_found","unknown_function","type_mismatch","expensive_query","timeout","query_cancelled","not_select","unsupported_feature","query_too_long","empty_query","access_denied","unknown_error"],"description":"* `syntax_error` - syntax_error\n* `table_not_found` - table_not_found\n* `column_not_found` - column_not_found\n* `unknown_function` - unknown_function\n* `type_mismatch` - type_mismatch\n* `expensive_query` - expensive_query\n* `timeout` - timeout\n* `query_cancelled` - query_cancelled\n* `not_select` - not_select\n* `unsupported_feature` - unsupported_feature\n* `query_too_long` - query_too_long\n* `empty_query` - empty_query\n* `access_denied` - access_denied\n* `unknown_error` - unknown_error","title":"CodeEnum"},"SQLQueryErrorResponse":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/CodeEnum","description":"Stable machine-readable error category (e.g. 'syntax_error', 'expensive_query', 'timeout'). Map this to user-facing copy.\n\n* `syntax_error` - syntax_error\n* `table_not_found` - table_not_found\n* `column_not_found` - column_not_found\n* `unknown_function` - unknown_function\n* `type_mismatch` - type_mismatch\n* `expensive_query` - expensive_query\n* `timeout` - timeout\n* `query_cancelled` - query_cancelled\n* `not_select` - not_select\n* `unsupported_feature` - unsupported_feature\n* `query_too_long` - query_too_long\n* `empty_query` - empty_query\n* `access_denied` - access_denied\n* `unknown_error` - unknown_error"},"detail":{"type":"string","description":"Server-default human message describing the failure."},"error":{"type":"string","description":"Deprecated alias of `detail`, mirrored for backward compatibility with the current SQL-editor frontend. Prefer `detail`; this field will be removed once the frontend migrates to `code`/`detail`."},"technical_detail":{"type":"string","description":"Optional sanitized raw engine message (e.g. the ClickHouse 'Code: N' line) for power users / debugging."}},"required":["code","detail","error"],"description":"Error response serializer for the SQL Query Editor endpoint.\n\nEvery 4xx/413 error is returned as ``{code, detail, error, technical_detail?}``.\n``code`` is a stable machine-readable category the frontend maps to its own\ncopy; ``detail`` is the server-default human message (safe fallback);\n``error`` mirrors ``detail`` for backward compatibility with the current FE\nand is removed once it migrates to ``code``/``detail``;\n``technical_detail`` is the optional sanitized raw engine message.","title":"SQLQueryErrorResponse"},"ClickhouseWorkflowsWorkflowIdEvalRunsGetParametersScope":{"type":"string","enum":["automation"],"title":"ClickhouseWorkflowsWorkflowIdEvalRunsGetParametersScope"},"CHEvalPipelineRunGraderScore":{"type":"object","properties":{"evaluator_id":{"type":"string"},"scorer":{"type":"string"},"evaluator_name":{"type":"string"},"primary_score":{"type":["number","null"],"format":"double"},"boolean_value":{"type":["integer","null"]}},"required":["evaluator_id","scorer","evaluator_name","primary_score","boolean_value"],"description":"One grader's score for a single evaluator-pipeline run (table cell).\n\nA flattened ``ch_eval_result`` row: which grader (``evaluator_id`` +\n``scorer`` + denormalized ``evaluator_name``) produced what. The FE picks\n``primary_score`` for numeric graders and reads ``boolean_value`` (1 pass /\n0 fail / 2 N/A) for boolean ones, matching the grader's score type.","title":"CHEvalPipelineRunGraderScore"},"CHEvalPipelineRun":{"type":"object","properties":{"log_unique_id":{"type":"string"},"run_at":{"type":"string","format":"date-time"},"eval_cost":{"type":["number","null"],"format":"double"},"output_primary_score":{"type":["number","null"],"format":"double"},"output_boolean_value":{"type":["integer","null"]},"src_input":{"type":["string","null"]},"src_output":{"type":["string","null"]},"src_model":{"type":["string","null"]},"src_status":{"type":["string","null"]},"src_trace_unique_id":{"type":["string","null"]},"src_timestamp":{"type":["string","null"],"format":"date-time"},"grader_scores":{"type":"array","items":{"$ref":"#/components/schemas/CHEvalPipelineRunGraderScore"}}},"required":["log_unique_id","run_at","eval_cost","src_input","src_output","src_model","src_status","src_trace_unique_id","grader_scores"],"description":"One evaluator-pipeline run = one graded log (DEV-8439 run-history table).\n\nEach row is a log this pipeline graded: the original log fields\n(``src_*``, joined from ``ch_log_v3`` by ``unique_id = log_unique_id``) plus\nevery grader's score for that log (``grader_scores``). The FE pivots\n``grader_scores`` into one score column per grader, mirroring the chart\nabove. ``src_*`` fields are null when the original log is outside retention.\n``src_timestamp`` is the source log's own start time (not grading time\n``run_at``); the FE anchors the open-log link's window on it, omitting the\nlink when it's null (source log not retrievable).","title":"CHEvalPipelineRun"},"PaginatedCHEvalPipelineRunList":{"type":"object","properties":{"count":{"type":"integer"},"results":{"type":"array","items":{"$ref":"#/components/schemas/CHEvalPipelineRun"}}},"required":["count","results"],"description":"Paginated evaluator run-history page (count + results slice).\n\nSchema-only — same hand-built pagination as the workflow runs view.","title":"PaginatedCHEvalPipelineRunList"},"ClickhouseWorkflowsWorkflowIdEvalScoresGetParametersScope":{"type":"string","enum":["automation"],"title":"ClickhouseWorkflowsWorkflowIdEvalScoresGetParametersScope"},"CHEvalPipelineScores":{"type":"object","properties":{"workflow_version_id":{"type":"string"},"evaluator_id":{"type":"string"},"scorer":{"type":"string"},"evaluator_name":{"type":"string"},"avg_primary_score":{"type":["number","null"],"format":"double"},"true_ratio":{"type":["number","null"],"format":"double"},"sample_count":{"type":"integer"}},"required":["workflow_version_id","evaluator_id","scorer","evaluator_name","sample_count"],"description":"Output-score aggregate for one evaluator pipeline (DEV-8439 Phase 2).\n\nOne row — the pipeline's output (rollup) score collapsed across versions, so\nthe FE draws one line. FE picks ``avg_primary_score`` (numeric) or\n``true_ratio`` (boolean, fraction passed; null when no boolean rows → \"—\").\nKey columns emitted empty: one series needs no key.","title":"CHEvalPipelineScores"},"ClickhouseWorkflowsWorkflowIdEvalScoresTimeSeriesGetParametersScope":{"type":"string","enum":["automation"],"title":"ClickhouseWorkflowsWorkflowIdEvalScoresTimeSeriesGetParametersScope"},"ClickhouseWorkflowsWorkflowIdEvalScoresTimeSeriesGetParametersTimeTick":{"type":"string","enum":["day","hour","minute"],"title":"ClickhouseWorkflowsWorkflowIdEvalScoresTimeSeriesGetParametersTimeTick"},"CHEvalPipelineScoresTimeSeries":{"type":"object","properties":{"date_group":{"type":"string","format":"date-time"},"evaluator_id":{"type":"string"},"scorer":{"type":"string"},"evaluator_name":{"type":"string"},"avg_primary_score":{"type":["number","null"],"format":"double"},"true_ratio":{"type":["number","null"],"format":"double"},"sample_count":{"type":"integer"}},"required":["date_group","evaluator_id","scorer","evaluator_name","sample_count"],"description":"Time-bucketed output score for one evaluator pipeline (graphs).\n\nSame aggregate as ``CHEvalPipelineScoresSerializer`` but one row per time\nbucket — the single output-score series for the scores-over-time chart,\nordered by bucket ascending. ``date_group`` is a DateTimeField over the\nbare CH bucket for the same tz reason as the workflow-metrics one.","title":"CHEvalPipelineScoresTimeSeries"},"CHWorkflowRun":{"type":"object","properties":{"unique_id":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"workflow_version_id":{"type":"string"},"workflow_version_type":{"type":"string"},"workflow_status":{"type":"string"},"delivery_fired_count":{"type":"integer"},"delivery_failed_count":{"type":"integer"}},"required":["unique_id","timestamp","workflow_version_id","workflow_version_type","workflow_status","delivery_fired_count","delivery_failed_count"],"description":"One monitor/automation run (per-run Runs-tab table row).\n\nNewest-first per-run rows off ch_log_v3 workflow root rows — replaces the\nper-version rollup table. ``workflow_status`` is the run outcome\n(completed / stopped / failed); delivery counts are the notification\nmethods that fired / errored on this run.","title":"CHWorkflowRun"},"PaginatedCHWorkflowRunList":{"type":"object","properties":{"count":{"type":"integer"},"results":{"type":"array","items":{"$ref":"#/components/schemas/CHWorkflowRun"}}},"required":["count","results"],"description":"Paginated monitor/automation run-history page (count + results slice).\n\nSchema-only — CHWorkflowRunsView.list() builds the {count, results} payload\nby hand off raw CH cursors, so spectacular rendered the response as a bare\narray. Never instantiated at runtime.","title":"PaginatedCHWorkflowRunList"},"ClickhouseWorkflowsWorkflowIdRunsSummaryGetParametersTimeTick":{"type":"string","enum":["day","hour","minute"],"title":"ClickhouseWorkflowsWorkflowIdRunsSummaryGetParametersTimeTick"},"CHWorkflowMetricsTimeSeries":{"type":"object","properties":{"date_group":{"type":"string","format":"date-time"},"completed_count":{"type":"integer"},"stopped_count":{"type":"integer"},"failed_count":{"type":"integer"},"total_count":{"type":"integer"},"delivery_fired_count":{"type":"integer"},"delivery_failed_count":{"type":"integer"}},"required":["date_group","completed_count","stopped_count","failed_count","total_count","delivery_fired_count","delivery_failed_count"],"description":"Time-bucketed monitor/automation run metrics for prompts-style graphs.\n\nOne row per time bucket (``date_group``), ordered ascending — completed /\nstopped / failed run counts plus delivery sums.\n\n``date_group`` must stay a DateTimeField over the bare CH DateTime bucket\n(NOT a stringified one): naive ``toString(bucket)`` output gets parsed as\nlocal time by browsers, shifting hourly chart labels by the viewer's UTC\noffset.","title":"CHWorkflowMetricsTimeSeries"},"PaginatedCompanyOrganizationListListFiltersData":{"type":"object","properties":{},"title":"PaginatedCompanyOrganizationListListFiltersData"},"PaginatedCompanyOrganizationListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedCompanyOrganizationListListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/CompanyOrganizationList"}}},"required":["count","results"],"title":"PaginatedCompanyOrganizationListList"},"CompanyOrganizationListRequest":{"type":"object","properties":{"unique_company_organization_id":{"type":"string"},"company_organization_unique_id":{"type":["string","null"]},"name":{"type":"string"},"email_domain":{"type":["string","null"]},"plan":{"$ref":"#/components/schemas/PlanEnum"},"stripe_customer_id":{"type":"string"},"llm_gateway_markup_rate":{"type":"number","format":"double","description":"LLM gateway markup rate (default 0% markup). Single source of truth: DEFAULT_LLM_GATEWAY_MARKUP_RATE."},"credit_low_balance_threshold":{"type":["number","null"],"format":"double"},"credit_auto_top_off_threshold":{"type":["number","null"],"format":"double"},"credit_auto_top_off_amount":{"type":["number","null"],"format":"double"},"is_auto_top_off_enabled":{"type":"boolean"}},"required":["name"],"title":"CompanyOrganizationListRequest"},"CompanyOrganizationDetail":{"type":"object","properties":{"id":{"type":"integer"},"plan_level":{"type":"integer"},"unique_company_organization_id":{"type":"string"},"company_organization_unique_id":{"type":["string","null"]},"name":{"type":"string"},"email_domain":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"plan":{"$ref":"#/components/schemas/PlanEnum"},"stripe_customer_id":{"type":"string"},"llm_gateway_markup_rate":{"type":"number","format":"double","description":"LLM gateway markup rate (default 0% markup). Single source of truth: DEFAULT_LLM_GATEWAY_MARKUP_RATE."},"credit_low_balance_threshold":{"type":["number","null"],"format":"double"},"credit_auto_top_off_threshold":{"type":["number","null"],"format":"double"},"credit_auto_top_off_amount":{"type":["number","null"],"format":"double"},"is_auto_top_off_enabled":{"type":"boolean"}},"required":["id","plan_level","name","created_at","updated_at"],"title":"CompanyOrganizationDetail"},"CompanyOrganizationDetailRequest":{"type":"object","properties":{"unique_company_organization_id":{"type":"string"},"company_organization_unique_id":{"type":["string","null"]},"name":{"type":"string"},"email_domain":{"type":["string","null"]},"plan":{"$ref":"#/components/schemas/PlanEnum"},"stripe_customer_id":{"type":"string"},"llm_gateway_markup_rate":{"type":"number","format":"double","description":"LLM gateway markup rate (default 0% markup). Single source of truth: DEFAULT_LLM_GATEWAY_MARKUP_RATE."},"credit_low_balance_threshold":{"type":["number","null"],"format":"double"},"credit_auto_top_off_threshold":{"type":["number","null"],"format":"double"},"credit_auto_top_off_amount":{"type":["number","null"],"format":"double"},"is_auto_top_off_enabled":{"type":"boolean"}},"required":["name"],"title":"CompanyOrganizationDetailRequest"},"PatchedCompanyOrganizationDetailRequest":{"type":"object","properties":{"unique_company_organization_id":{"type":"string"},"company_organization_unique_id":{"type":["string","null"]},"name":{"type":"string"},"email_domain":{"type":["string","null"]},"plan":{"$ref":"#/components/schemas/PlanEnum"},"stripe_customer_id":{"type":"string"},"llm_gateway_markup_rate":{"type":"number","format":"double","description":"LLM gateway markup rate (default 0% markup). Single source of truth: DEFAULT_LLM_GATEWAY_MARKUP_RATE."},"credit_low_balance_threshold":{"type":["number","null"],"format":"double"},"credit_auto_top_off_threshold":{"type":["number","null"],"format":"double"},"credit_auto_top_off_amount":{"type":["number","null"],"format":"double"},"is_auto_top_off_enabled":{"type":"boolean"}},"title":"PatchedCompanyOrganizationDetailRequest"},"PaginatedDomainVerificationResponseListFiltersData":{"type":"object","properties":{},"title":"PaginatedDomainVerificationResponseListFiltersData"},"DomainVerificationResponseStatusEnum":{"type":"string","enum":["pending","verified","failed","expired"],"description":"* `pending` - Pending\n* `verified` - Verified\n* `failed` - Failed\n* `expired` - Expired","title":"DomainVerificationResponseStatusEnum"},"DomainVerificationResponse":{"type":"object","properties":{"id":{"type":"integer"},"organization_id":{"type":"integer"},"domain":{"type":"string"},"verification_token":{"type":"string"},"status":{"$ref":"#/components/schemas/DomainVerificationResponseStatusEnum"},"txt_record":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"verified_at":{"type":["string","null"],"format":"date-time"},"last_checked_at":{"type":["string","null"],"format":"date-time"}},"required":["id","organization_id","domain","verification_token","txt_record","created_at","expires_at"],"title":"DomainVerificationResponse"},"PaginatedDomainVerificationResponseList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"total_count":{"type":"integer"},"current_filters":{"$ref":"#/components/schemas/FilterParamDictPydantic"},"filters_data":{"$ref":"#/components/schemas/PaginatedDomainVerificationResponseListFiltersData"},"results":{"type":"array","items":{"$ref":"#/components/schemas/DomainVerificationResponse"}}},"required":["count","results"],"title":"PaginatedDomainVerificationResponseList"},"DomainVerificationResponseRequest":{"type":"object","properties":{"domain":{"type":"string"},"verification_token":{"type":"string"},"status":{"$ref":"#/components/schemas/DomainVerificationResponseStatusEnum"},"expires_at":{"type":"string","format":"date-time"},"verified_at":{"type":["string","null"],"format":"date-time"},"last_checked_at":{"type":["string","null"],"format":"date-time"}},"required":["domain","verification_token","expires_at"],"title":"DomainVerificationResponseRequest"},"PatchedDomainVerificationResponseRequest":{"type":"object","properties":{"domain":{"type":"string"},"verification_token":{"type":"string"},"status":{"$ref":"#/components/schemas/DomainVerificationResponseStatusEnum"},"expires_at":{"type":"string","format":"date-time"},"verified_at":{"type":["string","null"],"format":"date-time"},"last_checked_at":{"type":["string","null"],"format":"date-time"}},"title":"PatchedDomainVerificationResponseRequest"},"StatusF6eEnum":{"type":"string","enum":["queued","running","succeeded","failed"],"description":"* `queued` - Queued\n* `running` - Running\n* `succeeded` - Succeeded\n* `failed` - Failed","title":"StatusF6eEnum"},"RedTeamCampaignSummary":{"type":"object","properties":{"status":{"type":["string","null"]},"grade":{"type":["string","null"]},"score":{"type":["integer","null"]},"findings_count":{"type":["integer","null"]},"probes_sent":{"type":["integer","null"]},"probes_completed":{"type":["integer","null"]},"probes_errored":{"type":["integer","null"]},"probes_total":{"type":["integer","null"]}},"required":["status","grade","score","findings_count","probes_sent","probes_completed","probes_errored","probes_total"],"title":"RedTeamCampaignSummary"},"RedTeamCampaignListSummary":{"oneOf":[{"$ref":"#/components/schemas/RedTeamCampaignSummary"},{"description":"Any type"}],"title":"RedTeamCampaignListSummary"},"RedTeamCampaignList":{"type":"object","properties":{"id":{"type":"string"},"target_id":{"type":"string"},"target_label":{"type":"string"},"status":{"$ref":"#/components/schemas/StatusF6eEnum"},"error":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"},"summary":{"$ref":"#/components/schemas/RedTeamCampaignListSummary"}},"required":["target_id","target_label","created_at","summary"],"title":"RedTeamCampaignList"},"PaginatedRedTeamCampaignListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/RedTeamCampaignList"}}},"required":["count","results"],"title":"PaginatedRedTeamCampaignListList"},"RedTeamCampaignCreateRequest":{"type":"object","properties":{"target_id":{"type":"string"},"target":{"type":"object","additionalProperties":{"description":"Any type"}},"consent":{"type":"boolean"}},"required":["consent"],"title":"RedTeamCampaignCreateRequest"},"RedTeamCampaignDetailSummary":{"oneOf":[{"$ref":"#/components/schemas/RedTeamCampaignSummary"},{"description":"Any type"}],"title":"RedTeamCampaignDetailSummary"},"RedTeamCampaignDetailReport":{"oneOf":[{"description":"Any type"},{"description":"Any type"}],"title":"RedTeamCampaignDetailReport"},"RedTeamCampaignDetail":{"type":"object","properties":{"id":{"type":"string"},"target_id":{"type":"string"},"target_label":{"type":"string"},"status":{"$ref":"#/components/schemas/StatusF6eEnum"},"error":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"},"summary":{"$ref":"#/components/schemas/RedTeamCampaignDetailSummary"},"report":{"$ref":"#/components/schemas/RedTeamCampaignDetailReport"}},"required":["target_id","target_label","created_at","summary"],"title":"RedTeamCampaignDetail"},"RedTeamCampaignEventList":{"type":"object","properties":{"sequence":{"type":"integer"},"event":{"type":"string"},"data":{"description":"Any type"},"created_at":{"type":"string","format":"date-time"}},"required":["sequence","event","created_at"],"title":"RedTeamCampaignEventList"},"PaginatedRedTeamCampaignEventListList":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"],"format":"uri"},"previous":{"type":["string","null"],"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/RedTeamCampaignEventList"}}},"required":["count","results"],"title":"PaginatedRedTeamCampaignEventListList"},"RedTeamCampaignReport":{"type":"object","properties":{"target_label":{"type":"string"},"status":{"type":"string"},"grade":{"type":"string"},"score":{"type":["integer","null"]},"resistance_rate":{"type":["number","null"],"format":"double"},"probes_sent":{"type":"integer"},"probes_completed":{"type":"integer"},"probes_errored":{"type":"integer"},"probes_total":{"type":"integer"},"cost_usd":{"type":"number","format":"double"},"duration_s":{"type":"number","format":"double"},"severity_counts":{"type":"object","additionalProperties":{"description":"Any type"}},"findings_count":{"type":"integer"},"profile":{"type":"object","additionalProperties":{"description":"Any type"}},"category_tiles":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"findings":{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}},"worst_finding":{"type":["object","null"],"additionalProperties":{"description":"Any type"}}},"required":["target_label","status","grade","score","resistance_rate","probes_sent","probes_completed","probes_errored","probes_total","cost_usd","duration_s","severity_counts","findings_count","profile","category_tiles","findings","worst_finding"],"title":"RedTeamCampaignReport"},"RedTeamSandboxTarget":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"blurb":{"type":"string"},"difficulty":{"type":"string"},"expected_grade":{"type":"string"}},"required":["id","name","blurb","difficulty","expected_grade"],"title":"RedTeamSandboxTarget"},"RedTeamSandboxTargetsResponse":{"type":"object","properties":{"targets":{"type":"array","items":{"$ref":"#/components/schemas/RedTeamSandboxTarget"}}},"required":["targets"],"title":"RedTeamSandboxTargetsResponse"},"RedTeamCampaignUsage":{"type":"object","properties":{"limit":{"type":"integer"},"usage":{"type":"integer"},"remaining_runs":{"type":"integer"},"reset_at":{"type":"string","format":"date-time"},"is_launch_allowed":{"type":"boolean"}},"required":["limit","usage","remaining_runs","reset_at","is_launch_allowed"],"title":"RedTeamCampaignUsage"}},"securitySchemes":{"RespanApiKey":{"type":"http","scheme":"bearer","description":"Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field."},"DashboardJwt":{"type":"http","scheme":"bearer","description":"Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead."},"BearerAuth":{"type":"http","scheme":"bearer","description":"JWT access token or Respan API key"},"DeploymentTokenAuth":{"type":"apiKey","in":"header","name":"X-Respan-Deployment-Token","description":"BYOC data-plane deployment service token (issued at registration; not a user JWT)"}}}}