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

Get user actions over some period of time

simeon
Newcomer

Hello,

I need to get user action duration and user account count by given start and end time and user action name. When I group all the data by start time the only thing which I can get is the count of the records on a single group. I use Dynatrace Environment API2 v1 in section “User sessions” and extract it as a table.

SELECT name, starttime, endtime, duration FROM useraction

The only thing which I can get is all of the registered user actions. Here is the result, which a receive.

{

"extrapolationLevel": 1,

"columnNames": [

"name",

"starttime",

"endtime",

"duration"

],

"values": [

[

"Loading DTSearchViewController",

1594789081588,

1594789082103,

515

],

[

"performSearch",

1594789085168,

1594789085551,

383

],

 

URL:

https://*****.live.dynatrace.com/api/v1/userSessionQueryLanguage/table?query=SELECT%20name%2C%20starttime%2C%20endtime%2C%20duration%20FROM%20useraction&addDeepLinkFields=false&explain=false

 

I would like to receive the information about the action duration, action name, start and end time of the action on some period of time. In other words I want to group all of the records in a time groups.

3 REPLIES 3

ChadTurner
Leader

@Simeon V. I would recommend using the following USQL:

SELECT name, startTime, endTime, duration FROM useraction WHERE usersession.userId IS NOT NULL ORDER BY name ASC.

Also if the Json output from the API isnt helping you supply the data you are looking for in excel format, You can always copy and paste the USQL data from the UI into Excel also you can always link excel to the URL of the USQL and have excel fetch the data.


-Chad

Hey, thank you for the answer, I solve my problem. Thank you for the time and for the fast support I appreciate it.

You are very welcome, If my answer solved your problem please feel free to select it as the best answer, along with clicking "Reward user" and reward the user with reputation points as you see fit.

-Chad