JSON models of the Service detection rules API vary greatly, depending on the type of some objects. Here you can find JSON models for each variation.
ServiceDetectionRule objectThe ServiceDetectionRule object is the base for all service detection rules. The actual set of fields depends on the type of the rule.
FullWebRequestRule objectThe service detection rule of the FULL_WEB_REQUEST type.
| Element | Type | Description | 
|---|---|---|
| applicationId | Application | The contribution to the service ID calculation from the detected application ID. You have two mutually exclusive options: 
  | 
| conditions | Conditions | A list of conditions of the rule. If several conditions are specified, the AND logic applies.  | 
| contextRoot | Context | The contribution to the service ID calculation from the detected context root. The context root is the first segment of the request URL after server name. For example, in the  You have two options: 
 You can use one or both options. If you use both, the transformation applies to the modified URL.  | 
| description | string | A short description of the rule.  | 
| enabled | boolean | The rule is enabled(  | 
| id | string | The ID of the service detection rule.  | 
| managementZones | string[] | The management zone (specified by the ID) of the process group for which this service detection rule should be created. You can specify only 1 management zone here.  | 
| metadata | Configuration | Metadata useful for debugging  | 
| name | string | The name of the rule.  | 
| order | string | The order of the rule in the rules list. The rules are evaluated from top to bottom. The first matching rule applies.  | 
| serverName | Server | The contribution to the service ID calculation from the detected server name. You have two mutually exclusive options: 
  | 
| type | string | The type of the service detection rule.  | 
ApplicationId objectThe contribution to the service ID calculation from the detected application ID.
You have two mutually exclusive options:
| Element | Type | Description | 
|---|---|---|
| transformations | Transformation | Transformations to be applied to the detected value.  | 
| valueOverride | string | The value to be used instead of the detected value.  | 
TransformationBase objectConfiguration of transformation of the detected value.
If several transformations are specified, they are handled sequentially from top to bottom. Each transformation is applied to the result of the preceding transformation. For example, the second transformation is applied to the result of the first transformation.
The actual set of fields depends on the type of the transformation. Find the list of actual objects in the description of the type field or see Service detection API - JSON models.
| Element | Type | Description | 
|---|---|---|
| type | string | Defines the actual set of fields depending on the value. See one of the following objects: 
 
  | 
ConditionsFullWebRequestAttributeTypeDto objectA condition of the service detection rule.
| Element | Type | Description | 
|---|---|---|
| attributeType | string | The type of the attribute to be checked. 
  | 
| compareOperations | Compare | A list of conditions for the rule. If several conditions are specified, the AND logic applies.  | 
CompareOperation objectThe condition of the rule.
The actual set of fields depends on the type of the condition. Find the list of actual objects in the description of the type field or see Service detection API - JSON models.
| Element | Type | Description | 
|---|---|---|
| type | string | Defines the actual set of fields depending on the value. See one of the following objects: 
 
  | 
ContextRoot objectThe contribution to the service ID calculation from the detected context root.
The context root is the first segment of the request URL after server name. For example, in the www.dynatrace.com/support/help/dynatrace-api/ URL the context root is support.
You have two options:
You can use one or both options. If you use both, the transformation applies to the modified URL.
| Element | Type | Description | 
|---|---|---|
| segmentsToCopyFromUrlPath | integer | The number of segments of the URL to be kept. The URL is divided by slashes ( For example, if you specify   | 
| transformations | Context | Transformations to be applied to the detected value.  | 
ContextRootTransformation objectConfiguration of transformation of the detected value.
If several transformations are specified, they are handled sequentially from top to bottom. Each transformation is applied to the result of the preceding transformation. For example, the second transformation is applied to the result of the first transformation.
The actual set of fields depends on the type of the transformation.
| Element | Type | Description | 
|---|---|---|
| type | string | Defines the actual set of fields depending on the value. See one of the following objects: 
 
  | 
ConfigurationMetadata objectMetadata 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.  | 
ServerName objectThe contribution to the service ID calculation from the detected server name.
You have two mutually exclusive options:
| Element | Type | Description | 
|---|---|---|
| transformations | Transformation | Transformations to be applied to the detected value.  | 
| valueOverride | string | The value to be used instead of the detected value.  | 
OpaqueAndExternalWebRequestRule objectThe service detection rule of the OPAQUE_AND_EXTERNAL_WEB_REQUEST type.
| Element | Type | Description | 
|---|---|---|
| applicationId | Application | The contribution to the service ID calculation from the detected application ID. You have two mutually exclusive options: 
  | 
| conditions | Conditions | A list of conditions of the rule. If several conditions are specified, the AND logic applies.  | 
| contextRoot | Context | The contribution to the service ID calculation from the detected context root. The context root is the first segment of the request URL after server name. For example, in the  You have two options: 
 You can use one or both options. If you use both, the transformation applies to the modified URL.  | 
| description | string | A short description of the rule.  | 
| enabled | boolean | The rule is enabled(  | 
| id | string | The ID of the service detection rule.  | 
| managementZones | string[] | The management zone (specified by the ID) of the process group for which this service detection rule should be created. You can specify only 1 management zone here.  | 
| metadata | Configuration | Metadata useful for debugging  | 
| name | string | The name of the rule.  | 
| order | string | The order of the rule in the rules list. The rules are evaluated from top to bottom. The first matching rule applies.  | 
| port | Port | The contribution to the service ID calculation from the port, where the web request has been detected.  | 
| publicDomainName | Public | The contribution to the service ID calculation from the domain name where the web request has been detected. You have two mutually exclusive options: 
  | 
| type | string | The type of the service detection rule.  | 
ApplicationId objectThe contribution to the service ID calculation from the detected application ID.
You have two mutually exclusive options:
| Element | Type | Description | 
|---|---|---|
| transformations | Transformation | Transformations to be applied to the detected value.  | 
| valueOverride | string | The value to be used instead of the detected value.  | 
TransformationBase objectConfiguration of transformation of the detected value.
If several transformations are specified, they are handled sequentially from top to bottom. Each transformation is applied to the result of the preceding transformation. For example, the second transformation is applied to the result of the first transformation.
The actual set of fields depends on the type of the transformation. Find the list of actual objects in the description of the type field or see Service detection API - JSON models.
| Element | Type | Description | 
|---|---|---|
| type | string | Defines the actual set of fields depending on the value. See one of the following objects: 
 
  | 
ConditionsOpaqueAndExternalWebRequestAttributeTypeDto objectA condition of the service detection rule.
| Element | Type | Description | 
|---|---|---|
| attributeType | string | The type of the attribute to be checked. 
  | 
| compareOperations | Compare | A list of conditions for the rule. If several conditions are specified, the AND logic applies.  | 
CompareOperation objectThe condition of the rule.
The actual set of fields depends on the type of the condition. Find the list of actual objects in the description of the type field or see Service detection API - JSON models.
| Element | Type | Description | 
|---|---|---|
| type | string | Defines the actual set of fields depending on the value. See one of the following objects: 
 
  | 
ContextRoot objectThe contribution to the service ID calculation from the detected context root.
The context root is the first segment of the request URL after server name. For example, in the www.dynatrace.com/support/help/dynatrace-api/ URL the context root is support.
You have two options:
You can use one or both options. If you use both, the transformation applies to the modified URL.
| Element | Type | Description | 
|---|---|---|
| segmentsToCopyFromUrlPath | integer | The number of segments of the URL to be kept. The URL is divided by slashes ( For example, if you specify   | 
| transformations | Context | Transformations to be applied to the detected value.  | 
ContextRootTransformation objectConfiguration of transformation of the detected value.
If several transformations are specified, they are handled sequentially from top to bottom. Each transformation is applied to the result of the preceding transformation. For example, the second transformation is applied to the result of the first transformation.
The actual set of fields depends on the type of the transformation.
| Element | Type | Description | 
|---|---|---|
| type | string | Defines the actual set of fields depending on the value. See one of the following objects: 
 
  | 
ConfigurationMetadata objectMetadata 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.  | 
Port objectThe contribution to the service ID calculation from the port, where the web request has been detected.
| Element | Type | Description | 
|---|---|---|
| doNotUseForServiceId | boolean | The port is used (  | 
PublicDomainName objectThe contribution to the service ID calculation from the domain name where the web request has been detected.
You have two mutually exclusive options:
| Element | Type | Description | 
|---|---|---|
| copyFromHostName | boolean | Use ( Not applicable if the override is specified.  | 
| transformations | Transformation | Transformations to be applied to the detected value.  | 
| valueOverride | string | The value to be used instead of the detected value.  | 
FullWebServiceRule objectThe service detection rule of the FULL_WEB_SERVICE type.
If you have a condition with the attributeType set to FRAMEWORK, the values field from compareOperations is limited to the following possible values:
AXISCXFHESSIANJAX_WS_RIJBOSSJERSEYPROGRESSRESTEASYRESTLETSPRINGTIBCOWEBLOGICWEBMETHODSWEBSPHEREWINK| Element | Type | Description | 
|---|---|---|
| applicationId | Application | The contribution to the service ID calculation from the detected application ID. You have two mutually exclusive options: 
  | 
| conditions | Conditions | A list of conditions of the rule. If several conditions are specified, the AND logic applies.  | 
| contextRoot | Context | The contribution to the service ID calculation from the detected context root. The context root is the first segment of the request URL after server name. For example, in the  You have two options: 
 You can use one or both options. If you use both, the transformation applies to the modified URL.  | 
| description | string | A short description of the rule.  | 
| detectAsWebRequestService | boolean | Detect the matching requests as full web services ( Setting this field to  Default is   | 
| enabled | boolean | The rule is enabled(  | 
| id | string | The ID of the service detection rule.  | 
| managementZones | string[] | The management zone (specified by the ID) of the process group for which this service detection rule should be created. You can specify only 1 management zone here.  | 
| metadata | Configuration | Metadata useful for debugging  | 
| name | string | The name of the rule.  | 
| order | string | The order of the rule in the rules list. The rules are evaluated from top to bottom. The first matching rule applies.  | 
| serverName | Server | The contribution to the service ID calculation from the detected server name. You have two mutually exclusive options: 
  | 
| type | string | The type of the service detection rule.  | 
| webServiceName | Web | The contribution to the service ID calculation from the detected web service name. You have two mutually exclusive options: 
  | 
| webServiceNameSpace | Web | The contribution to the service ID calculation from the detected web service name space. You have two mutually exclusive options: 
  | 
ApplicationId objectThe contribution to the service ID calculation from the detected application ID.
You have two mutually exclusive options:
| Element | Type | Description | 
|---|---|---|
| transformations | Transformation | Transformations to be applied to the detected value.  | 
| valueOverride | string | The value to be used instead of the detected value.  | 
TransformationBase objectConfiguration of transformation of the detected value.
If several transformations are specified, they are handled sequentially from top to bottom. Each transformation is applied to the result of the preceding transformation. For example, the second transformation is applied to the result of the first transformation.
The actual set of fields depends on the type of the transformation. Find the list of actual objects in the description of the type field or see Service detection API - JSON models.
| Element | Type | Description | 
|---|---|---|
| type | string | Defines the actual set of fields depending on the value. See one of the following objects: 
 
  | 
ConditionsFullWebServiceAttributeTypeDto objectA condition of the service detection rule.
| Element | Type | Description | 
|---|---|---|
| attributeType | string | The type of the attribute to be checked. 
  | 
| compareOperations | Compare | A list of conditions for the rule. If several conditions are specified, the AND logic applies.  | 
CompareOperation objectThe condition of the rule.
The actual set of fields depends on the type of the condition. Find the list of actual objects in the description of the type field or see Service detection API - JSON models.
| Element | Type | Description | 
|---|---|---|
| type | string | Defines the actual set of fields depending on the value. See one of the following objects: 
 
  | 
ContextRoot objectThe contribution to the service ID calculation from the detected context root.
The context root is the first segment of the request URL after server name. For example, in the www.dynatrace.com/support/help/dynatrace-api/ URL the context root is support.
You have two options:
You can use one or both options. If you use both, the transformation applies to the modified URL.
| Element | Type | Description | 
|---|---|---|
| segmentsToCopyFromUrlPath | integer | The number of segments of the URL to be kept. The URL is divided by slashes ( For example, if you specify   | 
| transformations | Context | Transformations to be applied to the detected value.  | 
ContextRootTransformation objectConfiguration of transformation of the detected value.
If several transformations are specified, they are handled sequentially from top to bottom. Each transformation is applied to the result of the preceding transformation. For example, the second transformation is applied to the result of the first transformation.
The actual set of fields depends on the type of the transformation.
| Element | Type | Description | 
|---|---|---|
| type | string | Defines the actual set of fields depending on the value. See one of the following objects: 
 
  | 
ConfigurationMetadata objectMetadata 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.  | 
ServerName objectThe contribution to the service ID calculation from the detected server name.
You have two mutually exclusive options:
| Element | Type | Description | 
|---|---|---|
| transformations | Transformation | Transformations to be applied to the detected value.  | 
| valueOverride | string | The value to be used instead of the detected value.  | 
WebServiceName objectThe contribution to the service ID calculation from the detected web service name.
You have two mutually exclusive options:
| Element | Type | Description | 
|---|---|---|
| transformations | Transformation | Transformations to be applied to the detected value.  | 
| valueOverride | string | The value to be used instead of the detected value.  | 
WebServiceNameSpace objectThe contribution to the service ID calculation from the detected web service name space.
You have two mutually exclusive options:
| Element | Type | Description | 
|---|---|---|
| transformations | Transformation | Transformations to be applied to the detected value.  | 
| valueOverride | string | The value to be used instead of the detected value.  | 
CompareOperation objectThe CompareOperation object is the base for all comparison operations. The actual set of fields depends on the type of the comparison.
StringContainsCompareOperation objectThe condition of the STRING_CONTAINS type.
The condition checks whether the string value contains the specified text.
| Element | Type | Description | 
|---|---|---|
| ignoreCase | boolean | The condition is case sensitive ( If not set, then   | 
| negate | boolean | Inverts the operation of the condition. Set to  If not set, then   | 
| values | string[] | The value to compare to. If several values are specified, the OR logic applies.  | 
StringEqualsCompareOperation objectThe condition of the STRING_EQUALS type.
The condition checks whether the string value equals the specified text.
| Element | Type | Description | 
|---|---|---|
| ignoreCase | boolean | The condition is case sensitive ( If not set, then   | 
| negate | boolean | Inverts the operation of the condition. Set to  If not set, then   | 
| values | string[] | The value to compare to. If several values are specified, the OR logic applies.  | 
StartsWithCompareOperation objectThe condition of the STARTS_WITH type.
The condition checks whether the string value starts with the specified text.
| Element | Type | Description | 
|---|---|---|
| ignoreCase | boolean | The condition is case sensitive ( If not set, then   | 
| negate | boolean | Inverts the operation of the condition. Set to  If not set, then   | 
| values | string[] | The value to compare to. If several values are specified, the OR logic applies.  | 
EndsWithCompareOperation objectThe condition of the ENDS_WITH type.
The condition checks whether the string value ends with the specified text.
| Element | Type | Description | 
|---|---|---|
| ignoreCase | boolean | The condition is case sensitive ( If not set, then   | 
| negate | boolean | Inverts the operation of the condition. Set to  If not set, then   | 
| values | string[] | The value to compare to. If several values are specified, the OR logic applies.  | 
ExistsCompareOperation objectThe condition of the EXISTS type.
The condition checks whether the specified attribute exists.
| Element | Type | Description | 
|---|---|---|
| negate | boolean | Inverts the operation of the condition. Set to  If not set, then   | 
IpInRangeCompareOperation objectThe condition of the IP_IN_RANGE type.
The condition checks whether the IP address belongs to a specified range.
| Element | Type | Description | 
|---|---|---|
| lower | string | The lower boundary of the IP range.  | 
| negate | boolean | Inverts the operation of the condition. Set to  If not set, then   | 
| upper | string | The upper boundary of the IP range.  | 
IntEqualsCompareOperation objectThe condition of the INT_EQUALS type.
The condition checks whether the integer value equals the specified value.
| Element | Type | Description | 
|---|---|---|
| negate | boolean | Inverts the operation of the condition. Set to  If not set, then   | 
| values | integer[] | The value to compare to. If several values are specified, the OR logic applies.  | 
LessThanCompareOperation objectThe condition of the LESS_THAN type.
The condition checks whether the integer value is less than the specified value.
| Element | Type | Description | 
|---|---|---|
| value | integer | The value to compare to.  | 
GreaterThanCompareOperation objectThe condition of the GREATER_THAN type.
The condition checks whether the integer value is greater than the specified value.
| Element | Type | Description | 
|---|---|---|
| value | integer | The value to compare to.  | 
TransformationBase objectThe TransformationBase object is the base for all transformation operations. The actual set of fields depends on the type of the transformation.
BeforeTransformation objectThe transformation of the BEFORE type.
The transformation keeps the value before the specified delimiter and removes everything after it.
| Element | Type | Description | 
|---|---|---|
| delimiter | string | The delimiter of the transformation. The transformation keeps everything before this delimiter and removes everything after it. The delimiter itself is not kept. If several delimiters appear in the initial value, only the first one is used.  | 
AfterTransformation objectThe transformation of the AFTER type.The transformation removes everything before the specified delimiter and keeps the value after it.
| Element | Type | Description | 
|---|---|---|
| delimiter | string | The delimiter of the transformation. The transformation removes everything before this delimiter and keeps everything after it. The delimiter itself is not kept. If several delimiters appear in the initial value, only the first one is used.  | 
BetweenTransformation objectThe transformation of the BETWEEN type.The transformation keeps value between the specified delimiters and removes everything outside them.
| Element | Type | Description | 
|---|---|---|
| after | string | The starting delimiter. The transformation removes everything before it. The delimiter itself is not kept.  | 
| before | string | The ending delimiter. The transformation removes everything after it. The delimiter itself is not kept.  | 
ReplaceBetweenTransformation objectThe transformation of the REPLACE_BETWEEN type.
The transformation replaces the content in between specified delimiters with the specified value. The rest of the string remains intact.
| Element | Type | Description | 
|---|---|---|
| after | string | The starting delimiter. The transformation replaces everything from here until ending delimiter. The delimiter itself remain intact.  | 
| before | string | The ending delimiter. The transformation replaces everything from starting delimiter until here. The delimiter itself remain intact.  | 
| replacement | string | The value to be used instead of the content between delimiters.  | 
RemoveNumbersTransformation objectThe transformation of the REMOVE_NUMBERS type.
The transformation removes any numbers from the detected value.
| Element | Type | Description | 
|---|---|---|
| includeHexNumbers | boolean | Remove ( If not set, then   | 
| minDigitCount | integer | Remove numbers that contain at least X digits.  | 
RemoveCreditCardNumbersTransformation objectThe transformation of the REMOVE_CREDIT_CARDS type.
The transformation automatically detects and removes credit card numbers. No additional parameters needed.
| Element | Type | Description | 
|---|---|---|
| type | string | Defines the actual set of fields depending on the value. See one of the following objects: 
 
  | 
RemoveIBANsTransformation objectThe transformation of the REMOVE_IBANS type.
The transformation automatically detects and removes International Bank Account Numbers (IBAN). No additional parameters needed.
| Element | Type | Description | 
|---|---|---|
| type | string | Defines the actual set of fields depending on the value. See one of the following objects: 
 
  | 
RemoveIPsTransformation objectThe transformation of the REMOVE_IPS type.
The transformation automatically detects and removes IP addresses. No additional parameters needed.
| Element | Type | Description | 
|---|---|---|
| type | string | Defines the actual set of fields depending on the value. See one of the following objects: 
 
  | 
SplitSelectTransformation objectThe transformation of the SPLIT_SELECT type.
The transformation splits the detected value into an array and keeps the specified element of the array.
| Element | Type | Description | 
|---|---|---|
| delimiter | string | The delimiter for splitting the detected value. The delimiter itself is not kept.  | 
| itemIndex | integer | The index of the element in the split array to be used. Indexing starts with   | 
TakeSegmentsTransformation objectThe transformation of the TAKE_SEGMENTS type.
The transformation splits the detected value into an array and keeps the specified number of first or last elements.
| Element | Type | Description | 
|---|---|---|
| delimiter | string | The delimiter for splitting the detected value. The delimiter itself is not kept.  | 
| segmentCount | integer | The number of elements to be kept.  | 
| takeFromEnd | boolean | Keeps the first ( If not set, then   |