Skip to main content
Version: v0.1.4-beta.2

Tasks API

Use the Tasks API to list visible work, claim shared tasks, inspect task context, and complete user tasks.

Operations​

MethodPathSummary
GET/tasksGet all tasks
GET/tasks/{id}Get task by ID
PUT/tasks/{id}/assigneeReassign a task
POST/tasks/{id}/claimClaim a task
POST/tasks/{id}/completeComplete a task
POST/tasks/{id}/draftSave a task draft
POST/tasks/{id}/unclaimUnclaim a task
GET/tasks/searchSearch tasks
POST/tasks/searchSearch tasks with structured filters

GET /tasks​

Get all tasks

Retrieve all tasks with pagination

Completed task rows continue to return their last saved task variable snapshot until maintenance cleanup removes the task record.

PropertyValue
Operation IDgetTasks
AuthBearer token required unless security is disabled.
Response DTOPageTaskResponseDto

Completed task entries keep their submitted variables in the response so historical task reviews can show the final task payload.

Parameters​

NameInRequiredTypeDescription
pageablequeryYesPageable

Example request​

curl -X GET "http://localhost:8080/tasks?page=0&size=20" \
-H "Authorization: Bearer $TOKEN"

Responses​

StatusDescriptionSchema
200OKPageTaskResponseDto

Example response​

Status: 200 OK

{
"content": [
{
"id": 123,
"title": "Manager Review",
"name": "Manager Review",
"description": "Review the expense request.",
"processInstanceId": 456,
"nodeId": "manager-review",
"assignee": "manager",
"candidateUsers": [],
"candidateGroups": [
"FINANCE"
],
"status": "PENDING",
"createdAt": "2026-06-17T09:30:00",
"completedAt": null,
"formDbId": 12,
"formId": "expenseReview",
"variables": {
"amount": 1250.75,
"requester": "Alice"
}
}
],
"totalElements": 1,
"totalPages": 1,
"first": true,
"last": true,
"size": 20,
"number": 0,
"numberOfElements": 1,
"empty": false,
"sort": {
"empty": true,
"sorted": false,
"unsorted": true
},
"pageable": {
"offset": 0,
"pageNumber": 0,
"pageSize": 20,
"paged": true,
"unpaged": false,
"sort": {
"empty": true,
"sorted": false,
"unsorted": true
}
}
}

GET /tasks/{id}​

Get task by ID

Retrieve a specific task by its ID

If the task is already COMPLETED, the response still includes the last saved task variables until the task is purged by retention cleanup or an explicit maintenance purge.

PropertyValue
Operation IDgetTaskById
AuthBearer token required unless security is disabled.
Response DTOTaskResponseDto

Completed task responses continue to include the task's submitted variables after the task finishes. Use this endpoint when operators or client apps need to review the final task payload.

Parameters​

NameInRequiredTypeDescription
idpathYesinteger(int64)

Example request​

curl -X GET "http://localhost:8080/tasks/123" \
-H "Authorization: Bearer $TOKEN"

Responses​

StatusDescriptionSchema
200OKTaskResponseDto

Example response​

Status: 200 OK

{
"id": 123,
"title": "Manager Review",
"name": "Manager Review",
"description": "Review the expense request.",
"processInstanceId": 456,
"nodeId": "manager-review",
"assignee": "manager",
"candidateUsers": [],
"candidateGroups": [
"FINANCE"
],
"status": "PENDING",
"createdAt": "2026-06-17T09:30:00",
"completedAt": null,
"formDbId": 12,
"formId": "expenseReview",
"variables": {
"amount": 1250.75,
"requester": "Alice"
}
}

POST /tasks/{id}/claim​

Claim a task

Claim a shared/group task for the current authenticated user

PropertyValue
Operation IDclaimTask
AuthBearer token required unless security is disabled.
Response DTOTaskResponseDto

Parameters​

NameInRequiredTypeDescription
idpathYesinteger(int64)

Example request​

curl -X POST "http://localhost:8080/tasks/123/claim" \
-H "Authorization: Bearer $TOKEN"

Responses​

StatusDescriptionSchema
200OKTaskResponseDto

Example response​

Status: 200 OK

{
"id": 123,
"title": "Manager Review",
"name": "Manager Review",
"description": "Review the expense request.",
"processInstanceId": 456,
"nodeId": "manager-review",
"assignee": "admin",
"candidateUsers": [],
"candidateGroups": [
"FINANCE"
],
"status": "PENDING",
"createdAt": "2026-06-17T09:30:00",
"completedAt": null,
"formDbId": 12,
"formId": "expenseReview",
"variables": {
"amount": 1250.75,
"requester": "Alice"
}
}

POST /tasks/{id}/complete​

Complete a task

Mark a task as completed and provide task variables

PropertyValue
Operation IDcompleteTask
AuthBearer token required unless security is disabled.
Request DTOTask completion payload
Request content typeapplication/json
Response DTOstring

Parameters​

NameInRequiredTypeDescription
idpathYesinteger(int64)

Request body​

RequiredContent typeDTO/schema
Yesapplication/jsonTask completion payload

Example request body:

{
"variables": {
"approved": true,
"comment": "Approved for payment",
"reviewedAt": "2026-06-17T10:00:00Z"
}
}

Example request​

curl -X POST "http://localhost:8080/tasks/123/complete" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"variables": {
"approved": true,
"comment": "Approved for payment",
"reviewedAt": "2026-06-17T10:00:00Z"
}
}'

Responses​

StatusDescriptionSchema
200OKstring

Example response​

Status: 200 OK

Task completed successfully

POST /tasks/{id}/unclaim​

Removes the current assignee and returns the task to the available pool.

curl -X POST "http://localhost:8080/tasks/123/unclaim" \
-H "Authorization: Bearer $TOKEN"

The response is the updated TaskResponseDto.

POST /tasks/{id}/draft​

Persists task variables without completing the task. Use this when a user saves progress in the Task Portal and needs to continue later.

curl -X POST "http://localhost:8080/tasks/123/draft" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"variables": {
"amount": 1250.75,
"comment": "Waiting for receipt",
"approved": false
}
}'

The response is the updated TaskResponseDto.

PUT /tasks/{id}/assignee​

Reassigns an existing task. This is an administrative operation for changing the assignee explicitly.

curl -X PUT "http://localhost:8080/tasks/123/assignee" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"assignee": "manager"
}'

The response is the updated TaskResponseDto.

GET /tasks/search​

Searches tasks with query parameters. Use this for simple filters from browser clients or quick operational checks.

curl -X GET "http://localhost:8080/tasks/search?status=PENDING&assignee=manager&page=0&size=20" \
-H "Authorization: Bearer $TOKEN"

The response is a paged PageTaskResponseDto.

POST /tasks/search​

Search tasks

Search tasks with structured filters and pagination.

Filters are combined with AND. The endpoint respects the caller's visibility rules, so non-admin users only see tasks assigned to them or available to their groups.

Supported filter fields:

FieldNotes
status / stateTask status such as PENDING or COMPLETED.
assigneeTask assignee. Use UNASSIGNED to match empty assignees.
candidateUser / candidate_userCandidate user membership.
candidateGroup / candidate_groupCandidate group membership.
processInstance / processInstanceId / process_instance_idProcess instance id.
processDefinition / processDefinitionId / process_definition_id / processDefinitionKey / process_definition_keyProcess definition id, key, or name.
taskName / task_name / title / nameTask title.
createdAt / created_at / createdDate / created_dateTask creation timestamp or date.
variableTask or process variable, addressed by name and scope.

Supported operators:

OperatorNotes
EQUALS, NOT_EQUALSExact match.
IN, NOT_INMatch against multiple values.
GREATER_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN, LESS_THAN_OR_EQUALNumeric or date comparisons.
CONTAINS, STARTS_WITH, ENDS_WITHCase-insensitive string matching.

Completed task responses continue to include the last saved task variable snapshot until maintenance cleanup removes the task record.

PropertyValue
Operation IDsearchTasks
AuthBearer token required unless security is disabled.
Response DTOPageTaskResponseDto

Request body​

RequiredContent typeDTO/schema
Yesapplication/jsonTaskSearchRequestDto

Example request body:

{
"filters": [
{
"field": "status",
"operator": "EQUALS",
"value": "PENDING"
},
{
"field": "taskName",
"operator": "CONTAINS",
"value": "review"
}
]
}

Parameters​

NameInRequiredTypeDescription
pageablequeryYesPageable

Example request​

curl -X POST "http://localhost:8080/tasks/search?page=0&size=20" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{
"filters": [
{ "field": "status", "operator": "EQUALS", "value": "PENDING" },
{ "field": "assignee", "operator": "EQUALS", "value": "manager" }
]
}'

Responses​

StatusDescriptionSchema
200OKPageTaskResponseDto

Example response​

Status: 200 OK

{
"content": [
{
"id": 123,
"title": "Manager Review",
"name": "Manager Review",
"description": "Review the expense request.",
"processInstanceId": 456,
"nodeId": "manager-review",
"assignee": "manager",
"candidateUsers": [],
"candidateGroups": [
"FINANCE"
],
"status": "PENDING",
"createdAt": "2026-06-17T09:30:00",
"completedAt": null,
"formDbId": 12,
"formId": "expenseReview",
"variables": {
"amount": 1250.75,
"requester": "Alice"
}
}
],
"totalElements": 1,
"totalPages": 1,
"first": true,
"last": true,
"size": 20,
"number": 0,
"numberOfElements": 1,
"empty": false,
"sort": {
"empty": true,
"sorted": false,
"unsorted": true
},
"pageable": {
"offset": 0,
"pageNumber": 0,
"pageSize": 20,
"paged": true,
"unpaged": false,
"sort": {
"empty": true,
"sorted": false,
"unsorted": true
}
}
}