Lists all policies that are native to a policy level.
The request produces an application/json
payload.
GET |
|
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.
Parameter | Type | Description | In | Required |
---|---|---|---|---|
categories | - | Optional policy categories set. Only policies that match given categories will be returned. | query | optional |
name | - | Optional policy name. Only policies that are of equal name will be returned. | query | optional |
levelId | - | The ID of the policy level. Use one of the following values, depending on the level type:
| path | required |
levelType | - | 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 |
Code | Type | Description |
---|---|---|
200 | Policy | Success. The response contains the list of policies. |
404 | Error | Failed. The specified resource is not found. |
PolicyDtoList
objectElement | Type | Description |
---|---|---|
policies | Policy | A list of policies. |
PolicyDto
objectElement | 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. |
{"policies": [{"uuid": "string","name": "string","description": "string"}]}
In this example, the request lists native policies of the mySampleEnv environment. The result is truncated to two entries.
curl --request GET \--url 'https://api.dynatrace.com/iam/v1/repo/environment/mySampleEnv/policies' \--header 'Authorization: Bearer abcdefjhij1234567890'
https://api.dynatrace.com/iam/v1/repo/environment/mySampleEnv/policies
{"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"}]}
200