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 |
---|---|---|
metadata | Configuration | Metadata useful for debugging |
id | string | The ID of the management zone. |
name | string | The name of the management zone. |
description | string | The description of the management zone. |
rules | Mz | A list of rules for management zone usage. If several rules are specified, the OR logic applies. |
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. |
The ConfigurationMetadata
object
Metadata useful for debugging
Element | Type | Description |
---|---|---|
configurationVersions | integer[] | A sorted list of the version numbers of the configuration. |
currentConfigurationVersions | string[] | A sorted list of version numbers of the configuration. |
clusterVersion | string | Dynatrace version. |
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 |
---|---|---|
type | string | The type of Dynatrace entities the management zone can be applied to. |
enabled | boolean | The rule is enabled ( |
propagationTypes | string[] | How to apply the management zone to underlying entities:
|
conditions | Entity | A list of matching rules for the management zone. The management zone applies only if all conditions are fulfilled. |
The EntityRuleEngineCondition
object
A condition defines how to execute matching logic for an entity.
Element | Type | Description |
---|---|---|
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. |
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. |
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:
|
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 |
---|---|---|
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. |
value | object | The value to compare to. |
negate | boolean | Reverses the comparison operator. For example it turns the begins with into does not begin with. |
type | string | Defines the actual set of fields depending on the value. See one of the following objects:
|
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 |
---|---|---|
enabled | boolean | The rule is enabled ( |
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. |
The MzDimensionalRuleCondition
object
A condition of the management zone dimensional rule.
Element | Type | Description |
---|---|---|
conditionType | string | The type of the condition. |
ruleMatcher | string | How we compare the values. |
key | string | The reference value for comparison. For conditions of the |
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. |
Response body JSON model
{
"name": "sampleManagementZone",
"description": "sampleDescription",
"rules": [
{
"type": "SERVICE",
"enabled": true,
"propagationTypes": [
"SERVICE_TO_HOST_LIKE"
],
"conditions": [
{
"key": {
"attribute": "SERVICE_DATABASE_NAME"
},
"comparisonInfo": {
"type": "STRING",
"operator": "BEGINS_WITH",
"value": "sample",
"negate": false,
"caseSensitive": false
}
},
{
"key": {
"attribute": "SERVICE_WEB_SERVER_NAME"
},
"comparisonInfo": {
"type": "STRING",
"operator": "EXISTS",
"negate": false
}
},
{
"key": {
"attribute": "PROCESS_GROUP_CUSTOM_METADATA",
"type": "PROCESS_CUSTOM_METADATA_KEY",
"dynamicKey": {
"source": "KUBERNETES",
"key": "kubernetes.io/limit-ranger"
}
},
"comparisonInfo": {
"type": "STRING",
"operator": "BEGINS_WITH",
"value": "sample",
"negate": false,
"caseSensitive": false
}
}
]
}
],
"dimensionalRules": [
{
"enabled": true,
"appliesTo": "METRIC",
"conditions": [
{
"conditionType": "DIMENSION",
"ruleMatcher": "EQUALS",
"key": "alwaysRequired",
"value": "requiredForDimension_forbiddenForMetricKeyAndLogFileName"
}
]
}
],
"entitySelectorBasedRules": [
{
"enabled": true,
"entitySelector": "type(HOST) AND cpuCores(4)"
}
]
}
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