24 Aug 2020 02:11 PM - last edited on 21 Aug 2024 11:31 AM by Michal_Gebacki
Hi all.
When I run the query:
https://yyyyyyyyyyy.live.dynatrace.com/api/v2/metrics/query?metricSelector=builtin%3Asynthetic.browser.availability.location.total&resolution=15m&from=-24h&to=now&entitySelector=entityId%20%28%22SYNTHETIC_TEST-2EF18627DF791E16%22%29
I get a bad request:
{
"error": {
"code": 400,
"message": "Expected type(SYNTHETIC_TEST) to be present in the entitySelector, but no such predicate was found."
}
}
If I run it without filtering by the entity, it returns all the data of all the entities including the one from the filter ""SYNTHETIC_TEST-2EF18627DF791E16") " (this is correct)
Why can't I filter by the entity ID?
Can't recieve only datapoint from one entity?
Regards!
Jose A
Solved! Go to Solution.
24 Aug 2020 03:21 PM
Where you have
&entitySelector=entityId%20%28%22SYNTHETIC_TEST-2EF18627DF791E16%22%29
I use:
&entitySelector=type%28SYNTHETIC_TEST%29%2CentityId%28SYNTHETIC_TEST-170D13E391AB294E%29
Check if it works in your case, with your correct entityId.