Migrate from Frequent issue detection API to Settings API

The Frequent issue detection API has been deprecated with Dynatrace version 1.249. Its replacement is Settings API with the Frequent issue detection (builtin:anomaly-detection.frequent-issues) schema. We recommend that you migrate to the new API at your earliest convenience.

The migration affects endpoint URLs, query parameters, and response/request body parameters, as well as the scope of the token for request authentication.

Base URL

new Settings 2.0
old Frequent issue detection
/api/v2/settings
/api/config/v1/frequentIssueDetection

Authentication token scope

new Settings 2.0
old Frequent issue detection
Read settings (settings.read)
Write settings (settings.write)
Read configuration (ReadConfig)
Write configuration (WriteConfig)

Parameters

To learn about new query/body parameters, see the documentation of individual requests in Settings API.

In the Settings 2.0 framework, each frequent issue detection configuration is represented by a settings object. An object contains some metadata (like the scope or creation timestamp) and the configuration itself, encapsulated in the value object. To learn about the parameters of the frequent issue detection configuration, query the Frequent issue detection (builtin:anomaly-detection.frequent-issues) schema with the GET a schema request.

Examples

Here are some examples of differences in API usage.

View configuration

To view the frequent issue detection configurations, you need the GET objects request. In query parameters, set schemaIds to builtin:anomaly-detection.frequent-issues and scope to environment.

Request URL

GET https://mySampleEnv.live.dynatrace.com/api/v2/settings/objects?schemaIds=builtin:anomaly-detection.frequent-issues&scopes=environment

Response body

{
"items": [
{
"objectId": "vu9U3hXa3q0AAAABAClidWlsdGluOmFub21hbHktZGV0ZWN0aW9uLmZyZXF1ZW50LWlzc3VlcwAGdGVuYW50AAZ0ZW5hbnQAJDNiNjk1ZjA4LWNhZDEtM2Y2OC04ZDM4LTQyODZkNzkzNjlkNL7vVN4V2t6t",
"value": {
"detectFrequentIssuesInApplications": true,
"detectFrequentIssuesInTransactionsAndServices": true,
"detectFrequentIssuesInInfrastructure": true
}
}
],
"totalCount": 1,
"pageSize": 500
}

Update configuration

To edit a maintenance window, you need the PUT an object request. In the request body, set schemaId to builtin:anomaly-detection.frequent-issues and scope to environment. Provide the frequent issue detection configuration in the value object.

Request URL

PUT https://mySampleEnv.live.dynatrace.com/api/v2/settings/objects/vu9U3hXa3q0AAAABAClidWlsdGluOmFub21hbHktZGV0ZWN0aW9uLmZyZXF1ZW50LWlzc3VlcwAGdGVuYW50AAZ0ZW5hbnQAJDNiNjk1ZjA4LWNhZDEtM2Y2OC04ZDM4LTQyODZkNzkzNjlkNL7vVN4V2t6t

Request body

{
"schemaId": "builtin:alerting.maintenance-window",
"scope": "environment",
"value": {
"detectFrequentIssuesInApplications": true,
"detectFrequentIssuesInTransactionsAndServices": true,
"detectFrequentIssuesInInfrastructure": true
}
}

Response body

[
{
"code": 200,
"objectId": "vu9U3hXa3q0AAAABAClidWlsdGluOmFub21hbHktZGV0ZWN0aW9uLmZyZXF1ZW50LWlzc3VlcwAGdGVuYW50AAZ0ZW5hbnQAJDNiNjk1ZjA4LWNhZDEtM2Y2OC04ZDM4LTQyODZkNzkzNjlkNL7vVN4V2t6t"
}
]