Get a workflow run
curl --request GET \
--url https://app.trelica.com/api/workflows/v1/{workflowId}/runs/{runId} \
--header 'Authorization: Bearer <token>'{
"next": "https://app.trelica.com/api/workflows/v1/b7288c2c64f779e28024ea0e/runs?after=eyJpZCI6IjY2MmE4YzExZjA3YmEwYWY5YTI1Yzg2MCJ9&limit=100",
"results": [
{
"id": "649454cc391d7e83ae7a0aa5",
"name": "Shirley Lane",
"status": "Completed",
"createdBy": {
"userId": "a9b8c7d6-e5f4-43a2-b1c0-9a8b7c6d5e4f",
"name": "Samira Johnson",
"email": "samira.johnson@example.com"
},
"createdDtm": "2023-06-22T14:03:56.248Z",
"deleted": false,
"lastModifiedDtm": "2023-06-22T14:04:16.157Z",
"context": {
"person": {
"id": "67aa6cdf421044b49ad1d6dfded7bf21",
"name": "Shirley Lane",
"firstName": "Shirley",
"lastName": "Lane",
"email": "shirley.lane@example.com",
"employeeId": "E001529",
"location": "Cambridge, UK",
"jobTitle": "Content Lead",
"team": "Web site",
"leavingDate": "2023-05-25T00:00:00Z",
"customFields": {
"personalemail": null
}
}
},
"trigger": {
"id": "54d9783a47e694183a270549",
"type": "PersonLeaves",
"status": "Completed",
"completed": {
"dtm": "2023-06-22T14:04:15.021Z",
"nextStepIds": [
"54d9783a47e694183a27054a"
],
"newContext": {
"person": {
"id": "67aa6cdf421044b49ad1d6dfded7bf21",
"name": "Shirley Lane",
"firstName": "Shirley",
"lastName": "Lane",
"email": "shirley.lane@example.com",
"employeeId": "E001529",
"location": "Cambridge, UK",
"jobTitle": "Content Lead",
"team": "Web site",
"leavingDate": "2023-05-25T00:00:00Z",
"customFields": {
"personalemail": null
}
}
}
}
},
"steps": [
{
"id": "54d9783a47e694183a27054a",
"type": "OffboardPersonApps",
"name": "Offboard person from apps",
"status": "Completed",
"completed": {
"dtm": "2023-06-22T14:04:16.149Z",
"nextStepIds": []
}
}
]
},
{
"id": "662a8c11f07ba0af9a25c860",
"name": "Stephanie Mason",
"status": "Waiting",
"createdBy": {
"userId": "7cbf8b34-a321-43f0-8c8f-275b41e30b14",
"name": "System",
"email": "admin@example.com"
},
"createdDtm": "2024-04-25T17:00:01.207Z",
"deleted": false,
"lastModifiedDtm": "2024-04-25T17:00:01.375Z",
"context": {
"person": {
"id": "0ad0090d2f27407ba1312883e805b123",
"name": "Stephanie Mason",
"firstName": "Stephanie",
"lastName": "Mason",
"email": "stephanie.mason@example.com",
"employeeId": "E001557",
"location": "Palo Alto, CA",
"jobTitle": "Accounts Receivable Executive",
"team": "Accounts Receivable",
"startDate": "2022-06-04T00:00:00Z",
"leavingDate": "2024-04-07T00:00:00Z",
"customFields": {
"personalemail": null
}
}
},
"trigger": {
"id": "54d9783a47e694183a270549",
"type": "PersonLeaves",
"status": "Waiting",
"waiting": {
"dtm": "2024-04-25T17:00:01.326Z"
}
},
"steps": []
}
]
}Workflows
Get a workflow run
Returns the run with the given ID for the workflow, including its context and step states,
inside a one-item result page (empty if no run has that ID). The variables query
parameter and the Workflows.Runs.ReadSecrets scope behave as for listing runs.
Required scope: Workflows.Runs.Read (Read-only access to workflow runs)
GET
/
api
/
workflows
/
v1
/
{workflowId}
/
runs
/
{runId}
Get a workflow run
curl --request GET \
--url https://app.trelica.com/api/workflows/v1/{workflowId}/runs/{runId} \
--header 'Authorization: Bearer <token>'{
"next": "https://app.trelica.com/api/workflows/v1/b7288c2c64f779e28024ea0e/runs?after=eyJpZCI6IjY2MmE4YzExZjA3YmEwYWY5YTI1Yzg2MCJ9&limit=100",
"results": [
{
"id": "649454cc391d7e83ae7a0aa5",
"name": "Shirley Lane",
"status": "Completed",
"createdBy": {
"userId": "a9b8c7d6-e5f4-43a2-b1c0-9a8b7c6d5e4f",
"name": "Samira Johnson",
"email": "samira.johnson@example.com"
},
"createdDtm": "2023-06-22T14:03:56.248Z",
"deleted": false,
"lastModifiedDtm": "2023-06-22T14:04:16.157Z",
"context": {
"person": {
"id": "67aa6cdf421044b49ad1d6dfded7bf21",
"name": "Shirley Lane",
"firstName": "Shirley",
"lastName": "Lane",
"email": "shirley.lane@example.com",
"employeeId": "E001529",
"location": "Cambridge, UK",
"jobTitle": "Content Lead",
"team": "Web site",
"leavingDate": "2023-05-25T00:00:00Z",
"customFields": {
"personalemail": null
}
}
},
"trigger": {
"id": "54d9783a47e694183a270549",
"type": "PersonLeaves",
"status": "Completed",
"completed": {
"dtm": "2023-06-22T14:04:15.021Z",
"nextStepIds": [
"54d9783a47e694183a27054a"
],
"newContext": {
"person": {
"id": "67aa6cdf421044b49ad1d6dfded7bf21",
"name": "Shirley Lane",
"firstName": "Shirley",
"lastName": "Lane",
"email": "shirley.lane@example.com",
"employeeId": "E001529",
"location": "Cambridge, UK",
"jobTitle": "Content Lead",
"team": "Web site",
"leavingDate": "2023-05-25T00:00:00Z",
"customFields": {
"personalemail": null
}
}
}
}
},
"steps": [
{
"id": "54d9783a47e694183a27054a",
"type": "OffboardPersonApps",
"name": "Offboard person from apps",
"status": "Completed",
"completed": {
"dtm": "2023-06-22T14:04:16.149Z",
"nextStepIds": []
}
}
]
},
{
"id": "662a8c11f07ba0af9a25c860",
"name": "Stephanie Mason",
"status": "Waiting",
"createdBy": {
"userId": "7cbf8b34-a321-43f0-8c8f-275b41e30b14",
"name": "System",
"email": "admin@example.com"
},
"createdDtm": "2024-04-25T17:00:01.207Z",
"deleted": false,
"lastModifiedDtm": "2024-04-25T17:00:01.375Z",
"context": {
"person": {
"id": "0ad0090d2f27407ba1312883e805b123",
"name": "Stephanie Mason",
"firstName": "Stephanie",
"lastName": "Mason",
"email": "stephanie.mason@example.com",
"employeeId": "E001557",
"location": "Palo Alto, CA",
"jobTitle": "Accounts Receivable Executive",
"team": "Accounts Receivable",
"startDate": "2022-06-04T00:00:00Z",
"leavingDate": "2024-04-07T00:00:00Z",
"customFields": {
"personalemail": null
}
}
},
"trigger": {
"id": "54d9783a47e694183a270549",
"type": "PersonLeaves",
"status": "Waiting",
"waiting": {
"dtm": "2024-04-25T17:00:01.326Z"
}
},
"steps": []
}
]
}Authorizations
OAuth 2.0. Obtain an access token via the Client Credentials or Authorization Code flow, then send it as Authorization: Bearer <token>.
Query Parameters
A comma-separated list of workflow variable IDs whose values should be included in each run's context. Values are omitted unless requested here. Reading a secret (password) variable additionally requires the Workflows.Runs.ReadSecrets scope.
Was this page helpful?
⌘I