Policy management API - GET a policy
Gets parameters of an access policy.
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 |
policyUuid | string | The ID of the required policy. | path | required |
Response
Response codes
Code | Type | Description |
---|---|---|
200 | Level | Success. The response contains the configuration of the policy. |
404 | ErrorDto | Failed. The specified resource is not found. |
Response body objects
The LevelPolicyDto
object
Element | Type | Description |
---|---|---|
uuid | string | The ID of the policy. |
name | string | The display name of the policy. |
tags | string[] | A list of tags. |
description | string | A short description of the policy. |
statementQuery | string | The statement of the policy. |
statements | Statement[] | The expanded form of the policy statement. |
The Statement
object
Element | Type | Description |
---|---|---|
effect | string | The effect of the policy (for example, allow something). |
service | string | The service to which the policy applies. |
permissions | string[] | A list of granted permissions. |
conditions | Condition[] | A list of conditions limiting the granted permissions. |
The Condition
object
Element | Type | Description |
---|---|---|
name | string | The name of the condition. It indicates which part of the services is checked by the condition. |
operator | string | The operator of the condition. |
values | string[] | A list of reference values of the condition. |
Response body JSON model
{
"uuid": "string",
"name": "string",
"tags": [
"string"
],
"description": "string",
"statementQuery": "string",
"statements": [
{
"effect": "string",
"service": "string",
"permissions": [
"string"
],
"conditions": [
{
"name": "string",
"operator": "string",
"values": [
"string"
]
}
]
}
]
}
Example
In this example, the request lists parameters of the Settings Writer global policy (UUID is d10eb8e0-875a-40c8-821c-6214c23ac0b3).
Curl
curl --request GET \
--url 'https://api.dynatrace.com/iam/v1/repo/global/global/policies/d10eb8e0-875a-40c8-821c-6214c23ac0b3' \
--header 'Authorization: Bearer abcdefjhij1234567890'
Request URL
https://api.dynatrace.com/iam/v1/repo/global/global/policies/d10eb8e0-875a-40c8-821c-6214c23ac0b3
Response body
{
"uuid": "d10eb8e0-875a-40c8-821c-6214c23ac0b3",
"name": "Settings Writer",
"description": "Settings Writer Policy",
"tags": [],
"statementQuery": "ALLOW settings:objects:read, settings:objects:write, settings:schemas:read;",
"statements": [
{
"effect": "ALLOW",
"permissions": [
"settings:objects:read",
"settings:objects:write",
"settings:schemas:read"
],
"conditions": null
}
]
}
Response code
200