Policy management API - GET all policies
Lists all access policies that are available at a policy level, including those inherited from higher levels.
The request produces an application/json
payload.
GET |
|
Authentication
To execute this request, you need the Allow IAM policy configuration for environments (iam-policies-management
) permission assigned to your token. To learn how to obtain and use it, see Authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
levelType | string | The type of the policy level. The following values are available:
Each level inherits the policies of the higher level and extends them with its own policies. | path | required |
levelId | string | The ID of the policy level. Use one of the following values, depending on the level type:
| path | required |
Response
Response codes
Code | Type | Description |
---|---|---|
200 | PolicyOverviewDtoList | Success. The response contains the list of policies. |
400 | ErrorDto | Failed. Only following level types are allowed: [account, environment, cluster] |
404 | ErrorDto | Failed. The specified resource is not found. |
Response body objects
The PolicyOverviewDtoList
object
Element | Type | Description |
---|---|---|
policyOverviewList | PolicyOverview[] | A list of policies. |
The PolicyOverview
object
Element | Type | Description |
---|---|---|
uuid | string | The ID of the policy. |
name | string | The display name of the policy. |
description | string | A short description of the policy. |
levelId | string | The ID of the level to which the policy applies. |
levelType | string | The type of the level to which the policy applies. |
Response body JSON model
1{2 "policyOverviewList": [3 {4 "uuid": "string",5 "name": "string",6 "description": "string",7 "levelId": "string",8 "levelType": "string"9 }10 ]11}
Example
In this example, the request lists all policies that apply to the mySampleEnv environment (some are inherited from higher levels). The result is truncated to four entries.
Curl
1curl --request GET \2 --url 'https://api.dynatrace.com/iam/v1/repo/environment/mySampleEnv/policies/aggregate' \3 --header 'Authorization: Bearer abcdefjhij1234567890'
Request URL
1https://api.dynatrace.com/iam/v1/repo/environment/mySampleEnv/policies/aggregate
Response body
1{2 "policyOverviewList": [3 {4 "uuid": "4eb72c58-a4a1-481e-854b-9da083c592e6",5 "name": "ActiveGate Configuration Writer",6 "description": "ActiveGate Configuration Writer Policy",7 "levelType": "global",8 "levelId": "global"9 },10 {11 "uuid": "23f43012-4971-47a0-b4a9-c4634ec02dc6",12 "name": "OneAgent Configuration Writer",13 "description": "OneAgent Configuration Writer Policy",14 "levelType": "global",15 "levelId": "global"16 },17 {18 "uuid": "b420b269-7acb-4081-b98f-b5772de63542",19 "name": "Settings Reader",20 "description": "Settings Reader Policy",21 "levelType": "environment",22 "levelId": "mySampleEnv"23 },24 {25 "uuid": "d10eb8e0-875a-40c8-821c-6214c23ac0b3",26 "name": "Settings Writer",27 "description": "Settings Writer Policy",28 "levelType": "environment",29 "levelId": "mySampleEnv"30 }31 ]32}
Response code
200