View Workflow Steps

get

/api/restapi/workflowInstance/steps

Send a request to this endpoint to view steps of multiple workflows.

Request

Query Parameters

There's no request body for this operation.

Back to Top

Response

Supported Media Types

200 Response

Response will be in the format of Map<Long, List<ApiEntityStepInstance> which is a map of provided workflowInstanceId as key and the list of its step instances as value. For example:
{
"1": [{
"completedDate": "2024-03-01T06:56:01",
"stepName": "Start",
"startedDate": "2024-03-01T06:56:00",
"workflowInstanceId": 1,
"tasksCompleted": 0,
"context": "P1",
"status": "FINISHED",
"workflowInstanceName": "Project Closeout"
},
{
"stepName": "Sponsor Decision",
"startedDate": "2024-03-01T06:56:33",
"workflowInstanceId": 1,
"tasksCompleted": 0,
"context": "P1",
"status": "EXECUTING",
"workflowInstanceName": "Project Closeout"
}],
"2": [{
"completedDate": "2024-03-01T07:18:49",
"stepName": "Start",
"startedDate": "2024-03-01T07:18:48",
"workflowInstanceId": 2,
"tasksCompleted": 1,
"context": "P1",
"status": "FINISHED",
"workflowInstanceName": "Project Closeout"
},
{
"stepName": "Sponsor Decision",
"startedDate": "2024-03-01T07:19:13",
"workflowInstanceId": 2,
"tasksCompleted": 1,
"context": "P1",
"status": "EXECUTING",
"workflowInstanceName": "Project Closeout"
}]
}
API fetches all the Step Instances records based on the given workflowInstanceIds and the given OOTB (filtering, pagination, sorting, record count) query parameters and then groups the results by workflowInstanceIds at the end. OOTB feature is available on all the ApiEntityStepInstance records and users can provide the ApiEntityStepInstance fields (except for those mentioned in Unsupported Fields for Entity Filtering page) as OOTB query params. For example:
/api/restapi/workflowInstance/steps?workflowInstanceIds=1,2&filters=status=FINISHED&start=0,limit=5

Sorting will work inside the groups.

Since the response is in a form of a map, user need to follow the hierarchy for projection. In above response example, to select 'status' for '1' workflowInstanceId, user should be to providing:/api/restapi/workflowInstance/steps?workflowInstanceIds=1,2&select=1.status
Body ()
Root Schema : List<ApiEntityStepInstance>
Type: array
Title: List<ApiEntityStepInstance>
Show Source
Nested Schema : ApiEntityStepInstance
Type: object
Title: ApiEntityStepInstance
Show Source

204 Response

Successful operation with no content.

400 Response

Invalid Input.
Back to Top