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

# Lightweight heartbeat

> Returns the current build identifier. Used for quick liveness probes.



## OpenAPI

````yaml /openapi/private/specs/services/workflow.yml get /workflow/hb
openapi: 3.1.0
info:
  title: Workflow Service API
  description: >
    Manages workflow runs and step-by-step state machine execution. Workflows

    are used to orchestrate multi-step processes like sage culture generation.


    ## Authentication

    All endpoints require authentication via API key:

    - **API Key**: Pass the key in the `X-Auth` header (service-to-service
    calls)


    ## Workflow Model

    - **Workflow Steps** (templates) define the step sequence for a workflow
    `type`

    - **Runs** are instances of a workflow type, tracking state and progress

    - **Run Steps** are materialized copies of template steps for each run


    ## State Machine

    ### Run States

    - `queued` -- created but not yet started

    - `running` -- actively progressing through steps

    - `finished` -- all steps completed successfully

    - `failed` -- a step failed or was executed out of order

    - `canceled` -- manually cancelled


    ### Step States

    - `pending` -- waiting to start

    - `running` -- actively executing

    - `finished` -- completed successfully

    - `failed` -- execution failed


    ## Business Rules

    - Steps must be executed in order; out-of-order transitions fail the entire
    run

    - A run cannot be transitioned if already finished, failed, or cancelled

    - Only one step can be running at a time

    - Cancelling a run fails all pending/running steps

    - The response `meta` object includes `steps`, `current_step`, `next_step`,
      `previous_step`, `first_step`, and `last_step` navigation aids
  version: 1.0.0
  contact:
    name: Platform Team
servers:
  - url: '{protocol}://{host}:{port}'
    description: Workflow Service
    variables:
      protocol:
        default: https
        enum:
          - http
          - https
      host:
        default: localhost
      port:
        default: '5000'
security: []
tags:
  - name: Workflow
    description: Workflow run management and step transitions
  - name: Service
    description: Health checks and initialization
paths:
  /workflow/hb:
    get:
      tags:
        - Service
      summary: Lightweight heartbeat
      description: Returns the current build identifier. Used for quick liveness probes.
      operationId: heartbeat
      responses:
        '200':
          description: Service is alive
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Current build identifier
              example:
                message: 1.0.0-abc1234
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - apiKeyAuth: []
components:
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            noApiKey:
              summary: Missing API key
              value:
                error: Unauthorized - API key required
            invalidApiKey:
              summary: Invalid API key
              value:
                error: Unauthorized - Invalid API key
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Auth
      description: Service-to-service API key

````