Service detection rules API - GET a rule

Shows the properties of the specified service detection rule for opaque and external web services.

The request produces an application/json payload.

Early Adopter

This request is an Early Adopter release and may be changed in non-compatible way.

GET
  • Managed https://{your-domain}/e/{your-environment-id}/api/config/v1/service/detectionRules/OPAQUE_AND_EXTERNAL_WEB_SERVICE/{id}
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/config/v1/service/detectionRules/OPAQUE_AND_EXTERNAL_WEB_SERVICE/{id}

Authentication

To execute this request, you need the Read configuration (ReadConfig) permission assigned to your API token. 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 service detection rule.

path required

Response

Refer to JSON models to find all JSON models that depend on the type of the model.

Response codes

Code Description
200

Success. The response contains properties of the specified rule.

404

Failed. The rule with the specified ID doesn't exist.

Response body

The OpaqueAndExternalWebServiceRule object

The service detection rule of the OPAQUE_AND_EXTERNAL_WEB_SERVICE type

Element Type Description
type string

The type of the service detection rule.

metadata ConfigurationMetadata
managementZones string[]

Specifies the management zones of the process group for which this service detection rule should be created.

id string

The ID of the service detection 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.

name string

The name of the rule.

description string

A short description of the rule.

enabled boolean

The rule is enabled(true) or disabled (false).

conditions ConditionsOpaqueAndExternalWebServiceAttributeTypeDto[]

A list of conditions of the rule.

If several conditions are specified, the AND logic applies.

detectAsWebRequestService boolean

Detect the matching requests as web services (false) or web request services (true).

Setting this field to true prevents detecting of matching requests as opaque web services. An opaque web request service is created instead. If you need to further modify the resulting web request service, you need to create a separate rule of the OPAQUE_AND_EXTERNAL_WEB_REQUEST type.

Default is false, detecting matching requests as opaque web services.

urlPath UrlPath
port Port

The Port object

The 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 (false) or isn't used (true) in the service ID calculation.

The UrlPath object

The contribution from the URL, where the web request has been detected, into service ID calculation.

You have two mutually exclusive options:

  • Override the detected value with a specified static value. Specify the new value in the valueOverride field.
  • Dynamically transform the detected value. Specify the transformation parameters in the transformations field.
Element Type Description
transformations TransformationBase[]

Transformations to be applied to the detected value.

valueOverride string

The value to be used instead of the detected value.

The TransformationBase object

Configuration 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:

  • BEFORE -> BeforeTransformation
  • AFTER -> AfterTransformation
  • BETWEEN -> BetweenTransformation
  • REPLACE_BETWEEN -> ReplaceBetweenTransformation
  • REMOVE_NUMBERS -> RemoveNumbersTransformation
  • REMOVE_CREDIT_CARDS -> RemoveCreditCardNumbersTransformation
  • REMOVE_IBANS -> RemoveIBANsTransformation
  • REMOVE_IPS -> RemoveIPsTransformation
  • SPLIT_SELECT -> SplitSelectTransformation
  • TAKE_SEGMENTS -> TakeSegmentsTransformation
The type element can hold these values.

The ConditionsOpaqueAndExternalWebServiceAttributeTypeDto object

A condition of the service detection rule.

Element Type Description
attributeType string

The type of the attribute to be checked.

The attributeType element can hold these values.
compareOperations CompareOperation[]

A list of conditions for the rule.

If several conditions are specified, the AND logic applies.

The CompareOperation object

The condition of the rule.

The actual set of fields depends on the type of the condition.

Element Type Description
type string

Defines the actual set of fields depending on the value. See one of the following objects:

  • EQUALS -> EqualsCompareOperation
  • STRING_CONTAINS -> StringContainsCompareOperation
  • STARTS_WITH -> StartsWithCompareOperation
  • ENDS_WITH -> EndsWithCompareOperation
  • EXISTS -> ExistsCompareOperation
  • IP_IN_RANGE -> IpInRangeCompareOperation
  • LESS_THAN -> LessThanCompareOperation
  • GREATER_THAN -> GreaterThanCompareOperation
  • INT_EQUALS -> IntEqualsCompareOperation
  • STRING_EQUALS -> StringEqualsCompareOperation
  • TAG -> TagCompareOperation
The type element can hold these values.

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 string version numbers of the configuration.

clusterVersion string

Dynatrace server version.

Possible values

Possible values for the type element in the TransformationBase object:

  • AFTER
  • BEFORE
  • BETWEEN
  • REMOVE_CREDIT_CARDS
  • REMOVE_IBANS
  • REMOVE_IPS
  • REMOVE_NUMBERS
  • REPLACE_BETWEEN
  • SPLIT_SELECT
  • TAKE_SEGMENTS

Possible values for the type element in the CompareOperation object:

  • ENDS_WITH
  • EQUALS
  • EXISTS
  • GREATER_THAN
  • INT_EQUALS
  • IP_IN_RANGE
  • LESS_THAN
  • STARTS_WITH
  • STRING_CONTAINS
  • STRING_EQUALS
  • TAG

Possible values for the attributeType element in the ConditionsOpaqueAndExternalWebServiceAttributeTypeDto object:

  • ENDPOINT
  • IP
  • OPERATION_NAME
  • PG_TAG
  • URL_PATH
  • URL_PORT