Alerting profiles API has been deprecated with Dynatrace version 1.249. Its replacement is Settings API with the Problem alerting profiles (builtin:alerting.profile
) 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.
/api/v2/settings
/api/config/v1/alertingProfiles
settings.read
)settings.write
)ReadConfig
)WriteConfig
)To learn about new query/body parameters, see the documentation of individual requests in Settings API.
In the Settings 2.0 framework, each alerting profile 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. The content of the value is essentially the same as the configuration in the deprecated Alerting profiles API. To learn about the parameters of the alerting profile configuration, query the Problem alerting profiles (builtin:alerting.profile
) schema with the GET a schema request.
Here are some examples of differences in API usage.
To list all alerting profiles, you need the GET objects request. In query parameters, set schemaIds to builtin:alerting.profile
and scope to environment
.
GET https://mySampleEnv.live.dynatrace.com/api/v2/settings/objects?schemaIds=builtin:alerting.profile&scopes=environment
{"items": [{"objectId": "vu9U3hXa3q0AAAABABhidWlsdGluOmFsZXJ0aW5nLnByb2ZpbGUABnRlbmFudAAGdGVuYW50ACQ4M2Q3NDk5YS1mZDY2LTQ1OGYtOGIxNy1iYjNkMzgwN2RmMTa-71TeFdrerQ","value": {"name": "Synthetic Emergencies","severityRules": [{"severityLevel": "AVAILABILITY","delayInMinutes": 0,"tagFilterIncludeMode": "INCLUDE_ANY","tagFilter": ["SYN_API","SYN_DB","SYN_SCH"]},{"severityLevel": "ERRORS","delayInMinutes": 5,"tagFilterIncludeMode": "INCLUDE_ANY","tagFilter": ["SYN_PLUGIN"]}],"eventFilters": []}},{"objectId": "vu9U3hXa3q0AAAABABhidWlsdGluOmFsZXJ0aW5nLnByb2ZpbGUABnRlbmFudAAGdGVuYW50ACQ1ODdkNzk5Yi1mNDI2LTQyNGYtYmY5NS1iZTQ4NzFiYWFlMmO-71TeFdrerQ","value": {"name": "CPU high","severityRules": [{"severityLevel": "PERFORMANCE","delayInMinutes": 30,"tagFilterIncludeMode": "NONE"},{"severityLevel": "RESOURCE_CONTENTION","delayInMinutes": 30,"tagFilterIncludeMode": "INCLUDE_ANY","tagFilter": ["Holox Cluster"]},{"severityLevel": "MONITORING_UNAVAILABLE","delayInMinutes": 0,"tagFilterIncludeMode": "NONE"},{"severityLevel": "AVAILABILITY","delayInMinutes": 0,"tagFilterIncludeMode": "NONE"}],"eventFilters": []}}],"totalCount": 2,"pageSize": 100}
To create an alerting profile, you need the POST an object request. In the request body, set schemaId to builtin:alerting.profile
and scope to environment
. Provide the alerting profile configuration in the value object.
The response contains the ID of the object that you need to modify the settings.
POST https://mySampleEnv.live.dynatrace.com/api/v2/settings/objects
[{"schemaId": "builtin:alerting.profile","scope": "environment","value": {"name": "Sample alerting profile","severityRules": [{"severityLevel": "AVAILABILITY","delayInMinutes": 0,"tagFilterIncludeMode": "NONE"}],"eventFilters": []}}]
[{"code": 200,"objectId": "vu9U3hXa3q0AAAABABhidWlsdGluOmFsZXJ0aW5nLnByb2ZpbGUABnRlbmFudAAGdGVuYW50ACQzYjAwNDMwOC01ZTZjLTNkNGMtOTNjMS01ZTBiOWRhZTlhZjW-71TeFdrerQ"}]
To edit an alerting profile, you need the PUT an object request.
PUT https://mySampleEnv.live.dynatrace.com/api/v2/settings/objects/vu9U3hXa3q0AAAABABhidWlsdGluOmFsZXJ0aW5nLnByb2ZpbGUABnRlbmFudAAGdGVuYW50ACQzYjAwNDMwOC01ZTZjLTNkNGMtOTNjMS01ZTBiOWRhZTlhZjW-71TeFdrerQ
{"schemaId": "builtin:alerting.profile","scope": "environment","value": {"name": "Sample alerting profile","managementZone": "1291856336337388063","severityRules": [{"severityLevel": "AVAILABILITY","delayInMinutes": 0,"tagFilterIncludeMode": "INCLUDE_ALL","tagFilter": ["InfraLinux","InraWin"]}],"eventFilters": []}}
[{"code": 200,"objectId": "vu9U3hXa3q0AAAABABhidWlsdGluOmFsZXJ0aW5nLnByb2ZpbGUABnRlbmFudAAGdGVuYW50ACQzYjAwNDMwOC01ZTZjLTNkNGMtOTNjMS01ZTBiOWRhZTlhZjW-71TeFdrerQ"}]