mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-02-13 03:39:22 -06:00
* no schema parsing in core engine * fix: parse schema in api, not engine * fix: parsing of input schema should not use json keys as field names
586 lines
16 KiB
YAML
586 lines
16 KiB
YAML
withTenant:
|
|
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
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/WorkflowList"
|
|
description: Successfully retrieved the workflows
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: A malformed or bad request
|
|
"403":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Forbidden
|
|
summary: Get workflows
|
|
tags:
|
|
- Workflow
|
|
withWorkflow:
|
|
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/_index.yaml#/Workflow"
|
|
description: Successfully retrieved the workflow
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: A malformed or bad request
|
|
"403":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Forbidden
|
|
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/_index.yaml#/APIErrors"
|
|
description: A malformed or bad request
|
|
"403":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Forbidden
|
|
"404":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Not found
|
|
summary: Delete workflow
|
|
tags:
|
|
- Workflow
|
|
workflowVersion:
|
|
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/_index.yaml#/WorkflowVersion"
|
|
description: Successfully retrieved the workflow version
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: A malformed or bad request
|
|
"403":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Forbidden
|
|
"404":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Not found
|
|
summary: Get workflow version
|
|
tags:
|
|
- Workflow
|
|
workflowVersionDefinition:
|
|
get:
|
|
x-resources: ["tenant", "workflow"]
|
|
description: Get a workflow version definition for a tenant
|
|
operationId: workflow-version:get:definition
|
|
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/_index.yaml#/WorkflowVersionDefinition"
|
|
description: Successfully retrieved the workflow version definition
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: A malformed or bad request
|
|
"403":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Forbidden
|
|
"404":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Not found
|
|
summary: Get workflow version definition
|
|
tags:
|
|
- Workflow
|
|
triggerWorkflow:
|
|
post:
|
|
x-resources: ["tenant", "workflow"]
|
|
description: Trigger a new workflow run for a tenant
|
|
operationId: workflow-run:create
|
|
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
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/TriggerWorkflowRunRequest"
|
|
description: The input to the workflow run
|
|
required: true
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/WorkflowRun"
|
|
description: Successfully created the workflow run
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: A malformed or bad request
|
|
"403":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Forbidden
|
|
"404":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Not found
|
|
summary: Trigger workflow run
|
|
tags:
|
|
- Workflow Run
|
|
workflowRuns:
|
|
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
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/WorkflowRunList"
|
|
description: Successfully retrieved the workflow runs
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: A malformed or bad request
|
|
"403":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Forbidden
|
|
summary: Get workflow runs
|
|
tags:
|
|
- Workflow
|
|
workflowRun:
|
|
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/_index.yaml#/WorkflowRun"
|
|
description: Successfully retrieved the workflow run
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: A malformed or bad request
|
|
"403":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Forbidden
|
|
summary: Get workflow run
|
|
tags:
|
|
- Workflow
|
|
linkGithub:
|
|
post:
|
|
x-resources: ["tenant", "workflow"]
|
|
description: Link a github repository to a workflow
|
|
operationId: workflow:update:link-github
|
|
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/_index.yaml#/LinkGithubRepositoryRequest"
|
|
description: The input to link a github repository
|
|
required: true
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/Workflow"
|
|
description: Successfully linked the github repository
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: A malformed or bad request
|
|
"403":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Forbidden
|
|
"404":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Not found
|
|
summary: Link github repository
|
|
tags:
|
|
- Workflow
|
|
createPullRequest:
|
|
post:
|
|
x-resources: ["tenant", "step-run"]
|
|
description: Create a pull request for a workflow
|
|
operationId: step-run:update:create-pr
|
|
parameters:
|
|
- description: The step run id
|
|
in: path
|
|
name: step-run
|
|
required: true
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
minLength: 36
|
|
maxLength: 36
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/CreatePullRequestFromStepRun"
|
|
description: The input to create a pull request
|
|
required: true
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/CreatePullRequestFromStepRun"
|
|
description: Successfully created the pull request
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: A malformed or bad request
|
|
"403":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Forbidden
|
|
"404":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Not found
|
|
summary: Create pull request
|
|
tags:
|
|
- Workflow
|
|
listPullRequests:
|
|
get:
|
|
x-resources: ["tenant", "workflow-run"]
|
|
description: List all pull requests for a workflow run
|
|
operationId: workflow-run:list:pull-requests
|
|
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
|
|
- description: The pull request state
|
|
in: query
|
|
name: state
|
|
required: false
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/PullRequestState"
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/ListPullRequestsResponse"
|
|
description: Successfully retrieved the list of pull requests
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: A malformed or bad request
|
|
"403":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Forbidden
|
|
summary: List pull requests
|
|
tags:
|
|
- Workflow
|
|
getDiff:
|
|
get:
|
|
x-resources: ["tenant", "step-run"]
|
|
description: Get the diff for a step run between the most recent run and the first run.
|
|
operationId: step-run:get:diff
|
|
parameters:
|
|
- description: The step run id
|
|
in: path
|
|
name: step-run
|
|
required: true
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
minLength: 36
|
|
maxLength: 36
|
|
responses:
|
|
"200":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/GetStepRunDiffResponse"
|
|
description: Successfully retrieved the diff
|
|
"400":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: A malformed or bad request
|
|
"403":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Forbidden
|
|
"404":
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../../components/schemas/_index.yaml#/APIErrors"
|
|
description: Not found
|
|
summary: Get diff
|
|
tags:
|
|
- Workflow
|