Links

Workflow runs

get
https://app.trelica.com/api
/workflows/v1/{workflowId}/runs
List workflow runs

Simple queries

The q parameter lets you pass a simple text query. This searches the follow fields:
Field value matches query exactly
Field value contains query text
Workflow run ID
Workflow run name

Example filters

Filter
Results
steps[status eq "Waiting"]
Runs with steps which are in the Waiting state
createdDtm ge "2022-01-01"
All runs created after 1st Jan 2022

Data structure

Workflow run

Attribute
Type
Description
id
string
Unique identifier for workflow run
name
string
Name of run
status
enum
Waiting | Failed | Completed
waitingUntilDtm
date
Optional. Only included if the status is Waiting
createdBy
object
Compact User object
createdDtm
datetime
(ISO format) Date/time run created
lastModifiedDtm
datetime
(ISO format) Date/time run last modified
context
object
Wraps a workflow run context
steps
array
List of Steps

Workflow run step

Attribute
Type
Description
id
string
Unique identifier for workflow step
type
enum
A workflow step type
name
string
Name of the workflow step
status
enum
Waiting | Failed | Completed
completed
object
Step Completed object.
Only exists if the status is Completed
waiting
object
Step Waiting object. Only exists if the status is Waiting
failed
object
Step Failed object. Only exists if the status is Failed

Workflow run step - Completed

Attribute
Type
Description
dtm
datetime
Date and time the step was run
nextStepIds
array
The step Ids (strings) that the workflow ran after this step.

Workflow run step - Waiting

Attribute
Type
Description
dtm
datetime
Date and time the step was run
untilDtm
datetime
Date and time the step will advance if no action has been received.
actions
array

Workflow run Step - Waiting Action

Attribute
Type
Description
label
string
Action label
href
url
URL to POST to execute this action.
Calling this requires the Workflows.Runs.Execute OAuth scope
When calling a Waiting Action URL then you must make an HTTP POST request.
This is because the request is not idempotent as it will modify the workflow run state.
If you try an HTTP GET you will receive an HTTP 405 "Method Not Allowed" error.
You should only perform a single POST request. Additional requests to the same URL whilst the action is being processed can result in an HTTP 409 "Conflict".

Workflow run step - Failed

Attribute
Type
Description
dtm
datetime
Date and time the step failed
message
string
Error message