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

# Get a single automation execution



## OpenAPI

````yaml https://portal.unicontrol.me/v1/openapi get /v1/automations/executions/{exec_id}
openapi: 3.1.0
info:
  title: Unicontrol API
  description: Welcome
  version: 1.0.0
servers:
  - url: http://0.0.0.0:3000
    description: Local Server
  - url: https://portal.test.flexhome.casa
    description: Development
  - url: https://portal.unicontrol.me
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/automations/executions/{exec_id}:
    get:
      tags:
        - Automations
      summary: Get a single automation execution
      operationId: getV1AutomationsExecutionsByExec_id
      parameters:
        - in: path
          name: exec_id
          required: true
          schema:
            type: string
          description: UUID da execução
        - in: header
          name: X-Organization-Id
          required: false
          schema:
            type: string
          description: >-
            ID da organização para contexto (opcional). Quando presente, filtra
            recursos da org.
      responses:
        '200':
          description: Execution
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  automation_id:
                    type: integer
                  status:
                    type: string
                    enum:
                      - running
                      - success
                      - failed
                      - cancelled
                  trigger_data:
                    type: object
                    nullable: true
                  error_message:
                    type: string
                    nullable: true
                  started_at:
                    type: string
                    format: date-time
                  finished_at:
                    type: string
                    format: date-time
                    nullable: true
                  user_id:
                    type: string
                  context_id:
                    type: string
                    nullable: true
                    description: Id de correlação com o histórico de estados
                  trigger_path:
                    type: string
                    nullable: true
                    description: 'Gatilho que disparou (ex: trigger/0); nulo = manual'
                  config:
                    type: object
                    nullable: true
                    description: Snapshot da automação no momento da execução
              example:
                id: 5f0c2a8e-3b1d-4c8a-9a51-7d2e4f6b8c10
                automation_id: 1
                status: success
                trigger_data:
                  trigger_type: state
                  entity_id: binary_sensor.porta
                  to: 'on'
                error_message: null
                started_at: '2026-03-17T10:00:00Z'
                finished_at: '2026-03-17T10:00:01Z'
                user_id: user_abc123
                context_id: 5f0c2a8e-3b1d-4c8a-9a51-7d2e4f6b8c10
                trigger_path: trigger/0
                config: null
        '401':
          description: Não autenticado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: unauthorized
        '403':
          description: Acesso negado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: forbidden
        '404':
          description: Recurso não encontrado
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: not found
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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