Executes the saved query of the filter by id and returns the single result.

Method

GET /filter/{id}/singleResult

Parameters

Path Parameters

Name Description
id The id of the filter to execute.

Result

A JSON object corresponding to the matching entity interface in the engine. This depends on thesaved query in the filter. Therefore it is not possible to specify a generic result format, i.e., ifthe resource type of the filter is Task the result will correspond to the Task interface in theengine.

Response Codes

Code Media type Description
200 application/json Request successful.
200 application/hal+json Request successful. In case of an expected HAL response.
204 Request successful, but the result was empty.
400 application/json The executed filter returned more than one single result. See the Introduction for the error response format.
403 application/json The authenticated user is unauthorized to read this filter. See the Introduction for the error response format.
404 application/json Filter with given id does not exist. See the Introduction for the error response format.

Example

Request

GET /filter/aTaskFilterId/singleResult

Response

Status 200.

Note: The examples show the result of a task filter. So the response corresponds to a task, but for other filters the response format will differ.

  1. {
  2. "assignee": "jonny1",
  3. "caseDefinitionId": null,
  4. "caseExecutionId": null,
  5. "caseInstanceId": null,
  6. "created": "2014-09-15T15:45:48.000+0200",
  7. "delegationState": null,
  8. "description": null,
  9. "due": null,
  10. "executionId": "aExecutionId",
  11. "followUp": null,
  12. "formKey": null,
  13. "id": "aTaskId",
  14. "name": "Task 2",
  15. "owner": null,
  16. "parentTaskId": null,
  17. "priority": 50,
  18. "processDefinitionId": "aProcessId",
  19. "processInstanceId": "aProcessInstanceId",
  20. "suspended": false,
  21. "taskDefinitionKey": "aTaskKey"
  22. }

原文: https://docs.camunda.org/manual/7.9/reference/rest/filter/get-execute-single-result/