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
- application/json
Path Parameters
-
policyid(required): string
Target policy ID
Query Parameters
-
fields: string
Attributes to be returned in the result. Policy ID is mandatory in attrbutes to return list. Comma-separated attributes are accepted.
-
policyType(required): string
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.
Response
Supported Media Types
- application/json
200 Response
Successful
Headers
-
ResponseTime: string
Captures the time in milliseconds taken for processing the request.
401 Response
Unauthorized
404 Response
Requested entity not found
500 Response
Internal Server Error
Default Response
Unexpected error
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"
}