10 Mar 2020
03:27 PM
- last edited on
30 Sep 2022
12:08 PM
by
MaciejNeumann
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
USQL sample:
select DISTINCT internalKeyUserActionId from useraction WHERE name = "loading of page /somepage/index.html"
Solved! Go to Solution.
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 🙂
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
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.