Management zones API - GET a management zone
Gets parameters of the specified management zone.
The request produces an application/json
payload.
GET | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/config/v1/managementZones/{id} |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/managementZones/{id} | |
Environment ActiveGate | https://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/managementZones/{id} |
Authentication
To execute this request, you need an access token with ReadConfig
scope.
To learn how to obtain and use it, see Tokens and authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
id | string | The ID of the required management zone. | path | required |
includeProcessGroupReferences | boolean | Flag to include process group references to the response. Process group references aren't compatible across environments. When this flag is set to false, conditions with process group references will be removed. If that leads to a rule having no conditions, the entire rule will be removed. | query | optional |
Response
To find all JSON models that depend on the type of the model, refer to JSON models.
Response codes
Code | Type | Description |
---|---|---|
200 | Management | Success |
Response body objects
The ManagementZone
object
The configuration of the management zone. It defines how the management zone applies.
Element | Type | Description |
---|---|---|
description | string | The description of the management zone. |
dimensionalRules | Mz | A list of dimensional data rules for management zone usage. If several rules are specified, the OR logic applies. |
entitySelectorBasedRules | Entity | A list of entity-selector based rules for management zone usage. If several rules are specified, the OR logic applies. |
id | string | The ID of the management zone. |
metadata | Configuration | Metadata useful for debugging |
name | string | The name of the management zone. |
rules | Mz | A list of rules for management zone usage. If several rules are specified, the OR logic applies. |
The MzDimensionalRule
object
The dimensional rule of the management zone usage. It defines how the management zone applies.
Each rule is evaluated independently of all other rules.
Element | Type | Description |
---|---|---|
appliesTo | string | The target of the rule. |
conditions | Mz | A list of conditions for the management zone. The management zone applies only if all conditions are fulfilled. |
enabled | boolean | The rule is enabled ( |
The MzDimensionalRuleCondition
object
A condition of the management zone dimensional rule.
Element | Type | Description |
---|---|---|
conditionType | string | The type of the condition. |
key | string | The reference value for comparison. For conditions of the |
ruleMatcher | string | How we compare the values. |
value | string | The value of the dimension. Only applicable when the conditionType is set to |
The EntitySelectorBasedMzRule
object
The entity-selector-based rule for management zone usage. It allows adding entities to a management zone via an entity selector.
Element | Type | Description |
---|---|---|
enabled | boolean | The rule is enabled ( |
entitySelector | string | The entity selector string, by which the entities are selected. |
The ConfigurationMetadata
object
Metadata useful for debugging
Element | Type | Description |
---|---|---|
clusterVersion | string | Dynatrace version. |
configurationVersions | integer[] | A sorted list of the version numbers of the configuration. |
currentConfigurationVersions | string[] | A sorted list of version numbers of the configuration. |
The MzRule
object
The rule of the management zone usage. It defines how the management zone applies.
Each rule is evaluated independently of all other rules.
Element | Type | Description |
---|---|---|
conditions | Entity | A list of matching rules for the management zone. The management zone applies only if all conditions are fulfilled. |
enabled | boolean | The rule is enabled ( |
propagationTypes | string[] | How to apply the management zone to underlying entities:
|
type | string | The type of Dynatrace entities the management zone can be applied to. |
The EntityRuleEngineCondition
object
A condition defines how to execute matching logic for an entity.
Element | Type | Description |
---|---|---|
comparisonInfo | Comparison | Defines how the matching is actually performed: what and how are we comparing. The actual set of fields and possible values of the operator field depend on the type of the comparison. Find the list of actual objects in the description of the type field or see JSON models. |
key | Condition | The key to identify the data we're matching. The actual set of fields and possible values depend on the type of the key. Find the list of actual objects in the description of the type field or see JSON models. |
The ComparisonBasic
object
Defines how the matching is actually performed: what and how are we comparing.
The actual set of fields and possible values of the operator field depend on the type of the comparison. Find the list of actual objects in the description of the type field or see JSON models.
Element | Type | Description |
---|---|---|
negate | boolean | Reverses the comparison operator. For example it turns the begins with into does not begin with. |
operator | string | Operator of the comparison. You can reverse it by setting negate to Possible values depend on the type of the comparison. Find the list of actual models in the description of the type field and check the description of the model you need. |
type | string | Defines the actual set of fields depending on the value. See one of the following objects:
|
value | object | The value to compare to. |
The ConditionKey
object
The key to identify the data we're matching.
The actual set of fields and possible values depend on the type of the key. Find the list of actual objects in the description of the type field or see JSON models.
Element | Type | Description |
---|---|---|
attribute | string | The attribute to be used for comparison. |
type | string | Defines the actual set of fields depending on the value. See one of the following objects:
|
Response body JSON model
{
"description": "sampleDescription",
"dimensionalRules": [
{
"appliesTo": "METRIC",
"conditions": [
{
"conditionType": "DIMENSION",
"key": "alwaysRequired",
"ruleMatcher": "EQUALS",
"value": "requiredForDimension_forbiddenForMetricKeyAndLogFileName"
}
],
"enabled": true
}
],
"entitySelectorBasedRules": [
{
"enabled": true,
"entitySelector": "type(HOST) AND cpuCores(4)"
}
],
"name": "sampleManagementZone",
"rules": [
{
"conditions": [
{
"comparisonInfo": {
"caseSensitive": false,
"negate": false,
"operator": "BEGINS_WITH",
"type": "STRING",
"value": "sample"
},
"key": {
"attribute": "SERVICE_DATABASE_NAME"
}
},
{
"comparisonInfo": {
"negate": false,
"operator": "EXISTS",
"type": "STRING"
},
"key": {
"attribute": "SERVICE_WEB_SERVER_NAME"
}
},
{
"comparisonInfo": {
"caseSensitive": false,
"negate": false,
"operator": "BEGINS_WITH",
"type": "STRING",
"value": "sample"
},
"key": {
"attribute": "PROCESS_GROUP_CUSTOM_METADATA",
"dynamicKey": {
"key": "kubernetes.io/limit-ranger",
"source": "KUBERNETES"
},
"type": "PROCESS_CUSTOM_METADATA_KEY"
}
}
],
"enabled": true,
"propagationTypes": [
"SERVICE_TO_HOST_LIKE"
],
"type": "SERVICE"
}
]
}
Example
In this example, the request inquires about the properties of the Easytravel management zone, which has the ID 9130632296508575249.
The configuration has the following settings:
Curl
curl -L -X GET 'https://mySampleEnv.live.dynatrace.com/api/config/v1/managementZones/9130632296508575249' \
-H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890'
Request URL
https://mySampleEnv.live.dynatrace.com/api/config/v1/managementZones/9130632296508575249
Response body
{
"metadata": {
"configurationVersions": [
0
],
"clusterVersion": "1.198.0.20200625-125013"
},
"id": "9130632296508575249",
"name": "Easytravel",
"rules": [
{
"type": "WEB_APPLICATION",
"enabled": true,
"propagationTypes": [],
"conditions": [
{
"key": {
"attribute": "WEB_APPLICATION_NAME"
},
"comparisonInfo": {
"type": "STRING",
"operator": "BEGINS_WITH",
"value": "easytravel",
"negate": false,
"caseSensitive": false
}
}
]
},
{
"type": "HOST",
"enabled": true,
"propagationTypes": [
"HOST_TO_PROCESS_GROUP_INSTANCE"
],
"conditions": [
{
"key": {
"attribute": "HOST_TAGS"
},
"comparisonInfo": {
"type": "TAG",
"operator": "TAG_KEY_EQUALS",
"value": {
"context": "CONTEXTLESS",
"key": "easyTravel"
},
"negate": false
}
}
]
},
{
"type": "SERVICE",
"enabled": true,
"propagationTypes": [
"SERVICE_TO_HOST_LIKE",
"SERVICE_TO_PROCESS_GROUP_LIKE"
],
"conditions": [
{
"key": {
"attribute": "SERVICE_TAGS"
},
"comparisonInfo": {
"type": "TAG",
"operator": "TAG_KEY_EQUALS",
"value": {
"context": "CONTEXTLESS",
"key": "easyTravel"
},
"negate": false
}
}
]
},
{
"type": "SERVICE",
"enabled": true,
"propagationTypes": [
"SERVICE_TO_HOST_LIKE",
"SERVICE_TO_PROCESS_GROUP_LIKE"
],
"conditions": [
{
"key": {
"attribute": "SERVICE_NAME"
},
"comparisonInfo": {
"type": "STRING",
"operator": "BEGINS_WITH",
"value": "dotNetFrontend",
"negate": false,
"caseSensitive": true
}
}
]
},
{
"type": "SERVICE",
"enabled": true,
"propagationTypes": [
"SERVICE_TO_HOST_LIKE",
"SERVICE_TO_PROCESS_GROUP_LIKE"
],
"conditions": [
{
"key": {
"attribute": "SERVICE_NAME"
},
"comparisonInfo": {
"type": "STRING",
"operator": "BEGINS_WITH",
"value": "dev: easyTravel Customer Frontend",
"negate": false,
"caseSensitive": false
}
}
]
},
{
"type": "SERVICE",
"enabled": true,
"propagationTypes": [
"SERVICE_TO_HOST_LIKE",
"SERVICE_TO_PROCESS_GROUP_LIKE"
],
"conditions": [
{
"key": {
"attribute": "SERVICE_NAME"
},
"comparisonInfo": {
"type": "STRING",
"operator": "BEGINS_WITH",
"value": "easyTravel-Business",
"negate": false,
"caseSensitive": true
}
}
]
}
]
}
Response code
200