Get all roles

get

/apiplatform/administration/v1/roles

Returns a collection of roles. The response also contains HATEOAS links to related operations.

Users requesting this resource must be assigned the Administrator role.

Request

Supported Media Types
Query Parameters
  • Collection Format: csv
    Pass optional fields, separated by commas, in this parameter to return them in the response. See the operation's description for a list of field values.
Back to Top

Response

Supported Media Types

200 Response

The collection of roles.
Body ()
Root Schema : RoleCollectionResponse
Match All
Show Source
Nested Schema : RoleCollectionResponse-allOf[0]
Type: object
Show Source
Nested Schema : CollectionResponseFeature
Type: object
Show Source
Nested Schema : LinksResponseFeature
Type: object
Show Source
Nested Schema : items
Type: array
Role IDs.
Show Source
Nested Schema : RoleIdResponse
Match All
Show Source
Nested Schema : RoleId
Type: object
Show Source

403 Response

Forbidden.
Body ()
Root Schema : Error
Type: object
Show Source
Nested Schema : errorDetails
Type: array
additional errors
Show Source

500 Response

Unexpected error.
Body ()
Root Schema : Error
Type: object
Show Source
Nested Schema : errorDetails
Type: array
additional errors
Show Source
Back to Top

Examples

The following example shows how to retrieve the roles available in Oracle API Platform Cloud Service - Classic by submitting a GET request on the REST resource using cURL. For more information about cURL, see Use cURL

curl -i -X GET 
-u apicsadmin:password
https://example.com/apiplatform/administration/v1/roles

Example of Response Headers

The following shows an example of the response headers.

HTTP/1.1 200 OK
Server: Oracle-Traffic-Director/12.2.1.0.0
Date: Mon, 02 Jan 2017 13:36:33 GMT
Content-length: 1117
Content-type: application/json
X-oracle-dms-ecid: thV^G1f0S00000000
X-oracle-dms-rid: 0:1
Via: 1.1 otd_opc
Proxy-agent: Oracle-Traffic-Director/12.2.1.0.0

Example of Response Body

The following example shows the contents of the response body in JSON format, including the available roles and HATEOAS links to related operations.

{
  "count": 5,
  "links": [
    {
      "method": "GET",
      "rel": "self",
      "href": "https://example.com:443/apiplatform/administration/v1/roles"
    },
    {
      "method": "GET",
      "rel": "canonical",
      "href": "https://example.com:443/apiplatform/administration/v1/roles"
    }
  ],
  "items": [
    {
      "links": [
        {
          "templated": "true",
          "method": "GET",
          "rel": "canonical",
          "href": "https://example.com:443/apiplatform/administration/v1/roles/APIManager"
        }
      ],
      "id": "APIManager"
    },
    {
      "links": [
        {
          "templated": "true",
          "method": "GET",
          "rel": "canonical",
          "href": "https://example.com:443/apiplatform/administration/v1/roles/ApplicationDeveloper"
        }
      ],
      "id": "ApplicationDeveloper"
    },
    {
      "links": [
        {
          "templated": "true",
          "method": "GET",
          "rel": "canonical",
          "href": "https://example.com:443/apiplatform/administration/v1/roles/GatewayManager"
        }
      ],
      "id": "GatewayManager"
    },
    {
      "links": [
        {
          "templated": "true",
          "method": "GET",
          "rel": "canonical",
          "href": "https://example.com:443/apiplatform/administration/v1/roles/Administrator"
        }
      ],
      "id": "Administrator"
    },
    {
      "links": [
        {
          "templated": "true",
          "method": "GET",
          "rel": "canonical",
          "href": "https://example.com:443/apiplatform/administration/v1/roles/GatewayRuntime"
        }
      ],
      "id": "GatewayRuntime"
    }
  ]
}
Back to Top