deprecated
This API is deprecated. Use the Settings API with the Management zones settings (builtin:management-zones
) schema instead.
Creates a new management zone.
The request consumes and produces an application/json
payload.
POST | SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/managementZones |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/managementZones |
To execute this request, you need an access token with WriteConfig
scope.
To learn how to obtain and use it, see Tokens and authentication.
To find all JSON models that depend on the type of the model, refer to JSON models.
Parameter | Type | Description | In | Required |
---|---|---|---|---|
body | Management | The JSON body of the request. Contains parameters of the new management zone. | body | optional |
ManagementZone
objectThe configuration of the management zone. It defines how the management zone applies.
Element | Type | Description | Required |
---|---|---|---|
description | string | The description of the management zone. | optional |
dimensionalRules | Mz | A list of dimensional data rules for management zone usage. If several rules are specified, the OR logic applies. | optional |
entitySelectorBasedRules | Entity | A list of entity-selector based rules for management zone usage. If several rules are specified, the OR logic applies. | optional |
id | string | The ID of the management zone. | optional |
metadata | Configuration | Metadata useful for debugging | optional |
name | string | The name of the management zone. | required |
rules | Mz | A list of rules for management zone usage. If several rules are specified, the OR logic applies. | optional |
MzDimensionalRule
objectThe 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 | Required |
---|---|---|---|
appliesTo | string | The target of the rule.
| required |
conditions | Mz | A list of conditions for the management zone. The management zone applies only if all conditions are fulfilled. | required |
enabled | boolean | The rule is enabled ( | required |
MzDimensionalRuleCondition
objectA condition of the management zone dimensional rule.
Element | Type | Description | Required |
---|---|---|---|
conditionType | string | The type of the condition.
| required |
key | string | The reference value for comparison. For conditions of the | required |
ruleMatcher | string | How we compare the values.
| required |
value | string | The value of the dimension. Only applicable when the conditionType is set to | optional |
EntitySelectorBasedMzRule
objectThe entity-selector-based rule for management zone usage. It allows adding entities to a management zone via an entity selector.
Element | Type | Description | Required |
---|---|---|---|
enabled | boolean | The rule is enabled ( | optional |
entitySelector | string | The entity selector string, by which the entities are selected. | required |
ConfigurationMetadata
objectMetadata useful for debugging
Element | Type | Description | Required |
---|---|---|---|
clusterVersion | string | Dynatrace version. | optional |
configurationVersions | integer[] | A sorted list of the version numbers of the configuration. | optional |
currentConfigurationVersions | string[] | A sorted list of version numbers of the configuration. | optional |
MzRule
objectThe 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 | Required |
---|---|---|---|
conditions | Entity | A list of matching rules for the management zone. The management zone applies only if all conditions are fulfilled. | required |
enabled | boolean | The rule is enabled ( | required |
propagationTypes | string[] | How to apply the management zone to underlying entities:
| optional |
type | string | The type of Dynatrace entities the management zone can be applied to.
| required |
EntityRuleEngineCondition
objectA condition defines how to execute matching logic for an entity.
Element | Type | Description | Required |
---|---|---|---|
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. | required |
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. | required |
ComparisonBasic
objectDefines 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 | Required |
---|---|---|---|
negate | boolean | Reverses the comparison operator. For example it turns the begins with into does not begin with. | required |
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. | required |
type | string | Defines the actual set of fields depending on the value. See one of the following objects:
| required |
value | string | The value to compare to. | optional |
AnyValue
objectA schema representing an arbitrary value type.
ConditionKey
objectThe 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 | Required |
---|---|---|---|
attribute | string | The attribute to be used for comparison.
| required |
type | string | Defines the actual set of fields depending on the value. See one of the following objects:
| optional |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"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"}]}
Code | Type | Description |
---|---|---|
201 | Entity | Success. The management zone has been created. The response contains the ID of the new zone. |
400 | Error | Failed. The input is invalid |
EntityShortRepresentation
objectThe short representation of a Dynatrace entity.
Element | Type | Description |
---|---|---|
description | string | A short description of the Dynatrace entity. |
id | string | The ID of the Dynatrace entity. |
name | string | The name of the Dynatrace entity. |
{"description": "Dynatrace entity for the REST API example","id": "6a98d7bc-abb9-44f8-ae6a-73e68e71812a","name": "Dynatrace entity"}
We recommend that you validate the payload before submitting it with an actual request. A response code of 204 indicates a valid payload.
The request consumes an application/json
payload.
POST | SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/managementZones/validator |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/managementZones/validator |
To execute this request, you need an access token with WriteConfig
scope.
To learn how to obtain and use it, see Tokens and authentication.
Code | Type | Description |
---|---|---|
204 | - | Validated. The submitted configuration is valid. Response does not have a body. |
400 | Error | Failed. The input is invalid |
In this example, the request creates a new management zone with the Mainframe name. It includes all services that run on hosts with the z/OS architecture and underlying process groups.
The API token is passed in the Authorization header.
The request body is lengthy, so it is truncated in the Curl section. See the full body in the Request body section. You can download or copy the example request body to try it out on your own.
curl -L -X POST 'https://mySampleEnv.live.dynatrace.com/api/config/v1/managementZones' \-H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890' \-H 'Content-Type: application/json' \--data-raw '{ <truncated - see the Request body section > }'
https://mySampleEnv.live.dynatrace.com/api/config/v1/managementZones
{"name": "Mainframe","rules": [{"type": "SERVICE","enabled": true,"propagationTypes": ["SERVICE_TO_PROCESS_GROUP_LIKE"],"conditions": [{"key": {"attribute": "HOST_ARCHITECTURE"},"comparisonInfo": {"type": "OS_ARCHITECTURE","operator": "EQUALS","value": "ZOS","negate": false}}]}]}
{"id": "2072664797514502900","name": "Mainframe"}
201
The new management zone looks like this in the UI: