Get Policy Based on Policy ID

get

/iam/governance/selfservice/api/v1/policies/{policyid}

Returns the policy details specified by the policy ID.

Request

Supported Media Types
Path Parameters
Query Parameters
  • Attributes to be returned in the result. Policy ID is mandatory in attrbutes to return list. Comma-separated attributes are accepted.
  • Policy type of the policy ID which is being returned. If the policy ID does not match to the Policy Type then empty result will be returned.
Back to Top

Response

Supported Media Types

200 Response

Successful
Headers
Body ()
Root Schema : IndividualPolicyGetResponse
Type: object
Show Source
Nested Schema : rules
Type: array
Show Source
Nested Schema : LinkDataInstances
Type: object
Show Source
Nested Schema : PolicyRules
Type: object
Show Source

401 Response

Unauthorized

404 Response

Requested entity not found

500 Response

Internal Server Error

Default Response

Unexpected error
Back to Top

Examples

This example retrieves an access policy based on an ID. The information shown here is against a pseudo system and serves as a prototype.

cURL Example

curl  -H "Content-Type: application/json"  -X GET  -u username:password  
"https://pseudo.com/iam/governance/selfservice/api/v1/policies/1?policyType=accessPolicy"

Example of GET Response Body

The following example shows the contents of the response body in JSON format.

{
    "links": [
        {
            "rel": "self",
            "href": "http://pseudo.com:PORT/iam/governance/selfservice/api/v1/policies/1?
policyType=accessPolicy"
        }
    ],
    "id": "1",
    "name": "ap1",
    "description": "ap1 description",
    "owner": "1",
    "ownerType": "USER",
    "createdBy": "1",
    "creationDate": "2019-04-03T20:13:47Z",
    "note": "",
    "version": "AAAAAAAAAAA=",
    "updateDate": "2019-04-03T20:13:47Z",
    "updatedBy": "1",
    "retrofitFlag": "1"
}
Back to Top