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

Lifetime of data from Dynatrace API

bastien_tebbani
Participant

Hello,

I actually work with Dynatrace API and I have a little mistake. For each problem, I find when they start and end, afterward I apply a filter on userSession to find how many people are impact by a specific error.For some error, I don't have any value in API response. However, when I search on Dynatrace website, I can find how many people are impact by this specific error. Therefore, I'm wondering if API and website have same data source, and if it's not, how long API keep information and how to change that.

Thanks.

Regards,


Bastien T.


7 REPLIES 7

nj_njoku
Inactive

Hi Bastien,

userSession is not a valid filter for getting the details of a problem via the Problems API. The only valid parameter is the problemId. Please see more on this here. Not everything available in the webUI is available in the Dynatrace API. See more on the Dynatrace API here.

Thanks

NJ


Hello,

Why "Not everything available in the webUI is available in the Dynatrace API." ? Where can I find datas available in the webUI and not in Dynatrace API ?

Thanks

Bastien T


Or where can I find all data and why they are available in the webUI and not in Dynatrace API, they are differents sources of datas? All data from userSession are not in the same database if I want to have them from the webUI and Dynatrace API ?

Thanks.

Regards,

Bastien T.


Hi Bastien,

See below for all the metrics that can be retrieved via the API

https://www.dynatrace.com/support/help/shortlink/api-metrics#built-in-metrics

All the various funtions the API can perform are listed in the link below

https://www.dynatrace.com/support/help/dynatrace-api/

Thanks

NJ


bastien_tebbani
Participant

Hello @Ugochukwu N.,

I'm sorry, you didn't answer my question. I found how to use the Dynatrace API. My question was mainly about the lifetime of the data. I'm wondering about difference between the lifetime of the data in Dynatrace API and the lifetime of the data in webUI.

Do these data come from the same data source or are they in different databases with different data lifetimes?

Thanks.

Regards,

Bastien T.


Hi Bastien,

Timeseries metrics in the webUI and in the API have the same datasource and the same retention periods (see here). Most timeseries metrics are exposed via the API (listed here ). There are other data types in the Web UI that are not exposed via the API. See here

Hope This Helps

NJ


Hi Ugochukwu,

It was exactly what I'm looking for! Thank you!


I had only a little question more:
Did you know why my request didn't return any data after few hours after end of an error?
Here startDate is equal to the Timestamp in the begin of a specific error and endDate is the end of this specific error, applicationID is the ID of application receive with endDate and startDate when we interrogate Problem API . If data have a long duration of the lifetime, why evening I can't get information of impact of a specific error which had takes place the morning of same date?

SELECT count(*) as count, userAction.name as name, userAction.targetUrl as targetURL, applicationType, matchingConversionGoals , bounce, userAction.apdexCategory AS apdex


FROM userSession


WHERE totalErrorCount > 0 and userType = "REAL_USER"

AND userId = null


AND ((startTime <= " + startDate + " AND endTime >= " + endDate + ")


OR (startTime <= " + startDate + " AND endTime <= " + endDate + ")


OR (startTime <= " + endDate + " AND startTime >= " + startDate + " AND endTime >= " + endDate + ")


OR (startTime <= " + endDate + " AND startTime >= " + startDate + " AND endTime >= "+ startDate + " AND endTime <= "+ endDate +"))

AND userAction.internalApplicationId=\" " + applicationID + " \"

GROUP BY userAction.name, userAction.targetUrl, applicationType, matchingConversionGoals, bounce, userAction.apdexCategory

ORDER BY count(*) desc

Thanks.

Regards,

Bastien T.


Featured Posts