Hatchet Workflow API

The Workflow API from Hatchet — 16 operation(s) for workflow.

Operations 22

GET /api/v1/tenants/{tenant}/queue-metrics Get Workflow Metrics #
GET /api/v1/tenants/{tenant}/workflows Get Workflows #
GET /api/v1/tenants/{tenant}/workflows/scheduled Get Scheduled Workflow Runs #
GET /api/v1/tenants/{tenant}/workflows/scheduled/{scheduled-workflow-run} Get Scheduled Workflow Run #
DELETE /api/v1/tenants/{tenant}/workflows/scheduled/{scheduled-workflow-run} Delete Scheduled Workflow Run #
PATCH /api/v1/tenants/{tenant}/workflows/scheduled/{scheduled-workflow-run} Update Scheduled Workflow Run #
POST /api/v1/tenants/{tenant}/workflows/scheduled/bulk-delete Bulk Delete Scheduled Workflow Runs #
POST /api/v1/tenants/{tenant}/workflows/scheduled/bulk-update Bulk Update Scheduled Workflow Runs #
GET /api/v1/tenants/{tenant}/workflows/crons Get Cron Job Workflows #
GET /api/v1/tenants/{tenant}/workflows/crons/{cron-workflow} Get Cron Job Workflow Run #
DELETE /api/v1/tenants/{tenant}/workflows/crons/{cron-workflow} Delete Cron Job Workflow Run #
PATCH /api/v1/tenants/{tenant}/workflows/crons/{cron-workflow} Update Cron Job Workflow Run #
GET /api/v1/workflows/{workflow} Get Workflow #
DELETE /api/v1/workflows/{workflow} Delete Workflow #
PATCH /api/v1/workflows/{workflow} Update Workflow #
GET /api/v1/workflows/{workflow}/versions Get Workflow Version #
GET /api/v1/workflows/{workflow}/metrics Get Workflow Metrics #
GET /api/v1/tenants/{tenant}/workflows/{workflow}/worker-count Get Workflow Worker Count #
GET /api/v1/tenants/{tenant}/workflows/runs Get Workflow Runs #
GET /api/v1/tenants/{tenant}/workflows/runs/metrics Get Workflow Runs Metrics #
GET /api/v1/tenants/{tenant}/workflow-runs/{workflow-run} Get Workflow Run #
GET /api/v1/tenants/{tenant}/workflow-runs/{workflow-run}/shape Get Workflow Run #

Documentation

Specifications

Code Examples

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-v1-task-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-v1-workflow-run-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-v1-event-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-v1-filter-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-v1-webhook-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-v1-task-event-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-v1-log-line-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-tenant-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-worker-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-rate-limit-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-api-token-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-workflow-schema.json

Other Resources

🔗
Examples
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/examples/v1-task-get-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/examples/v1-workflow-run-trigger-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/examples/v1-event-create-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/examples/v1-filter-create-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/examples/v1-task-cancel-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/examples/v1-task-replay-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/examples/v1-log-line-list-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/examples/rate-limit-upsert-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/examples/webhook-worker-create-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/examples/worker-list-example.json
🔗
SDKs
https://pypi.org/project/hatchet-sdk/
🔗
SDKs
https://www.npmjs.com/package/@hatchet-dev/typescript-sdk
🔗
SDKs
https://github.com/hatchet-dev/hatchet/tree/main/sdks/go
🔗
SDKs
https://github.com/hatchet-dev/hatchet/tree/main/sdks/ruby
🔗
SelfHosting
https://docs.hatchet.run/self-hosting
🔗
SourceCode
https://github.com/hatchet-dev/hatchet

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/hatchet-workflow-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

hatchet-workflow-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.0.0
  title: Hatchet API Token Workflow API
  description: The Hatchet API
servers:
- url: ''
security:
- bearerAuth: []
- cookieAuth: []
tags:
- name: Workflow
paths:
  /api/v1/tenants/{tenant}/queue-metrics:
    get:
      x-resources:
      - tenant
      description: Get the queue metrics for the tenant
      operationId: tenant:get:queue-metrics
      parameters:
      - description: The tenant id
        in: path
        name: tenant
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: A list of workflow IDs to filter by
        in: query
        name: workflows
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowID'
      - description: A list of metadata key value pairs to filter by
        in: query
        name: additionalMetadata
        example:
        - key1:value1
        - key2:value2
        required: false
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantQueueMetrics'
          description: Successfully retrieved the workflow version metrics
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Not found
      summary: Get Workflow Metrics
      tags:
      - Workflow
  /api/v1/tenants/{tenant}/workflows:
    get:
      x-resources:
      - tenant
      description: Get all workflows for a tenant
      operationId: workflow:list
      parameters:
      - description: The tenant id
        in: path
        name: tenant
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: The number to skip
        in: query
        name: offset
        required: false
        schema:
          type: integer
          format: int
          default: 0
      - description: The number to limit by
        in: query
        name: limit
        required: false
        schema:
          type: integer
          format: int
          default: 50
      - description: Search by name
        in: query
        name: name
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowList'
          description: Successfully retrieved the workflows
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Forbidden
      summary: Get Workflows
      tags:
      - Workflow
  /api/v1/tenants/{tenant}/workflows/scheduled:
    get:
      x-resources:
      - tenant
      description: Get all scheduled workflow runs for a tenant
      operationId: workflow-scheduled:list
      parameters:
      - description: The tenant id
        in: path
        name: tenant
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: The number to skip
        in: query
        name: offset
        required: false
        schema:
          type: integer
          format: int64
      - description: The number to limit by
        in: query
        name: limit
        required: false
        schema:
          type: integer
          format: int64
      - description: The order by field
        in: query
        name: orderByField
        required: false
        schema:
          $ref: '#/components/schemas/ScheduledWorkflowsOrderByField'
      - description: The order by direction
        in: query
        name: orderByDirection
        required: false
        schema:
          $ref: '#/components/schemas/WorkflowRunOrderByDirection'
      - description: The workflow id to get runs for.
        in: query
        name: workflowId
        required: false
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: The parent workflow run id
        in: query
        name: parentWorkflowRunId
        required: false
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: The parent step run id
        in: query
        name: parentStepRunId
        required: false
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: A list of metadata key value pairs to filter by
        in: query
        name: additionalMetadata
        example:
        - key1:value1
        - key2:value2
        required: false
        schema:
          type: array
          items:
            type: string
      - description: A list of scheduled run statuses to filter by
        in: query
        name: statuses
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ScheduledRunStatus'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduledWorkflowsList'
          description: Successfully retrieved the workflow runs
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Forbidden
      summary: Get Scheduled Workflow Runs
      tags:
      - Workflow
  /api/v1/tenants/{tenant}/workflows/scheduled/{scheduled-workflow-run}:
    get:
      x-resources:
      - tenant
      - scheduled-workflow-run
      description: Get a scheduled workflow run for a tenant
      operationId: workflow-scheduled:get
      parameters:
      - description: The tenant id
        in: path
        name: tenant
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: The scheduled workflow id
        in: path
        name: scheduled-workflow-run
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduledWorkflows'
          description: Successfully retrieved the workflow runs
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Forbidden
      summary: Get Scheduled Workflow Run
      tags:
      - Workflow
    delete:
      x-resources:
      - tenant
      - scheduled-workflow-run
      description: Delete a scheduled workflow run for a tenant
      operationId: workflow-scheduled:delete
      parameters:
      - description: The tenant id
        in: path
        name: tenant
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: The scheduled workflow id
        in: path
        name: scheduled-workflow-run
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      responses:
        '204':
          description: Successfully deleted the scheduled workflow run
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Forbidden
      summary: Delete Scheduled Workflow Run
      tags:
      - Workflow
    patch:
      x-resources:
      - tenant
      - scheduled-workflow-run
      description: Update (reschedule) a scheduled workflow run for a tenant
      operationId: workflow-scheduled:update
      parameters:
      - description: The tenant id
        in: path
        name: tenant
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: The scheduled workflow id
        in: path
        name: scheduled-workflow-run
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateScheduledWorkflowRunRequest'
        description: The input to reschedule the workflow run
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduledWorkflows'
          description: Successfully updated the scheduled workflow run
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Not found
      summary: Update Scheduled Workflow Run
      tags:
      - Workflow
  /api/v1/tenants/{tenant}/workflows/scheduled/bulk-delete:
    post:
      x-resources:
      - tenant
      description: Bulk delete scheduled workflow runs for a tenant
      operationId: workflow-scheduled:bulk-delete
      parameters:
      - description: The tenant id
        in: path
        name: tenant
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScheduledWorkflowsBulkDeleteRequest'
        description: The input to bulk delete scheduled workflow runs
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduledWorkflowsBulkDeleteResponse'
          description: Bulk delete response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Forbidden
      summary: Bulk Delete Scheduled Workflow Runs
      tags:
      - Workflow
  /api/v1/tenants/{tenant}/workflows/scheduled/bulk-update:
    post:
      x-resources:
      - tenant
      description: Bulk update (reschedule) scheduled workflow runs for a tenant
      operationId: workflow-scheduled:bulk-update
      parameters:
      - description: The tenant id
        in: path
        name: tenant
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScheduledWorkflowsBulkUpdateRequest'
        description: The input to bulk update scheduled workflow runs
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduledWorkflowsBulkUpdateResponse'
          description: Bulk update response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Forbidden
      summary: Bulk Update Scheduled Workflow Runs
      tags:
      - Workflow
  /api/v1/tenants/{tenant}/workflows/crons:
    get:
      x-resources:
      - tenant
      description: Get all cron job workflow triggers for a tenant
      operationId: cron-workflow:list
      parameters:
      - description: The tenant id
        in: path
        name: tenant
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: The number to skip
        in: query
        name: offset
        required: false
        schema:
          type: integer
          format: int64
      - description: The number to limit by
        in: query
        name: limit
        required: false
        schema:
          type: integer
          format: int64
      - description: The workflow id to get runs for.
        in: query
        name: workflowId
        required: false
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: The workflow name to get runs for.
        in: query
        name: workflowName
        required: false
        schema:
          type: string
      - description: The cron name to get runs for.
        in: query
        name: cronName
        required: false
        schema:
          type: string
      - description: A list of metadata key value pairs to filter by
        in: query
        name: additionalMetadata
        example:
        - key1:value1
        - key2:value2
        required: false
        schema:
          type: array
          items:
            type: string
      - description: The order by field
        in: query
        name: orderByField
        required: false
        schema:
          $ref: '#/components/schemas/CronWorkflowsOrderByField'
      - description: The order by direction
        in: query
        name: orderByDirection
        required: false
        schema:
          $ref: '#/components/schemas/WorkflowRunOrderByDirection'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CronWorkflowsList'
          description: Successfully retrieved the workflow runs
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Forbidden
      summary: Get Cron Job Workflows
      tags:
      - Workflow
  /api/v1/tenants/{tenant}/workflows/crons/{cron-workflow}:
    get:
      x-resources:
      - tenant
      - cron-workflow
      description: Get a cron job workflow run for a tenant
      operationId: workflow-cron:get
      parameters:
      - description: The tenant id
        in: path
        name: tenant
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: The cron job id
        in: path
        name: cron-workflow
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CronWorkflows'
          description: Successfully retrieved the workflow runs
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Forbidden
      summary: Get Cron Job Workflow Run
      tags:
      - Workflow
    delete:
      x-resources:
      - tenant
      - cron-workflow
      description: Delete a cron job workflow run for a tenant
      operationId: workflow-cron:delete
      parameters:
      - description: The tenant id
        in: path
        name: tenant
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: The cron job id
        in: path
        name: cron-workflow
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      responses:
        '204':
          description: Successfully deleted the cron job workflow run
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Forbidden
      summary: Delete Cron Job Workflow Run
      tags:
      - Workflow
    patch:
      x-resources:
      - tenant
      - cron-workflow
      description: Update a cron workflow for a tenant
      operationId: workflow-cron:update
      parameters:
      - description: The tenant id
        in: path
        name: tenant
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: The cron job id
        in: path
        name: cron-workflow
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCronWorkflowTriggerRequest'
        description: The input for updates
        required: true
      responses:
        '204':
          description: Successfully updated the cron job workflow run
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
          description: Forbidden
      summary: Update Cron Job Workflow Run
      tags:
      - Workflow
  /api/v1/workflows/{workflow}:
    get:
      x-resources:
      - tenant
      - workflow
      description: Get a workflow for a tenant
      operationId: workflow:get
      parameters:
      - description: The workflow id
        in: path
        name: workflow
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workflow'
          description: Successfully retrieved the workflow
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Not found
      summary: Get Workflow
      tags:
      - Workflow
    delete:
      x-resources:
      - tenant
      - workflow
      description: Delete a workflow for a tenant
      operationId: workflow:delete
      parameters:
      - description: The workflow id
        in: path
        name: workflow
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      responses:
        '204':
          description: Successfully deleted the workflow
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Not found
      summary: Delete Workflow
      tags:
      - Workflow
    patch:
      x-resources:
      - tenant
      - workflow
      description: Update a workflow for a tenant
      operationId: workflow:update
      parameters:
      - description: The workflow id
        in: path
        name: workflow
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowUpdateRequest'
        description: The input to update the workflow
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workflow'
          description: Successfully updated the workflow
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Forbidden
      summary: Update Workflow
      tags:
      - Workflow
  /api/v1/workflows/{workflow}/versions:
    get:
      x-resources:
      - tenant
      - workflow
      description: Get a workflow version for a tenant
      operationId: workflow-version:get
      parameters:
      - description: The workflow id
        in: path
        name: workflow
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: The workflow version. If not supplied, the latest version is fetched.
        in: query
        name: version
        required: false
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowVersion'
          description: Successfully retrieved the workflow version
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Not found
      summary: Get Workflow Version
      tags:
      - Workflow
  /api/v1/workflows/{workflow}/metrics:
    get:
      x-resources:
      - tenant
      - workflow
      description: Get the metrics for a workflow version
      operationId: workflow:get:metrics
      parameters:
      - description: The workflow id
        in: path
        name: workflow
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: A status of workflow run statuses to filter by
        in: query
        name: status
        required: false
        schema:
          $ref: '#/components/schemas/WorkflowRunStatus'
      - description: A group key to filter metrics by
        in: query
        name: groupKey
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowMetrics'
          description: Successfully retrieved the workflow version metrics
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Not found
      summary: Get Workflow Metrics
      tags:
      - Workflow
  /api/v1/tenants/{tenant}/workflows/{workflow}/worker-count:
    get:
      x-resources:
      - tenant
      - workflow
      description: Get a count of the workers available for workflow
      operationId: workflow:get:workers-count
      parameters:
      - description: The tenant id
        in: path
        name: tenant
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: The workflow id
        in: path
        name: workflow
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowWorkersCount'
          description: Successfully retrieved the workflow worker count
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Forbidden
      summary: Get Workflow Worker Count
      tags:
      - Workflow
  /api/v1/tenants/{tenant}/workflows/runs:
    get:
      x-resources:
      - tenant
      description: Get all workflow runs for a tenant
      operationId: workflow-run:list
      parameters:
      - description: The tenant id
        in: path
        name: tenant
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: The number to skip
        in: query
        name: offset
        required: false
        schema:
          type: integer
          format: int64
      - description: The number to limit by
        in: query
        name: limit
        required: false
        schema:
          type: integer
          format: int64
      - description: The event id to get runs for.
        in: query
        name: eventId
        required: false
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: The workflow id to get runs for.
        in: query
        name: workflowId
        required: false
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: The parent workflow run id
        in: query
        name: parentWorkflowRunId
        required: false
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: The parent step run id
        in: query
        name: parentStepRunId
        required: false
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: A list of workflow run statuses to filter by
        in: query
        name: statuses
        required: false
        schema:
          $ref: '#/components/schemas/WorkflowRunStatusList'
      - description: A list of workflow kinds to filter by
        in: query
        name: kinds
        required: false
        schema:
          $ref: '#/components/schemas/WorkflowKindList'
      - description: A list of metadata key value pairs to filter by
        in: query
        name: additionalMetadata
        example:
        - key1:value1
        - key2:value2
        required: false
        schema:
          type: array
          items:
            type: string
      - description: The time after the workflow run was created
        in: query
        name: createdAfter
        example: '2021-01-01T00:00:00Z'
        required: false
        schema:
          type: string
          format: date-time
      - description: The time before the workflow run was created
        in: query
        name: createdBefore
        example: '2021-01-01T00:00:00Z'
        required: false
        schema:
          type: string
          format: date-time
      - description: The time after the workflow run was finished
        in: query
        name: finishedAfter
        example: '2021-01-01T00:00:00Z'
        required: false
        schema:
          type: string
          format: date-time
      - description: The time before the workflow run was finished
        in: query
        name: finishedBefore
        example: '2021-01-01T00:00:00Z'
        required: false
        schema:
          type: string
          format: date-time
      - description: The order by field
        in: query
        name: orderByField
        required: false
        schema:
          $ref: '#/components/schemas/WorkflowRunOrderByField'
      - description: The order by direction
        in: query
        name: orderByDirection
        required: false
        schema:
          $ref: '#/components/schemas/WorkflowRunOrderByDirection'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowRunList'
          description: Successfully retrieved the workflow runs
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description:

# --- truncated at 32 KB (62 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/openapi/hatchet-workflow-api-openapi.yml