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

Monthwise RUM details of an application

Balamurugesh
Guide

hi, I am looking for an API which will provide monthwise RUM details like "apdexCategory",

        "application",        "avg(userActionCount)",        "userType",        "avg(duration)",
        "count(*)",        "sum(totalErrorCount)",        "userExperienceScore" for an application configured in Dynatrace. I am using below curl request to get data but am not sure how to group the details in monthwise format for each application
,
curl --location --request GET 'https:// dynatrace.nml.com/e/abcd/api/v1/userSessionQueryLanguage/table?query=SELECT%20useraction.apdexCategory%2C%20useraction.application%2C%20%20AVG%28userActionCount%29%2C%20userType%2C%20AVG%28duration%29%2C%20COUNT%28%2A%29%2C%20SUM%28totalErrorCount%29%2C%20userExperienceScore%20FROM%20usersession%20WHERE%20useraction.application%20%3D%20%27tem_clientwebsite_preprod%27%20GROUP%20BY%20%20useraction.apdexCategory%2C%20useraction.application%2CuserExperienceScore%2C%20userType%20ORDER%20BY%20COUNT%28%2A%29%20DESC&pageSize=1000&addDeepLinkFields=false' \
--header 'accept: application/json' \
--header 'Authorization: abcd'
 
 
    
5 REPLIES 5

AntonioSousa
DynaMight Guru
DynaMight Guru

@Balamurugesh,

You should use the startTimestamp & endTimestamp parameters. Please check it out at:
https://www.dynatrace.com/support/help/dynatrace-api/environment-api/rum/user-sessions/table

Antonio Sousa

hi Antonio,

Can you please share the sample request? i am not sure about the parmaters to be passed to get monthwise details.

 

Thanks,

Dingu 

 

@Balamurugesh,

You can do it by something like the following line of curl. Please change abc12345 for your tenant and DYNATRACE.TOKEN for the auth token. As you can see, you will have to give the corresponding UTC time in milliseconds:

curl -X GET "https://abc12345.live.dynatrace.com/api/v1/userSessionQueryLanguage/table?query=select%20apdexcategory%2C%20count%28%2A%29%20from%20useraction%20group%20by%20apdexcategory&startTimestamp=1659315600000&endTimestamp=1661994000000&addDeepLinkFields=false&explain=false " -H "accept: application/json" -H "Authorization: Api-Token DYNATRACE.TOKEN"

 

It's easier if you test it in the UI first. Change abd12345 for your tenant and give it a try:

https://abc12345.live.dynatrace.com/rest-api-doc/index.jsp?urls.primaryName=Environment%20API%20v1#/RUM%20-%20User%20sessions/getDTAQLResultAsTable 

Antonio Sousa

thanks @AntonioSousa for the details. i am looking for a field which provides availability % of monitors or application from RUM API. I tried querying usersession and useraction tables but could not figure the field. Can you provide info on this?

@Balamurugesh,

Please notice that availability might be very difficult to get from RUM data, and thus USQL. Better done with synthetic monitoring, which I believe are the monitors you are referring to. For these, there is a different synthetic API, that you might use.

Antonio Sousa

Featured Posts