Get Approvals for User
Get approvals assigned to the user specified by the token.
GET https://instance.securid.com/aveksa/command.submit?cmd=getApprovalsForUser
This command is deprecated and has been replaced by Get Work Items for User. Future releases may remove it.
When using a trusted application token, auth-user-id is required to specify the user whose approvals to retrieve. When using a user token from loginUser, auth-user-id is not applicable. The default response format is XML. Pass format=json to receive JSON.
Invalid auth-user-id values return 401 The token is invalid or expired rather than a meaningful user-not-found error. Invalid sort values are silently ignored and fall back to asc.
Request
Parameters
| getApprovalsForUser | |
| format | xml - (Default) Returns the response as XML.json - Returns the response as JSON. |
| auth-user-id | The ID of the user whose approvals to retrieve. Required when using a trusted application token. Not applicable for user tokens. |
| state | The approval state to filter by. Valid values: pending completed all. (Default) pending |
| sort | Sort results by due date. Valid values: asc desc. (Default) asc. Values are case-sensitive. |
| page-size | Number of approvals per page. (Default) 20 |
| start-page | Starting page number. (Default) 1 |
Headers
Bearer token |
Response
Parameters
NumApprovals | Total number of matching approvals across all pages. |
Approval | Absent when no approvals are returned for the page. A single object when 1 approval is returned. An array of objects when multiple approvals are returned. |
Approval.WorkItemId | Unique identifier of the approval work item, in id:WPDS:n format. |
Approval.WorkItemName | Display name of the approval step. |
Approval.RequestName | Name of the change request this approval belongs to. |
Approval.WorkItemDueDate | Due date and time of the approval. |
Approval.WorkItemCompletedDate | Date and time the approval was completed. Empty string if not yet completed. |
Examples
Request
- Curl
- Python
- Node.js
curl -K -X GET \
"https://instance.securid.com/aveksa/command.submit?cmd=getApprovalsForUser&format=json&auth-user-id=jsmith&state=all" \
-H "Authorization: Bearer <token>"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "getApprovalsForUser",
"format": "json",
"auth-user-id": "jsmith",
"state": "all"
}
headers = {
'Authorization': 'Bearer <token>'
}
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: "getApprovalsForUser",
format: "json",
"auth-user-id": "jsmith",
state: "all"
};
const headers = {
'Authorization': 'Bearer <token>'
};
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 Multiple Results
- 200 Single Result
- 200 No Results
- 200 XML
- 401 Invalid Token
- 401 Invalid User
- 412 Missing auth-user-id
{
"getApprovalsForUser": {
"Approval": [
{
"WorkItemName": "Asset Business Owner Approval",
"WorkItemId": "1001:WPDS:1",
"RequestName": "00001",
"WorkItemCompletedDate": "2025-12-10 10:03:10.0",
"WorkItemDueDate": "2025-12-15 10:02:40.0"
},
{
"WorkItemName": "Asset Business Owner Approval",
"WorkItemId": "1002:WPDS:1",
"RequestName": "00002",
"WorkItemCompletedDate": "",
"WorkItemDueDate": "2026-01-15 10:00:00.0"
}
],
"NumApprovals": 2
}
}
{
"getApprovalsForUser": {
"Approval": {
"WorkItemName": "Asset Business Owner Approval",
"WorkItemId": "1001:WPDS:1",
"RequestName": "00001",
"WorkItemCompletedDate": "2025-12-10 10:03:10.0",
"WorkItemDueDate": "2025-12-15 10:02:40.0"
},
"NumApprovals": 1
}
}
{
"getApprovalsForUser": {
"NumApprovals": 0
}
}
Default format when format is omitted.
<?xml version="1.0" encoding="UTF-8"?>
<getApprovalsForUser>
<NumApprovals>2</NumApprovals>
<Approval>
<WorkItemId>1001:WPDS:1</WorkItemId>
<WorkItemName>Asset Business Owner Approval</WorkItemName>
<WorkItemDueDate>2025-12-15 10:02:40.0</WorkItemDueDate>
<WorkItemCompletedDate>2025-12-10 10:03:10.0</WorkItemCompletedDate>
<RequestName>00001</RequestName>
</Approval>
<Approval>
<WorkItemId>1002:WPDS:1</WorkItemId>
<WorkItemName>Asset Business Owner Approval</WorkItemName>
<WorkItemDueDate>2026-01-15 10:00:00.0</WorkItemDueDate>
<WorkItemCompletedDate></WorkItemCompletedDate>
<RequestName>00002</RequestName>
</Approval>
</getApprovalsForUser>
<html>
<head>
<title>Error</title>
</head>
<body>The token is not valid for the command 'getApprovalsForUser'. Token is invalid or expired</body>
</html>
Returned when auth-user-id does not match a valid user. The response body is the same as an expired token error.
<html>
<head>
<title>Error</title>
</head>
<body>The token is invalid or expired
Query String=cmd=getApprovalsForUser&format=json&auth-user-id=jsmith&state=all</body>
</html>
<html>
<head>
<title>Error</title>
</head>
<body>The parameter auth-user-id is required.
Query String=cmd=getApprovalsForUser&format=json</body>
</html>
Verified with RSA Governance & Lifecycle version 8.0.0.188886 P10_HF01.
See Also
- Find Approvals: Search approvals with additional filter options
- Get Approval Details: Retrieve full details for a specific approval
- Perform Approval: Accept or reject an approval
- Get Work Items for User: Replacement for this command