Update Review Items
Update the state of review items in an active review.
POST https://instance.securid.com/aveksa/command.submit?cmd=updateReviewItems
Only user reviews in Active state are supported. Account and role reviews return 412 This webservice can only be used to update items in user reviews. Only items assigned to the authenticated user can be updated. Sending via GET returns 405. This restriction was absent from the RSA reference prior to 8.0.0 P12 / 8.1.0.
When the request body contains zero matching ReviewItemChange elements, the server returns 412 even though the response body reports Status=Success. Updated all 0 review components. Check the HTTP status code, not the body, to detect errors.
Request
Parameters
| updateReviewItems | |
| format | properties - (Default) Returns the response as key=value pairs. When multiple objects are returned, values are comma-delimited: key=value1,value2,value3.json - Returns the response as JSON. |
Headers
Bearer token | |
| application/xml |
Body
<Review>
<ReviewResultName>value</ReviewResultName>
<SignOff>false</SignOff>
<UpdateCommentsOnly>false</UpdateCommentsOnly>
<ReviewItemChange state="revoke" comments="value">
<RevieweeUserId>value</RevieweeUserId>
<Entitlement resource="value" action="value" business-source="value"/>
</ReviewItemChange>
<ReviewItemChange state="maintain" comments="value" expires-on="DD-MMM-YYYY">
<RevieweeUserId>value</RevieweeUserId>
<ApplicationRole name="value" business-source="value"/>
</ReviewItemChange>
<ReviewItemChange state="none" comments="value">
<RevieweeUserId>value</RevieweeUserId>
<RevieweeAccount name="value" business-source="value"/>
<Group name="value" business-source="value"/>
</ReviewItemChange>
<ReviewItemChange state="custom" comments="value">
<RevieweeUserId>value</RevieweeUserId>
<GlobalRole name="value" role-set="value"/>
</ReviewItemChange>
</Review>
The name of the review instance (for example, UAR-6). | |
SignOff | Sign off the review after updating. (Default) false |
UpdateCommentsOnly | When true, update only the comment on each item and ignore the state attribute. (Default) false |
ReviewItemChange | One element per review item to update. Attributes:state (required): maintain revoke none custom (custom only if the review supports custom states)comments: comment text to attach to the itemexpires-on: expiration date in DD-MMM-YYYY format, valid when state=maintain and the review allows expiry |
RevieweeUserId | The user ID of the user being reviewed. Must be a child of each ReviewItemChange. |
Entitlement | Identifies an entitlement review item. Attributes:resource: resource name of the entitlementaction: action name of the entitlementbusiness-source: raw application name the entitlement belongs to |
ApplicationRole | Identifies an application role review item. Attributes:name: raw name of the application rolebusiness-source: raw application name the role belongs to |
RevieweeAccount | Identifies a reviewee account. Attributes:name: account name being reviewedbusiness-source: raw application name the account belongs to |
Group | Identifies a group review item. Attributes:name: group namebusiness-source: raw application name the group belongs to |
GlobalRole | Identifies a global role review item. Attributes:name: raw name of the global rolerole-set: raw name of the role set the global role belongs to |
Response
200 responses respect the format parameter. Error responses (4xx) are always returned as HTML regardless of the format parameter.
The response body reports an overall status and, for multi-item requests, a per-item status line for each ReviewItemChange element.
Parameters
type | Executed command name |
Status | Overall result. Single item: Success. Updated the review component with specified state. Multiple items: Success. Updated all N review components with specified states. |
Examples
Request
- Curl
- Python
- Node.js
curl -K -X POST \
"https://instance.securid.com/aveksa/command.submit?cmd=updateReviewItems&format=json" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/xml" \
-d "<Review>
<ReviewResultName>UAR-6</ReviewResultName>
<SignOff>false</SignOff>
<ReviewItemChange state=\"maintain\" comments=\"Access confirmed\">
<RevieweeUserId>AveksaAdmin</RevieweeUserId>
<Entitlement resource=\"Report Definition\" action=\"Run Reports\" business-source=\"Aveksa\"/>
</ReviewItemChange>
<ReviewItemChange state=\"maintain\" comments=\"Access confirmed\">
<RevieweeUserId>AveksaAdmin</RevieweeUserId>
<Entitlement resource=\"Report Result\" action=\"Run Reports\" business-source=\"Aveksa\"/>
</ReviewItemChange>
<ReviewItemChange state=\"maintain\" comments=\"Access confirmed\">
<RevieweeUserId>AveksaAdmin</RevieweeUserId>
<Entitlement resource=\"Report Result\" action=\"View Report Results\" business-source=\"Aveksa\"/>
</ReviewItemChange>
</Review>"
import requests
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "updateReviewItems",
"format": "json"
}
payload = """<Review>
<ReviewResultName>UAR-6</ReviewResultName>
<SignOff>false</SignOff>
<ReviewItemChange state="maintain" comments="Access confirmed">
<RevieweeUserId>AveksaAdmin</RevieweeUserId>
<Entitlement resource="Report Definition" action="Run Reports" business-source="Aveksa"/>
</ReviewItemChange>
<ReviewItemChange state="maintain" comments="Access confirmed">
<RevieweeUserId>AveksaAdmin</RevieweeUserId>
<Entitlement resource="Report Result" action="Run Reports" business-source="Aveksa"/>
</ReviewItemChange>
<ReviewItemChange state="maintain" comments="Access confirmed">
<RevieweeUserId>AveksaAdmin</RevieweeUserId>
<Entitlement resource="Report Result" action="View Report Results" business-source="Aveksa"/>
</ReviewItemChange>
</Review>"""
headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/xml'
}
response = requests.post(url, params=params, data=payload, headers=headers)
if response.status_code == 200:
print(response.json())
else:
print(f"Request failed with status code {response.status_code}")
const https = require('https');
const params = new URLSearchParams({
cmd: 'updateReviewItems',
format: 'json'
});
const body = `<Review>
<ReviewResultName>UAR-6</ReviewResultName>
<SignOff>false</SignOff>
<ReviewItemChange state="maintain" comments="Access confirmed">
<RevieweeUserId>AveksaAdmin</RevieweeUserId>
<Entitlement resource="Report Definition" action="Run Reports" business-source="Aveksa"/>
</ReviewItemChange>
<ReviewItemChange state="maintain" comments="Access confirmed">
<RevieweeUserId>AveksaAdmin</RevieweeUserId>
<Entitlement resource="Report Result" action="Run Reports" business-source="Aveksa"/>
</ReviewItemChange>
<ReviewItemChange state="maintain" comments="Access confirmed">
<RevieweeUserId>AveksaAdmin</RevieweeUserId>
<Entitlement resource="Report Result" action="View Report Results" business-source="Aveksa"/>
</ReviewItemChange>
</Review>`;
const options = {
hostname: 'instance.securid.com',
path: `/aveksa/command.submit?${params}`,
method: 'POST',
headers: {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/xml',
'Content-Length': Buffer.byteLength(body)
}
};
const req = https.request(options, res => {
let data = '';
res.on('data', chunk => { data += chunk; });
res.on('end', () => console.log(JSON.parse(data)));
});
req.on('error', err => console.error('Error:', err.message));
req.write(body);
req.end();
Response
- 200
- 401 Invalid Token
- 405 Wrong Method
- 412 Invalid XML
- 412 Missing Name
- 412 Review Not Found
- 412 Not Actionable
- 412 User Reviews Only
- 412 Item Failure
{
"data": {
"type": "updateReviewItems",
"Status": "Success. Updated all 3 review components with specified states."
}
}
<html>
<head>
<title>Error</title>
</head>
<body>The token is not valid for the command 'updateReviewItems'. Token is invalid or expired</body>
</html>
<html>
<head>
<title>Error</title>
</head>
<body>The command must be executed using a HTTP POST request
Query String=cmd=updateReviewItems&format=json</body>
</html>
<html>
<head>
<title>Error</title>
</head>
<body>Invalid XML content in the request body. Premature end of file.
Query String=cmd=updateReviewItems&format=json</body>
</html>
<html>
<head>
<title>Error</title>
</head>
<body>ReviewResultName element has to be specified with a valid review result name.
ReviewResultName element has to be specified with a valid review result name.
Query String=cmd=updateReviewItems&format=json</body>
</html>
<html>
<head>
<title>Error</title>
</head>
<body>Could not find a review with name InvalidReview-999
Query String=cmd=updateReviewItems&format=json</body>
</html>
<html>
<head>
<title>Error</title>
</head>
<body>The review is not an actionable state.
Query String=cmd=updateReviewItems&format=json</body>
</html>
<html>
<head>
<title>Error</title>
</head>
<body>This webservice can only be used to update items in user reviews.
Query String=cmd=updateReviewItems&format=json</body>
</html>
<html>
<head>
<title>Error</title>
</head>
<body>
Status=Failure. None of the 1 review components could be updated.
Status For Review Item(AveksaAdmin-Report Definition:Run Reports)=Failure (business-source attribute has to be specified with a valid name. )
Query String=cmd=updateReviewItems&format=json</body>
</html>
Verified with RSA Governance & Lifecycle version 8.0.0.188886 P10_HF01.
See Also
- Get Review Status: Check whether a review is in Active state before calling this command
- Set Review State: Change a review to Active, OnHold, or Completed
- Update Unreviewed Items: Mark all unreviewed items in bulk