Opik REST API

The Opik REST API provides programmatic access to all platform capabilities including logging traces and spans from LLM applications, managing datasets and experiment items, running evaluations, storing feedback scores, and accessing project data. The API is available for both the open-source self-hosted deployment and the managed Opik Cloud service, with authentication handled via API keys and workspace headers for cloud users.

OpenAPI Specification

opik-rest-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Opik REST API
  description: "The Opik REST API is currently in beta and subject to change. If you\
    \ have any questions or feedback about the APIs, please reach out on GitHub: https://github.com/comet-ml/opik.\n\
    \nAll of the methods listed in this documentation are used by either the SDK or\
    \ the UI to interact with the Opik server. As a result,\nthe methods have been\
    \ optimized for these use-cases in mind. If you are looking for a method that\
    \ is not listed above, please create\nand issue on GitHub or raise a PR!\n\nOpik\
    \ includes two main deployment options that results in slightly different API\
    \ usage:\n\n- **Self-hosted Opik instance:** You will simply need to specify the\
    \ URL as `http://localhost:5173/api/<endpoint_path>` or similar. This is the default\
    \ option for the docs.\n- **Opik Cloud:** You will need to specify the Opik API\
    \ Key and Opik Workspace in the header. The format of the header should be:\n\n\
    \  ```\n  {\n    \"Comet-Workspace\": \"your-workspace-name\",\n    \"authorization\"\
    : \"your-api-key\"\n  }\n  ```\n\n  The full payload would therefore look like:\n\
    \  \n  ```\n  curl -X GET 'https://www.comet.com/opik/api/v1/private/projects'\
    \ \\\n  -H 'Accept: application/json' \\\n  -H 'Comet-Workspace: <your-workspace-name>'\
    \ \\\n  -H 'authorization: <your-api-key>'\n  ```\n\n  Do take note here that\
    \ the authorization header value does not include the `Bearer ` prefix. To switch\
    \ to using the Opik Cloud in the documentation, you can\n  click on the edit button\
    \ displayed when hovering over the `Base URL` displayed on the right hand side\
    \ of the docs.\n"
  contact:
    name: Github Repository
    url: https://github.com/comet-ml/opik
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
- url: http://localhost:5173/api
  description: Local server
- url: https://www.comet.com/opik/api
  description: Opik Cloud
tags:
- name: MCP OAuth
  description: MCP OAuth 2.1 Authorization Server resources
- name: System usage
  description: System usage related resource
- name: Agent Configs
  description: Agent configuration management
- name: AI Spend
  description: Coding-agent spend analytics
- name: Alerts
  description: Alert resources
- name: Annotation Queues
  description: Private annotation queue operations
- name: Assertion Results
  description: Assertion result related resources
- name: Attachments
  description: Attachments related resources
- name: Check
  description: Access check resources
- name: Automation rule evaluators
  description: Automation rule evaluators resource
- name: Chat Completions
  description: Chat Completions related resources
- name: Dashboards
  description: Workspace Dashboard resources
- name: Datasets
  description: Dataset resources
- name: Environments
  description: Environment related resources
- name: Experiments
  description: Experiment resources
- name: Feedback-definitions
  description: Feedback definitions related resources
- name: Guardrails
  description: Guardrails related resources
- name: Insights Views
  description: Insights View resources
- name: LLM Models
  description: LLM model registry resources
- name: LlmProviderKey
  description: LLM Provider Key
- name: Runners
  description: Local runner management endpoints
- name: Manual Evaluation
  description: "Manual evaluation resources for traces, threads, and spans"
- name: Ollama
  description: Ollama provider configuration endpoints with OpenAI-compatible API
    support.
- name: Ollie State
  description: Ollie pod state persistence
- name: OpenTelemetry Ingestion
  description: Resource to ingest Traces and Spans via OpenTelemetry
- name: Optimizations
  description: Optimization resources
- name: Pairing
  description: Pairing sessions for the `opik connect` and `opik endpoint` CLI commands
- name: Projects
  description: Project related resources
- name: Prompts
  description: Prompt resources
- name: Reports
  description: Ollie daily report management
- name: Retention Rules
  description: Data retention rule management
- name: Service Toggles
  description: Service Toggles resources
- name: Spans
  description: Span related resources
- name: Traces
  description: Trace related resources
- name: Welcome Wizard
  description: Welcome wizard tracking resources
- name: Workspace permissions
  description: Workspace permissions related resources
- name: Workspaces
  description: Workspace related resources
- name: Redirect
  description: Redirects for SDK generated links
paths:
  /oauth/authorize:
    get:
      tags:
      - MCP OAuth
      summary: OAuth Authorization Endpoint
      description: "OAuth 2.1 authorization endpoint (RFC 6749 §3.1). Validates the\
        \ client and PKCE parameters, then redirects to the login or consent page"
      operationId: authorize
      parameters:
      - name: client_id
        in: query
        required: true
        schema:
          minLength: 1
          type: string
      - name: redirect_uri
        in: query
        required: true
        schema:
          minLength: 1
          type: string
      - name: response_type
        in: query
        schema:
          type: string
      - name: code_challenge
        in: query
        schema:
          type: string
      - name: code_challenge_method
        in: query
        schema:
          type: string
      - name: resource
        in: query
        schema:
          type: string
      - name: state
        in: query
        schema:
          type: string
      responses:
        "302":
          description: "Redirect to login, consent, or client redirect_uri with an\
            \ error"
    post:
      tags:
      - MCP OAuth
      summary: Submit Authorization Consent
      description: "Submit the user's consent, issue an authorization code, and return\
        \ the client redirect target"
      operationId: consent
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ConsentRequest"
        required: true
      responses:
        "200":
          description: Consent response with the client redirect target
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConsentResponse"
  /oauth/authorize/context:
    get:
      tags:
      - MCP OAuth
      summary: Get Authorization Consent Context
      description: "Get the client details, eligible workspaces, and a CSRF token\
        \ used to render the consent screen"
      operationId: getAuthorizeContext
      parameters:
      - name: client_id
        in: query
        required: true
        schema:
          minLength: 1
          type: string
      - name: redirect_uri
        in: query
        required: true
        schema:
          minLength: 1
          type: string
      responses:
        "200":
          description: Authorization consent context
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AuthorizeContext"
  /.well-known/oauth-authorization-server:
    get:
      tags:
      - MCP OAuth
      summary: Get OAuth Authorization Server Metadata
      description: Get OAuth 2.1 Authorization Server Metadata (RFC 8414)
      operationId: getOAuthAuthorizationServerMetadata
      responses:
        "200":
          description: Authorization Server Metadata
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AuthorizationServerMetadata"
  /oauth/revoke:
    post:
      tags:
      - MCP OAuth
      summary: OAuth Token Revocation Endpoint
      description: "OAuth 2.0 token revocation endpoint (RFC 7009). Always returns\
        \ 200, whether the token was revoked, never existed, or was invalid"
      operationId: revoke
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                token:
                  type: string
                client_id:
                  type: string
      responses:
        "200":
          description: Revocation acknowledged
  /oauth/token:
    post:
      tags:
      - MCP OAuth
      summary: OAuth Token Endpoint
      description: "OAuth 2.1 token endpoint (RFC 6749 §4.1.3, §6). Exchanges an authorization\
        \ code with PKCE or a refresh token for an access/refresh token pair"
      operationId: token
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                grant_type:
                  type: string
                code:
                  type: string
                redirect_uri:
                  type: string
                client_id:
                  type: string
                code_verifier:
                  type: string
                refresh_token:
                  type: string
      responses:
        "200":
          description: Token response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TokenResponse"
        "400":
          description: OAuth error (RFC 6749 §5.2)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OAuthError"
  /v1/internal/usage/bi-datasets:
    get:
      tags:
      - System usage
      summary: Get datasets information for BI events
      description: Get datasets information for BI events per user per workspace
      operationId: getDatasetBiInfo
      responses:
        "200":
          description: Datasets BiInformationResponse resource
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BiInformationResponse"
  /v1/internal/usage/bi-experiments:
    get:
      tags:
      - System usage
      summary: Get experiments information for BI events
      description: Get experiments information for BI events per user per workspace
      operationId: getExperimentBiInfo
      responses:
        "200":
          description: Experiments BiInformationResponse resource
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BiInformationResponse"
  /v1/internal/usage/bi-spans:
    get:
      tags:
      - System usage
      summary: Get spans information for BI events
      description: Get spans information for BI events per user per workspace
      operationId: getSpansBiInfo
      responses:
        "200":
          description: Spans BiInformationResponse resource
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BiInformationResponse"
  /v1/internal/usage/workspace-span-counts:
    get:
      tags:
      - System usage
      summary: Get spans count on previous day for all available workspaces
      description: Get spans count on previous day for all available workspaces
      operationId: getSpansCountForWorkspaces
      responses:
        "200":
          description: SpanCountResponse resource
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SpansCountResponse"
  /v1/internal/usage/bi-traces:
    get:
      tags:
      - System usage
      summary: Get traces information for BI events
      description: Get traces information for BI events per user per workspace
      operationId: getTracesBiInfo
      responses:
        "200":
          description: Traces BiInformationResponse resource
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BiInformationResponse"
  /v1/internal/usage/workspace-trace-counts:
    get:
      tags:
      - System usage
      summary: Get traces count on previous day for all available workspaces
      description: Get traces count on previous day for all available workspaces
      operationId: getTracesCountForWorkspaces
      responses:
        "200":
          description: TraceCountResponse resource
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TraceCountResponse"
  /v1/private/agent-configs/blueprints:
    post:
      tags:
      - Agent Configs
      summary: Create optimizer config with initial blueprint
      description: Creates a new optimizer config with initial blueprint. Fails if
        the project already has a config.
      operationId: createAgentConfig
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AgentConfigCreate_Write"
      responses:
        "201":
          description: Created
          headers:
            Location:
              required: true
              style: simple
              schema:
                type: string
              example: "${basePath}/v1/private/agent-configs/blueprints/{blueprint_id}"
        "400":
          description: Bad Request (e.g. MASK type not allowed)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage_Write"
        "409":
          description: Conflict (config already exists)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage_Write"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage_Write"
    patch:
      tags:
      - Agent Configs
      summary: Add blueprint to existing config
      description: Adds a new blueprint to an existing optimizer config. Fails if
        the project has no config yet.
      operationId: updateAgentConfig
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AgentConfigCreate_Write"
      responses:
        "201":
          description: Created
          headers:
            Location:
              required: true
              style: simple
              schema:
                type: string
              example: "${basePath}/v1/private/agent-configs/blueprints/{blueprint_id}"
        "404":
          description: Not Found (no config for project)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage_Write"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage_Write"
  /v1/private/agent-configs/blueprints/projects/{project_id}/masks/{mask_id}:
    post:
      tags:
      - Agent Configs
      summary: Create blueprint from mask
      description: Creates a new blueprint by applying a mask's changes on top of
        the latest blueprint for the project.
      operationId: createBlueprintFromMask
      parameters:
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: mask_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        "201":
          description: Created
          headers:
            Location:
              required: true
              style: simple
              schema:
                type: string
              example: "${basePath}/v1/private/agent-configs/blueprints/{blueprint_id}"
        "404":
          description: Not Found (no config or mask not found)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage_Write"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage_Write"
  /v1/private/agent-configs/blueprints/environments:
    post:
      tags:
      - Agent Configs
      summary: Create or update environments
      description: Creates or updates environment-to-blueprint mappings
      operationId: createOrUpdateEnvs
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AgentConfigEnvUpdate"
      responses:
        "204":
          description: Environments updated
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage"
  /v1/private/agent-configs/blueprints/environments/{env_name}/projects/{project_id}:
    get:
      tags:
      - Agent Configs
      summary: Retrieve blueprint by environment
      description: Retrieves the blueprint associated with a specific environment
      operationId: getBlueprintByEnv
      parameters:
      - name: env_name
        in: path
        required: true
        schema:
          type: string
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: mask_id
        in: query
        schema:
          type: string
          format: uuid
      responses:
        "200":
          description: Blueprint retrieved
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AgentBlueprint_Public"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage_Public"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage_Public"
    put:
      tags:
      - Agent Configs
      summary: Set environment by blueprint name
      description: Sets an environment to point to a blueprint identified by name
      operationId: setEnvByBlueprintName
      parameters:
      - name: env_name
        in: path
        required: true
        schema:
          type: string
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AgentConfigEnvSetByName"
      responses:
        "204":
          description: Environment updated
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage"
    delete:
      tags:
      - Agent Configs
      summary: Delete environment
      description: Soft-deletes an environment by setting its ended_at timestamp
      operationId: deleteEnv
      parameters:
      - name: env_name
        in: path
        required: true
        schema:
          type: string
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        "204":
          description: Environment deleted
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage"
  /v1/private/agent-configs/blueprints/{blueprint_id}:
    get:
      tags:
      - Agent Configs
      summary: Retrieve blueprint by ID
      description: Retrieves a specific blueprint by its ID
      operationId: getBlueprintById
      parameters:
      - name: blueprint_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: mask_id
        in: query
        schema:
          type: string
          format: uuid
      responses:
        "200":
          description: Blueprint retrieved
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AgentBlueprint_Public"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage_Public"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage_Public"
  /v1/private/agent-configs/blueprints/projects/{project_id}/names/{name}:
    get:
      tags:
      - Agent Configs
      summary: Retrieve blueprint by name
      description: Retrieves a specific blueprint by its name within a project
      operationId: getBlueprintByName
      parameters:
      - name: name
        in: path
        required: true
        schema:
          type: string
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: mask_id
        in: query
        schema:
          type: string
          format: uuid
      responses:
        "200":
          description: Blueprint retrieved
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AgentBlueprint_Public"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage_Public"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage_Public"
  /v1/private/agent-configs/blueprints/history/projects/{project_id}:
    get:
      tags:
      - Agent Configs
      summary: Get blueprint history
      description: Retrieves paginated blueprint history for a project
      operationId: getBlueprintHistory
      parameters:
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: page
        in: query
        schema:
          minimum: 1
          type: integer
          format: int32
          default: 1
      - name: size
        in: query
        schema:
          minimum: 1
          type: integer
          format: int32
          default: 10
      responses:
        "200":
          description: History retrieved
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BlueprintPage_History"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage_History"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage_History"
  /v1/private/agent-configs/blueprints/{blueprint_id}/deltas:
    get:
      tags:
      - Agent Configs
      summary: Retrieve delta by blueprint ID
      description: Retrieves only the changes (delta) introduced in a specific blueprint
      operationId: getDeltaById
      parameters:
      - name: blueprint_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        "200":
          description: Delta retrieved
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AgentBlueprint_Public"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage_Public"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage_Public"
  /v1/private/agent-configs/blueprints/latest/projects/{project_id}:
    get:
      tags:
      - Agent Configs
      summary: Retrieve latest blueprint
      description: Retrieves the latest blueprint for a project
      operationId: getLatestBlueprint
      parameters:
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: mask_id
        in: query
        schema:
          type: string
          format: uuid
      responses:
        "200":
          description: Blueprint retrieved
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AgentBlueprint_Public"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage_Public"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage_Public"
  /v1/private/agent-configs/blueprints/remove-keys:
    post:
      tags:
      - Agent Configs
      summary: Remove configuration parameters
      description: Removes configuration parameters by creating a new blueprint that
        closes the specified keys. Returns 204 if no changes were needed (idempotent).
      operationId: removeConfigKeys
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AgentConfigRemoveValues"
      responses:
        "201":
          description: Created
          headers:
            Location:
              required: true
              style: simple
              schema:
                type: string
              example: "${basePath}/v1/private/agent-configs/blueprints/{blueprint_id}"
        "204":
          description: No changes needed (no config or keys already removed)
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage"
  /v1/private/ai-spend/composition:
    post:
      tags:
      - AI Spend
      summary: Get spend composition
      description: Get coding-agent token-flow composition (Sankey)
      operationId: getSpendComposition
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SpendMetricRequest"
      responses:
        "200":
          description: Spend composition
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SpendCompositionResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage"
  /v1/private/ai-spend/composition/{laneKey}/breakdown:
    post:
      tags:
      - AI Spend
      summary: Get spend lane breakdown
      description: Get the per-item breakdown for a composition lane
      operationId: getSpendLaneBreakdown
      parameters:
      - name: laneKey
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SpendMetricRequest"
      responses:
        "200":
          description: Lane breakdown
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SpendBreakdownResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage"
  /v1/private/ai-spend/recommendations:
    post:
      tags:
      - AI Spend
      summary: Get spend recommendations
      description: Get coding-agent cost-saving recommendations
      operationId: getSpendRecommendations
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SpendMetricRequest"
      responses:
        "200":
          description: Recommendations
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SpendRecommendationsResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage"
  /v1/private/ai-spend/summary:
    post:
      tags:
      - AI Spend
      summary: Get spend summary
      description: Get coding-agent spend KPI summary
      operationId: getSpendSummary
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SpendMetricRequest"
      responses:
        "200":
          description: Spend summary
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WorkspaceMetricsSummaryResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage"
  /v1/private/ai-spend/users:
    post:
      tags:
      - AI Spend
      summary: Get spend user leaderboard
      description: Get coding-agent spend per user
      operationId: getSpendUsers
      parameters:
      - name: page
        in: query
        schema:
          minimum: 1
          type: integer
          format: int32
          default: 1
      - name: size
        in: query
        schema:
          maximum: 1000
          minimum: 1
          type: integer
          format: int32
          default: 25
      - name: sorting
        in: query
        schema:
          type: string
      - name: name
        in: query
        schema:
          type: string
          description: "Filter users by name or email (partial match, case insensitive)"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SpendMetricRequest"
      responses:
        "200":
          description: User leaderboard
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SpendUserPage"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage"
  /v1/private/alerts:
    get:
      tags:
      - Alerts
      summary: Find alerts
      description: Find alerts
      operationId: findAlerts
      parameters:
      - name: page
        in: query
        schema:
          minimum: 1
          type: integer
          format: int32
          default: 1
      - name: size
        in: query
        schema:
          minimum: 1
          type: integer
          format: int32
          default: 10
      - name: sorting
        in: query
        schema:
          type: string
      - name: filters
        in: query
        schema:
          type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AlertPage_Public"
    post:
      tags:
      - Alerts
      summary: Create alert
      description: Create alert
      operationId: createAlert
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Alert_Write"
      responses:
        "201":
          description: Created
          headers:
            Location:
              required: true
              style: simple
              schema:
                type: string
              example: "${basePath}/v1/private/alerts/{alertId}"
        "422":
          description: Unprocessable Content
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage"
        "400":
          desc

# --- truncated at 32 KB (563 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/opik/refs/heads/main/openapi/opik-rest-api-openapi.yml