Web API reference

Every operation of the web API (v0), by what it is for. The same description, in OpenAPI 3.1, to generate a client from: openapi.yaml. Using the web API says how to sign in, and what errors look like.

Session

Signing in and out. Every other call needs a session, except health, messages’ webhooks and the metrics page.

Who is signed in

GET /api/v0/session

The person signed in and what they may do. Signed out, answers 401 with the sign-in sources, the organisation’s name, any maintenance notice, and a CSRF token to sign in with.

Answers 200: Done.

Field

Type

absence

null or object

always

configures

boolean

always

csrf_token

string

always

inspects_releases

boolean

always

maintains

boolean

always

manages_users

boolean

always

organisation

object

always

platform_roles

list of object

always

plugins

object

always

project_roles

object

always

reports_projects

list of string

always

sections

list of string

always

supervises

list of string

always

user

object

always

views_projects

list of string

always

withheld

list of any

always

Sign in

POST /api/v0/session

Signs in with a username and password at one of the sign-in sources. Needs the CSRF token from GET /api/v0/session, and answers with a new one to use from then on. Repeated failures from one address are slowed down (429).

Takes:

Field

Type

password

string

always

provider

string

username

string

always

Answers 200: Done.

Field

Type

absence

any

always

configures

boolean

always

csrf_token

string

always

inspects_releases

boolean

always

maintains

boolean

always

manages_users

boolean

always

organisation

object

always

platform_roles

list of object

always

plugins

object

always

project_roles

object

always

reports_projects

list of string

always

sections

list of string

always

supervises

list of string

always

user

object

always

views_projects

list of string

always

withheld

list of any

always

Sign out

DELETE /api/v0/session

Ends the session everywhere.

Answers 204: Signed out.

Work

Tasks: finding them, opening them, submitting them and passing them on.

My tasks and my groups’ tasks

GET /api/v0/inbox

Open tasks assigned to me, and tasks waiting for anyone in roles I hold. limit (1 to 200, default 50).

Who may: runtime.claim.

Query: limit.

Answers 200: Done.

Field

Type

tasks

list of Task

always

Processes I may start

GET /api/v0/startable

Each process I may start a case of, with its project and name.

Who may: runtime.start.

Answers 200: Done.

Field

Type

processes

list of object

always

A task, with its form

GET /api/v0/cases/{case_id}/tasks/{task_id}

The task, its form, the data to show in it, and whether I may submit it or pass it on.

Who may: a role the task is for.

Answers 200: Done.

Field

Type

action_label

string

always

assigned_at

null or string

always

assignee

null or string

always

assignee_name

null or string

always

can_pass_on

boolean

always

can_submit

boolean

always

case_id

string

always

case_owner

string

always

case_owner_name

string

always

case_started_at

string

always

case_title

string

always

created_at

string

always

data

object

always

delegated_at

string

always

due_at

any

always

element

string

always

escalated_at

any

always

form

object

always

held

boolean

always

lists

object

always

name

string

always

project

string

always

role

string

always

role_title

string

always

task_id

string

always

version

string

always

Submit a task

POST /api/v0/cases/{case_id}/tasks/{task_id}

Submits the form’s values as data. Each value is checked against the form and the case’s data; 422 lists each field that needs attention. Answers with the case’s progress and the tasks it gave me next.

Who may: a role the task is for.

Takes:

Field

Type

data

object

always

Answers 200: Done.

Field

Type

case_id

string

always

progress

object

always

status

string

always

tasks

list of Task

always

Take, hand back or pass on a task

POST /api/v0/cases/{case_id}/tasks/{task_id}/assignment

action is take (I take it), hand_back (back to the group), pass_on (to someone else in the role, to) or reassign (a supervisor gives it to to).

Who may: runtime.claim, runtime.delegate or runtime.supervise.

Takes:

Field

Type

action

string

always

to

null or string

Answers 200: Done.

Field

Type

assigned_at

null or string

always

assignee

null or string

always

case_id

string

always

created_at

string

always

delegated_at

string

always

due_at

null or string

always

element

string

always

escalated_at

any

always

form

string

always

name

string

always

project

string

always

role

string

always

task_id

string

always

Who a task can be passed to

GET /api/v0/cases/{case_id}/tasks/{task_id}/candidates

People in the task’s role, and whether each is out of office.

Who may: runtime.delegate or runtime.supervise.

Answers 200: Done.

Field

Type

people

list of object

always

Work out a form’s decided fields

POST /api/v0/cases/{case_id}/tasks/{task_id}/worked-out

Given the form’s values so far as data, the fields a decision table fills in, as the form shows them before it is submitted.

Who may: a role the task is for.

Takes:

Field

Type

data

object

always

Answers 200: Done.

Field

Type

values

object

always

Cases

Starting cases, finding them, following them and controlling them.

Start a case

POST /api/v0/projects/{project}/cases

Starts a case of process in the project’s active release, with optional starting data. Answers with the case id and the tasks it gave me.

Who may: runtime.start.

Takes:

Field

Type

process

string

always

Answers 201: Started.

Field

Type

case_id

string

always

tasks

list of Task

always

Find cases

GET /api/v0/cases

One page of the cases I may view, newest first: searched by the start of a case id or part of a title (q), and narrowed by project, status, and started_after/started_before. limit and after page through them.

Who may: runtime.view.

Query: q, project, status, started_after, started_before, limit, after.

Answers 200: Done.

Field

Type

cases

list of object

always

next

null or string

always

A case

GET /api/v0/cases/{case_id}

A case’s data, status and progress, for someone who may view it.

Who may: runtime.view.

Answers 200: Done.

Field

Type

can

object

always

case_id

string

always

data

object

always

end_event

null or string

always

hold

any

always

now

object

always

open_tasks

list of Task

always

outcome

null or object

always

owner

string

always

owner_name

string

always

process

string

always

process_name

string

always

project

string

always

started_at

string

always

status

string

always

steps

list of object

always

title

string

always

updated_at

string

always

version

string

always

Where a case has got to

GET /api/v0/cases/{case_id}/status

The steps done, the work open now and who has it, and what may be done to the case (suspend, resume, cancel).

Who may: runtime.view.

Answers 200: Done.

Field

Type

can

object

always

case_id

string

always

hold

any

always

now

object

always

outcome

any

always

owner

string

always

owner_name

string

always

process

string

always

process_name

string

always

project

string

always

started_at

string

always

status

string

always

steps

list of object

title

string

always

updated_at

string

always

version

string

always

A case’s history

GET /api/v0/cases/{case_id}/audit

Everything that happened to the case, oldest first, each in plain words with who did it. after and limit page through it.

Who may: assurance.audit.

Query: after, limit.

Answers 200: Done.

Field

Type

events

list of object

always

next

integer or null

always

Suspend, resume or cancel a case

POST /api/v0/cases/{case_id}/control

action is suspend, resume or cancel; reason is shown to everyone who follows the case and kept in its history. Answers with the case’s status.

Who may: runtime.suspend or runtime.cancel.

Takes:

Field

Type

action

suspend or resume or cancel

always

reason

string

Answers 200: Done.

Field

Type

can

object

always

case_id

string

always

hold

object or null

always

now

object

always

outcome

any

always

owner

string

always

owner_name

string

always

process

string

always

process_name

string

always

project

string

always

started_at

string

always

status

string

always

steps

list of any

always

title

string

always

updated_at

string

always

version

string

always

A case’s comments

GET /api/v0/cases/{case_id}/comments

Comments on the case and its tasks, oldest first.

Who may: runtime.view, or a role in one of its tasks.

Answers 200: Done.

Field

Type

comments

list of object

always

Comment on a case

POST /api/v0/cases/{case_id}/comments

Adds text to the case, or to one of its open tasks with task_id. Answers with every comment.

Who may: runtime.view, or a role in one of its tasks.

Takes:

Field

Type

text

string

always

task_id

string or null

Answers 200: Done.

Field

Type

comments

list of object

always

Case files and evidence

What people added to a case, and what the case sent.

Add a file to a task

POST /api/v0/cases/{case_id}/tasks/{task_id}/files

The body is the file itself, with the form field it is for in ?field=, its name in ?name= and its type in Content-Type. It is checked for viruses and against the form’s limits before it is kept. 413 when it is too large.

Who may: a role the task is for.

Query: field, name.

Takes: the content itself (/).

Answers 200: Done.

Field

Type

file

object

always

A case’s files

GET /api/v0/cases/{case_id}/files

Every file added to the case, with who added it and when.

Who may: runtime.view.

Answers 200: Done.

Field

Type

files

list of object

always

Download a case file

GET /api/v0/cases/{case_id}/files/{file_id}

The file, as it was added. Each download is recorded.

Who may: runtime.view.

Answers 200: The file, with its own type, as an attachment.

Emails the case sent

GET /api/v0/cases/{case_id}/emails

Each email the case’s process sent, and whether it went.

Who may: runtime.view.

Answers 200: Done.

Field

Type

can_open_evidence

boolean

always

emails

list of object

always

Messages the case sent to other systems

GET /api/v0/cases/{case_id}/messages

Each call the case made to another system that the system acknowledged, with its answer.

Who may: runtime.view.

Answers 200: Done.

Field

Type

can_open_evidence

boolean

always

messages

list of object

always

Exactly what was sent

GET /api/v0/cases/{case_id}/evidence/{evidence}

The exact content of an email or message, as it was sent. Each opening is recorded.

Who may: assurance.audit.

Answers 200: What was sent: an email as message/rfc822, a message as it was sent.

Messages from other systems

Other systems starting cases and moving them on.

Send a message to a case

POST /api/v0/projects/{project}/messages/{message}

A message another system sends: it reaches the case waiting for it (matched by the fields the process correlates on), or starts a case if the process starts on it. 201 when it started a case, 200 when a case received it, 202 when it is kept until a case is ready for it (kept_until).

Who may: runtime.message.

Takes:

Field

Type

payload

object

always; The message’s fields, as the project’s message says.

Answers 200: A case received it.

Field

Type

started

list of string

always; The cases it started.

delivered

list of string

always; The cases that received it.

kept_until

string

With 202: until when it is kept for a case to be ready for it.

Answers 201: It started a case.

Field

Type

started

list of string

always; The cases it started.

delivered

list of string

always; The cases that received it.

kept_until

string

With 202: until when it is kept for a case to be ready for it.

Answers 202: Kept until a case is ready for it.

Field

Type

started

list of string

always; The cases it started.

delivered

list of string

always; The cases that received it.

kept_until

string

With 202: until when it is kept for a case to be ready for it.

Post a signed webhook

POST /api/v0/projects/{project}/webhooks/{message}

For systems that sign their posts rather than sign in. The body is the system’s own JSON; the webhook named in the project says which fields to take, the secret it is signed with and how the signature is sent. A post repeated with the same id gets the first answer. 404 when no webhook is set up for this message here.

Who may: anyone who can reach it; no session.

Takes:

The other system’s own JSON; the webhook says which fields to take.

Answers 200: A case received it.

Field

Type

started

boolean

case_id

string or null

repeat

boolean

The same post again: the first answer, and nothing done again.

Answers 201: Started a case.

Field

Type

started

boolean

case_id

string or null

repeat

boolean

The same post again: the first answer, and nothing done again.

Answers 202: Kept until a case is ready for it.

Field

Type

started

boolean

case_id

string or null

repeat

boolean

The same post again: the first answer, and nothing done again.

Supervision

Keeping work moving.

Try a failed step again

POST /api/v0/cases/{case_id}/jobs/{job_id}/retry

Puts a step that failed (a call to another system, a script) back in the queue.

Who may: platform.maintenance or runtime.supervise.

Answers 200: Done.

Field

Type

case_id

string

always

job_id

string

always

status

string

always

Work that needs a supervisor

GET /api/v0/supervision

For the projects I supervise: steps that failed, and the open tasks waiting longest (limit, 1 to 500, default 100) with how many are open in all.

Who may: runtime.supervise.

Query: limit.

Answers 200: Done.

Field

Type

failed_jobs

list of object

always

open_count

integer

always

open_tasks

list of Task

always

projects

list of string

always

Notices and absence

What each person is told, and time out of office.

My notices

GET /api/v0/notices

Notices for me, newest first, and how many I have not seen.

Answers 200: Done.

Field

Type

notices

list of object

always

unseen

integer

always

Mark notices seen

POST /api/v0/notices/seen

Marks every notice up to upto, the newest notice seen, as seen. Answers with how many are still unseen.

Takes:

Field

Type

upto

integer

always

Answers 200: Done.

Field

Type

unseen

integer

always

Which notices are emailed to me

GET /api/v0/notices/preferences

Notices are always shown in the web application; these say which are also emailed.

Answers 200: Done.

Field

Type

email_while_away

boolean

always

emailed

object

always

sent

boolean

always

Choose which notices are emailed

POST /api/v0/notices/preferences

emailed: whether each kind of notice is also emailed to me; email_while_away: whether they are emailed while I am out of office.

Takes:

Field

Type

email_while_away

boolean

always

emailed

object

always

Answers 200: Done.

Field

Type

email_while_away

boolean

always

emailed

object

always

sent

boolean

always

Time out of office

GET /api/v0/absence

My time out of office, or with platform.identity someone else’s (?subject=).

Query: subject.

Answers 200: Done.

Field

Type

absence

any

always

colleagues

list of object

always

name

string

always

subject

string

always

Set time out of office

POST /api/v0/absence

from and back (dates in the organisation’s time zone), and delegate, who takes my tasks meanwhile. With platform.identity, ?subject= sets someone else’s.

Query: subject.

Takes:

Field

Type

back

string

always

delegate

string

always

from

string

always

Answers 200: Done.

Field

Type

absence

object

always

colleagues

list of object

always

name

string

always

subject

string

always

End time out of office

DELETE /api/v0/absence

Ends it now.

Query: subject.

Answers 200: Done.

Field

Type

absence

any

always

colleagues

list of object

always

name

string

always

subject

string

always

Reports

How work is going, and finding cases by their fields.

How work is going

GET /api/v0/reports

Cases started and finished, tasks waiting and how long, by project, over days (and for project).

Who may: assurance.reports.

Query: days, project.

Answers 200: Done.

Field

Type

activity

list of object

always

days

integer

always

overview

object

always

partial

boolean

always

project

any

always

projects

list of string

always

since

string

always

waiting

list of object

always

Export a report

GET /api/v0/reports/export

Case activity (which=cases) or task waiting (which=tasks) as CSV, over days (and for project). Each export is recorded.

Who may: assurance.reports.

Query: which, days, project.

Answers 200: The report as CSV.

Fields cases can be found by

GET /api/v0/reports/fields

For each process I may report on, the case fields it lets people search by, with their kinds.

Who may: assurance.reports.

Answers 200: Done.

Field

Type

processes

list of object

always

Find cases by their fields

POST /api/v0/reports/query

Cases of process in project whose fields match every condition in where ({field, operator, value}), optionally with status. ?format=csv exports them.

Who may: assurance.reports.

Query: format.

Takes:

Field

Type

project

string

always

process

string

always

where

list of object

status

string or null

Answers 200: Done.

Field

Type

cases

list of object

always

fields

list of object

always

more

boolean

always

Releases

What is deployed, and moving running cases to a new release.

What is deployed

GET /api/v0/deployments

Each project’s deployments in this environment: which release, who deployed and approved it, and the evidence it was approved on.

Who may: release.inspect.

Answers 200: Done.

Field

Type

projects

list of object

always

refused

list of object

always

Cases that could move to the active release

GET /api/v0/deployments/{project}/cases

Running cases on earlier releases of the project, what moving them would change, and earlier moves.

Who may: release.inspect.

Answers 200: Done.

Field

Type

may_move

boolean

always

moves

list of any

always

open_elsewhere

integer

always

releases

list of object

always

to_version

string

always

Move cases to the active release

POST /api/v0/deployments/{project}/cases/move

Moves the cases on from_release_id (or only case_ids) to the project’s active release. dry_run says what would happen without moving anything.

Who may: release.deploy.

Takes:

Field

Type

from_release_id

string

always

case_ids

list of string

dry_run

boolean

Answers 200: Done.

Field

Type

cases

list of object

always

move_id

integer or null

always

moved

integer

always

to_version

string

always

Undo a move

POST /api/v0/deployments/{project}/cases/moves/{move_id}/undo

Moves back the cases of an earlier move that have not changed since.

Who may: release.deploy.

Answers 200: Done.

Field

Type

cases

list of object

always

Build

Templates for new projects.

Templates for new projects

GET /api/v0/build/templates

The templates a new project can start from: FlowAssembly’s and the organisation’s own.

Who may: the Build section.

Answers 200: Done.

Field

Type

templates

list of object

always

Download a template

GET /api/v0/build/templates/{template_id}/file

A template as an exported project, to import with fa import.

Who may: the Build section.

Answers 200: The project, as a .faproject file.

Admin

People, sign-in, settings, plugins and the instance’s health.

The access policy

GET /api/v0/admin/access

Roles, what each may do, and who holds them, with the policy’s history.

Who may: platform.identity.

Answers 200: Done.

Field

Type

catalogue

object

always

document

object

always

editable

boolean

always

history

list of object

always

projects

object

always

providers

list of string

always

sections

list of string

always

version

integer

always

Change the access policy

PUT /api/v0/admin/access

Saves a new version of the policy, given the version it was based on (409 when someone else saved one since).

Who may: platform.identity.

Takes:

Field

Type

document

object

always

version

integer

always

Answers 200: Done.

Field

Type

catalogue

object

always

document

object

always

editable

boolean

always

history

list of object

always

projects

object

always

providers

list of string

always

sections

list of string

always

version

integer

always

People who can sign in

GET /api/v0/admin/users

Local accounts and people from directories who have signed in, with their roles and teams.

Who may: platform.identity.

Answers 200: Done.

Field

Type

local_sources

list of string

always

users

list of object

always

Add a local account

POST /api/v0/admin/users

Adds an account to FlowAssembly’s own users (provider, username, name, email). Answers with its first password, shown this once, for the person to change.

Who may: platform.identity.

Takes:

Field

Type

email

string

always

name

string

always

provider

string

always

username

string

always

Answers 200: Done.

Field

Type

password

string

always

user

string

always

Change an account

POST /api/v0/admin/users/{provider}/{username}

Disables or enables a local account (disabled), or gives it a new password (new_password), shown this once.

Who may: platform.identity.

Takes:

Field

Type

disabled

boolean

new_password

boolean

Answers 200: Done.

Field

Type

disabled

boolean

password

string

user

string

always

Sign-in sources

GET /api/v0/admin/sources

The directories and local accounts people sign in with, and their history.

Who may: platform.identity.

Answers 200: Done.

Field

Type

document

object

always

editable

boolean

always

history

list of object

always

secret_names

list of string

always

version

integer

always

Change the sign-in sources

PUT /api/v0/admin/sources

Saves a new version, given the version it was based on. Each directory is checked first; 422 says which step failed.

Who may: platform.identity.

Takes:

Field

Type

document

object

always

version

integer

always

Answers 200: Done.

Field

Type

document

object

always

editable

boolean

always

history

list of object

always

secret_names

list of string

always

version

integer

always

Check a sign-in source

POST /api/v0/admin/sources/check

Tries a source with someone’s username, step by step: reaching it, signing in as the service account, finding the person and their groups.

Who may: platform.identity.

Takes:

Field

Type

id

string

always

settings

object

always

username

string

always

Answers 200: Done.

Field

Type

passed

boolean

always

steps

list of object

always

Every email sent

GET /api/v0/admin/email/deliveries

Every email FlowAssembly sent or tried to, newest first, and what became of it.

Who may: platform.configure.

Query: limit, after.

Answers 200: Done.

Field

Type

emails

list of object

always

more

boolean

always

The emails FlowAssembly sends

GET /api/v0/admin/email/templates

Its own notices, with their wording, and each deployed project’s emails.

Who may: platform.configure.

Answers 200: Done.

Field

Type

notices

list of object

always

notices_sent

boolean

always

project_emails

list of object

always

wording

object

always

The organisation’s settings

GET /api/v0/admin/settings

Its name, time zone, working days and holidays, notice wording and retention, with their history.

Who may: platform.configure.

Answers 200: Done.

Field

Type

document

object

always

editable

boolean

always

history

list of object

always

version

integer

always

web_address

any

always

Change the organisation’s settings

PUT /api/v0/admin/settings

Saves a new version, given the version it was based on.

Who may: platform.configure.

Takes:

Field

Type

document

object

always

version

integer

always

Answers 200: Done.

Field

Type

document

object

always

editable

boolean

always

history

list of object

always

version

integer

always

web_address

any

always

Plugins

GET /api/v0/admin/plugins

The plugins installed here, whether the organisation’s review record lets each run, which are switched on, and their settings.

Who may: platform.configure.

Answers 200: Done.

Field

Type

editable

boolean

always

plugins

list of object

always

reviewed_record

boolean

always

version

integer

always

Switch plugins on or off

PUT /api/v0/admin/plugins

Saves which plugins are on and their settings, given the version it was based on.

Who may: platform.configure.

Takes:

Field

Type

enabled

list of string

always

settings

object

always

version

integer

always

Answers 200: Done.

Field

Type

editable

boolean

always

plugins

list of object

always

reviewed_record

boolean

always

version

integer

always

The instance as it runs

GET /api/v0/admin/system

Each service and the version it runs, storage, and the settings in use (never secrets).

Who may: platform.configure or platform.maintenance.

Answers 200: Done.

Field

Type

database

object

always

email_servers

list of object

always

health

list of object

always

projects

list of object

always

python

string

always

retention

list of object

always

settings_file

any

always

sign_in_sources

list of string

always

storage

object

always

version

string

always

Queues

GET /api/v0/admin/queues

Per project: tasks waiting for people, steps waiting to run and steps that failed, and every failed step.

Who may: platform.configure or platform.maintenance.

Answers 200: Done.

Field

Type

can_retry

boolean

always

failed_jobs

list of any

always

kept_messages

list of any

always

projects

list of object

always

Announce maintenance

PUT /api/v0/admin/maintenance

maintenance: when FlowAssembly will be unavailable and what to tell people, shown to everyone, at sign-in too; null stops telling them. Given the settings version it was based on.

Who may: platform.maintenance.

Takes:

Field

Type

maintenance

null or object

always

version

integer

always

Answers 200: Done.

Field

Type

maintenance

object

always

version

integer

always

Plugins

APIs that installed plugins add.

A plugin’s own API

GET /api/v0/plugins/{name}/{path}

What a running plugin answers, for its own pages; open to people who may open one of them.

Who may: as the plugin’s pages say.

Answers 200: What the plugin answers.

A plugin’s own API

POST /api/v0/plugins/{name}/{path}

As GET.

Who may: as the plugin’s pages say.

Takes:

A any.

Answers 200: What the plugin answers.

A plugin’s own API

PUT /api/v0/plugins/{name}/{path}

As GET.

Who may: as the plugin’s pages say.

Takes:

A any.

Answers 200: What the plugin answers.

A plugin’s own API

DELETE /api/v0/plugins/{name}/{path}

As GET.

Who may: as the plugin’s pages say.

Takes:

A any.

Answers 200: What the plugin answers.

Health

For probes and load balancers; no session needed.

Is the process alive

GET /healthz

Answers while the process runs, without the database. For liveness probes.

Who may: anyone who can reach it; no session.

Answers 200: Alive.

Field

Type

status

string

always

Is it ready for work

GET /readyz

Answers 200 when the database is reachable, 503 when it is not. For readiness probes and load balancers.

Who may: anyone who can reach it; no session.

Answers 200: Ready.

Field

Type

status

string

always