Get Work Items for User
Get work items of a given type (approval or activity) for the user specified by the token.
GET https://instance.securid.com/aveksa/command.submit?cmd=getWorkItemsForUser
Request
Parameters
| getWorkItemsForUser | |
approval or activity | |
| auth-user-id | The username of the user whose work items to retrieve. Required when using a trusted application token. Not applicable for user tokens. |
| state | Filter by work item state. pending (Default) | completed | all |
| page-size | Number of work items to return per page. Defaults to 20. |
| start-page | Page number to start from. Defaults to 1. |
| sort | Sort work items by due date. asc (Default) | desc |
| format | xml - (Default) Returns work items as XML.json - Useful for parsing into JavaScript or other languages. See www.json.org for details. |
| token | Deprecated. Use the Authorization request header instead. |
Headers
Bearer token | |
| Accept | application/json |
| Content-Type | application/json |
Response
Parameters
NumWorkItems | Total number of work items returned. |
Approval[] / Activity[] | Array of work items matching the requested workItemType. |
WorkItemId | Composite ID of the work item. Pass this to Get Work Item Details. |
WorkItemName | Display name of the work item. |
WorkItemDueDate | Date and time the work item is due. |
WorkItemCompletedDate | Date and time the work item was completed. Empty if still pending. |
RequestName | Name of the parent change request. |
Examples
Request
- Curl
- Python
- Node.js
curl -K -X GET \
"https://instance.securid.com/aveksa/command.submit?cmd=getWorkItemsForUser&workItemType=approval&format=json&state=pending" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "getWorkItemsForUser",
"workItemType": "approval",
"format": "json",
"state": "pending"
}
headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
}
response = requests.get(url, params=params, headers=headers)
if response.status_code == 200:
data = response.json()
print(data)
else:
print(f"Request failed with status code {response.status_code}")
const axios = require('axios');
const url = "https://instance.securid.com/aveksa/command.submit";
const params = {
cmd: "getWorkItemsForUser",
workItemType: "approval",
format: "json",
state: "pending"
};
const headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
};
axios.get(url, { params, headers })
.then(response => {
if (response.status === 200) {
console.log(response.data);
} else {
console.log(`Request failed with status code ${response.status}`);
}
})
.catch(error => {
console.error('Error:', error);
});
Response
- 200 Approvals
- 200 Activities
- 200 No Items
- 401 Invalid Token
- 412 Missing workItemType
- 412 Missing auth-user-id
{
"getWorkItemsForUser": {
"Approval": [
{
"WorkItemName": "Asset Business Owner Approval",
"WorkItemId": "441:WPDS:1",
"RequestName": "00201",
"WorkItemCompletedDate": "2025-12-10 10:03:10.0",
"WorkItemDueDate": "2025-12-15 10:02:40.0"
}
],
"NumWorkItems": 1
}
}
{
"getWorkItemsForUser": {
"Activity": [
{
"WorkItemName": "Manual Fulfillment",
"WorkItemId": "224:WPDS:1",
"RequestName": "00102",
"WorkItemCompletedDate": "2025-04-14 21:27:37.0",
"WorkItemDueDate": "2025-03-12 17:00:00.0"
}
],
"NumWorkItems": 1
}
}
{
"getWorkItemsForUser": {
"NumWorkItems": 0
}
}
<html>
<head>
<title>Error</title>
</head>
<body>The token is not valid for the command 'getWorkItemsForUser'. Token is invalid or expired</body>
</html>
<html>
<head>
<title>Error</title>
</head>
<body>The workItemType parameter is required.
Query String=cmd=getWorkItemsForUser&auth-user-id=<userId>&format=json</body>
</html>
<html>
<head>
<title>Error</title>
</head>
<body>The parameter auth-user-id is required.
Query String=cmd=getWorkItemsForUser&workItemType=approval&format=json</body>
</html>
See Also
- Get Work Item Details: Get full details of a specific work item
- Perform Approval: Submit an approval decision on a work item
- Get Approvals for User: Retrieve pending approvals for a user
Verified with RSA Governance & Lifecycle version 8.0.0.188886 P10_HF01.