Get grants issued for an application

get

/developers/services/v1/applications/{id}/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

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

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 collection of grants that have been issued for the {appId} application 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:443/developers/services/v1/applications/{id}/grants

{id} is the unique ID for an application. To retrieve available applications, see Get applications.

Example of Response Headers

The following shows an example of the response headers.

HTTP/1.1 200 OK
Server: Oracle Traffic Director
Date: Wed, 20 Dec 2017 05:19:46 GMT
Content-type: application/json
X-oracle-dms-ecid: 6^3rv0_eR00000000
X-oracle-dms-rid: 0:1

Example of Response Body

The following example shows the contents of the response body in JSON format, including the grant type, role, and user or group ID for users or groups issued each grant.

{
    "offset": 0,
    "count": 1,
    "limit": 128,
    "hasMore": false,
    "links": [
        {
            "templated": "true",
            "method": "GET",
            "rel": "self",
            "href": "http://example.com:443/developers/services/v1/applications/110/grants"
        },
        {
            "templated": "true",
            "method": "GET",
            "rel": "canonical",
            "href": "http://example.com:443/developers/services/v1/applications/110/grants"
        },
        {
            "method": "GET",
            "rel": "types",
            "href": "http://example.com:443/developers/services/v1/applications/grants/types"
        },
        {
            "templated": "true",
            "method": "POST",
            "rel": "create",
            "href": "http://example.com:443/developers/services/v1/applications/110/grants",
            "grant": "ManageApplicationGrant"
        },
        {
            "templated": "true",
            "method": "POST",
            "rel": "create",
            "href": "http://example.com:443/developers/services/v1/applications/110/grants",
            "grant": "ViewAllDetailsApplicationGrant"
        }
    ],
    "items": [
        {
            "createdAt": "2017-12-20T22:30:24-0800",
            "createdBy": "weblogic",
            "links": [
                {
                    "templated": "true",
                    "method": "DELETE",
                    "rel": "delete",
                    "href": "http://example.com:443/developers/services/v1/applications/110/grants/ManageApplicationGrant/users/weblogic"
                }
            ],
            "type": "ManageApplicationGrant",
            "user": {
                "roles": [
                    "Administrator"
                ],
                "id": "apicsadmin"
            }
        }
    ]
}
Back to Top