Applications detection rules API - GET a rule
Gets parameters of the specified application detection rule.
The request produces an application/json
payload.
GET | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/config/v1/applicationDetectionRules/{id} |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/applicationDetectionRules/{id} | |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/applicationDetectionRules/{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 application detection rule. | path | required |
Response
Response codes
Code | Type | Description |
---|---|---|
200 | ApplicationDetectionRuleConfig | Success |
Response body objects
The ApplicationDetectionRuleConfig
object
Application detection rule.
Element | Type | Description |
---|---|---|
applicationIdentifier | string | The Dynatrace entity ID of the application, for example You must use an existing ID. If you need to create a rule for an application that doesn't exist yet, create an application first and then configure detection rules for it. |
filterConfig | ApplicationFilter | The condition of an application detection rule. |
id | string | The ID of the rule. |
metadata | ConfigurationMetadataDtoImpl | Metadata useful for debugging. |
name | string | The unique name of the Application 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. |
The ApplicationFilter
object
The condition of an application detection rule.
Element | Type | Description |
---|---|---|
applicationMatchTarget | string | Where to look for the the pattern value.
|
applicationMatchType | string | The operator of the matching.
|
pattern | string | The value to look for. |
The ConfigurationMetadataDtoImpl
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. |
Response body JSON model
1{2 "applicationIdentifier": "APPLICATION-123456",3 "filterConfig": {4 "applicationMatchTarget": "DOMAIN",5 "applicationMatchType": "EQUALS",6 "pattern": "myapp.example.com"7 },8 "id": "12345678-abcd-1234-abcd-1234567890ab",9 "metadata": {10 "clusterVersion": "Mock version",11 "configurationVersions": [12 4,13 214 ]15 },16 "name": "uniqueName"17}
Example
In this example, the request gets the properties of the easyTravel rule, which has the ID 95b22afb-4e3d-4f9f-a37d-81bc3d388a33.
The API token is passed in the Authorization header.
Curl
1curl -X GET \2 https://mySampleEnv.live.dynatrace.com/api/config/v1/applicationDetectionRules/95b22afb-4e3d-4f9f-a37d-81bc3d388a33 \3 -H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890'
Request URL
1https://mySampleEnv.live.dynatrace.com/api/config/v1/applicationDetectionRules/95b22afb-4e3d-4f9f-a37d-81bc3d388a33
Response body
1{2 "metadata": {3 "configurationVersions": [4 05 ],6 "clusterVersion": "1.188.0.20200203-155649"7 },8 "id": "95b22afb-4e3d-4f9f-a37d-81bc3d388a33",9 "applicationIdentifier": "APPLICATION-900C1E36674F607D",10 "filterConfig": {11 "pattern": "easyTravel",12 "applicationMatchType": "EQUALS",13 "applicationMatchTarget": "DOMAIN"14 }15}
Response code
200