AppD Archive

Time range calculation in AppD REST APIs

CommunityUser
Splunk Employee
Splunk Employee
We are trying to poll and retrieve health rule violation and other key metrics upon running load test. Tried using below REST api and not sure how to calculate the time range.. please point to any documentation to help here. How to calculate the magic number at the end of the below call? https://<>.saas.appdynamics.com/controller/restui/bt/performanceRequestStats?applicationId=999&entityType=APPLICATION&entityId=999&time-range=last_1_hour.BEFORE_NOW.-1.1424287621109.60
0 Karma

Arun_Dasetty
Super Champion

Hi,

We see the value in last parameter "1424287621109" represents the time in your system browser (say time at which user is making request), where -1 represents from currrent to last 1 day "before_now", Hope that provides insight on the value format in parameter.

If you convert value "1424287621109" using any "millis to date" (google search) tool you will get the value as "Thu Feb 19 2015 00:57:01 GMT+0530 (India Standard Time)" Which could be the time at which you made the request

We request you ask queries specific to AD functionality that we could assist with, the query above looks to be specific to the way we handled the value format, Hope that is fine with you.

Regards,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee
If you're using a relative time range such as "1 hour before now" you do not need to include a specific time in milliseconds. As it looks like you've discovered, that would be pretty impossible to coordinate. So, use EITHER a relative time range (before, after) OR a specific time range (in miliseconds) but not both. For more documentation, check out these docs on the subject. They're pretty comprehensive for any data retrieval operation you might want to do:

https://docs.appdynamics.com/display/PRO40/Use+the+AppDynamics+REST+API#UsetheAppDynamicsRESTAPI-Ret...

Hope that helps,

-Brad

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Thanks.

I see a REST API to get htalthrule-violations.

I'm trying to get the transaction scorecard.. is there an endpoint for that? pls see the attachment

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Yes, you can get the scorecard values because they're normal metrics like any other you might want to harvest. You just need to know the name (location in the metric browser) of the metric behind the scorecard. If you click on the number to the right of the scorecard graph, it'll take you to that metric in the metric browser so that you'll know your target metric's name/location. Then just follow the API for collecting standard metric values.

One exception is that there doesn't seem to be a metric for "Normal" transactions, just for error/slow/very slow. I'll check again, but I'm not seeing it. See attachment:

Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...