Updates the specified request naming rule. If the rule with the specified ID doesn't exist—creates a new rule with this ID.
The request consumes and produces an application/json
payload.
PUT | SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/service/requestNaming/{id} |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/service/requestNaming/{id} |
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 |
---|---|---|---|---|
id | string | The ID of the request naming to be updated. The ID of the request naming in the body of the request must match this ID. | path | required |
body | Request | The JSON body of the request containing updated parameters of the request naming. | body | optional |
RequestNaming
objectThe request naming rule.
Element | Type | Description | Required |
---|---|---|---|
conditions | Condition[] | The set of conditions for the request naming rule usage. You can specify several conditions. The request has to match all the specified conditions for the rule to trigger. | required |
enabled | boolean | The rule is enabled ( | required |
id | string | The ID of the request naming rule. | optional |
managementZones | string[] | Specifies the management zones for which this rule should be applied. | optional |
metadata | Configuration | Metadata useful for debugging | optional |
namingPattern | string | The name to be assigned to matching requests. | required |
order | string | The order string. Sorting request namings alphabetically by their order string determines their relative ordering. Typically this is managed by Dynatrace internally and will not be present in GET responses nor used if present in PUT/POST requests, except where noted otherwise. | optional |
placeholders | Placeholder[] | The list of custom placeholders to be used in the naming pattern. It enables you to extract a request attribute value or other request attribute and use it in the request naming pattern. | optional |
Condition
objectA condition of a rule usage.
Element | Type | Description | Required |
---|---|---|---|
attribute | string | The attribute to be matched. Note that for a service property attribute you must use the comparison of the
| required |
comparisonInfo | Comparison | Type-specific comparison for attributes. The actual set of fields depends on the type of the comparison. Find the list of actual objects in the description of the type field or see Service metrics API - JSON models. | required |
ComparisonInfo
objectType-specific comparison for attributes. The actual set of fields depends on the type of the comparison. Find the list of actual objects in the description of the type field or see Service metrics API - JSON models.
Element | Type | Description | Required |
---|---|---|---|
comparison | string | Operator of the comparision. You can reverse it by setting negate to | required |
negate | boolean | Reverse the comparison operator. For example, it turns equals into does not equal. | 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 |
values | - | The values to compare to. | optional |
AnyValue
objectA schema representing an arbitrary value type.
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 |
Placeholder
objectThe custom placeholder to be used as a naming value pattern.
It enables you to extract a request attribute value or other request attribute and use it in the naming pattern.
Element | Type | Description | Required |
---|---|---|---|
aggregation | string | Which value of the request attribute must be used when it occurs across multiple child requests. Only applicable for the For the
| optional |
attribute | string | The attribute to extract from. You can only use attributes of the string type.
| required |
delimiterOrRegex | string | Depending on the type value:
| optional |
endDelimiter | string | The closing delimiter string to look for. Required if the kind value is | optional |
kind | string | The type of extraction. Defines either usage of regular expression ( When the attribute is
| required |
name | string | The name of the placeholder. Use it in the naming pattern as | required |
normalization | string | The format of the extracted string.
| optional |
oneAgentAttributeKey | string | The One Agent attribute to extract from. Required if the kind value is | optional |
requestAttribute | string | The request attribute to extract from. Required if the kind value is | optional |
source | Propagation | Defines valid sources of request attributes for conditions or placeholders. | optional |
useFromChildCalls | boolean | If Only applicable for the | optional |
PropagationSource
objectDefines valid sources of request attributes for conditions or placeholders.
Element | Type | Description | Required |
---|---|---|---|
managementZone | string | Use only request attributes from services that belong to this management zone.. Use either this or | optional |
serviceTag | Universal | Use only request attributes from services that have this tag. Use either this or | optional |
UniversalTag
objectUse only request attributes from services that have this tag. Use either this or managementZone
Element | Type | Description | Required |
---|---|---|---|
context | string | The origin of the tag, such as AWS or Cloud Foundry. For custom tags use the The context is set for tags that are automatically imported by OneAgent (for example, from the AWS console or environment variables). It’s useful for determining the origin of tags when not manually defined, and it also helps to prevent clashes with other existing tags. If the tag is not automatically imported,
| optional |
key | string | The key of the tag. For custom tags, put the tag value here. The key allows categorization of multiple tags. It is possible that there are multiple values for a single key which will all be represented as standalone tags. Therefore, the key does not have the semantic of a map key but is more like a key of a key-value tuple. In some cases, for example custom tags, the key represents the actual tag value and the value field is not set – those are called valueless tags. | required |
tagKey | Universal | - | optional |
value | string | The value of the tag. Not applicable to custom tags. If a tag does have a separate key and value (in the textual representation they are split by the colon ‘:’), this field is set with the actual value. Key-value pairs can occur for automatically imported tags and tags set by rules if extractors are used. | optional |
UniversalTagKey
objectElement | Type | Description | Required |
---|---|---|---|
context | string | -
| optional |
key | string | - | optional |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"conditions": [{"attribute": "WEBREQUEST_URL_PATH","comparisonInfo": {"caseSensitive": false,"comparison": "BEGINS_WITH","negate": false,"type": "STRING","value": "/url"}}],"enabled": true,"namingPattern": "renamed request"}
The request returns the short representation of the updated or newly created rule.
Code | Type | Description |
---|---|---|
201 | Entity | Success. Request naming rule has been created. Response contains the new request naming rule's ID and name. |
204 | - | Success. Request naming rule has been updated. Response doesn't have a body. |
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/service/requestNaming/{id}/validator |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/service/requestNaming/{id}/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. |