Policy management API - GET native policies
Lists all policies that are native to a policy level.
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 OAuth clients.
Parameters
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.
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.
Optional policy name. Only policies that are of equal name will be returned.
Optional policy categories set. Only policies that match given categories will be returned.
Response
Response codes
Response body objects
The PolicyDtoList
object
The PolicyDto
object
The ID of the policy.
The display name of the policy.
A short description of the policy.
Response body JSON model
{"policies": [{"uuid": "string","name": "string","description": "string"}]}
Example
In this example, the request lists native policies of the mySampleEnv environment. The result is truncated to two entries.
Curl
curl --request GET \--url 'https://api.dynatrace.com/iam/v1/repo/environment/mySampleEnv/policies' \--header 'Authorization: Bearer abcdefjhij1234567890'
Request URL
https://api.dynatrace.com/iam/v1/repo/environment/mySampleEnv/policies
Response body
{"policies": [{"uuid": "b420b269-7acb-4081-b98f-b5772de63542","name": "Settings Reader","description": "Settings Reader Policy"},{"uuid": "d10eb8e0-875a-40c8-821c-6214c23ac0b3","name": "Settings Writer","description": "Settings Writer Policy"}]}
Response code
200