GET /bpm-engine/api/tasks

As of Version

product version 2021 Autumn | component version 

Request MethodGET
Response FormatJSON
Description

Retrieves a list of tasks of the currently active user that are matching the conditions defined in various query parameters.

The following query parameters can optionally be added to the request URL.

ParameterTypeDescription
createdAfterstringOnly return tasks which have been created after the given date.
createdBeforestringOnly return tasks which have been created before the given date.
createdOnstringOnly return tasks which have been created on the given date.
descriptionstringOnly return tasks with the given description.
dueAfterstringOnly return tasks which are due after the given date.
dueBeforestringOnly return tasks which are due before the given date.
dueOnstringOnly return tasks which are due on the given date.
filterstringAllows to filter the result. By default, all tasks that are assigned to the current user, have been claimed by the current user or are waiting to be claimed by the current user (candidate user or groups) will be returned.
includeProcessVariablesbooleanInclude process variables in the result.
namestringOnly return process instances with the given name.
nameLikestring

Specify a string that has to match the name and that can contain % characters as placeholders for an arbitrary number of unknown characters.

pageinteger($int32)Results page you want to retrieve (0…N). Default is 0 which means the first page.
processDefinitionIdstringOnly return process instances with the given process definition ID.
processDefinitionKeystringOnly return process instances with the given process definition key.
processDefinitionKeyLikestring

Specify a string that has to match the processDefinitionKey and that can contain % characters as placeholders for an arbitrary number of unknown characters.

Only return tasks which are part of a process instance which has a process definition with a key matching the given value.

processDefinitionNamestringOnly return tasks which are part of a process instance which has a process definition with the given name.
processDefinitionNameLikestring

Specify a string that has to match the processDefinitionName and that can contain % characters as placeholders for an arbitrary number of unknown characters.

Only return tasks which are part of a process instance which has a process definition with a name matching the given value.

processInstanceBusinessKeystringOnly return tasks which are part of the process instance with the given business key.
processInstanceBusinessKeyLikestring

Specify a string that has to match the processInstanceBusinessKey and that can contain % characters as placeholders for an arbitrary number of unknown characters.

Only return tasks which are part of the process instance which has a business key matching the given value.

processInstanceIdstringOnly return tasks which are part of the process instance with the given ID.
processInstanceIdWithChildrenstringOnly return tasks which are part of the process instance and its children with the given ID.
scopeDefinitionIdstringOnly return tasks with the given scopeDefinitionId.
scopeIdstringOnly return tasks with the given scopeId.
scopeTypestringOnly return tasks with the given scopeType.
sizeinteger($int32)Number of objects per page.
sortstringSorting of results either ascending (asc) or descending (desc). Default sort order is ascending.
withoutDueDatebooleanOnly return tasks which do not have a due date. The property is ignored if the value is false.

Meaning of HTTP status codes:

HTTP Status CodeDescription
200The request was successful and the tasks are returned.
401The calling user is not authorized.
404A parameter was passed in the wrong format. The status message contains additional information.
Request HeaderContent-Type: application/json
Request Example
https://<host>/bpm-engine/api/tasks?page=0&size=1
Response Example
{
  "objects": [
    {
      "id": "187",
      "name": "1st_task",
      "description": "In this case, you have to do several things as they are:\n1. subtask\n2. subtask",
      "assignee": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
      "owner": aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa5,
      "createTime": "2021-11-01T12:28:46.388Z",
      "claimTime": "2021-11-01T13:29:47.389Z",
      "processDefinitionId": "twosteptest_proc:4:8dc694a2-10b1-11ec-99ef-027ea5eeae02",
      "processInstanceId": "00000000-0000-0000-0000-000000000000",
      "parentTaskId": null,
      "formKey": "twosteptest_proc:1st_task",
      "taskDefinitionKey": "sid-4CAF2A19-B303-46C6-A7C0-2F506F1613D4",
      "delegationState": "pending",
      "suspended": true,
      "variables": [
        {
          "name": "whatabout",
          "type": "string",
          "value": "testValue",
          "scope": "global"
        },
        {
          "name": "initiator",
          "type": "string",
          "value": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa5",
          "scope": "global"
        }
      ]
    }
  ],
  "numItems": 1,
  "totalNumItems": 1,
  "hasMoreItems": false
}