Get grants issued for an application

get

/apiplatform/management/v1/applications/{appId}/grants

Returns a collection of grants that have been issued for the {appId} application. By default, the grant type, role, and user or group ID for users or groups issued each grant are returned. Additional fields can be returned by sending any of these field names, separated by commas, in the fields query parameter: createdAt, createdBy, user.roles, and group.roles.

Any authenticated user issued the Manage Application or View All Details grants for the application can access this resource.

Request

Supported Media Types
Path Parameters
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 grants
Body ()
Root Schema : GetGrantsResponse
Match All
Show Source
Nested Schema : CollectionResponseFeature
Type: object
Show Source
Nested Schema : LinksResponseFeature
Type: object
Show Source
Nested Schema : GetGrantsResponse-allOf[2]
Type: object
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : GetGrantsItem
Match All
Show Source
Nested Schema : Grant
Type: object
Show Source
Nested Schema : ResourceLinksProperties
Type: object
Show Source
Nested Schema : Group
Type: object
Show Source
Nested Schema : User
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 a collection of grants issued for an application by submitting a GET request on the REST resource using cURL. For more information about cURL, see Use cURL

curl -i -X GET 
-H "Authorization: Bearer access_token"
https://example.com/apiplatform/management/v1/applications/{appId}/grants

{appId} is the unique Id for an application. To retrieve available application Ids, see Get Applications.

You can pass the following optional field values in the fields query parameter, separated by commas, to include them in the response:

  • createdAt: The date and time the grant was issued.

  • createdBy: The user who issued the grant.

  • user.roles: The roles the user is assigned.

  • group.roles: The roles the group is assigned.

The following example shows you how to include these fields in the response:

curl -i -X GET 
-H "Authorization: Bearer access_token"
https://example.com/apiplatform/management/v1/applications/{appId}/grants?fields=user.roles,group.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:  Thu, 16 Mar 2017 07:43:30 GMT
Content-Length:  1528
Content-Type:  application/json
X-oracle-dms-ecid:  f102c33f-1c5b-4409-806d-03bf5706c492-000268cc
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 grants issued for the application and HATEOAS links to related operations.

{
    "count": 1,
    "links": [
        {
            "templated": "true",
            "method": "GET",
            "rel": "grantees",
            "href": "https://example.com:443/apiplatform/management/v1/applications/grants/ManageApplicationGrant/grantees",
            "grant": "ManageApplicationGrant"
        },
        {
            "templated": "true",
            "method": "GET",
            "rel": "grantees",
            "href": "https://example.com:443/apiplatform/management/v1/applications/grants/ViewAllDetailsApplicationGrant/grantees",
            "grant": "ViewAllDetailsApplicationGrant"
        },
        {
            "templated": "true",
            "method": "GET",
            "rel": "self",
            "href": "https://example.com:443/apiplatform/management/v1/applications/103/grants"
        },
        {
            "templated": "true",
            "method": "GET",
            "rel": "canonical",
            "href": "https://example.com:443/apiplatform/management/v1/applications/103/grants"
        },
        {
            "method": "GET",
            "rel": "types",
            "href": "https://example.com:443/apiplatform/management/v1/applications/grants/types"
        },
        {
            "templated": "true",
            "method": "POST",
            "rel": "create",
            "href": "https://example.com:443/apiplatform/management/v1/applications/103/grants",
            "grant": "ManageApplicationGrant"
        },
        {
            "templated": "true",
            "method": "POST",
            "rel": "create",
            "href": "https://example.com:443/apiplatform/management/v1/applications/103/grants",
            "grant": "ViewAllDetailsApplicationGrant"
        }
    ],
    "items": [
        {
            "links": [
                {
                    "templated": "true",
                    "method": "DELETE",
                    "rel": "delete",
                    "href": "https://example.com:443/apiplatform/management/v1/applications/103/grants/ManageApplicationGrant/users/apicsadmin"
                }
            ],
            "type": "ManageApplicationGrant",
            "user": {
                "roles": [
                    "Administrator"
                ],
                "id": "apicsadmin"
            }
        }
    ]
}
Back to Top