Service detection API - GET an opaque web service rule
Shows the properties of the specified service detection rule for opaque and external web services.
The request produces an application/json
payload.
GET | ManagedDynatrace for Government | 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} | |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/service/detectionRules/OPAQUE_AND_EXTERNAL_WEB_SERVICE/{id} |
Authentication
To execute this request, you need an access token with ReadConfig
scope.
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 | Type | Description |
---|---|---|
200 | OpaqueAndExternalWebServiceRule | Success. The response contains properties of the specified rule. |
404 | - | Failed. The rule with the specified ID doesn't exist. |
Response body objects
The OpaqueAndExternalWebServiceRule
object
The service detection rule of the OPAQUE_AND_EXTERNAL_WEB_SERVICE
type
Element | Type | Description |
---|---|---|
conditions | ConditionsOpaqueAndExternalWebServiceAttributeTypeDto[] | A list of conditions of the rule. If several conditions are specified, the AND logic applies. |
description | string | A short description of the rule. |
detectAsWebRequestService | boolean | Detect the matching requests as 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 | ConfigurationMetadata | 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. |
type | string | The type of the service detection rule. |
urlPath | UrlPath | The contribution from the URL, where the web request has been detected, into service ID calculation. You have two mutually exclusive options:
|
The ConditionsOpaqueAndExternalWebServiceAttributeTypeDto
object
A condition of the service detection rule.
Element | Type | Description |
---|---|---|
attributeType | string | The type of the attribute to be checked.
|
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. 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:
|
The ConfigurationMetadata
object
Metadata 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. |
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 ( |
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. 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:
|
Response body JSON model
1{2 "conditions": [3 {4 "attributeType": "URL_PATH",5 "compareOperations": [6 {7 "ignoreCase": "false",8 "invert": "false",9 "type": "STRING_CONTAINS",10 "values": [11 "value1",12 "value2"13 ]14 }15 ]16 }17 ],18 "description": "REST API example",19 "detectAsWebRequestService": false,20 "enabled": true,21 "managementZones": [22 "zone 1"23 ],24 "name": "My sample rule",25 "port": {26 "doNotUseForServiceId": "true"27 },28 "type": "OPAQUE_AND_EXTERNAL_WEB_SERVICE",29 "urlPath": {30 "valueOverride": "abc"31 }32}