Delete effective-dated role assignments
post
/rest/users/roles/delete
Executes the SOAP-compatible DeleteRole business operation. This is POST because it is a body-based batch business action. Each role is ended using effectiveTo; the security-group definition itself is not deleted.
Request
Header Parameters
-
Password(required):
Application password.
-
PasswordType(required):
Password type (case-sensitive). Use PasswordText. PasswordDigest requires webservice.allowHashedPassword=Yes.
-
Username(required):
Application username.
Response
200 Response
Role assignments ended successfully.
400 Response
Invalid collection, missing field, invalid date, or invalid effective-date range.
401 Response
Authentication failed.
403 Response
Authorization failed for UserService/deleteRole.
404 Response
User, role, or role assignment was not found.
500 Response
Uncatalogued business or transaction error.
Examples
This example describes how to delete effective-dated role assignments.
Example cURL Command
Use the following cURL command to submit a request on the REST resource:
curl -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-u username:password \
"http://server:port/PASJava/rest/users/roles/delete" \
-d '{"Use this placeholder to plug-in the example request body given below"}' Example Request Body in JSON Format
The following shows an example of the request body in JSON format:
{
"users": [
{
"userId": "{{user2}}",
"roles": [
{
"roleName": "{{roleTwo}}",
"effectiveTo": "{{deleteEffectiveTo}}"
},
{
"roleName": "{{roleThree}}",
"effectiveTo": "{{deleteEffectiveTo}}"
}
]
},
{
"userId": "{{user3}}",
"roles": [
{
"roleName": "{{roleTwo}}",
"effectiveTo": "{{deleteEffectiveTo}}"
}
]
}
]
}
Example Response Body in JSON Format
The following shows an example of the response body in JSON format:
{
"status": "success"
}
Example Request Body in XML Format
The following shows an example of the request body in XML format:
<users>
<user>
<userId>{{user2}}</userId>
<roles>
<role>
<roleName>{{roleTwo}}</roleName>
<effectiveTo>{{deleteEffectiveTo}}</effectiveTo>
</role>
<role>
<roleName>{{roleThree}}</roleName>
<effectiveTo>{{deleteEffectiveTo}}</effectiveTo>
</role>
</roles>
</user>
<user>
<userId>{{user3}}</userId>
<roles>
<role>
<roleName>{{roleTwo}}</roleName>
<effectiveTo>{{deleteEffectiveTo}}</effectiveTo>
</role>
</roles>
</user>
</users>
Example Response Body in XML Format
The following shows an example of the response body in XML format:
<response> <status>success</status> </response>