Filter History Tasks

Do we have a REST API to filter out all historic tasks not belonging to a particular user.

API:

http://localhost:8081/engine-rest/history/task?processInstanceId=4fdcfd3c-0fe9-11e9-9444-889f965c5e51&taskName=abc&taskAssignee=hugh

This query filters out all tasks that were completed by hugh.
I need an API to filter out all tasks that were not completed by hugh.
Need some help with this.
Thanks.

There’s no such REST API to provide the task which was not completed by specific user.

Instead you can store approver userid as part of process/task variables. Later while querying for historic tasks you can filter by using operator “neq”

You can refer this section,

processVariables A JSON array to only include tasks that belong to a process instance with variables with certain values.
The array consists of JSON objects with three properties name , operator and value . name is the variable name, operator is the comparison operator to be used and value the variable value.
value may be of type String , Number or Boolean .

Valid operator values are: eq - equal to; neq - not equal to; gt - greater than; gteq - greater than or equal to; lt - lower than; lteq - lower than or equal to; like .