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

https://api.dynatrace.com/iam/v1/repo/{levelType}/{levelId}/policies/aggregate

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

ParameterTypeDescriptionInRequired
levelTypestring

The type of the policy level. The following values are available:

  • global: A global policy applies to all accounts and environments. It is defined and managed by Dynatrace.
  • account: An account policy applies to all environments of an account.
  • environment: An environment policy applies to a specific environment.

Each level inherits the policies of the higher level and extends them with its own policies.

pathrequired
levelIdstring

The ID of the policy level. Use one of the following values, depending on the level type:

  • global: use the global value.
  • account: use the UUID of the account.
  • environment: use the ID of the environment.
pathrequired

Response

Response codes

CodeTypeDescription
200PolicyOverviewDtoList

Success. The response contains the list of policies.

404ErrorDto

Failed. The specified resource is not found.

Response body objects

The PolicyOverviewDtoList object

ElementTypeDescription
policyOverviewListPolicyOverview[]

A list of policies.

The PolicyOverview object

ElementTypeDescription
uuidstring

The ID of the policy.

namestring

The display name of the policy.

descriptionstring

A short description of the policy.

levelIdstring

The ID of the level to which the policy applies.

levelTypestring

The type of the level to which the policy applies.

Response body JSON model

{
"policyOverviewList": [
{
"uuid": "string",
"name": "string",
"description": "string",
"levelId": "string",
"levelType": "string"
}
]
}

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

curl --request GET \
--url 'https://api.dynatrace.com/iam/v1/repo/environment/mySampleEnv/policies/aggregate' \
--header 'Authorization: Bearer abcdefjhij1234567890'

Request URL

https://api.dynatrace.com/iam/v1/repo/environment/mySampleEnv/policies/aggregate

Response body

{
"policyOverviewList": [
{
"uuid": "4eb72c58-a4a1-481e-854b-9da083c592e6",
"name": "ActiveGate Configuration Writer",
"description": "ActiveGate Configuration Writer Policy",
"levelType": "global",
"levelId": "global"
},
{
"uuid": "23f43012-4971-47a0-b4a9-c4634ec02dc6",
"name": "OneAgent Configuration Writer",
"description": "OneAgent Configuration Writer Policy",
"levelType": "global",
"levelId": "global"
},
{
"uuid": "b420b269-7acb-4081-b98f-b5772de63542",
"name": "Settings Reader",
"description": "Settings Reader Policy",
"levelType": "environment",
"levelId": "mySampleEnv"
},
{
"uuid": "d10eb8e0-875a-40c8-821c-6214c23ac0b3",
"name": "Settings Writer",
"description": "Settings Writer Policy",
"levelType": "environment",
"levelId": "mySampleEnv"
}
]
}

Response code

200