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

# Inspect a workflow's accepted graph and live execution state

> Returns the base graph plus accepted additive grafts. Task payloads are never returned.



## OpenAPI

````yaml /api/headgate.openapi.yaml get /workflows/{id}
openapi: 3.1.0
info:
  title: headgate control API
  version: 0.1.0
  description: >
    The web UI is one client of this control API and gets no

    privileged access — asynqmon reads Redis directly, which is why its
    compatibility

    note is three minor versions stale.


    Both the Go and Rust implementations serve this spec, and the conformance
    suite

    asserts identical responses. Every list endpoint is bounded to prevent
    inspection

    from becoming an unbounded store operation: asynq's

    GetQueueInfo is O(number of groups) and has pinned Redis CPU for seconds in

    production. Monitoring caused the outage.


    DERIVED FROM THE ARCHITECTURE, NOT FROM A PREDECESSOR'S UI. The first draft
    of this

    spec was the asynq Inspector surface -- list by state, act on one job, pause
    a queue

    -- with new nouns bolted on. That inherited three problems: it omitted bulk

    operations, history, and enqueue (which asynq and apalis-board respectively
    DO have),

    and more importantly it had no endpoint for the question this system's own
    design

    creates. When dequeue is an admission decision, the operator's first
    question is not

    "what is in the queue" but "why is THIS job not running" -- see
    /jobs/{id}/admission.

    No predecessor needs that endpoint because no predecessor has a gate.
servers:
  - url: /api/v1
security: []
paths:
  /workflows/{id}:
    get:
      summary: Inspect a workflow's accepted graph and live execution state
      description: >-
        Returns the base graph plus accepted additive grafts. Task payloads are
        never returned.
      parameters:
        - $ref: '#/components/parameters/Id'
      responses:
        '200':
          description: Bounded workflow graph snapshot.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowSnapshot'
        '404':
          description: Workflow not found
components:
  parameters:
    Id:
      name: id
      in: path
      required: true
      schema:
        type: string
  schemas:
    WorkflowSnapshot:
      type: object
      required:
        - workflow_id
        - coordinator_job_id
        - coordinator_state
        - revision
        - generation
        - failed
        - failed_subgraph_retry
        - nodes
      properties:
        workflow_id:
          type: string
        coordinator_job_id:
          type: string
        coordinator_state:
          type: string
        revision:
          type: integer
          minimum: 1
        generation:
          type: integer
          minimum: 1
        failed:
          type: boolean
        failed_subgraph_retry:
          type: boolean
        retry_policy:
          type: object
          required:
            - max_generations
            - backoff_ms
          properties:
            max_generations:
              type: integer
              minimum: 1
            backoff_ms:
              type: integer
              minimum: 1
        nodes:
          type: array
          maxItems: 999
          items:
            $ref: '#/components/schemas/WorkflowNode'
    WorkflowNode:
      type: object
      required:
        - name
        - job_id
        - kind
        - job_kind
        - state
        - dependencies
        - dependents
      properties:
        name:
          type: string
        job_id:
          type: string
        kind:
          type: string
          enum:
            - task
            - signal
            - timer
            - child_workflow
            - condition
        job_kind:
          type: string
        state:
          type: string
          description: >-
            May be `missing` when retention removed an unfinished node before
            inspection.
        dependencies:
          type: array
          items:
            type: string
        dependents:
          type: array
          items:
            type: string
        signal:
          type: string
        wake_at_ms:
          type: integer
        delay_ms:
          type: integer
        child_workflow_id:
          type: string
        condition:
          type: string
        completed_at_ms:
          type: integer

````