Skip to main content
A workflow is either a request workflow (people submit a form, optionally approved before it runs) or a job (run manually, by API or on a schedule). Its files are stored in Bentra (local) or read from a repository through a VCS connector (vcs). Approvers, roles and form sharing are on Workflow access.

GET workflows/

Workflows you can access, newest first. Paginated.

GET workflows/{id}/

One workflow, with its workspace, runner pool and source.
For a local workflow, source is {"type": "local"}. runner_pool is {"id", "name"} when the workflow is pinned to a pool, otherwise null (the organization’s default pool).

POST workflows/

Creates a workflow in a workspace you belong to. You become its admin. Permission: org.create_workflow. source for a repo-backed workflow:
Response 201: {"success": true, "workflow": {…}} with the same shape as GET workflows/{id}/. Errors: 400 with errors.name, errors.workflow_type, errors.workspace or errors.source.<field>; 403 without org.create_workflow.

PATCH workflows/{id}/

Changes only the fields you send. Permission: workflow.manage_form_settings; changing the connector also needs workflow.edit.
Response 200: {"success": true, "workflow": {…}}. Errors: 400 for a duplicate name, unknown pool or connector, a path outside the repository, source on a local workflow, or form_file_path on a job.

GET workflows/{id}/settings/

Intake, approval and notification settings for request workflows; trigger channels and schedule for jobs.

PATCH workflows/{id}/settings/

Changes only the settings you send. Sending a setting of the other workflow type returns 400. Permission: workflow.manage_form_settings. The intake channels only apply while the workflow is active.

POST workflows/{id}/status/

active ↔ paused needs workflow.edit; archiving or restoring needs workflow.delete. Paused and archived workflows accept no new requests or runs. Response: {"success": true, "status": "paused"}.

DELETE workflows/{id}/

Permanently deletes the workflow and everything it owns: files, versions, settings, requests, runs and their logs, datasets, data grants, approvers and roles. It can’t be undone. A repository the workflow reads from is not touched. To stop a workflow but keep its history, archive it instead. Needs workflow.delete. Refused with 409 while the workflow has a queued or running run; cancel those first. Response: 204 No Content.

GET workflows/{id}/form/

A request workflow’s form.yml. For a Bentra-stored workflow it’s the draft ("source": "draft"); for a repo-backed one it’s the file at the tracked branch or pinned tag ("source": "repository", with ref).

PUT workflows/{id}/form/

Changes a request workflow’s form. Permission: workflow.manage_form_settings.
  • Bentra-stored: saves the draft and returns {"success": true, "saved_local": true}. Publish a version to make it live.
  • Repo-backed: creates a branch from the tracked branch (or the default branch for a tag-pinned workflow), commits the form file and opens a pull request: {"success": true, "pr_url": "…", "pr_number": 7, "branch": "…"}. The form changes once the pull request is merged (and, for a tag-pinned workflow, a new tag is pinned). 502 if the provider refuses.