> ## Documentation Index
> Fetch the complete documentation index at: https://arklowdocs.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Apply a resource config revision



## OpenAPI

````yaml https://api.arklow.io/swagger/ui/json post /v1/orgs/{org_id}/config/revisions/{revision_id}/apply
openapi: 3.1.0
info:
  title: Arklow
  description: Arklow's API
  version: 0.1.0
servers:
  - url: https://api.arklow.io
    description: Production
  - url: http://localhost:3123
    description: Local development
security:
  - apiKey: []
tags:
  - name: actions
  - name: api_keys
  - name: billing
  - name: config
  - name: credentials
  - name: destinations
  - name: invites
  - name: members
  - name: metrics
  - name: notifications
  - name: orgs
  - name: rules
  - name: sources
  - name: users
  - name: ingress
externalDocs:
  url: https://api.arklow.io/swagger/ui
paths:
  /v1/orgs/{org_id}/config/revisions/{revision_id}/apply:
    post:
      tags:
        - config
      summary: Apply a resource config revision
      operationId: post_v1_orgs_by_org_id_config_revisions_by_revision_id_apply
      parameters:
        - schema:
            type: string
            pattern: ^[0-9]+$
          in: path
          name: org_id
          required: true
        - schema:
            type: string
            pattern: ^[0-9]+$
          in: path
          name: revision_id
          required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - errors
                properties:
                  data:
                    anyOf:
                      - type: object
                        required:
                          - id
                          - org_id
                          - preview_steps
                          - status
                          - error_message
                          - updated_at
                          - applied_at
                        properties:
                          id:
                            type: string
                          org_id:
                            type: string
                          preview_steps:
                            type: array
                            items:
                              anyOf:
                                - type: object
                                  required:
                                    - kind
                                    - op
                                    - variant
                                    - final_version
                                  properties:
                                    kind:
                                      type: string
                                      enum:
                                        - action
                                    op:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - create
                                        - type: string
                                          enum:
                                            - noop
                                        - type: string
                                          enum:
                                            - update
                                    variant:
                                      type: string
                                    id:
                                      type: string
                                    current_version:
                                      type: integer
                                    final_version:
                                      type: integer
                                    destination:
                                      anyOf:
                                        - type: object
                                          required:
                                            - by
                                            - value
                                          properties:
                                            by:
                                              type: string
                                              enum:
                                                - default_sink
                                            value:
                                              type: string
                                              enum:
                                                - default_sink
                                        - type: object
                                          required:
                                            - by
                                            - value
                                          properties:
                                            by:
                                              type: string
                                              enum:
                                                - id
                                            value:
                                              type: string
                                        - type: object
                                          required:
                                            - by
                                            - value
                                          properties:
                                            by:
                                              type: string
                                              enum:
                                                - label
                                            value:
                                              type: string
                                    create:
                                      type: object
                                      required:
                                        - schema
                                        - variant
                                        - version
                                      properties:
                                        alias:
                                          type: array
                                          items:
                                            type: string
                                        schema: {}
                                        variant:
                                          type: string
                                        version:
                                          type: integer
                                    update:
                                      type: object
                                      required:
                                        - version
                                      properties:
                                        alias:
                                          type: array
                                          items:
                                            type: string
                                        schema: {}
                                        version:
                                          type: integer
                                - type: object
                                  required:
                                    - kind
                                    - op
                                    - label
                                    - desired
                                  properties:
                                    kind:
                                      type: string
                                      enum:
                                        - destination
                                    op:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - create
                                        - type: string
                                          enum:
                                            - noop
                                        - type: string
                                          enum:
                                            - update
                                    label:
                                      type: string
                                    id:
                                      type: string
                                    desired:
                                      allOf:
                                        - type: object
                                          required:
                                            - label
                                          properties:
                                            label:
                                              type: string
                                            credential:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                        - anyOf:
                                            - type: object
                                              required:
                                                - type
                                                - config
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - webhook
                                                config:
                                                  type: object
                                                  required:
                                                    - url
                                                  properties:
                                                    url:
                                                      type: string
                                                      format: uri
                                                    headers:
                                                      type: object
                                                      additionalProperties:
                                                        type: string
                                                    signaling:
                                                      anyOf:
                                                        - type: object
                                                          required:
                                                            - enabled
                                                            - default
                                                          properties:
                                                            enabled:
                                                              type: boolean
                                                              enum:
                                                                - true
                                                            default:
                                                              anyOf:
                                                                - type: string
                                                                  enum:
                                                                    - ack
                                                                - type: string
                                                                  enum:
                                                                    - mod_ack
                                                          additionalProperties: false
                                                        - type: object
                                                          required:
                                                            - enabled
                                                          properties:
                                                            enabled:
                                                              type: boolean
                                                              enum:
                                                                - false
                                                            default:
                                                              anyOf:
                                                                - type: string
                                                                  enum:
                                                                    - ack
                                                                - type: string
                                                                  enum:
                                                                    - mod_ack
                                                          additionalProperties: false
                                                    response_time_sla_ms:
                                                      type: integer
                                                      minimum: 1
                                                  additionalProperties: false
                                            - type: object
                                              required:
                                                - type
                                                - config
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - sdk
                                                config:
                                                  type: object
                                                  required:
                                                    - namespace
                                                  properties:
                                                    namespace:
                                                      type: string
                                                    signaling:
                                                      anyOf:
                                                        - type: object
                                                          required:
                                                            - enabled
                                                            - default
                                                          properties:
                                                            enabled:
                                                              type: boolean
                                                              enum:
                                                                - true
                                                            default:
                                                              anyOf:
                                                                - type: string
                                                                  enum:
                                                                    - ack
                                                                - type: string
                                                                  enum:
                                                                    - mod_ack
                                                          additionalProperties: false
                                                        - type: object
                                                          required:
                                                            - enabled
                                                          properties:
                                                            enabled:
                                                              type: boolean
                                                              enum:
                                                                - false
                                                            default:
                                                              anyOf:
                                                                - type: string
                                                                  enum:
                                                                    - ack
                                                                - type: string
                                                                  enum:
                                                                    - mod_ack
                                                          additionalProperties: false
                                                    response_time_sla_ms:
                                                      type: integer
                                                      minimum: 1
                                                  additionalProperties: false
                                            - type: object
                                              required:
                                                - type
                                                - config
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - google_pubsub
                                                config:
                                                  type: object
                                                  required:
                                                    - project_id
                                                    - topic_id
                                                  properties:
                                                    project_id:
                                                      type: string
                                                    topic_id:
                                                      type: string
                                                    response_time_sla_ms:
                                                      type: integer
                                                      minimum: 1
                                            - type: object
                                              required:
                                                - type
                                                - config
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - aws_sqs
                                                config:
                                                  type: object
                                                  required:
                                                    - queue_url
                                                  properties:
                                                    queue_url:
                                                      type: string
                                                      format: uri
                                                    region:
                                                      type: string
                                                    response_time_sla_ms:
                                                      type: integer
                                                      minimum: 1
                                            - type: object
                                              required:
                                                - type
                                                - config
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - mcp
                                                config:
                                                  type: object
                                                  required:
                                                    - endpoint
                                                  properties:
                                                    endpoint:
                                                      type: string
                                                      format: uri
                                                    response_time_sla_ms:
                                                      type: integer
                                                      minimum: 1
                                            - type: object
                                              required:
                                                - type
                                                - config
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - default_sink
                                                config:
                                                  type: object
                                                  properties: {}
                                                  additionalProperties: false
                                    updates:
                                      anyOf:
                                        - allOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - webhook
                                                config:
                                                  type: object
                                                  properties:
                                                    url:
                                                      type: string
                                                      format: uri
                                                    headers:
                                                      type: object
                                                      additionalProperties:
                                                        type: string
                                                    signaling:
                                                      anyOf:
                                                        - type: object
                                                          required:
                                                            - enabled
                                                            - default
                                                          properties:
                                                            enabled:
                                                              type: boolean
                                                              enum:
                                                                - true
                                                            default:
                                                              anyOf:
                                                                - type: string
                                                                  enum:
                                                                    - ack
                                                                - type: string
                                                                  enum:
                                                                    - mod_ack
                                                          additionalProperties: false
                                                        - type: object
                                                          required:
                                                            - enabled
                                                          properties:
                                                            enabled:
                                                              type: boolean
                                                              enum:
                                                                - false
                                                            default:
                                                              anyOf:
                                                                - type: string
                                                                  enum:
                                                                    - ack
                                                                - type: string
                                                                  enum:
                                                                    - mod_ack
                                                          additionalProperties: false
                                                    response_time_sla_ms:
                                                      type: integer
                                                      minimum: 1
                                            - type: object
                                              properties:
                                                credential_id:
                                                  anyOf:
                                                    - type: string
                                                      pattern: ^[0-9]+$
                                                    - type: 'null'
                                        - allOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - sdk
                                                config:
                                                  type: object
                                                  properties:
                                                    namespace:
                                                      type: string
                                                    signaling:
                                                      anyOf:
                                                        - type: object
                                                          required:
                                                            - enabled
                                                            - default
                                                          properties:
                                                            enabled:
                                                              type: boolean
                                                              enum:
                                                                - true
                                                            default:
                                                              anyOf:
                                                                - type: string
                                                                  enum:
                                                                    - ack
                                                                - type: string
                                                                  enum:
                                                                    - mod_ack
                                                          additionalProperties: false
                                                        - type: object
                                                          required:
                                                            - enabled
                                                          properties:
                                                            enabled:
                                                              type: boolean
                                                              enum:
                                                                - false
                                                            default:
                                                              anyOf:
                                                                - type: string
                                                                  enum:
                                                                    - ack
                                                                - type: string
                                                                  enum:
                                                                    - mod_ack
                                                          additionalProperties: false
                                                    response_time_sla_ms:
                                                      type: integer
                                                      minimum: 1
                                            - type: object
                                              properties:
                                                credential_id:
                                                  anyOf:
                                                    - type: string
                                                      pattern: ^[0-9]+$
                                                    - type: 'null'
                                        - allOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - google_pubsub
                                                config:
                                                  type: object
                                                  properties:
                                                    project_id:
                                                      type: string
                                                    topic_id:
                                                      type: string
                                                    response_time_sla_ms:
                                                      type: integer
                                                      minimum: 1
                                            - type: object
                                              properties:
                                                credential_id:
                                                  anyOf:
                                                    - type: string
                                                      pattern: ^[0-9]+$
                                                    - type: 'null'
                                        - allOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - aws_sqs
                                                config:
                                                  type: object
                                                  properties:
                                                    queue_url:
                                                      type: string
                                                      format: uri
                                                    region:
                                                      type: string
                                                    response_time_sla_ms:
                                                      type: integer
                                                      minimum: 1
                                            - type: object
                                              properties:
                                                credential_id:
                                                  anyOf:
                                                    - type: string
                                                      pattern: ^[0-9]+$
                                                    - type: 'null'
                                        - allOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - mcp
                                                config:
                                                  type: object
                                                  properties:
                                                    endpoint:
                                                      type: string
                                                      format: uri
                                                    response_time_sla_ms:
                                                      type: integer
                                                      minimum: 1
                                            - type: object
                                              properties:
                                                credential_id:
                                                  anyOf:
                                                    - type: string
                                                      pattern: ^[0-9]+$
                                                    - type: 'null'
                                        - allOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - default_sink
                                                config:
                                                  type: object
                                                  properties: {}
                                            - type: object
                                              properties:
                                                credential_id:
                                                  anyOf:
                                                    - type: string
                                                      pattern: ^[0-9]+$
                                                    - type: 'null'
                                - type: object
                                  required:
                                    - kind
                                    - op
                                    - name
                                    - desired
                                  properties:
                                    kind:
                                      type: string
                                      enum:
                                        - metric_source
                                    op:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - create
                                        - type: string
                                          enum:
                                            - noop
                                        - type: string
                                          enum:
                                            - update
                                    name:
                                      type: string
                                    id:
                                      type: string
                                    desired:
                                      type: object
                                      required:
                                        - name
                                        - kind
                                        - endpoint
                                      properties:
                                        name:
                                          type: string
                                        kind:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - prometheus
                                            - type: string
                                              enum:
                                                - datadog
                                        endpoint:
                                          type: string
                                        poll_interval_seconds:
                                          type: integer
                                        credential:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        config:
                                          anyOf:
                                            - type: object
                                              properties:
                                                path:
                                                  type: string
                                                auth_header:
                                                  type: string
                                                tls_skip_verify:
                                                  type: boolean
                                            - type: object
                                              properties:
                                                scope:
                                                  type: string
                                                namespace:
                                                  type: string
                                            - type: 'null'
                                        status:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - active
                                            - type: string
                                              enum:
                                                - paused
                                        queries:
                                          type: array
                                          items:
                                            type: object
                                            required:
                                              - name
                                            properties:
                                              name:
                                                type: string
                                              status:
                                                anyOf:
                                                  - type: string
                                                    enum:
                                                      - active
                                                  - type: string
                                                    enum:
                                                      - paused
                                              config:
                                                anyOf:
                                                  - type: object
                                                    properties:
                                                      expression:
                                                        type: string
                                                      rollup_seconds:
                                                        type: integer
                                                      window_seconds:
                                                        type: integer
                                                      group_by:
                                                        type: array
                                                        items:
                                                          type: string
                                                      tags:
                                                        type: object
                                                        additionalProperties:
                                                          type: string
                                                  - type: 'null'
                                    updates:
                                      type: object
                                      properties:
                                        status:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - active
                                            - type: string
                                              enum:
                                                - paused
                                        endpoint:
                                          type: string
                                        poll_interval_seconds:
                                          type: integer
                                        credential_id:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        config:
                                          anyOf:
                                            - type: object
                                              properties:
                                                path:
                                                  type: string
                                                auth_header:
                                                  type: string
                                                tls_skip_verify:
                                                  type: boolean
                                            - type: object
                                              properties:
                                                scope:
                                                  type: string
                                                namespace:
                                                  type: string
                                            - type: 'null'
                                - type: object
                                  required:
                                    - kind
                                    - op
                                    - name
                                    - source
                                    - desired
                                  properties:
                                    kind:
                                      type: string
                                      enum:
                                        - metric_source_query
                                    op:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - create
                                        - type: string
                                          enum:
                                            - noop
                                        - type: string
                                          enum:
                                            - update
                                    name:
                                      type: string
                                    id:
                                      type: string
                                    source:
                                      anyOf:
                                        - type: object
                                          required:
                                            - by
                                            - value
                                          properties:
                                            by:
                                              type: string
                                              enum:
                                                - id
                                            value:
                                              type: string
                                        - type: object
                                          required:
                                            - by
                                            - value
                                          properties:
                                            by:
                                              type: string
                                              enum:
                                                - name
                                            value:
                                              type: string
                                    desired:
                                      type: object
                                      required:
                                        - name
                                      properties:
                                        name:
                                          type: string
                                        status:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - active
                                            - type: string
                                              enum:
                                                - paused
                                        config:
                                          anyOf:
                                            - type: object
                                              properties:
                                                expression:
                                                  type: string
                                                rollup_seconds:
                                                  type: integer
                                                window_seconds:
                                                  type: integer
                                                group_by:
                                                  type: array
                                                  items:
                                                    type: string
                                                tags:
                                                  type: object
                                                  additionalProperties:
                                                    type: string
                                            - type: 'null'
                                    update:
                                      type: object
                                      required:
                                        - op
                                        - name
                                      properties:
                                        op:
                                          type: string
                                          enum:
                                            - upsert
                                        id:
                                          type: string
                                        name:
                                          type: string
                                        status:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - active
                                            - type: string
                                              enum:
                                                - paused
                                        config:
                                          anyOf:
                                            - type: object
                                              properties:
                                                expression:
                                                  type: string
                                                rollup_seconds:
                                                  type: integer
                                                window_seconds:
                                                  type: integer
                                                group_by:
                                                  type: array
                                                  items:
                                                    type: string
                                                tags:
                                                  type: object
                                                  additionalProperties:
                                                    type: string
                                            - type: 'null'
                                - type: object
                                  required:
                                    - kind
                                    - op
                                    - desired
                                  properties:
                                    kind:
                                      type: string
                                      enum:
                                        - metric_source_query_policy
                                    op:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - create
                                        - type: string
                                          enum:
                                            - noop
                                        - type: string
                                          enum:
                                            - update
                                    id:
                                      type: string
                                    query_id:
                                      type: string
                                    desired:
                                      type: object
                                      required:
                                        - action_variant
                                        - mode
                                        - query_selector
                                      properties:
                                        action_variant:
                                          type: string
                                        max_series:
                                          type: number
                                        mode:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - discover
                                            - type: string
                                              enum:
                                                - manual
                                        query_selector:
                                          anyOf:
                                            - type: object
                                              required:
                                                - by
                                                - value
                                              properties:
                                                by:
                                                  type: string
                                                  enum:
                                                    - id
                                                value:
                                                  type: string
                                            - type: object
                                              required:
                                                - by
                                                - source
                                                - value
                                              properties:
                                                by:
                                                  type: string
                                                  enum:
                                                    - metric_source_query_name
                                                source:
                                                  anyOf:
                                                    - type: object
                                                      required:
                                                        - by
                                                        - value
                                                      properties:
                                                        by:
                                                          type: string
                                                          enum:
                                                            - id
                                                        value:
                                                          type: string
                                                    - type: object
                                                      required:
                                                        - by
                                                        - value
                                                      properties:
                                                        by:
                                                          type: string
                                                          enum:
                                                            - name
                                                        value:
                                                          type: string
                                                value:
                                                  type: string
                                        selector:
                                          anyOf:
                                            - type: object
                                              additionalProperties:
                                                type: array
                                                items:
                                                  type: string
                                                minItems: 1
                                            - type: 'null'
                                    updates:
                                      type: object
                                      properties:
                                        max_series:
                                          anyOf:
                                            - type: number
                                            - type: 'null'
                                        mode:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - discover
                                            - type: string
                                              enum:
                                                - manual
                                        selector:
                                          anyOf:
                                            - type: object
                                              additionalProperties:
                                                type: array
                                                items:
                                                  type: string
                                                minItems: 1
                                            - type: 'null'
                                - type: object
                                  required:
                                    - kind
                                    - op
                                    - name
                                    - desired
                                  properties:
                                    kind:
                                      type: string
                                      enum:
                                        - source
                                    op:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - create
                                        - type: string
                                          enum:
                                            - noop
                                        - type: string
                                          enum:
                                            - update
                                    name:
                                      type: string
                                    id:
                                      type: string
                                    desired:
                                      allOf:
                                        - type: object
                                          required:
                                            - name
                                          properties:
                                            name:
                                              type: string
                                            credential:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                            status:
                                              anyOf:
                                                - type: string
                                                  enum:
                                                    - active
                                                - type: string
                                                  enum:
                                                    - paused
                                            ingest:
                                              type: object
                                              properties:
                                                variant:
                                                  type: string
                                                version:
                                                  type: integer
                                                  minimum: 1
                                              additionalProperties: false
                                        - anyOf:
                                            - type: object
                                              required:
                                                - type
                                                - config
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - aws_sqs
                                                config:
                                                  type: object
                                                  required:
                                                    - queue_url
                                                    - region
                                                  properties:
                                                    queue_url:
                                                      type: string
                                                      format: uri
                                                    region:
                                                      type: string
                                            - type: object
                                              required:
                                                - type
                                                - config
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - google_pubsub
                                                config:
                                                  type: object
                                                  required:
                                                    - project_id
                                                    - subscription_id
                                                  properties:
                                                    project_id:
                                                      type: string
                                                    subscription_id:
                                                      type: string
                                    updates:
                                      allOf:
                                        - anyOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - aws_sqs
                                                config:
                                                  type: object
                                                  properties:
                                                    queue_url:
                                                      type: string
                                                      format: uri
                                                    region:
                                                      type: string
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - google_pubsub
                                                config:
                                                  type: object
                                                  properties:
                                                    project_id:
                                                      type: string
                                                    subscription_id:
                                                      type: string
                                        - type: object
                                          properties:
                                            status:
                                              anyOf:
                                                - type: string
                                                  enum:
                                                    - active
                                                - type: string
                                                  enum:
                                                    - paused
                                            ingest:
                                              type: object
                                              properties:
                                                variant:
                                                  type: string
                                                version:
                                                  type: integer
                                                  minimum: 1
                                              additionalProperties: false
                                            credential_id:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                          status:
                            anyOf:
                              - type: string
                                enum:
                                  - planned
                              - type: string
                                enum:
                                  - applying
                              - type: string
                                enum:
                                  - applied
                              - type: string
                                enum:
                                  - failed
                          error_message:
                            anyOf:
                              - type: string
                              - type: 'null'
                          updated_at:
                            type: string
                            format: date-time
                          applied_at:
                            anyOf:
                              - type: string
                                format: date-time
                              - type: 'null'
                      - type: 'null'
                  errors:
                    anyOf:
                      - type: array
                        items:
                          type: object
                          required:
                            - code
                            - message
                          properties:
                            code:
                              type: string
                            message:
                              type: string
                      - type: 'null'
        '202':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - errors
                properties:
                  data:
                    anyOf:
                      - type: object
                        required:
                          - id
                          - org_id
                          - preview_steps
                          - status
                          - error_message
                          - updated_at
                          - applied_at
                        properties:
                          id:
                            type: string
                          org_id:
                            type: string
                          preview_steps:
                            type: array
                            items:
                              anyOf:
                                - type: object
                                  required:
                                    - kind
                                    - op
                                    - variant
                                    - final_version
                                  properties:
                                    kind:
                                      type: string
                                      enum:
                                        - action
                                    op:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - create
                                        - type: string
                                          enum:
                                            - noop
                                        - type: string
                                          enum:
                                            - update
                                    variant:
                                      type: string
                                    id:
                                      type: string
                                    current_version:
                                      type: integer
                                    final_version:
                                      type: integer
                                    destination:
                                      anyOf:
                                        - type: object
                                          required:
                                            - by
                                            - value
                                          properties:
                                            by:
                                              type: string
                                              enum:
                                                - default_sink
                                            value:
                                              type: string
                                              enum:
                                                - default_sink
                                        - type: object
                                          required:
                                            - by
                                            - value
                                          properties:
                                            by:
                                              type: string
                                              enum:
                                                - id
                                            value:
                                              type: string
                                        - type: object
                                          required:
                                            - by
                                            - value
                                          properties:
                                            by:
                                              type: string
                                              enum:
                                                - label
                                            value:
                                              type: string
                                    create:
                                      type: object
                                      required:
                                        - schema
                                        - variant
                                        - version
                                      properties:
                                        alias:
                                          type: array
                                          items:
                                            type: string
                                        schema: {}
                                        variant:
                                          type: string
                                        version:
                                          type: integer
                                    update:
                                      type: object
                                      required:
                                        - version
                                      properties:
                                        alias:
                                          type: array
                                          items:
                                            type: string
                                        schema: {}
                                        version:
                                          type: integer
                                - type: object
                                  required:
                                    - kind
                                    - op
                                    - label
                                    - desired
                                  properties:
                                    kind:
                                      type: string
                                      enum:
                                        - destination
                                    op:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - create
                                        - type: string
                                          enum:
                                            - noop
                                        - type: string
                                          enum:
                                            - update
                                    label:
                                      type: string
                                    id:
                                      type: string
                                    desired:
                                      allOf:
                                        - type: object
                                          required:
                                            - label
                                          properties:
                                            label:
                                              type: string
                                            credential:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                        - anyOf:
                                            - type: object
                                              required:
                                                - type
                                                - config
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - webhook
                                                config:
                                                  type: object
                                                  required:
                                                    - url
                                                  properties:
                                                    url:
                                                      type: string
                                                      format: uri
                                                    headers:
                                                      type: object
                                                      additionalProperties:
                                                        type: string
                                                    signaling:
                                                      anyOf:
                                                        - type: object
                                                          required:
                                                            - enabled
                                                            - default
                                                          properties:
                                                            enabled:
                                                              type: boolean
                                                              enum:
                                                                - true
                                                            default:
                                                              anyOf:
                                                                - type: string
                                                                  enum:
                                                                    - ack
                                                                - type: string
                                                                  enum:
                                                                    - mod_ack
                                                          additionalProperties: false
                                                        - type: object
                                                          required:
                                                            - enabled
                                                          properties:
                                                            enabled:
                                                              type: boolean
                                                              enum:
                                                                - false
                                                            default:
                                                              anyOf:
                                                                - type: string
                                                                  enum:
                                                                    - ack
                                                                - type: string
                                                                  enum:
                                                                    - mod_ack
                                                          additionalProperties: false
                                                    response_time_sla_ms:
                                                      type: integer
                                                      minimum: 1
                                                  additionalProperties: false
                                            - type: object
                                              required:
                                                - type
                                                - config
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - sdk
                                                config:
                                                  type: object
                                                  required:
                                                    - namespace
                                                  properties:
                                                    namespace:
                                                      type: string
                                                    signaling:
                                                      anyOf:
                                                        - type: object
                                                          required:
                                                            - enabled
                                                            - default
                                                          properties:
                                                            enabled:
                                                              type: boolean
                                                              enum:
                                                                - true
                                                            default:
                                                              anyOf:
                                                                - type: string
                                                                  enum:
                                                                    - ack
                                                                - type: string
                                                                  enum:
                                                                    - mod_ack
                                                          additionalProperties: false
                                                        - type: object
                                                          required:
                                                            - enabled
                                                          properties:
                                                            enabled:
                                                              type: boolean
                                                              enum:
                                                                - false
                                                            default:
                                                              anyOf:
                                                                - type: string
                                                                  enum:
                                                                    - ack
                                                                - type: string
                                                                  enum:
                                                                    - mod_ack
                                                          additionalProperties: false
                                                    response_time_sla_ms:
                                                      type: integer
                                                      minimum: 1
                                                  additionalProperties: false
                                            - type: object
                                              required:
                                                - type
                                                - config
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - google_pubsub
                                                config:
                                                  type: object
                                                  required:
                                                    - project_id
                                                    - topic_id
                                                  properties:
                                                    project_id:
                                                      type: string
                                                    topic_id:
                                                      type: string
                                                    response_time_sla_ms:
                                                      type: integer
                                                      minimum: 1
                                            - type: object
                                              required:
                                                - type
                                                - config
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - aws_sqs
                                                config:
                                                  type: object
                                                  required:
                                                    - queue_url
                                                  properties:
                                                    queue_url:
                                                      type: string
                                                      format: uri
                                                    region:
                                                      type: string
                                                    response_time_sla_ms:
                                                      type: integer
                                                      minimum: 1
                                            - type: object
                                              required:
                                                - type
                                                - config
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - mcp
                                                config:
                                                  type: object
                                                  required:
                                                    - endpoint
                                                  properties:
                                                    endpoint:
                                                      type: string
                                                      format: uri
                                                    response_time_sla_ms:
                                                      type: integer
                                                      minimum: 1
                                            - type: object
                                              required:
                                                - type
                                                - config
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - default_sink
                                                config:
                                                  type: object
                                                  properties: {}
                                                  additionalProperties: false
                                    updates:
                                      anyOf:
                                        - allOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - webhook
                                                config:
                                                  type: object
                                                  properties:
                                                    url:
                                                      type: string
                                                      format: uri
                                                    headers:
                                                      type: object
                                                      additionalProperties:
                                                        type: string
                                                    signaling:
                                                      anyOf:
                                                        - type: object
                                                          required:
                                                            - enabled
                                                            - default
                                                          properties:
                                                            enabled:
                                                              type: boolean
                                                              enum:
                                                                - true
                                                            default:
                                                              anyOf:
                                                                - type: string
                                                                  enum:
                                                                    - ack
                                                                - type: string
                                                                  enum:
                                                                    - mod_ack
                                                          additionalProperties: false
                                                        - type: object
                                                          required:
                                                            - enabled
                                                          properties:
                                                            enabled:
                                                              type: boolean
                                                              enum:
                                                                - false
                                                            default:
                                                              anyOf:
                                                                - type: string
                                                                  enum:
                                                                    - ack
                                                                - type: string
                                                                  enum:
                                                                    - mod_ack
                                                          additionalProperties: false
                                                    response_time_sla_ms:
                                                      type: integer
                                                      minimum: 1
                                            - type: object
                                              properties:
                                                credential_id:
                                                  anyOf:
                                                    - type: string
                                                      pattern: ^[0-9]+$
                                                    - type: 'null'
                                        - allOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - sdk
                                                config:
                                                  type: object
                                                  properties:
                                                    namespace:
                                                      type: string
                                                    signaling:
                                                      anyOf:
                                                        - type: object
                                                          required:
                                                            - enabled
                                                            - default
                                                          properties:
                                                            enabled:
                                                              type: boolean
                                                              enum:
                                                                - true
                                                            default:
                                                              anyOf:
                                                                - type: string
                                                                  enum:
                                                                    - ack
                                                                - type: string
                                                                  enum:
                                                                    - mod_ack
                                                          additionalProperties: false
                                                        - type: object
                                                          required:
                                                            - enabled
                                                          properties:
                                                            enabled:
                                                              type: boolean
                                                              enum:
                                                                - false
                                                            default:
                                                              anyOf:
                                                                - type: string
                                                                  enum:
                                                                    - ack
                                                                - type: string
                                                                  enum:
                                                                    - mod_ack
                                                          additionalProperties: false
                                                    response_time_sla_ms:
                                                      type: integer
                                                      minimum: 1
                                            - type: object
                                              properties:
                                                credential_id:
                                                  anyOf:
                                                    - type: string
                                                      pattern: ^[0-9]+$
                                                    - type: 'null'
                                        - allOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - google_pubsub
                                                config:
                                                  type: object
                                                  properties:
                                                    project_id:
                                                      type: string
                                                    topic_id:
                                                      type: string
                                                    response_time_sla_ms:
                                                      type: integer
                                                      minimum: 1
                                            - type: object
                                              properties:
                                                credential_id:
                                                  anyOf:
                                                    - type: string
                                                      pattern: ^[0-9]+$
                                                    - type: 'null'
                                        - allOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - aws_sqs
                                                config:
                                                  type: object
                                                  properties:
                                                    queue_url:
                                                      type: string
                                                      format: uri
                                                    region:
                                                      type: string
                                                    response_time_sla_ms:
                                                      type: integer
                                                      minimum: 1
                                            - type: object
                                              properties:
                                                credential_id:
                                                  anyOf:
                                                    - type: string
                                                      pattern: ^[0-9]+$
                                                    - type: 'null'
                                        - allOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - mcp
                                                config:
                                                  type: object
                                                  properties:
                                                    endpoint:
                                                      type: string
                                                      format: uri
                                                    response_time_sla_ms:
                                                      type: integer
                                                      minimum: 1
                                            - type: object
                                              properties:
                                                credential_id:
                                                  anyOf:
                                                    - type: string
                                                      pattern: ^[0-9]+$
                                                    - type: 'null'
                                        - allOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - default_sink
                                                config:
                                                  type: object
                                                  properties: {}
                                            - type: object
                                              properties:
                                                credential_id:
                                                  anyOf:
                                                    - type: string
                                                      pattern: ^[0-9]+$
                                                    - type: 'null'
                                - type: object
                                  required:
                                    - kind
                                    - op
                                    - name
                                    - desired
                                  properties:
                                    kind:
                                      type: string
                                      enum:
                                        - metric_source
                                    op:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - create
                                        - type: string
                                          enum:
                                            - noop
                                        - type: string
                                          enum:
                                            - update
                                    name:
                                      type: string
                                    id:
                                      type: string
                                    desired:
                                      type: object
                                      required:
                                        - name
                                        - kind
                                        - endpoint
                                      properties:
                                        name:
                                          type: string
                                        kind:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - prometheus
                                            - type: string
                                              enum:
                                                - datadog
                                        endpoint:
                                          type: string
                                        poll_interval_seconds:
                                          type: integer
                                        credential:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        config:
                                          anyOf:
                                            - type: object
                                              properties:
                                                path:
                                                  type: string
                                                auth_header:
                                                  type: string
                                                tls_skip_verify:
                                                  type: boolean
                                            - type: object
                                              properties:
                                                scope:
                                                  type: string
                                                namespace:
                                                  type: string
                                            - type: 'null'
                                        status:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - active
                                            - type: string
                                              enum:
                                                - paused
                                        queries:
                                          type: array
                                          items:
                                            type: object
                                            required:
                                              - name
                                            properties:
                                              name:
                                                type: string
                                              status:
                                                anyOf:
                                                  - type: string
                                                    enum:
                                                      - active
                                                  - type: string
                                                    enum:
                                                      - paused
                                              config:
                                                anyOf:
                                                  - type: object
                                                    properties:
                                                      expression:
                                                        type: string
                                                      rollup_seconds:
                                                        type: integer
                                                      window_seconds:
                                                        type: integer
                                                      group_by:
                                                        type: array
                                                        items:
                                                          type: string
                                                      tags:
                                                        type: object
                                                        additionalProperties:
                                                          type: string
                                                  - type: 'null'
                                    updates:
                                      type: object
                                      properties:
                                        status:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - active
                                            - type: string
                                              enum:
                                                - paused
                                        endpoint:
                                          type: string
                                        poll_interval_seconds:
                                          type: integer
                                        credential_id:
                                          anyOf:
                                            - type: string
                                            - type: 'null'
                                        config:
                                          anyOf:
                                            - type: object
                                              properties:
                                                path:
                                                  type: string
                                                auth_header:
                                                  type: string
                                                tls_skip_verify:
                                                  type: boolean
                                            - type: object
                                              properties:
                                                scope:
                                                  type: string
                                                namespace:
                                                  type: string
                                            - type: 'null'
                                - type: object
                                  required:
                                    - kind
                                    - op
                                    - name
                                    - source
                                    - desired
                                  properties:
                                    kind:
                                      type: string
                                      enum:
                                        - metric_source_query
                                    op:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - create
                                        - type: string
                                          enum:
                                            - noop
                                        - type: string
                                          enum:
                                            - update
                                    name:
                                      type: string
                                    id:
                                      type: string
                                    source:
                                      anyOf:
                                        - type: object
                                          required:
                                            - by
                                            - value
                                          properties:
                                            by:
                                              type: string
                                              enum:
                                                - id
                                            value:
                                              type: string
                                        - type: object
                                          required:
                                            - by
                                            - value
                                          properties:
                                            by:
                                              type: string
                                              enum:
                                                - name
                                            value:
                                              type: string
                                    desired:
                                      type: object
                                      required:
                                        - name
                                      properties:
                                        name:
                                          type: string
                                        status:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - active
                                            - type: string
                                              enum:
                                                - paused
                                        config:
                                          anyOf:
                                            - type: object
                                              properties:
                                                expression:
                                                  type: string
                                                rollup_seconds:
                                                  type: integer
                                                window_seconds:
                                                  type: integer
                                                group_by:
                                                  type: array
                                                  items:
                                                    type: string
                                                tags:
                                                  type: object
                                                  additionalProperties:
                                                    type: string
                                            - type: 'null'
                                    update:
                                      type: object
                                      required:
                                        - op
                                        - name
                                      properties:
                                        op:
                                          type: string
                                          enum:
                                            - upsert
                                        id:
                                          type: string
                                        name:
                                          type: string
                                        status:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - active
                                            - type: string
                                              enum:
                                                - paused
                                        config:
                                          anyOf:
                                            - type: object
                                              properties:
                                                expression:
                                                  type: string
                                                rollup_seconds:
                                                  type: integer
                                                window_seconds:
                                                  type: integer
                                                group_by:
                                                  type: array
                                                  items:
                                                    type: string
                                                tags:
                                                  type: object
                                                  additionalProperties:
                                                    type: string
                                            - type: 'null'
                                - type: object
                                  required:
                                    - kind
                                    - op
                                    - desired
                                  properties:
                                    kind:
                                      type: string
                                      enum:
                                        - metric_source_query_policy
                                    op:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - create
                                        - type: string
                                          enum:
                                            - noop
                                        - type: string
                                          enum:
                                            - update
                                    id:
                                      type: string
                                    query_id:
                                      type: string
                                    desired:
                                      type: object
                                      required:
                                        - action_variant
                                        - mode
                                        - query_selector
                                      properties:
                                        action_variant:
                                          type: string
                                        max_series:
                                          type: number
                                        mode:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - discover
                                            - type: string
                                              enum:
                                                - manual
                                        query_selector:
                                          anyOf:
                                            - type: object
                                              required:
                                                - by
                                                - value
                                              properties:
                                                by:
                                                  type: string
                                                  enum:
                                                    - id
                                                value:
                                                  type: string
                                            - type: object
                                              required:
                                                - by
                                                - source
                                                - value
                                              properties:
                                                by:
                                                  type: string
                                                  enum:
                                                    - metric_source_query_name
                                                source:
                                                  anyOf:
                                                    - type: object
                                                      required:
                                                        - by
                                                        - value
                                                      properties:
                                                        by:
                                                          type: string
                                                          enum:
                                                            - id
                                                        value:
                                                          type: string
                                                    - type: object
                                                      required:
                                                        - by
                                                        - value
                                                      properties:
                                                        by:
                                                          type: string
                                                          enum:
                                                            - name
                                                        value:
                                                          type: string
                                                value:
                                                  type: string
                                        selector:
                                          anyOf:
                                            - type: object
                                              additionalProperties:
                                                type: array
                                                items:
                                                  type: string
                                                minItems: 1
                                            - type: 'null'
                                    updates:
                                      type: object
                                      properties:
                                        max_series:
                                          anyOf:
                                            - type: number
                                            - type: 'null'
                                        mode:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - discover
                                            - type: string
                                              enum:
                                                - manual
                                        selector:
                                          anyOf:
                                            - type: object
                                              additionalProperties:
                                                type: array
                                                items:
                                                  type: string
                                                minItems: 1
                                            - type: 'null'
                                - type: object
                                  required:
                                    - kind
                                    - op
                                    - name
                                    - desired
                                  properties:
                                    kind:
                                      type: string
                                      enum:
                                        - source
                                    op:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - create
                                        - type: string
                                          enum:
                                            - noop
                                        - type: string
                                          enum:
                                            - update
                                    name:
                                      type: string
                                    id:
                                      type: string
                                    desired:
                                      allOf:
                                        - type: object
                                          required:
                                            - name
                                          properties:
                                            name:
                                              type: string
                                            credential:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                                            status:
                                              anyOf:
                                                - type: string
                                                  enum:
                                                    - active
                                                - type: string
                                                  enum:
                                                    - paused
                                            ingest:
                                              type: object
                                              properties:
                                                variant:
                                                  type: string
                                                version:
                                                  type: integer
                                                  minimum: 1
                                              additionalProperties: false
                                        - anyOf:
                                            - type: object
                                              required:
                                                - type
                                                - config
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - aws_sqs
                                                config:
                                                  type: object
                                                  required:
                                                    - queue_url
                                                    - region
                                                  properties:
                                                    queue_url:
                                                      type: string
                                                      format: uri
                                                    region:
                                                      type: string
                                            - type: object
                                              required:
                                                - type
                                                - config
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - google_pubsub
                                                config:
                                                  type: object
                                                  required:
                                                    - project_id
                                                    - subscription_id
                                                  properties:
                                                    project_id:
                                                      type: string
                                                    subscription_id:
                                                      type: string
                                    updates:
                                      allOf:
                                        - anyOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - aws_sqs
                                                config:
                                                  type: object
                                                  properties:
                                                    queue_url:
                                                      type: string
                                                      format: uri
                                                    region:
                                                      type: string
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - google_pubsub
                                                config:
                                                  type: object
                                                  properties:
                                                    project_id:
                                                      type: string
                                                    subscription_id:
                                                      type: string
                                        - type: object
                                          properties:
                                            status:
                                              anyOf:
                                                - type: string
                                                  enum:
                                                    - active
                                                - type: string
                                                  enum:
                                                    - paused
                                            ingest:
                                              type: object
                                              properties:
                                                variant:
                                                  type: string
                                                version:
                                                  type: integer
                                                  minimum: 1
                                              additionalProperties: false
                                            credential_id:
                                              anyOf:
                                                - type: string
                                                - type: 'null'
                          status:
                            anyOf:
                              - type: string
                                enum:
                                  - planned
                              - type: string
                                enum:
                                  - applying
                              - type: string
                                enum:
                                  - applied
                              - type: string
                                enum:
                                  - failed
                          error_message:
                            anyOf:
                              - type: string
                              - type: 'null'
                          updated_at:
                            type: string
                            format: date-time
                          applied_at:
                            anyOf:
                              - type: string
                                format: date-time
                              - type: 'null'
                      - type: 'null'
                  errors:
                    anyOf:
                      - type: array
                        items:
                          type: object
                          required:
                            - code
                            - message
                          properties:
                            code:
                              type: string
                            message:
                              type: string
                      - type: 'null'
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - errors
                properties:
                  data:
                    anyOf:
                      - type: 'null'
                      - type: 'null'
                  errors:
                    anyOf:
                      - type: array
                        items:
                          type: object
                          required:
                            - code
                            - message
                          properties:
                            code:
                              type: string
                            message:
                              type: string
                      - type: 'null'
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - errors
                properties:
                  data:
                    anyOf:
                      - type: 'null'
                      - type: 'null'
                  errors:
                    anyOf:
                      - type: array
                        items:
                          type: object
                          required:
                            - code
                            - message
                          properties:
                            code:
                              type: string
                            message:
                              type: string
                      - type: 'null'
components:
  securitySchemes:
    apiKey:
      type: apiKey
      name: x-arklow-auth
      in: header

````