08 Jan 2019 07:43 AM
Hi,
now I understand that we can fetch the average response time of services, for example, via the following TimeseriesAPI.
https://{your-environment-id}.live.dynatrace.com/api/v1/timeseries/com.dynatrace.builtin:service.responsetime?api-token=XXXXXXXXX&includeData=true&relativeTime=hour&aggregationType=avg&entity=SERVICE-XXXXXXXXX
This returns the average of response time of a specific Service named as "SERVICE-XXXXXXXXX".
In the same way as this, is it possible to fetch the average response time of a specific URI?
If possible, which API should I use?
For now, I suppose that I can do this if I set target URLs as "Key requests" and use APIs corresponding to this "Key requests".
Is this assumption correct?
Regards,
Kohei
Solved! Go to Solution.
08 Jan 2019 07:56 AM
Hi. For a service you can also fetch the percentiles, etc. but to your question for a specific URL or also called 'key request' in Dynatrace you have to first 'subscribe' that specific endpoint within your UI service screen. Then you can fetch its metrics through providing a specific metric identifier which are:
10 Jan 2019 04:34 AM
Hi @Wolfgang B..
thanks for your prompt response!
After subscription of specific endpoint URIs at my Dynatrace tenant, I checked if I can retrieve response time of them or not, using such as the following API.
https://[your-environment-id].live.dynatrace.com/api/v1/timeseries/com.dynatrace.builtin:servicemethod.responsetime?api-token=xxxxxxxxx&includeData=true&relativeTime=hour&aggregationType=avg&entity=SERVICE_METHOD-XXXXXXXX
Using this API, I could finally do what I wanted to do.
Thank you very much!
Appendix:
In addition to the above, I made some investigations as follows.
I'm glad if they are helpful for you!
Case1: Without 'entity' of GET parameters
example API
https://[your-environment-id].live.dynatrace.com/api/v1/timeseries/com.dynatrace.builtin:servicemethod.responsetime?api-token=xxxxxxxxx&includeData=true&relativeTime=hour&aggregationType=avg
overview
This returns response time of all URIs subscribed as 'Key request' on the tenant.
This enables us to fetch all response time of 'Key request' at one time API call and it means that this can keep us from over-consuming API requests limit.
Case2: With entityID which is not subscribed as 'Key request' for 'entity'
example API
Here, let 'SERVICE_METHOD-YYYYYYYYYY' be not subscribed as 'Key request'
https://[your-environment-id].live.dynatrace.com/api/v1/timeseries/com.dynatrace.builtin:servicemethod.responsetime?api-token=xxxxxxxxx&includeData=true&relativeTime=hour&aggregationType=avg&entity=SERVICE_METHOD-YYYYYYYYYY
overview
This returns metric definitions of this timeseriesIdentifier included in this api path.
note) Here 'com.dynatrace.builtin:servicemethod.responsetime' is indicated as timeseriesIdentifier.
10 Jan 2019 09:14 AM
Hi,
Yes that behaviour is by design. What you can also do is to use the service ID within the entity filter which will report all subscribed service requests for that selected parent service.
11 Jan 2019 02:14 AM
Great!
Certainly, with com.dynatrace.builtin:servicemethod.responsetime, when I assign a specific service ID for entity filter, I can get response time of all of 'Key request' associated with service within that entity filter.
Thanks for details!