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

How to get key user action display name via API

jeff_rowell
Helper

I’m trying to extract metrics for specific key user actions, via API calls such as the following. As can be seen, I am referencing the “entityID” of a specific key user action. I am trying to find a way, via the API, to lookup the display name of a Key User Action based on its ID but can’t find anyway to do this other than via USQL (sample query below). Perhaps I am overlooking something – is there in fact anyway to, via the API, get the display name for a specific entityID? Conversely, if I had a key user action name, would there be anyway of finding its entitityID via the API without using USQL?

 

API Example to get a metric for a specific key user action

https://<ENV>/api/v2/metrics/query?Api-Token=<TOKEN>&metricSelector=builtin:apps.web.action.duration...

 

USQL sample:

select DISTINCT internalKeyUserActionId from useraction WHERE name = "loading of page /somepage/index.html"

5 REPLIES 5

Domenico_Bressi
Advisor

Hi @Jeff R.

I make yesterday something more or less similar using Timeseries (Api V1) to find "Key user actions". I see you're using V2 (metrics api)

try this to export all .. and/or ... add parameter to export the one you need 🙂

https://dynatrace.xxxxxx/e/xxxxxx/api/v1/timeseries/com.dynatrace.builtin:appmethod.useractiondurati...



Thank you very much for suggesting this approach.

Hi Domenico,

 

How to get when we are using V2 (metrics api) ? Is it possible? Because we have to use v2 api. 

 

Regards

jeff_rowell
Helper

Unfortunately, after further investigation, I found that the solution provided above will not work. The V1 API is only usable for some metrics, and not the ones that relate to Key User Actions. E.g., you cannot lookup builtin:apps.web.action.duration.load.browser.

I could use the USQL API to obtain the display name for a Key User action based on its ID, but I would prefer not to take this approach because it would not allow me to lookup older key user action IDs (I believe that I would be restricted to 35 days worth of data).

I have been trying to find another way to get the display name via the API but so far without any success.

You can use the /api/v2/entities API to get the display name of an APPLICATION_METHOD entity.

Featured Posts