29 Jan 2023 01:33 PM - last edited on 08 Feb 2023 12:35 PM by Ana_Kuzmenchuk
While creating an Alerting profile, getting the below error:
No scope generator registered
Document Followed: https://www.dynatrace.com/support/help/dynatrace-api/environment-api/settings/objects/post-object
Request:
curl -X POST "https://REDACTED/api/v2/settings/objects?validateOnly=false" -H "accept: application/json; charset=utf-8" -H "Authorization: Api-Token xxxxx" -H "Content-Type: application/json; charset=utf-8" -d "[{\"schemaId\":\"builtin:alerting.profile\",\"value\":{\"name\":\"De\",\"severityRules\":[{\"severityLevel\":\"AVAILABILITY\",\"delayInMinutes\":0,\"tagFilterIncludeMode\":\"NONE\"},{\"severityLevel\":\"ERRORS\",\"delayInMinutes\":0,\"tagFilterIncludeMode\":\"NONE\"},{\"severityLevel\":\"MONITORING_UNAVAILABLE\",\"delayInMinutes\":0,\"tagFilterIncludeMode\":\"NONE\"}],\"eventFilters\":[]}}]"
Response:
"error": {
"code": 404,
"message": "No scope generator registered for schema builtin:alerting.profile"
}
Not sure what is missed, Need someone attention
Solved! Go to Solution.
29 Jan 2023 08:45 PM
Hey lorry,
Unfortunately the documentation on this doesn't explain very well but for environment wide settings it should still require a scope. It would be "scope":"environment".
Heres another forum post with a similar problem Solved: Trying to create Metric Event via APIv2 but get "No scope generator registered" - Dynatrace ...
Hope this helps!
08 Feb 2023 12:36 PM
Hey @lorry, were you able to solve your problem? Was the comment above helpful?