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

# Save a scenario revision

> Requires `runs:write`. Set expectedRevision to null to create a scenario ID, or to its exact current revision to append. A stale revision conflicts; no saved revision or run is overwritten.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/scenarios
openapi: 3.1.0
info:
  title: Firedrill API
  version: '2026-10-14'
  description: >-
    Authenticated simulation coordination, retained evidence and controlled
    Tools. Your customer-owned runner executes the target. This reference covers
    the documented JSON workflows; Tool-native HTTP routes and MCP methods are
    discovered from the selected Tool. Structural schemas do not replace
    canonical validation or capability checks.
servers:
  - url: https://api.firedrill.run
security:
  - FiredrillCredential: []
tags:
  - name: discovery
    description: Capabilities, authority and structural authoring schemas.
  - name: projects
    description: Projects and their logical environment.
  - name: simulations
    description: Preparation, queued batches and cancellation.
  - name: runs
    description: Individual recorded executions.
  - name: reports
    description: Retained observations, distributions and descriptive comparisons.
  - name: assessment
    description: Optional semantic assessment and authored scenario ranking.
  - name: evidence
    description: Authenticated captured files.
  - name: runner-protocol
    description: Advanced customer-runner coordination; native SDKs manage this protocol.
  - name: scenarios
    description: Immutable retained versions of repository-authored scenarios.
  - name: credentials
    description: Expiring scoped CI credentials.
  - name: authentication
    description: Human-approved sign-in boundaries.
  - name: tools
    description: Tool releases, data, instances and observations.
  - name: tool-connections
    description: Bounded target/manual grants, separate from control authority.
  - name: tool-lifecycle
    description: Epoch-fenced reusable Tool actions and exact-key recovery.
paths:
  /v1/scenarios:
    post:
      tags:
        - scenarios
      summary: Save a scenario revision
      description: >-
        Requires `runs:write`. Set expectedRevision to null to create a scenario
        ID, or to its exact current revision to append. A stale revision
        conflicts; no saved revision or run is overwritten.
      operationId: scenarios_save
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScenarioSaveInput'
      responses:
        '200':
          description: The retained resource or operation response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SavedScenario'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '410':
          $ref: '#/components/responses/Gone'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
        '422':
          $ref: '#/components/responses/InvalidInput'
        '429':
          $ref: '#/components/responses/Capacity'
        '500':
          $ref: '#/components/responses/Internal'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      description: >-
        Save a unique stable key for this exact logical action, at most 200
        characters. Reuse it with identical input after an uncertain response. A
        new key is new intent; it must not be used merely to recover an accepted
        action.
      schema:
        type: string
        minLength: 1
        maxLength: 200
  schemas:
    ScenarioSaveInput:
      type: object
      properties:
        projectId:
          type: string
          minLength: 1
          maxLength: 160
        environmentId:
          type: string
          minLength: 1
          maxLength: 160
        schemaVersion:
          type: string
          const: 2026-10-14-preparation.1
        scenario:
          $ref: '#/components/schemas/ScenarioInput'
        expectedRevision:
          anyOf:
            - type: string
              pattern: ^[a-f0-9]{64}$
            - type: 'null'
      required:
        - projectId
        - environmentId
        - schemaVersion
        - scenario
        - expectedRevision
      additionalProperties: false
    SavedScenario:
      type: object
      properties:
        schemaVersion:
          type: string
          const: 2026-10-14-preparation.1
        projectId:
          type: string
        environmentId:
          type: string
        id:
          type: string
        revision:
          type: string
        scenario:
          $ref: '#/components/schemas/Scenario'
        createdAt:
          type: string
      required:
        - schemaVersion
        - projectId
        - environmentId
        - id
        - revision
        - scenario
        - createdAt
    ScenarioInput:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 160
        name:
          type: string
          minLength: 1
          maxLength: 200
        input:
          $ref: '#/components/schemas/JsonValue'
        description:
          type: string
          maxLength: 4000
        checks:
          default: []
          maxItems: 100
          type: array
          items:
            $ref: '#/components/schemas/ExactCheckInput'
        rubric:
          $ref: '#/components/schemas/RubricInput'
        metrics:
          minItems: 1
          maxItems: 32
          type: array
          items:
            $ref: '#/components/schemas/TaskMetricDefinitionInput'
        serviceDatasets:
          type: object
          propertyNames:
            type: string
            pattern: ^[a-z][a-z0-9_-]{0,63}$
          additionalProperties:
            type: string
            minLength: 1
            maxLength: 160
        sequence:
          $ref: '#/components/schemas/SequenceInput'
      required:
        - id
        - name
        - input
      additionalProperties: false
    Scenario:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        input:
          $ref: '#/components/schemas/JsonValue'
        checks:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              description:
                type: string
              path:
                type: string
              comparator:
                type: string
                enum:
                  - equals
                  - contains
                  - exists
                  - lte
                  - gte
              required:
                type: boolean
              expected:
                anyOf:
                  - type: 'null'
                  - type: string
                  - type: number
                  - type: boolean
                    const: false
                  - type: boolean
                    const: true
                  - type: array
                    items:
                      $ref: '#/components/schemas/JsonValue'
                  - type: object
                    properties: {}
                    required: []
                    additionalProperties:
                      $ref: '#/components/schemas/JsonValue'
              source:
                anyOf:
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: service_state
                      namespace:
                        type: string
                      rowId:
                        type: string
                      schemaVersion:
                        type: string
                        const: 2026-10-15-effect-check.1
                      service:
                        type: string
                    required:
                      - kind
                      - namespace
                      - rowId
                      - schemaVersion
                      - service
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: service_activity
                      schemaVersion:
                        type: string
                        const: 2026-10-15-effect-check.1
                      service:
                        type: string
                      where:
                        anyOf:
                          - type: object
                            properties:
                              path:
                                type: string
                              equals:
                                $ref: '#/components/schemas/JsonValue'
                            required:
                              - path
                              - equals
                    required:
                      - kind
                      - schemaVersion
                      - service
                  - type: object
                    properties:
                      kind:
                        type: string
                        const: service_pending
                      schemaVersion:
                        type: string
                        const: 2026-10-15-effect-check.1
                      service:
                        type: string
                    required:
                      - kind
                      - schemaVersion
                      - service
              numeric:
                anyOf:
                  - $ref: '#/components/schemas/NumericCheck'
            required:
              - id
              - description
              - path
              - comparator
              - required
        description:
          anyOf:
            - type: string
        rubric:
          anyOf:
            - type: object
              properties:
                id:
                  type: string
                version:
                  type: string
                dimensions:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      description:
                        type: string
                      anchors:
                        type: array
                        prefixItems:
                          - type: string
                          - type: string
                          - type: string
                          - type: string
                          - type: string
                        minItems: 5
                        maxItems: 5
                      evidenceKinds:
                        anyOf:
                          - type: array
                            items:
                              type: string
                              enum:
                                - image
                                - text
                                - audio
                                - video
                      applicability:
                        anyOf:
                          - type: object
                            properties:
                              state:
                                type: string
                                const: applicable
                            required:
                              - state
                          - type: object
                            properties:
                              state:
                                type: string
                                const: not_applicable
                              reason:
                                type: string
                            required:
                              - state
                              - reason
                      missingEvidence:
                        type: string
                        enum:
                          - not_assessable
                    required:
                      - id
                      - description
                      - anchors
                composite:
                  anyOf:
                    - $ref: '#/components/schemas/CompositePolicy'
                policyVersion:
                  type: string
                  enum:
                    - 2026-10-15-assessment.1
              required:
                - id
                - version
                - dimensions
        metrics:
          anyOf:
            - type: array
              items:
                $ref: '#/components/schemas/TaskMetricDefinition'
        serviceDatasets:
          anyOf:
            - type: object
              properties: {}
              required: []
              additionalProperties:
                type: string
        sequence:
          anyOf:
            - type: object
              properties:
                schemaVersion:
                  type: string
                  const: 2026-10-14-sequence.1
                steps:
                  type: array
                  items:
                    $ref: '#/components/schemas/SequenceStep'
              required:
                - schemaVersion
                - steps
      required:
        - id
        - name
        - input
        - checks
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            repair:
              type: string
            requestId:
              type: string
            details:
              anyOf:
                - type: 'null'
                - type: string
                - type: number
                - type: boolean
                  const: false
                - type: boolean
                  const: true
                - type: array
                  items:
                    $ref: '#/components/schemas/JsonValue'
                - type: object
                  properties: {}
                  required: []
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            validation:
              anyOf:
                - $ref: '#/components/schemas/ValidationDiagnostics'
          required:
            - code
            - message
            - repair
            - requestId
      required:
        - error
    JsonValue:
      description: >-
        Any JSON value: null, boolean, finite number, string, array or object.
        The request transport must contain valid JSON; canonical validation
        rejects nonfinite numbers.
    ExactCheckInput:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 160
        description:
          type: string
          minLength: 1
          maxLength: 2000
        path:
          type: string
          maxLength: 1000
        comparator:
          type: string
          enum:
            - equals
            - contains
            - exists
            - lte
            - gte
        expected:
          $ref: '#/components/schemas/JsonValue'
        required:
          default: true
          type: boolean
        source:
          oneOf:
            - type: object
              properties:
                schemaVersion:
                  type: string
                  const: 2026-10-15-effect-check.1
                service:
                  type: string
                  pattern: ^[a-z][a-z0-9_-]{0,63}$
                kind:
                  type: string
                  const: service_state
                namespace:
                  type: string
                  minLength: 1
                  maxLength: 160
                rowId:
                  type: string
                  minLength: 1
                  maxLength: 512
              required:
                - schemaVersion
                - service
                - kind
                - namespace
                - rowId
              additionalProperties: false
            - type: object
              properties:
                schemaVersion:
                  type: string
                  const: 2026-10-15-effect-check.1
                service:
                  type: string
                  pattern: ^[a-z][a-z0-9_-]{0,63}$
                kind:
                  type: string
                  const: service_activity
                where:
                  type: object
                  properties:
                    path:
                      type: string
                      maxLength: 1000
                    equals:
                      $ref: '#/components/schemas/JsonValue'
                  required:
                    - path
                    - equals
                  additionalProperties: false
              required:
                - schemaVersion
                - service
                - kind
              additionalProperties: false
            - type: object
              properties:
                schemaVersion:
                  type: string
                  const: 2026-10-15-effect-check.1
                service:
                  type: string
                  pattern: ^[a-z][a-z0-9_-]{0,63}$
                kind:
                  type: string
                  const: service_pending
              required:
                - schemaVersion
                - service
                - kind
              additionalProperties: false
        numeric:
          type: object
          properties:
            schemaVersion:
              type: string
              const: 2026-10-16-numeric-check.1
            unit:
              type: string
              minLength: 1
              maxLength: 64
            absoluteTolerance:
              default: 0
              type: number
              minimum: 0
          required:
            - schemaVersion
            - unit
          additionalProperties: false
      required:
        - id
        - description
        - path
        - comparator
      additionalProperties: false
    RubricInput:
      type: object
      properties:
        composite:
          $ref: '#/components/schemas/CompositePolicyInput'
        id:
          type: string
          minLength: 1
          maxLength: 160
        version:
          type: string
          minLength: 1
          maxLength: 160
        policyVersion:
          type: string
          const: 2026-10-15-assessment.1
        dimensions:
          minItems: 1
          maxItems: 12
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
                maxLength: 160
              description:
                type: string
                minLength: 1
                maxLength: 4000
              anchors:
                type: array
                prefixItems:
                  - type: string
                    minLength: 1
                    maxLength: 4000
                  - type: string
                    minLength: 1
                    maxLength: 4000
                  - type: string
                    minLength: 1
                    maxLength: 4000
                  - type: string
                    minLength: 1
                    maxLength: 4000
                  - type: string
                    minLength: 1
                    maxLength: 4000
              evidenceKinds:
                minItems: 1
                maxItems: 4
                type: array
                items:
                  type: string
                  enum:
                    - text
                    - image
                    - audio
                    - video
              applicability:
                oneOf:
                  - type: object
                    properties:
                      state:
                        type: string
                        const: applicable
                    required:
                      - state
                    additionalProperties: false
                  - type: object
                    properties:
                      state:
                        type: string
                        const: not_applicable
                      reason:
                        type: string
                        minLength: 1
                        maxLength: 2000
                    required:
                      - state
                      - reason
                    additionalProperties: false
              missingEvidence:
                type: string
                const: not_assessable
            required:
              - id
              - description
              - anchors
            additionalProperties: false
      required:
        - id
        - version
        - dimensions
      additionalProperties: false
      description: >-
        Five ordered task-specific anchors represent levels 0–4. Structural JSON
        Schema cannot enforce unique IDs, applicability policy, comparator rules
        or all cross-field constraints; use recipe preview.
    TaskMetricDefinitionInput:
      type: object
      properties:
        schemaVersion:
          type: string
          const: 2026-10-16-task-metric.1
        id:
          type: string
          minLength: 1
          maxLength: 160
        label:
          type: string
          minLength: 1
          maxLength: 200
        path:
          type: string
          maxLength: 1000
        unit:
          type: string
          minLength: 1
          maxLength: 64
        direction:
          type: string
          enum:
            - higher_is_better
            - lower_is_better
            - neutral
        source:
          oneOf:
            - type: object
              properties:
                schemaVersion:
                  type: string
                  const: 2026-10-15-effect-check.1
                service:
                  type: string
                  pattern: ^[a-z][a-z0-9_-]{0,63}$
                kind:
                  type: string
                  const: service_state
                namespace:
                  type: string
                  minLength: 1
                  maxLength: 160
                rowId:
                  type: string
                  minLength: 1
                  maxLength: 512
              required:
                - schemaVersion
                - service
                - kind
                - namespace
                - rowId
              additionalProperties: false
            - type: object
              properties:
                schemaVersion:
                  type: string
                  const: 2026-10-15-effect-check.1
                service:
                  type: string
                  pattern: ^[a-z][a-z0-9_-]{0,63}$
                kind:
                  type: string
                  const: service_activity
                where:
                  type: object
                  properties:
                    path:
                      type: string
                      maxLength: 1000
                    equals:
                      $ref: '#/components/schemas/JsonValue'
                  required:
                    - path
                    - equals
                  additionalProperties: false
              required:
                - schemaVersion
                - service
                - kind
              additionalProperties: false
            - type: object
              properties:
                schemaVersion:
                  type: string
                  const: 2026-10-15-effect-check.1
                service:
                  type: string
                  pattern: ^[a-z][a-z0-9_-]{0,63}$
                kind:
                  type: string
                  const: service_pending
              required:
                - schemaVersion
                - service
                - kind
              additionalProperties: false
      required:
        - schemaVersion
        - id
        - label
        - path
        - unit
      additionalProperties: false
    SequenceInput:
      type: object
      properties:
        schemaVersion:
          type: string
          const: 2026-10-14-sequence.1
        steps:
          minItems: 1
          maxItems: 10000
          type: array
          items:
            oneOf:
              - type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    maxLength: 160
                  when:
                    type: object
                    properties:
                      path:
                        type: string
                        maxLength: 1000
                      comparator:
                        type: string
                        enum:
                          - equals
                          - contains
                          - exists
                          - lte
                          - gte
                      expected:
                        $ref: '#/components/schemas/JsonValue'
                      step:
                        type: string
                        minLength: 1
                        maxLength: 160
                    required:
                      - path
                      - comparator
                      - step
                    additionalProperties: false
                  kind:
                    type: string
                    const: target
                  input:
                    $ref: '#/components/schemas/JsonValue'
                required:
                  - id
                  - kind
                additionalProperties: false
              - type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    maxLength: 160
                  when:
                    type: object
                    properties:
                      path:
                        type: string
                        maxLength: 1000
                      comparator:
                        type: string
                        enum:
                          - equals
                          - contains
                          - exists
                          - lte
                          - gte
                      expected:
                        $ref: '#/components/schemas/JsonValue'
                      step:
                        type: string
                        minLength: 1
                        maxLength: 160
                    required:
                      - path
                      - comparator
                      - step
                    additionalProperties: false
                  kind:
                    type: string
                    const: service
                  service:
                    type: string
                    pattern: ^[a-z][a-z0-9_-]{0,63}$
                  operationId:
                    type: string
                    minLength: 1
                    maxLength: 160
                  arguments:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      $ref: '#/components/schemas/JsonValue'
                required:
                  - id
                  - kind
                  - service
                  - operationId
                  - arguments
                additionalProperties: false
              - type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    maxLength: 160
                  when:
                    type: object
                    properties:
                      path:
                        type: string
                        maxLength: 1000
                      comparator:
                        type: string
                        enum:
                          - equals
                          - contains
                          - exists
                          - lte
                          - gte
                      expected:
                        $ref: '#/components/schemas/JsonValue'
                      step:
                        type: string
                        minLength: 1
                        maxLength: 160
                    required:
                      - path
                      - comparator
                      - step
                    additionalProperties: false
                  kind:
                    type: string
                    const: wait_for
                  service:
                    type: string
                    pattern: ^[a-z][a-z0-9_-]{0,63}$
                  operationId:
                    type: string
                    minLength: 1
                    maxLength: 160
                  arguments:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      $ref: '#/components/schemas/JsonValue'
                  until:
                    type: object
                    properties:
                      path:
                        type: string
                        maxLength: 1000
                      comparator:
                        type: string
                        enum:
                          - equals
                          - contains
                          - exists
                          - lte
                          - gte
                      expected:
                        $ref: '#/components/schemas/JsonValue'
                    required:
                      - path
                      - comparator
                    additionalProperties: false
                  maxAttempts:
                    type: integer
                    minimum: 1
                    maximum: 100000
                  intervalMs:
                    type: integer
                    minimum: 100
                    maximum: 60000
                required:
                  - id
                  - kind
                  - service
                  - operationId
                  - arguments
                  - until
                  - maxAttempts
                  - intervalMs
                additionalProperties: false
              - type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    maxLength: 160
                  when:
                    type: object
                    properties:
                      path:
                        type: string
                        maxLength: 1000
                      comparator:
                        type: string
                        enum:
                          - equals
                          - contains
                          - exists
                          - lte
                          - gte
                      expected:
                        $ref: '#/components/schemas/JsonValue'
                      step:
                        type: string
                        minLength: 1
                        maxLength: 160
                    required:
                      - path
                      - comparator
                      - step
                    additionalProperties: false
                  kind:
                    type: string
                    const: advance_time
                  service:
                    type: string
                    pattern: ^[a-z][a-z0-9_-]{0,63}$
                  toUs:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  maxEvents:
                    default: 100
                    type: integer
                    minimum: 1
                    maximum: 1000
                required:
                  - id
                  - kind
                  - service
                  - toUs
                additionalProperties: false
              - type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    maxLength: 160
                  when:
                    type: object
                    properties:
                      path:
                        type: string
                        maxLength: 1000
                      comparator:
                        type: string
                        enum:
                          - equals
                          - contains
                          - exists
                          - lte
                          - gte
                      expected:
                        $ref: '#/components/schemas/JsonValue'
                      step:
                        type: string
                        minLength: 1
                        maxLength: 160
                    required:
                      - path
                      - comparator
                      - step
                    additionalProperties: false
                  kind:
                    type: string
                    const: snapshot
                  service:
                    type: string
                    pattern: ^[a-z][a-z0-9_-]{0,63}$
                required:
                  - id
                  - kind
                  - service
                additionalProperties: false
              - type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    maxLength: 160
                  when:
                    type: object
                    properties:
                      path:
                        type: string
                        maxLength: 1000
                      comparator:
                        type: string
                        enum:
                          - equals
                          - contains
                          - exists
                          - lte
                          - gte
                      expected:
                        $ref: '#/components/schemas/JsonValue'
                      step:
                        type: string
                        minLength: 1
                        maxLength: 160
                    required:
                      - path
                      - comparator
                      - step
                    additionalProperties: false
                  kind:
                    type: string
                    const: restore
                  service:
                    type: string
                    pattern: ^[a-z][a-z0-9_-]{0,63}$
                  snapshotStepId:
                    type: string
                    minLength: 1
                    maxLength: 160
                  boundary:
                    type: string
                    const: service_only
                required:
                  - id
                  - kind
                  - service
                  - snapshotStepId
                  - boundary
                additionalProperties: false
      required:
        - schemaVersion
        - steps
      additionalProperties: false
    NumericCheck:
      type: object
      properties:
        schemaVersion:
          type: string
          const: 2026-10-16-numeric-check.1
        unit:
          type: string
        absoluteTolerance:
          type: number
      required:
        - schemaVersion
        - unit
        - absoluteTolerance
    CompositePolicy:
      type: object
      properties:
        schemaVersion:
          type: string
          const: 2026-10-16-composite.1
        method:
          type: string
          const: weighted_mean_ordinal
        weights:
          type: array
          items:
            type: object
            properties:
              dimensionId:
                type: string
              weight:
                type: number
            required:
              - dimensionId
              - weight
      required:
        - schemaVersion
        - method
        - weights
    TaskMetricDefinition:
      type: object
      properties:
        schemaVersion:
          type: string
          const: 2026-10-16-task-metric.1
        id:
          type: string
        label:
          type: string
        path:
          type: string
        unit:
          type: string
        direction:
          type: string
          enum:
            - higher_is_better
            - lower_is_better
            - neutral
        source:
          anyOf:
            - type: object
              properties:
                kind:
                  type: string
                  const: service_state
                namespace:
                  type: string
                rowId:
                  type: string
                schemaVersion:
                  type: string
                  const: 2026-10-15-effect-check.1
                service:
                  type: string
              required:
                - kind
                - namespace
                - rowId
                - schemaVersion
                - service
            - type: object
              properties:
                kind:
                  type: string
                  const: service_activity
                schemaVersion:
                  type: string
                  const: 2026-10-15-effect-check.1
                service:
                  type: string
                where:
                  anyOf:
                    - type: object
                      properties:
                        path:
                          type: string
                        equals:
                          $ref: '#/components/schemas/JsonValue'
                      required:
                        - path
                        - equals
              required:
                - kind
                - schemaVersion
                - service
            - type: object
              properties:
                kind:
                  type: string
                  const: service_pending
                schemaVersion:
                  type: string
                  const: 2026-10-15-effect-check.1
                service:
                  type: string
              required:
                - kind
                - schemaVersion
                - service
      required:
        - schemaVersion
        - id
        - label
        - path
        - unit
    SequenceStep:
      anyOf:
        - type: object
          properties:
            kind:
              type: string
              const: target
            id:
              type: string
            input:
              anyOf:
                - type: 'null'
                - type: string
                - type: number
                - type: boolean
                  const: false
                - type: boolean
                  const: true
                - type: array
                  items:
                    $ref: '#/components/schemas/JsonValue'
                - type: object
                  properties: {}
                  required: []
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            when:
              anyOf:
                - type: object
                  properties:
                    path:
                      type: string
                    comparator:
                      type: string
                      enum:
                        - equals
                        - contains
                        - exists
                        - lte
                        - gte
                    step:
                      type: string
                    expected:
                      anyOf:
                        - type: 'null'
                        - type: string
                        - type: number
                        - type: boolean
                          const: false
                        - type: boolean
                          const: true
                        - type: array
                          items:
                            $ref: '#/components/schemas/JsonValue'
                        - type: object
                          properties: {}
                          required: []
                          additionalProperties:
                            $ref: '#/components/schemas/JsonValue'
                  required:
                    - path
                    - comparator
                    - step
          required:
            - kind
            - id
        - type: object
          properties:
            kind:
              type: string
              const: service
            service:
              type: string
            operationId:
              type: string
            arguments:
              type: object
              properties: {}
              required: []
              additionalProperties:
                $ref: '#/components/schemas/JsonValue'
            id:
              type: string
            when:
              anyOf:
                - type: object
                  properties:
                    path:
                      type: string
                    comparator:
                      type: string
                      enum:
                        - equals
                        - contains
                        - exists
                        - lte
                        - gte
                    step:
                      type: string
                    expected:
                      anyOf:
                        - type: 'null'
                        - type: string
                        - type: number
                        - type: boolean
                          const: false
                        - type: boolean
                          const: true
                        - type: array
                          items:
                            $ref: '#/components/schemas/JsonValue'
                        - type: object
                          properties: {}
                          required: []
                          additionalProperties:
                            $ref: '#/components/schemas/JsonValue'
                  required:
                    - path
                    - comparator
                    - step
          required:
            - kind
            - service
            - operationId
            - arguments
            - id
        - type: object
          properties:
            kind:
              type: string
              const: wait_for
            service:
              type: string
            operationId:
              type: string
            arguments:
              type: object
              properties: {}
              required: []
              additionalProperties:
                $ref: '#/components/schemas/JsonValue'
            until:
              $ref: '#/components/schemas/Predicate'
            maxAttempts:
              type: number
            intervalMs:
              type: number
            id:
              type: string
            when:
              anyOf:
                - type: object
                  properties:
                    path:
                      type: string
                    comparator:
                      type: string
                      enum:
                        - equals
                        - contains
                        - exists
                        - lte
                        - gte
                    step:
                      type: string
                    expected:
                      anyOf:
                        - type: 'null'
                        - type: string
                        - type: number
                        - type: boolean
                          const: false
                        - type: boolean
                          const: true
                        - type: array
                          items:
                            $ref: '#/components/schemas/JsonValue'
                        - type: object
                          properties: {}
                          required: []
                          additionalProperties:
                            $ref: '#/components/schemas/JsonValue'
                  required:
                    - path
                    - comparator
                    - step
          required:
            - kind
            - service
            - operationId
            - arguments
            - until
            - maxAttempts
            - intervalMs
            - id
        - type: object
          properties:
            kind:
              type: string
              const: advance_time
            service:
              type: string
            toUs:
              type: number
            maxEvents:
              type: number
            id:
              type: string
            when:
              anyOf:
                - type: object
                  properties:
                    path:
                      type: string
                    comparator:
                      type: string
                      enum:
                        - equals
                        - contains
                        - exists
                        - lte
                        - gte
                    step:
                      type: string
                    expected:
                      anyOf:
                        - type: 'null'
                        - type: string
                        - type: number
                        - type: boolean
                          const: false
                        - type: boolean
                          const: true
                        - type: array
                          items:
                            $ref: '#/components/schemas/JsonValue'
                        - type: object
                          properties: {}
                          required: []
                          additionalProperties:
                            $ref: '#/components/schemas/JsonValue'
                  required:
                    - path
                    - comparator
                    - step
          required:
            - kind
            - service
            - toUs
            - maxEvents
            - id
        - type: object
          properties:
            kind:
              type: string
              const: snapshot
            service:
              type: string
            id:
              type: string
            when:
              anyOf:
                - type: object
                  properties:
                    path:
                      type: string
                    comparator:
                      type: string
                      enum:
                        - equals
                        - contains
                        - exists
                        - lte
                        - gte
                    step:
                      type: string
                    expected:
                      anyOf:
                        - type: 'null'
                        - type: string
                        - type: number
                        - type: boolean
                          const: false
                        - type: boolean
                          const: true
                        - type: array
                          items:
                            $ref: '#/components/schemas/JsonValue'
                        - type: object
                          properties: {}
                          required: []
                          additionalProperties:
                            $ref: '#/components/schemas/JsonValue'
                  required:
                    - path
                    - comparator
                    - step
          required:
            - kind
            - service
            - id
        - type: object
          properties:
            kind:
              type: string
              const: restore
            service:
              type: string
            snapshotStepId:
              type: string
            boundary:
              type: string
              const: service_only
            id:
              type: string
            when:
              anyOf:
                - type: object
                  properties:
                    path:
                      type: string
                    comparator:
                      type: string
                      enum:
                        - equals
                        - contains
                        - exists
                        - lte
                        - gte
                    step:
                      type: string
                    expected:
                      anyOf:
                        - type: 'null'
                        - type: string
                        - type: number
                        - type: boolean
                          const: false
                        - type: boolean
                          const: true
                        - type: array
                          items:
                            $ref: '#/components/schemas/JsonValue'
                        - type: object
                          properties: {}
                          required: []
                          additionalProperties:
                            $ref: '#/components/schemas/JsonValue'
                  required:
                    - path
                    - comparator
                    - step
          required:
            - kind
            - service
            - snapshotStepId
            - boundary
            - id
    ValidationDiagnostics:
      type: object
      properties:
        issues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
        totalIssues:
          type: number
        omittedIssues:
          type: number
      required:
        - issues
        - totalIssues
        - omittedIssues
    CompositePolicyInput:
      type: object
      properties:
        schemaVersion:
          type: string
          const: 2026-10-16-composite.1
        method:
          type: string
          const: weighted_mean_ordinal
        weights:
          minItems: 1
          maxItems: 12
          type: array
          items:
            type: object
            properties:
              dimensionId:
                type: string
                minLength: 1
                maxLength: 160
              weight:
                type: integer
                minimum: 1
                maximum: 1000
            required:
              - dimensionId
              - weight
            additionalProperties: false
      required:
        - schemaVersion
        - method
        - weights
      additionalProperties: false
    Predicate:
      type: object
      properties:
        path:
          type: string
        comparator:
          type: string
          enum:
            - equals
            - contains
            - exists
            - lte
            - gte
        expected:
          anyOf:
            - type: 'null'
            - type: string
            - type: number
            - type: boolean
              const: false
            - type: boolean
              const: true
            - type: array
              items:
                $ref: '#/components/schemas/JsonValue'
            - type: object
              properties: {}
              required: []
              additionalProperties:
                $ref: '#/components/schemas/JsonValue'
      required:
        - path
        - comparator
    ValidationIssue:
      type: object
      properties:
        path:
          type: array
          items:
            anyOf:
              - type: string
              - type: number
        code:
          type: string
        message:
          type: string
        pathTruncated:
          anyOf:
            - type: boolean
              const: true
      required:
        - path
        - code
        - message
  responses:
    BadRequest:
      description: >-
        Malformed request or missing operation key. Repair the input before
        retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: >-
        Missing, expired or revoked authority. Complete supported sign-in or use
        an authorized credential.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Forbidden:
      description: >-
        The current capability, actor, audience or ownership grant does not
        allow this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    NotFound:
      description: The exact resource is unavailable under the current authority and scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Conflict:
      description: >-
        Selected context, epoch, revision, lease or saved operation intent
        conflicts; inspect retained state.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Gone:
      description: >-
        Retained content is expired, deleted or unavailable under its retention
        fence. Metadata is not a replacement payload.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    PayloadTooLarge:
      description: >-
        Request, response or retained-resource size exceeds this operation’s
        enforced bound.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    UnsupportedMediaType:
      description: Send the documented JSON or exact artifact media type.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    InvalidInput:
      description: >-
        Input failed canonical validation. Inspect error.validation and repair
        the indicated fields.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Capacity:
      description: >-
        Bounded capacity or resource admission rejected the operation. Inspect
        retained work before retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Internal:
      description: >-
        The service could not complete the request. Inspect retained state
        before exact-key recovery.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unavailable:
      description: >-
        A required service, provider or authority check is unavailable. Existing
        evidence remains separate from this failure.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    FiredrillCredential:
      type: http
      scheme: bearer
      description: >-
        Opaque Firedrill interactive or scoped machine credential. The CLI
        handles human-approved login; CI stores its scoped credential as
        FIREDRILL_TOKEN. Capabilities and project/environment ownership are
        rechecked at use.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.