Creates a new conditional naming rule.
The request consumes and produces an application/json
payload.
POST | SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/conditionalNaming/{type} |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/conditionalNaming/{type} |
To execute this request, you need an access token with WriteConfig
scope.
To learn how to obtain and use it, see Tokens and authentication.
Refer to JSON models to find all JSON models that depend on the type of the model.
Parameter | Type | Description | In | Required |
---|---|---|---|---|
type | string | The type of the rule, defined by the type of Dynatrace entities to which the rule applies.
| path | required |
body | Conditional | The JSON body of the request. Contains parameters of the new naming rule. Do not specify the id of the rule. The value of the type field must match the type path parameter. | body | optional |
ConditionalNamingRule
objectThe rule for the conditional naming.
Element | Type | Description | Required |
---|---|---|---|
displayName | string | The name of the rule | required |
enabled | boolean | The rule is enabled ( | required |
id | string | The ID of the naming rule. | optional |
metadata | Configuration | Metadata useful for debugging | optional |
nameFormat | string | The name to be assigned to matching entities. You can use the following placeholders here:
| required |
rules | Entity | A list of matching conditions of the rule. The rule applies only if all conditions are fulfilled. | required |
type | string | The type of Dynatrace entities to which the rule applies.
| 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 |
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.
{"displayName": "TestRule","enabled": true,"id": "4e88530c-edec-4e31-9cb4-3f2c63abc2b7","nameFormat": "TestNameFormat","rules": [{"comparisonInfo": {"negate": "false","operator": "EQUALS","type": "SIMPLE_TECH","value": {"type": "JAVA"}},"key": {"attribute": "PROCESS_GROUP_TECHNOLOGY"}},{"comparisonInfo": {"caseSensitive": true,"negate": "false","operator": "CONTAINS","type": "STRING","value": "test"},"key": {"attribute": "PROCESS_GROUP_PREDEFINED_METADATA","dynamicKey": "EXE_NAME","type": "PROCESS_PREDEFINED_METADATA_KEY"}}],"type": "PROCESS_GROUP"}
The request returns the short representation of the newly created rule.
Code | Type | Description |
---|---|---|
201 | Entity | Success. The naming rule has been created. The response contains the ID of the new rule |
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/conditionalNaming/{type}/validator |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/conditionalNaming/{type}/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 doesn't have a body. |
400 | Error | Failed. The input is invalid. |