Get Available Roles
Returns all the application roles that are visible along with predefined roles that are available for an Oracle Enterprise Performance Management Cloud service.
This API is synchronous and returns the outcome of the operation in the response. Any non-zero status indicates failure of getting available roles.
This REST API is version v2.
Required Roles
Service Administrator or Access Control – Manage
REST Resource
GET /interop/rest/security/v2/role/getavailableroles
Note:
Before using the REST resources, you must understand how to access the REST resources and other important concepts. See Implementation Best Practices for EPM Cloud REST APIs. Using this REST API requires prerequisites. See Prerequisites.
Table 12-86 Tasks for Getting Available Roles
Task | Request | REST Resource |
---|---|---|
Get Available Roles | GET | /interop/rest/security/v2/role/getavailableroles |
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
Table 12-87 Parameters
Parameters | Description |
---|---|
links |
Detailed information about the link |
status |
Status of the operation
|
error |
Detailed information about the error |
details |
Records matching the request |
Examples of Response Body
The following show examples of the response body in JSON format.
Example 1: Job Completes without Errors
{
"links": {
"href": " https://<BASE URL>/interop/rest/security/v2/role/getavailableroles",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"name": "Ad Hoc - Create",
"id": "HP:0016"
},
{
"name": "Ad Hoc - Read Only User",
"id": "HP:0017"
},
{
"name": "Ad Hoc - User",
"id": "HP:0015"
},
{
"name": "Announcements - Manage",
"id": "HP:0021"
},
{
"name": "User",
"id": "HUB:003"
},
{
"name": "Viewer",
"id": "HUB:004"
},
...
]
}
Example 2: Job Completes with Errors
{
"links": {
"href": " https://<BASE-URL>/interop/rest/security/v2/role/getavailableroles",
"action": "GET"
},
"status": 1,
"error": {
"errorcode": "EPMCSS-21192",
"errormessage": "Failed to get available roles. Authorization failed. Please provide valid authorized user."
},
"details": null
}
Sample cURL Commands
Sample cURL command using Basic Auth
curl -X GET -s -u '<USERNAME>:<PASSWORD>' -H 'Content-Type: application/json'
'https://<BASE-URL>/interop/rest/security/v2/role/getavailableroles'
Sample cURL command using oAuth
curl --location --request GET 'https://<BASE-URL>/interop/rest/security/v2/role/getavailableroles'
--header "Authorization: Bearer <OAUTH_TOKEN>"