Get Available Roles
Returns all the granular and predefined roles that are available for an Oracle Fusion Cloud Enterprise Performance Management service. Additionally, roles can be retrieved based on the specified type (predefined or granular).
This API is synchronous and returns the outcome of the operation in the response. Any non-zero status indicates failure of getting available roles.
Required Roles
Service Administrator or any predefined role and the Access Control – Manage granular role
REST Resource
GET
/interop/rest/security/v2/role/getavailableroles?type=<type>
Table 13-102 Tasks for Getting Available Roles
| Task | Request | REST Resource |
|---|---|---|
| Get Available Roles | GET | /interop/rest/security/v2/role/getavailableroles?type=<type> |
Request
Supported Media Types: application/json
Table 13-103 Request Parameter
| Name | Description | Type | Required | Default |
|---|---|---|---|---|
type |
When When When |
Query | No | All granular and predefined roles |
Response
Supported Media Types: application/json
Table 13-104 Response 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
Example 1: REST API Completes without Errors when no Query Parameter is Specified
{
"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: REST API Completes without Errors, when Query Parameter
type=application is Specified
{
"links": {
"href": " https://<BASE URL>/interop/rest/security/v2/role/getavailableroles?type=application",
"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"
}
]
}
Example 3: REST API Completes without Errors, when Query Parameter
type=predefined is Specified
{
"links": {
"href": " https://<BASE URL>/interop/rest/security/v2/role/getavailableroles?type=predefined",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"name": "User",
"id": "HUB:003"
},
{
"name": "Viewer",
"id": "HUB:004"
}
. . .
]
}
Example 4: REST API 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 Command Basic Auth
curl -X GET -s -u '<USERNAME>:<PASSWORD>' -H 'Content-Type: application/json' 'https://<BASE-URL>/interop/rest/security/v2/role/getavailableroles'
curl -X GET -s -u '<USERNAME>:<PASSWORD>' -H 'Content-Type: application/json''https://<BASE-URL>/interop/rest/security/v2/role/getavailableroles?type=application'
Sample cURL Command OAuth 2.0
curl -X GET --header "Authorization: Bearer <OAUTH_ACCESS_TOKEN>" -H 'Content-Type: application/json' 'https://<BASE-URL>/interop/rest/security/v2/role/getavailableroles'
curl -X GET --header "Authorization: Bearer <OAUTH_ACCESS_TOKEN>" -H 'Content-Type: application/json' 'https://<BASE-URL>/interop/rest/security/v2/role/getavailableroles?type=application'