Revoke a role
post
/access-governance/access-controls/20250331/roles/{roleId}/revoke
Revokes a role.
Request
Path Parameters
-
roleId(required): string
Unique Role identifier
Header Parameters
-
opc-request-id: string
The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.
-
tenancy-id: string
The tenancy id.
Details for revoking a role.
Root Schema : RevokeRoleDetails
Type:
objectThe information needed for revoking role.
Show Source
-
globalIdentityId(required):
string
Global Identity Id of the user for whom role is revoked.
Response
Supported Media Types
- application/json
200 Response
Role revoke was successfully requested.
Headers
-
etag: string
For optimistic concurrency control. See `if-match`.
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : RoleData
Type:
objectRole Data.
Show Source
-
globalIdentityId(required):
string
Global identity id.
-
state:
string
State of role.
400 Response
Bad Request
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
objectError Information.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing.
-
message(required):
string
A human-readable error string.
401 Response
Unauthorized
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
objectError Information.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing.
-
message(required):
string
A human-readable error string.
404 Response
Not Found
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
objectError Information.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing.
-
message(required):
string
A human-readable error string.
409 Response
Conflict
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
objectError Information.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing.
-
message(required):
string
A human-readable error string.
429 Response
Too Many Requests
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
objectError Information.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing.
-
message(required):
string
A human-readable error string.
500 Response
Internal Server Error
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
objectError Information.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing.
-
message(required):
string
A human-readable error string.
Default Response
Unknown Error
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
objectError Information.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing.
-
message(required):
string
A human-readable error string.
Examples
The following example shows how to revoke a role for an identity by submitting a POST request.
Run the following APIs before revoking a role:
- GET
identities/{version}/identities: Choose the identity for which you want to revoke a role. - GET
identities/{version}/identities/{identityId}/roles: List Role for an identity to select a role that you want to revoke.
cURL Example
curl -i -X POST \
-H "Authorization:Bearer <your access token>" \
-d \
'{
"globalIdentityId": "globalId.8d51xxxxa7fb"
}'\
'https://${service-instance-url}/access-governance/access-controls/20250331/roles/{roleId}/revoke'Example of the Response Body
The following example shows the contents of the response body in JSON format, including a list of all available roles:
{
"globalIdentityId": "globalId.8d51xxxxa7fb",
"state": "Revoke in Progress"
}