openapi: 3.1.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: Forbidden summary: Get Workflow Runs tags: - Workflow /api/v1/tenants/{tenant}/workflows/runs/metrics: get: x-resources: - tenant description: Get a summary of workflow run metrics for a tenant operationId: workflow-run:get:metrics parameters: - description: The tenant id in: path name: tenant required: true schema: type: string format: uuid minLength: 36 maxLength: 36 - 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 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 responses: '200': content: application/json: schema: $ref: '#/components/schemas/WorkflowRunsMetrics' description: Successfully retrieved the workflow runs 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 summary: Get Workflow Runs Metrics tags: - Workflow /api/v1/tenants/{tenant}/workflow-runs/{workflow-run}: get: x-resources: - tenant - workflow-run description: Get a workflow run for a tenant operationId: workflow-run:get parameters: - description: The tenant id in: path name: tenant required: true schema: type: string format: uuid minLength: 36 maxLength: 36 - description: The workflow run id in: path name: workflow-run required: true schema: type: string format: uuid minLength: 36 maxLength: 36 responses: '200': content: application/json: schema: $ref: '#/components/schemas/WorkflowRun' description: Successfully retrieved the 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 summary: Get Workflow Run tags: - Workflow /api/v1/tenants/{tenant}/workflow-runs/{workflow-run}/shape: get: x-resources: - tenant - workflow-run description: Get a workflow run for a tenant operationId: workflow-run:get:shape parameters: - description: The tenant id in: path name: tenant required: true schema: type: string format: uuid minLength: 36 maxLength: 36 - description: The workflow run id in: path name: workflow-run required: true schema: type: string format: uuid minLength: 36 maxLength: 36 responses: '200': content: application/json: schema: $ref: '#/components/schemas/WorkflowRunShape' description: Successfully retrieved the 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 summary: Get Workflow Run tags: - Workflow components: schemas: ScheduledWorkflowsBulkDeleteFilter: type: object properties: workflowId: type: string format: uuid minLength: 36 maxLength: 36 parentWorkflowRunId: type: string format: uuid minLength: 36 maxLength: 36 parentStepRunId: type: string format: uuid minLength: 36 maxLength: 36 additionalMetadata: description: A list of metadata key value pairs to filter by type: array items: type: string example: - key1:value1 - key2:value2 WorkflowRunsMetricsCounts: type: object properties: PENDING: type: integer RUNNING: type: integer SUCCEEDED: type: integer FAILED: type: integer QUEUED: type: integer CANCELLED: type: integer WorkflowRunList: type: object properties: rows: type: array items: $ref: '#/components/schemas/WorkflowRun' pagination: $ref: '#/components/schemas/PaginationResponse' TenantQueueMetrics: properties: total: $ref: '#/components/schemas/QueueMetrics' description: The total queue metrics. workflow: type: object additionalProperties: $ref: '#/components/schemas/QueueMetrics' queues: type: object additionalProperties: type: integer CronWorkflows: type: object properties: metadata: $ref: '#/components/schemas/APIResourceMeta' tenantId: type: string workflowVersionId: type: string workflowId: type: string workflowName: type: string cron: type: string name: type: string input: type: object additionalProperties: true additionalMetadata: type: object additionalProperties: true enabled: type: boolean method: $ref: '#/components/schemas/CronWorkflowsMethod' priority: type: integer minimum: 1 maximum: 3 format: int32 required: - metadata - tenantId - workflowVersionId - workflowName - workflowId - cron - enabled - method ScheduledWorkflowsBulkDeleteRequest: type: object properties: scheduledWorkflowRunIds: type: array items: type: string format: uuid minLength: 36 maxLength: 36 minItems: 1 maxItems: 500 filter: $ref: '#/components/schemas/ScheduledWorkflowsBulkDeleteFilter' WorkflowMetrics: type: object properties: groupKeyRunsCount: type: integer description: The number of runs for a specific group key (passed via filter) groupKeyCount: type: integer description: The total number of concurrency group keys. APIResourceMeta: type: object properties: id: type: string description: the id of this resource, in UUID format example: bb214807-246e-43a5-a25d-41761d1cff9e minLength: 0 maxLength: 36 createdAt: type: string description: the time that this resource was created format: date-time example: '2022-12-13T15:06:48.888358-05:00' updatedAt: type: string description: the time that this resource was last updated format: date-time example: '2022-12-13T15:06:48.888358-05:00' required: - id - createdAt - updatedAt WorkflowTriggerCronRef: type: object properties: parent_id: type: string cron: type: string Workflow: properties: metadata: $ref: '#/components/schemas/APIResourceMeta' name: type: string description: The name of the workflow. description: type: string description: The description of the workflow. isPaused: type: boolean description: Whether the workflow is paused. versions: type: array items: $ref: '#/components/schemas/WorkflowVersionMeta' tags: type: array items: $ref: '#/components/schemas/WorkflowTag' description: The tags of the workflow. jobs: type: array items: $ref: '#/components/schemas/Job' description: The jobs of the workflow. tenantId: type: string description: The tenant id of the workflow. required: - metadata - name - tenantId type: object ScheduledRunStatus: type: string enum: - PENDING - RUNNING - SUCCEEDED - FAILED - CANCELLED - QUEUED - SCHEDULED ScheduledWorkflowsBulkError: type: object properties: id: type: string format: uuid minLength: 36 maxLength: 36 error: type: string required: - error CronWorkflowsList: type: object properties: rows: type: array items: $ref: '#/components/schemas/CronWorkflows' pagination: $ref: '#/components/schemas/PaginationResponse' WorkflowUpdateRequest: type: object properties: isPaused: type: boolean description: Whether the workflow is paused. APIError: type: object properties: code: type: integer description: a custom Hatchet error code format: uint64 example: 1400 field: type: string description: the field that this error is associated with, if applicable example: name description: type: string description: a description for this error example: A descriptive error message docs_link: type: string description: a link to the documentation for this error, if it exists example: github.com/hatchet-dev/hatchet required: - description CronWorkflowsOrderByField: type: string enum: - name - createdAt WorkflowRunOrderByField: type: string enum: - createdAt - startedAt - finishedAt - duration PaginationResponse: type: object properties: current_page: type: integer description: the current page format: int64 example: 2 next_page: type: integer description: the next page format: int64 example: 3 num_pages: type: integer description: the total number of pages for listing format: int64 example: 10 example: next_page: 3 num_pages: 10 current_page: 2 WorkflowVersion: type: object properties: metadata: $ref: '#/components/schemas/APIResourceMeta' version: type: string description: The version of the workflow. order: type: integer format: int32 workflowId: type: string sticky: type: string description: The sticky strategy of the workflow. defaultPriority: type: integer format: int32 description: The default priority of the workflow. workflow: $ref: '#/components/schemas/Workflow' concurrency: $ref: '#/components/schemas/WorkflowConcurrency' triggers: $ref: '#/components/schemas/WorkflowTriggers' scheduleTimeout: type: string jobs: type: array items: $ref: '#/components/schemas/Job' workflowConfig: type: object v1Concurrency: type: array items: $ref: '#/components/schemas/ConcurrencySetting' inputJsonSchema: type: object description: The JSON schema for the workflow input. required: - metadata - version - order - workflowId QueueMetrics: type: object properties: numQueued: type: integer description: The number of items in the queue. numRunning: type: integer description: The number of items running. numPending: type: integer description: The number of items pending. required: - numQueued - numRunning - numPending JobRunStatus: type: string enum: - PENDING - RUNNING - SUCCEEDED - FAILED - CANCELLED - BACKOFF ScheduledWorkflowsMethod: type: string enum: - DEFAULT - API ScheduledWorkflowsList: type: object properties: rows: type: array items: $ref: '#/components/schemas/ScheduledWorkflows' pagination: $ref: '#/components/schemas/PaginationResponse' ScheduledWorkflowsBulkUpdateResponse: type: object properties: updatedIds: type: array items: type: string format: uuid minLength: 36 maxLength: 36 errors: type: array items: $ref: '#/components/schemas/ScheduledWorkflowsBulkError' required: - updatedIds - errors WorkflowRun: type: object properties: metadata: $ref: '#/components/schemas/APIResourceMeta' tenantId: type: string workflowVersionId: type: string workflowVersion: $ref: '#/components/schemas/WorkflowVersion' status: $ref: '#/components/schemas/WorkflowRunStatus' displayName: type: string jobRuns: type: array items: $ref: '#/components/schemas/JobRun' triggeredBy: $ref: '#/components/schemas/WorkflowRunTriggeredBy' input: type: object additionalProperties: true error: type: string startedAt: type: string format: date-time finishedAt: type: string format: date-time duration: type: integer example: 1000 parentId: type: string example: bb214807-246e-43a5-a25d-41761d1cff9e minLength: 36 maxLength: 36 format: uuid parentStepRunId: type: string example: bb214807-246e-43a5-a25d-41761d1cff9e minLength: 36 maxLength: 36 format: uuid additionalMetadata: type: object additionalProperties: true required: - metadata - tenantId - workflowVersionId - status - triggeredBy UpdateCronWorkflowTriggerRequest: properties: enabled: type: boolean WorkflowKind: type: string enum: - FUNCTION - DURABLE - DAG UpdateScheduledWorkflowRunRequest: type: object properties: triggerAt: type: string format: date-time required: - triggerAt WorkflowWorkersCount: type: object properties: freeSlotCount: type: integer maxSlotCount: type: integer workflowRunId: type: string required: - count Job: type: object properties: metadata: $ref: '#/components/schemas/APIResourceMeta' tenantId: type: string versionId: type: string name: type: string description: type: string description: The description of the job. steps: type: array items: $ref: '#/components/schemas/Step' timeout: type: string description: The timeout of the job. required: - metadata - tenantId - versionId - name - steps ConcurrencySetting: type: object properties: maxRuns: type: integer format: int32 description: The maximum number of concurrent workflow runs. limitStrategy: $ref: '#/components/schemas/ConcurrencyLimitStrategy' description: The strategy to use when the concurrency limit is reached. expression: type: string description: The concurrency expression, used to generate a key from task inputs, metadata, etc. stepReadableId: type: string description: The readable id of the step to which this concurrency setting applies. scope: $ref: '#/components/schemas/ConcurrencyScope' description: The scope of the concurrency setting. required: - maxRuns - limitStrategy - expression - scope ScheduledWorkflowsBulkDeleteResponse: type: object properties: deletedIds: type: array items: type: string format: uuid minLength: 36 maxLength: 36 errors: type: array items: $ref: '#/components/schemas/ScheduledWorkflowsBulkError' required: - deletedIds - errors WorkflowRunOrderByDirection: type: string enum: - ASC - DESC StepRunStatus: type: string enum: - PENDING - PENDING_ASSIGNMENT - ASSIGNED - RUNNING - SUCCEEDED - FAILED - CANCELLED - CANCELLING - BACKOFF ConcurrencyLimitStrategy: type: string enum: - CANCEL_IN_PROGRESS - DROP_NEWEST - QUEUE_NEWEST - GROUP_ROUND_ROBIN ConcurrencyScope: type: string enum: - WORKFLOW - TASK WorkflowRunStatusList: type: array items: $ref: '#/components/schemas/WorkflowRunStatus' APIErrors: type: object properties: errors: type: array items: $ref: '#/components/schemas/APIError' required: - errors WorkflowID: type: string description: A workflow ID. WorkflowRunShape: type: object properties: metadata: $ref: '#/components/schemas/APIResourceMeta' tenantId: type: string workflowId: type: string workflowVersionId: type: string workflowVersion: $ref: '#/components/schemas/WorkflowVersion' status: $ref: '#/components/schemas/WorkflowRunStatus' displayName: type: string jobRuns: type: array items: $ref: '#/components/schemas/JobRun' triggeredBy: $ref: '#/components/schemas/WorkflowRunTriggeredBy' input: type: object additionalProperties: true error: type: string startedAt: type: string format: date-time finishedAt: type: string format: date-time duration: type: integer example: 1000 parentId: type: string example: bb214807-246e-43a5-a25d-41761d1cff9e minLength: 36 maxLength: 36 format: uuid parentStepRunId: type: string example: bb214807-246e-43a5-a25d-41761d1cff9e minLength: 36 maxLength: 36 format: uuid additionalMetadata: type: object additionalProperties: true required: - metadata - tenantId - workflowVersionId - status - triggeredBy WorkflowRunStatus: type: string enum: - PENDING - RUNNING - SUCCEEDED - FAILED - CANCELLED - QUEUED - BACKOFF WorkflowTriggerEventRef: type: object properties: parent_id: type: string event_key: type: string WorkflowTag: type: object properties: name: type: string description: The name of the workflow. color: type: string description: The description of the workflow. required: - name - color WorkflowRunTriggeredBy: type: object properties: metadata: $ref: '#/components/schemas/APIResourceMeta' parentWorkflowRunId: type: string eventId: type: string cronParentId: type: string cronSchedule: type: string required: - metadata Step: type: object properties: metadata: $ref: '#/components/schemas/APIResourceMeta' readableId: type: string description: The readable id of the step. tenantId: type: string jobId: type: string action: type: string timeout: type: string description: The timeout of the step. isDurable: type: boolean description: Whether the step is durable. slotRequests: type: object description: Slot requests for the step (slot_type -> units). additionalProperties: type: integer children: type: array items: type: string parents: type: array items: type: string required: - metadata - readableId - tenantId - jobId - action - nextId JobRun: type: object properties: metadata: $ref: '#/components/schemas/APIResourceMeta' tenantId: type: string workflowRunId: type: string workflowRun: $ref: '#/components/schemas/WorkflowRun' jobId: type: string job: $ref: '#/components/schemas/Job' tickerId: type: string stepRuns: type: array items: $ref: '#/components/schemas/StepRun' status: $ref: '#/components/schemas/JobRunStatus' result: type: object startedAt: type: string format: date-time finishedAt: type: string format: date-time timeoutAt: type: string format: date-time cancelledAt: type: string format: date-time cancelledReason: type: string cancelledError: type: string required: - metadata - tenantId - workflowRunId - jobId - status ScheduledWorkflowsOrderByField: type: string enum: - triggerAt - createdAt WorkflowConcurrency: type: object properties: maxRuns: type: integer format: int32 description: The maximum number of concurrent workflow runs. limitStrategy: $ref: '#/components/schemas/ConcurrencyLimitStrategy' description: The strategy to use when the concurrency limit is reached. getConcurrencyGroup: type: string description: An action which gets the concurrency group for the WorkflowRun. required: - maxRuns - limitStrategy - getConcurrencyGroup WorkflowKindList: type: array items: $ref: '#/components/schemas/WorkflowKind' CronWorkflowsMethod: type: string enum: - DEFAULT - API ScheduledWorkflowsBulkUpdateRequest: type: object properties: updates: type: array items: $ref: '#/components/schemas/ScheduledWorkflowsBulkUpdateItem' minItems: 1 maxItems: 500 required: - updates WorkflowVersionMeta: type: object properties: metadata: $ref: '#/components/schemas/APIResourceMeta' version: type: string description: The version of the workflow. order: type: integer format: int32 workflowId: type: string workflow: $ref: '#/components/schemas/Workflow' required: - metadata - version - order - workflowId WorkflowList: type: object properties: metadata: $ref: '#/components/schemas/APIResourceMeta' rows: type: array items: $ref: '#/components/schemas/Workflow' pagination: $ref: '#/components/schemas/PaginationResponse' StepRun: type: object properties: metadata: $ref: '#/components/schemas/APIResourceMeta' tenantId: type: string jobRunId: type: string jobRun: $ref: '#/components/schemas/JobRun' stepId: type: string step: $ref: '#/components/schemas/Step' childWorkflowsCount: type: integer parents: type: array items: type: string childWorkflowRuns: type: array items: type: string workerId: type: string input: type: string output: type: string status: $ref: '#/components/schemas/StepRunStatus' requeueAfter: type: string format: date-time result: type: object error: type: string startedAt: type: string format: date-time startedAtEpoch: type: integer finishedAt: type: string format: date-time finishedAtEpoch: type: integer timeoutAt: type: string format: date-time timeoutAtEpoch: type: integer cancelledAt: type: string format: date-time cancelledAtEpoch: type: integer cancelledReason: type: string cancelledError: type: string required: - metadata - tenantId - jobRunId - stepId - status ScheduledWorkflowsBulkUpdateItem: type: object properties: id: type: string format: uuid minLength: 36 maxLength: 36 triggerAt: type: string format: date-time required: - id - triggerAt WorkflowTriggers: type: object properties: metadata: $ref: '#/components/schemas/APIResourceMeta' workflow_version_id: type: string tenant_id: type: string events: type: array items: $ref: '#/components/schemas/WorkflowTriggerEventRef' crons: type: array items: $ref: '#/components/schemas/WorkflowTriggerCronRef' ScheduledWorkflows: type: object properties: metadata: $ref: '#/components/schemas/APIResourceMeta' tenantId: type: string workflowVersionId: type: string workflowId: type: string workflowName: type: string triggerAt: type: string format: date-time input: type: object additionalProperties: true additionalMetadata: type: object additionalProperties: true workflowRunCreatedAt: type: string format: date-time workflowRunName: type: string workflowRunStatus: $ref: '#/components/schemas/WorkflowRunStatus' workflowRunId: type: string example: bb214807-246e-43a5-a25d-41761d1cff9e minLength: 36 maxLength: 36 format: uuid method: $ref: '#/components/schemas/ScheduledWorkflowsMethod' priority: type: integer minimum: 1 maximum: 3 format: int32 required: - metadata - tenantId - workflowVersionId - workflowName - workflowId - triggerAt - method WorkflowRunsMetrics: type: object properties: counts: type: object $ref: '#/components/schemas/WorkflowRunsMetricsCounts' securitySchemes: bearerAuth: type: http scheme: bearer cookieAuth: type: apiKey in: cookie name: hatchet customAuth: type: http scheme: bearer