Get Pending Tasks
Overview
Retrieve pending tasks for a user and process.
Endpoint
GET /api/task/pending
Use the service origin described in Getting started. The path above already includes /api.
Authentication
Send the access token obtained from Get Access Token in the Authorization header. Access is limited by the authenticated account’s permissions.
Request headers
Accept: application/json
Authorization: Bearer ACCESS_TOKEN
Query parameters
| Parameter | Type | Requirement | Description |
|---|---|---|---|
userName | string | See notes | User name used to sign in or select tasks. |
processName | string | See notes | Process name used to filter tasks. |
isInOutArgsRequired | boolean | See notes | Whether to include input and output arguments. The example uses true. |
The example supplies all parameters listed above. Omission behavior and server defaults are not established by this reference; confirm them for your deployed version.
Request example
The following example uses cURL in a POSIX shell. Replace example credentials and IDs before running it. Replace the AI Command Center origin with your deployment address.
curl --request GET \
--url 'https://command-center.example.com/api/task/pending?userName=sample-user&processName=Expense-Report-Approval&isInOutArgsRequired=true' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN'
Response
Successful status: 200 OK.
The following is an illustrative response with synthetic contact and credential values. Arrays are shortened to one representative item.
{
"data": [
{
"taskId": 205,
"name": "Approve",
"form": "DemoForm.iform",
"processInstanceId": "d6b5c730d7204790b71fa635f72c0b59",
"statusId": 2,
"status": "Assigned",
"priorityId": 2,
"arguments": null,
"assignedTo": 2,
"assignedUserTitle": "demouser1 1",
"dueDate": "2024-07-10T04:18:42.231048",
"created": "2024-07-09T04:18:42.250691",
"createdBy": "Sample User",
"modified": "2024-07-10T09:28:35.853284",
"modifiedBy": "Sample User",
"processName": "LeaveApplication_demo",
"creatorName": "Sample User",
"modifierName": "Sample User",
"isExternalForm": false,
"activityId": "StandardTaskWithTimeout1",
"activityInstanceId": "aa1c4358-7853-430c-8154-9470260b2771",
"isAssignedToGroup": true,
"originalAssignedUserTitle": "demouser1 1",
"input": null,
"output": null
}
],
"totalCount": 8
}
Response fields
The table describes selected fields in the response. Types reflect the example; this is not an exhaustive schema or nullability contract.
| Field | Example type | Description |
|---|---|---|
data | array | Task records matching the request. |
totalCount | integer | Reported number of matching tasks. |
Errors
Endpoint-specific error statuses and response bodies are not yet documented. See Usage and troubleshooting for general handling guidance.