Public API
Workflows

On this page
- GET /api/v1/public/apps/{app}/environments/{environment}/workflows
- POST /api/v1/public/apps/{app}/environments/{environment}/workflows
- DELETE /api/v1/public/apps/{app}/environments/{environment}/workflows/{workflow}
- GET /api/v1/public/apps/{app}/environments/{environment}/workflows/{workflow}
- PATCH /api/v1/public/apps/{app}/environments/{environment}/workflows/{workflow}
- POST /api/v1/public/apps/{app}/environments/{environment}/workflows/{workflow}/duplicate
- POST /api/v1/public/apps/{app}/environments/{environment}/workflows/{workflow}/publish
- POST /api/v1/public/apps/{app}/environments/{environment}/workflows/{workflow}/run
- GET /api/v1/public/apps/{app}/environments/{environment}/workflows/{workflow}/runs
- GET /api/v1/public/apps/{app}/environments/{environment}/workflows/{workflow}/runs/{run}
- POST /api/v1/public/apps/{app}/environments/{environment}/workflows/{workflow}/unpublish
Draft and published workflows for one app and environment. The graph is the same one the canvas saves.
These routes are the public API. Send Authorization: Bearer with a workspace server API key. The key can act on every app in the workspace. A route that names an app uses that app id. environment is development or production.
GET /api/v1/public/apps/{app}/environments/{environment}/workflows
The workflows were listed.
Path
app— App id in this workspace.environment—developmentorproduction.
Responses
200WORKFLOWS_LISTED— The workflows were listed.401INVALID_API_KEY— The API key is invalid.404APP_NOT_FOUND— The app could not be found.429RATE_LIMIT_EXCEEDED— Too many requests. Please try again later.500SERVER_ERROR— Something went wrong. Please try again.
POST /api/v1/public/apps/{app}/environments/{environment}/workflows
The workflow was created.
Path
app— App id in this workspace.environment—developmentorproduction.
Responses
201WORKFLOW_CREATED— The workflow was created.401INVALID_API_KEY— The API key is invalid.404APP_NOT_FOUND— The app could not be found.422VALIDATION_FAILED— The request contains invalid fields.429RATE_LIMIT_EXCEEDED— Too many requests. Please try again later.500SERVER_ERROR— Something went wrong. Please try again.
DELETE /api/v1/public/apps/{app}/environments/{environment}/workflows/{workflow}
The workflow was deleted.
Path
app— App id in this workspace.environment—developmentorproduction.workflow— Workflow id.
Responses
200WORKFLOW_DELETED— The workflow was deleted.id(string, required)
401INVALID_API_KEY— The API key is invalid.404RESOURCE_NOT_FOUND— The requested resource could not be found.429RATE_LIMIT_EXCEEDED— Too many requests. Please try again later.500SERVER_ERROR— Something went wrong. Please try again.
GET /api/v1/public/apps/{app}/environments/{environment}/workflows/{workflow}
The workflow was found.
Path
app— App id in this workspace.environment—developmentorproduction.workflow— Workflow id.
Responses
200WORKFLOW_FETCHED— The workflow was found.401INVALID_API_KEY— The API key is invalid.404RESOURCE_NOT_FOUND— The requested resource could not be found.429RATE_LIMIT_EXCEEDED— Too many requests. Please try again later.500SERVER_ERROR— Something went wrong. Please try again.
PATCH /api/v1/public/apps/{app}/environments/{environment}/workflows/{workflow}
The workflow was updated.
Path
app— App id in this workspace.environment—developmentorproduction.workflow— Workflow id.
Body
name(string, optional)nodes(array of object, optional)basedOn(string, optional)
Responses
200WORKFLOW_UPDATED— The workflow was updated.401INVALID_API_KEY— The API key is invalid.404RESOURCE_NOT_FOUND— The requested resource could not be found.422VALIDATION_FAILED— The request contains invalid fields.429RATE_LIMIT_EXCEEDED— Too many requests. Please try again later.500SERVER_ERROR— Something went wrong. Please try again.
POST /api/v1/public/apps/{app}/environments/{environment}/workflows/{workflow}/duplicate
The workflow was duplicated.
Path
app— App id in this workspace.environment—developmentorproduction.workflow— Workflow id.
Responses
201WORKFLOW_DUPLICATED— The workflow was duplicated.401INVALID_API_KEY— The API key is invalid.404RESOURCE_NOT_FOUND— The requested resource could not be found.422VALIDATION_FAILED— The request contains invalid fields.429RATE_LIMIT_EXCEEDED— Too many requests. Please try again later.500SERVER_ERROR— Something went wrong. Please try again.
POST /api/v1/public/apps/{app}/environments/{environment}/workflows/{workflow}/publish
The workflow was published.
Path
app— App id in this workspace.environment—developmentorproduction.workflow— Workflow id.
Responses
200WORKFLOW_PUBLISHED— The workflow was published.401INVALID_API_KEY— The API key is invalid.404RESOURCE_NOT_FOUND— The requested resource could not be found.429RATE_LIMIT_EXCEEDED— Too many requests. Please try again later.500SERVER_ERROR— Something went wrong. Please try again.
POST /api/v1/public/apps/{app}/environments/{environment}/workflows/{workflow}/run
The workflow was started.
Path
app— App id in this workspace.environment—developmentorproduction.workflow— Workflow id.
Responses
200WORKFLOW_STARTED— The workflow was started.id(string, required)
401INVALID_API_KEY— The API key is invalid.404RESOURCE_NOT_FOUND— The requested resource could not be found.429RATE_LIMIT_EXCEEDED— Too many requests. Please try again later.500SERVER_ERROR— Something went wrong. Please try again.
GET /api/v1/public/apps/{app}/environments/{environment}/workflows/{workflow}/runs
The workflow runs were listed.
Path
app— App id in this workspace.environment—developmentorproduction.workflow— Workflow id.
Query
page(integer)
Responses
200WORKFLOW_RUNS_LISTED— The workflow runs were listed.401INVALID_API_KEY— The API key is invalid.404RESOURCE_NOT_FOUND— The requested resource could not be found.422VALIDATION_FAILED— The request contains invalid fields.429RATE_LIMIT_EXCEEDED— Too many requests. Please try again later.500SERVER_ERROR— Something went wrong. Please try again.
GET /api/v1/public/apps/{app}/environments/{environment}/workflows/{workflow}/runs/{run}
The workflow run was found.
Path
app— App id in this workspace.environment—developmentorproduction.workflow— Workflow id.run— Workflow run id.
Responses
200WORKFLOW_RUN_FETCHED— The workflow run was found.401INVALID_API_KEY— The API key is invalid.404RESOURCE_NOT_FOUND— The requested resource could not be found.429RATE_LIMIT_EXCEEDED— Too many requests. Please try again later.500SERVER_ERROR— Something went wrong. Please try again.
POST /api/v1/public/apps/{app}/environments/{environment}/workflows/{workflow}/unpublish
The workflow was unpublished.
Path
app— App id in this workspace.environment—developmentorproduction.workflow— Workflow id.
Responses
200WORKFLOW_UNPUBLISHED— The workflow was unpublished.401INVALID_API_KEY— The API key is invalid.404RESOURCE_NOT_FOUND— The requested resource could not be found.429RATE_LIMIT_EXCEEDED— Too many requests. Please try again later.500SERVER_ERROR— Something went wrong. Please try again.
