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

# Run a homologation scenario

> Evaluates the scenario's pass criterion against the rail's own persisted state and readiness — the registered local certificate and trust store, the relayed-message ledger, the settlement cycles — and records the run with its evidence document. Nothing is injected onto the wire. A criterion that does not hold, and a criterion whose underlying state could not be read, both record a FAILED run carrying the reason; neither is reported as passing. A scenario with a run already in progress is a 409. Run history persists and is exportable.



## OpenAPI

````yaml /es/openapi/v3-current/siloc.yaml post /api/v1/siloc/homologation/scenarios/{scenarioId}/runs
openapi: 3.1.0
info:
  description: >-
    OpenAPI 3.1 surface for Lerian SILOC, the participant-side rail connecting
    the institution to Núclea's SILOC deferred-net interbank settlement.
  title: Lerian SILOC API
  version: 1.0.0
servers:
  - url: https://siloc.sandbox.lerian.net
security: []
paths:
  /api/v1/siloc/homologation/scenarios/{scenarioId}/runs:
    post:
      tags:
        - Onboarding
      summary: Run a homologation scenario
      description: >-
        Evaluates the scenario's pass criterion against the rail's own persisted
        state and readiness — the registered local certificate and trust store,
        the relayed-message ledger, the settlement cycles — and records the run
        with its evidence document. Nothing is injected onto the wire. A
        criterion that does not hold, and a criterion whose underlying state
        could not be read, both record a FAILED run carrying the reason; neither
        is reported as passing. A scenario with a run already in progress is a
        409. Run history persists and is exportable.
      operationId: runHomologationScenario
      parameters:
        - description: >-
            Idempotency key for this state-changing request (required, max 255
            characters).
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: >-
              Idempotency key for this state-changing request (required, max 255
              characters).
            maxLength: 255
            type: string
        - description: The scenario to run.
          in: path
          name: scenarioId
          required: true
          schema:
            description: The scenario to run.
            format: uuid
            type: string
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HomologationRunResponse'
          description: Created
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
      security:
        - BearerAuth: []
components:
  schemas:
    HomologationRunResponse:
      additionalProperties: false
      properties:
        evidenceRef:
          description: >-
            The captured run evidence, a JSON document naming the criterion, the
            verdict, the reason, and the facts observed. Omitted while a run is
            still in progress.
          type: string
        finishedAt:
          description: >-
            When the outcome was recorded; omitted while a run is still in
            progress.
          format: date-time
          type: string
        id:
          description: Run id.
          format: uuid
          type: string
        scenarioId:
          description: The scenario this run certifies.
          format: uuid
          type: string
        startedAt:
          description: When the run was claimed.
          format: date-time
          type: string
        status:
          description: Run outcome.
          enum:
            - NOT_STARTED
            - IN_PROGRESS
            - PASSED
            - FAILED
          type: string
      required:
        - id
        - scenarioId
        - status
        - startedAt
      type: object
    Detail:
      additionalProperties: true
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
        upstream:
          $ref: '#/components/schemas/Upstream'
          description: >-
            RFC 9457 extension member: the error a proxied third-party provider
            reported. Absent unless the emitting service explicitly surfaced
            one.
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    Upstream:
      additionalProperties: false
      properties:
        code:
          description: The upstream provider's own error code, verbatim.
          examples:
            - E4001
          type: string
        message:
          description: >-
            The upstream provider's own error message, verbatim (bounded, never
            its raw response body).
          examples:
            - account not found at provider
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````