Search 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: string
Target policy ID
Query Parameters
-
fields(optional): string
Attributes to be returned in the result. Policy ID is mandatory in attrbutes to return list. Comma-separated attributes are accepted.
-
policyType: 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 all the policies of type approvalPolicy 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/policiesD3F56497B1C44CABB367E1FE7B558723?policyType=approvalPolicy
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/iam/governance/selfservice/api/v1/policies/D3F56497B1C44CABB367E1FE7B558723?policyType=approvalPolicy" } ], "approvalPolicy": [ { "id": "6EC52A881E80415FAED6A80307E27DFC", "name": "Enable User Default Rule", "ownerLogin": "XELSYSADM", "ownerFirstName": "System", "update": 1455195174000, "status": "enabled", "ownerDisplayName": "System Administrator", "ownerId": "1", "createById": "1", "ownerLastName": "Administrator", "create": 1455195174000, "updateById": "1", "typeId": "D3F56497B1C44CABB367E1FE7B558723", "ownerEmail": "donotreply@mydomain.com" }, { "id": "92FFA84AB90143B3B6E81EAEE2541458", "name": "Delete User Default Rule", "ownerLogin": "XELSYSADM", "ownerFirstName": "System", "update": 1455195173000, "status": "enabled", "ownerDisplayName": "System Administrator", "ownerId": "1", "createById": "1", "ownerLastName": "Administrator", "create": 1455195173000, "updateById": "1", "typeId": "D3F56497B1C44CABB367E1FE7B558723", "ownerEmail": "donotreply@mydomain.com" } ] }