Search Tasks
post
/process/api/v1/search/tasks
Search for tasks. Use this search API function if you want to use a query that is created using Lucene's simple query parser and full query string syntax.
Request
Header Parameters
-
Accept-Language: string
Accept-Language header in IETF BCP 47
Supported Media Types
- application/json
Root Schema : schema
Type:
Show Source
object
-
action: string
Allowed Values:
[ "INSPECT", "READ", "USE", "MANAGE" ]
Used only in conjuction with assignmentFilter=PERSONA, where action specifies the DACS permission level utilized to fetch the PERSONA based task listing. If not specified, the default value of INSPECT is used for fetching the tasks -
assignmentFilter: string
Allowed Values:
[ "MY", "GROUP", "MY_AND_GROUP", "MY_AND_GROUP_ALL", "CREATOR", "PERSONA", "MEMBER" ]
-
count: boolean
Whether to return the count of the matching document or not
-
fetchIdentityDisplayName: boolean
Whether to fetch the displayName for identity type fields
-
fields: array
fields
A comma separated list of searchable fields that should be included in search. When the search type is advanced, this can be omitted since the query string itself will be analysed by the ReST API and the fields in the query string will be included
-
highlight: string
If the search response should include highlighting of matched words
-
highlightTag: string
The HTML markup to be used to surround highlighted words in the returned search response
-
limit: integer
Maximum Value:
50
Default Value:25
-
offset: integer
Default Value:
0
-
orderBy: string
This query parameter specifies the orderBy clause. Supported sortBy fieldName should be any of: title,priority,dueDate,createdDate,completedDate The value must follow the format fieldName[:(asc/desc)]. e.g. priority:asc. Multiple ordering is not supported. Default sortOrder is asc if not specified. Default orderBy is createdDate:desc
-
query: string
The query string either in simple or advanced format. Simple query strings are for full text queries and do not contain fielded queries, whereas the advanced format is for fielded queries
-
searchType: string
Allowed Values:
[ "simple", "advanced" ]
simple is used for full text searches using the simple query string syntax, advanced is used to build fielded search queries combining multiple fields with boolean operators AND/OR/NOT -
select: array
select
The list of fields to include in the returned documents
Nested Schema : fields
Type:
array
A comma separated list of searchable fields that should be included in search. When the search type is advanced,
this can be omitted since the query string itself will be analysed by the ReST API and the fields in the query
string will be included
Show Source
Nested Schema : select
Type:
array
The list of fields to include in the returned documents
Show Source
Response
Supported Media Types
- application/json
200 Response
Successful operation
Nested Schema : items
Type:
Show Source
array
-
Array of:
object items
Additional Properties Allowed:
true
Nested Schema : items
Type:
object
Additional Properties Allowed:
true
400 Response
Returned if some of the query parameters are invalid
401 Response
Unauthorized
404 Response
Tasks not found
429 Response
Too Many Requests
500 Response
Internal Server Error
503 Response
Too Many Exceptions or Too Slow Requests
Examples
Example: Search for tasks
The following example shows how to search for tasks by submitting a POST request on the REST resource using cURL. For more information about cURL, see cURL Access. For more information about endpoint URL structure, see Send Requests.
curl 'http://localhost:9020/process/api/v1/search/tasks' \
-H 'Accept: text/plain, */*; q=0.01' \
-H 'Accept-Language: en,en-US;q=0.9,en-GB;q=0.8,hi;q=0.7' \
-H 'Authorization: ********** \
-H 'Connection: keep-alive' \
-H 'Content-Type: application/json' \
-H 'Origin: http://localhost:9020' \
-H 'Referer:http://localhost:9020/process/workspace/?root=taskList' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36' \
-H 'X-Requested-With: XMLHttpRequest' \
-H 'opc-request-id: agas76asdh' \
-H 'x-tenant-id: coke' \
--data-raw $'{"orderBy":"createdDate:desc","offset":0,"totalResults":true,"limit":20,"assignmentFilter":"PERSONA","actionValue":"MANAGE","query":"\u0021(state:ASSIGNED)","highlight":true,"highlightTag":"b","searchType":"advanced","count":true,"fetchIdentityDisplayName":true,"select":["title","id","state","subState","assignee","priority","createdDate","businessKey","dueDate","processName","createdBy"]}' \
Sample for request body
{
"orderBy": "createdDate:desc",
"offset": 0,
"limit": 20,
"assignmentFilter": "PERSONA",
"actionValue": "MANAGE",
"query": "!(state:ASSIGNED)",
"highlight": true,
"highlightTag": "b",
"searchType": "advanced",
"count": true,
"fetchIdentityDisplayName": true,
"select": [
"title",
"id",
"state",
"subState",
"assignee",
"priority",
"createdDate",
"businessKey",
"dueDate",
"processName",
"createdBy"
]
}
Sample response
{
"limit": 20,
"offset": 0,
"count": 1,
"totalResults": 1,
"items": [
{
"createdDate": "2025-07-18T06:25:32.028+00:00",
"subState": "INITIATED",
"createdBy": {
"id": "20c0862f-fd35-40ca-a70d-03d0faac45a9",
"name": "ssaInstanceAdmin",
"displayName": null,
"type": "USER"
},
"processName": "TestAsyncUT",
"createdByType": "USER",
"assignee": {
"id": "077acfe8-fc17-4ceb-8216-xz487562yrtgf98357hf6g",
"name": "handel",
"displayName": null,
"type": "USER"
},
"state": "COMPLETED",
"id": "018adc6f-63a0-11f0-959f-0242ac120024",
"title": "HITL handel ",
"priority": 2
}
]
}