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

# Execution status

> A non-zero exitCode is still status completed (the code failed, the platform succeeded); status failed means an infrastructure error, which is never charged. stdout/stderr are capped at 64KB each. An exitCode of 124 means the run hit its timeout.



## OpenAPI

````yaml api/openapi.json GET /executions/{id}
openapi: 3.1.0
info:
  title: Amoreg Regulatory Knowledge API
  version: 1.0.0
  description: >-
    Hybrid semantic + keyword search over Amoreg's regulatory knowledge base,
    scoped to the jurisdictions enabled for your organisation. Prepaid credits
    in GBP: 2p per search, 2p per screening keyword.
servers:
  - url: https://app.amoreg.com/api/v1
security:
  - apiKey: []
paths:
  /executions/{id}:
    get:
      summary: Execution run status and output
      description: >-
        A non-zero exitCode is still status completed (the code failed, the
        platform succeeded); status failed means an infrastructure error, which
        is never charged. stdout/stderr are capped at 64KB each. An exitCode of
        124 means the run hit its timeout.
      operationId: getExecution
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The execution run
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  status:
                    type: string
                    enum:
                      - pending
                      - running
                      - completed
                      - failed
                  exitCode:
                    type: integer
                    nullable: true
                  stdout:
                    type: string
                    nullable: true
                  stderr:
                    type: string
                    nullable: true
                  durationMs:
                    type: integer
                    nullable: true
                  error:
                    type: string
                    nullable: true
                  createdAt:
                    type: string
                    format: date-time
                  completedAt:
                    type: string
                    format: date-time
                    nullable: true
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        details:
          type: string
      required:
        - error
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        Organisation API key created in the dashboard (format: amrg_live_…).
        Sent as `Authorization: Bearer amrg_live_…`.

````