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

Filter transformation API

jose-antonio_ra
Inactive

Hello everyone.

I am trying to capture through API the response time value of a key request.

With this URL request I see that I have all my KR´s

/api/v1/timeseries/com.dynatrace.builtin%3Aservicemethod.responsetime?includeData=true&aggregationType=MEDIAN&relativeTime=day


but I want to get only the values of this:

,"SERVICE_METHOD-6BE714AA7879EBD0":"/empresas/ordem/movimentos/mainResult.jsp"


I have invested the filtering, but I don't understand how I should do it

https://www.dynatrace.com/support/help/shortlink/api-metrics-v2-selector#filter-transformation



Can someone help me with an example? How do I build the request URL with the filter?


Thank you

Jose A


2 REPLIES 2

Your request is GET, so the only way you can pass arguments is query parameters or path parameters:

https://www.dynatrace.com/support/help/extend-dynatrace/dynatrace-api/environment-api/metric/get-dat...

/api/v1/timeseries/com.dynatrace.builtin%3Aservicemethod.responsetime:filter(prefix(<dimension>,<expected prefix>))?includeData=true&aggregationType=MEDIAN&relativeTime=day

Dimension should be name of dimension, I suppose request (I'm not sure right now), prefix is request name/id. I've didn't test it but this is how I understand it.

Sebastian


augustoalonso_d
Newcomer

Hello,

I'm trying to get data point of a service request, using a custom Request Attribute, the LTN value of the X-Dynatrace-Test header of the request.

At this time, I'm already able to get data points of a specific service (entity), in a specific timeframe (startTimeStamp and endTimestamp), but I want to filter those data point by adding a Request Attribute filter.

My attempts about filter look like filter(prefix( and filter(eq(:

curl .../api/v1/timeseries/com.dynatrace.builtin:service.responsetime?filter(prefix(RequestAttribute,load-test-name))&includeData=true&aggregationType=AVG&startTimestamp=1596064919408&endTimestamp=1596065615408&queryMode=SERIES&entity=SERVICE-ID"
curl .../api/v1/timeseries/com.dynatrace.builtin:service.responsetime?filter(eq(RequestAttribute,load-test-name))&includeData=true&aggregationType=AVG&startTimestamp=1596064919408&endTimestamp=1596065615408&queryMode=SERIES&entity=SERVICE-ID"

I'm using "RequestAttribute" as a dimension because I'm able to use it into the UI in order to create a Multidimensional Analysis:

There are no curl request examples in the documentation to get some guidance about how to implement filters correctly, or they are so basic.

¿Can anyone share some examples or documentation/blogs/support pages/etc to achieve my goal?

Thanks in advance.