17 Jun 2024 08:20 PM
I would like to know how I can extract via API the entities that have issues marked as 'Frequent Issue'.
Solved! Go to Solution.
19 Jun 2024 05:45 PM
You filter through the events API, looking for frequentEvent(true) Events:
curl --location 'https://xxxx.managed.dynatrace.com/e/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/api/v2/events?from=-3d&to=now&eventSelector=frequentEvent(true)' \
--header 'Authorization: Api-Token dt0c01.FOO.BAR' \
The payload will be a list of events, with the respective entities in it e.g.:
{
"totalCount": 711,
"pageSize": 100,
"nextPageKey": "AQANMTcxODU1NTg5ODQ1NAEA",
"events": [
{
"eventId": "-2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"startTime": xxxxxxxxxxxxx,
"endTime": -1,
"eventType": "SERVICE_ERROR_RATE_INCREASED",
"title": "Failure rate increase",
"entityId": {
"entityId": {
"id": "SERVICE-xxxxxxxxxxxxxxxx",
"type": "SERVICE"
},
"name": "xxxxxxxxxx"
},
"properties": [
],
"status": "OPEN",
"correlationId": "xxxxxxxxxxxxxxxx",
"entityTags": [
],
"managementZones": [
],
"underMaintenance": false,
"suppressAlert": false,
"suppressProblem": false,
"frequentEvent": true
},
,,,
Iterating through the list you will be able to extract all entitles which are having frequent issues.