cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

bad request API Synthetic monitoring

jose-antonio_ra
Inactive

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

2 REPLIES 2

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.

It´s working now!


Thanks again @Antonio S.