This page describes the Controller Metrics and Events API methods that allow you to retrieve information on metric data and various types of activities in your monitored environment. You can also configure how long you retain the metrics.

Alternatively, you can use the Cisco AppDynamics DEXTER extension to query Cisco AppDynamics data. However, you must not run this extension tool during peak hours because it may impact the Controller performance. 

Data Retention for Metric and Snapshot API

Default Granularity for Time Ranges

The granularity depends on the time range when fetching data. The table below specifies the granularity of the data for different time ranges.

Time RangeGranularity
0–1459 minutes (0-24.20 hours)

1 minute

1460-2940 minutes (24.20 - 49 hours)

10 minutes

> 49 hours60 minutes

If no data is fetched or the time range is invalid, naturally, no data granularity will be applied. 

Data Aggregation

You can set the rollup query string parameter to true to request aggregated data (one datapoint). You can disable data aggregation by setting rollup=false. The default value is true.

For example: /controller/rest/applications/application_name/metrics?rollup=true

Time Ranges

You can set the time range for data with the query string parameter time-range-type. The following values are supported for time-range-type:

  • BEFORE_NOW 
  • BEFORE_TIME 
  • AFTER_TIME 
  • BETWEEN_TIMES 

Request Custom Data Granularity

To request data at a custom granularity, do the following:

  • Set rollup=true  or do not specify the rollup  property.
  • Set the desired time range for the aggregated data with the query string parameter time-range.
  • Configure the range with time-range with a frequency:
    • For BETWEEN_TIMES, set the frequency by specifying the start and end times with the parameters start-time and end-time.
    • For BEFORE_NOW, specify the parameter duration-in-mins.
    • For AFTER_TIME, specify the parameters duration-in-mins  and the start-time.
    • For BEFORE_TIME, specify the parameters duration-in-mins  and the end-time.

Example Requests

Configured Range and FrequencyDescription of Data Granularity
?rollup=true&time-range-type=BETWEEN_TIMES&start-time=1682841600000&end-time=1682841603600
 
Return the metric data aggregated between the specified start and end times (60 minutes).  
?rollup=true&time-range-type=BEFORE_NOW&duration-in-mins=120Return the metric data aggregated 120 minutes ago until now.
?rollup=true&time-range-type=BEFORE_TIME&end-time=1682841603600&duration-in-mins=15Return the metric data aggregated from 15 minutes before end-time until the end-time.

See Using Time Ranges for descriptions of the parameters and more examples.

Retrieve Metric Hierarchy

This API returns information about the metric tree structure. Because it retrieves the first generation of child elements, you can only expand the children of the folder type.

  • If a child element is a container item in the response, its type value is folder
  • Otherwise, the type value for the child element is leaf

You can recurse the metric tree structure further by using the metric-path parameter as described in the Metric Data API.


Format 

GET /controller/rest/applications/application_name/metrics

Input parameters

Parameter Name

Parameter Type

Value

Mandatory

application_name

URI

The name or ID of the business or EUM (browser/mobile/IoT) application. Use the call to get the application ID in the Application Model API.

Yes

output

Query

HTTP Request parameter included as part of the URL to change the output format.
Valid values are XML (default) or JSON.

No

metric-pathQuery

The path to the metric in the metric hierarchy.

When including the pipe ( | ) or backslash ( \ ) special characters in the metric-path, you must include an additional backslash to indicate escape.

No

Example

curl --user user1@customer1:your_password "http://demo.appdynamics.com/controller/rest/applications/ECommerce_E2E/metrics"
 
<metric-items><metric-item>
  <type>folder</type>
  <name>Backends</name>
</metric-item>
<metric-item>
  <type>folder</type>
  <name>Service Endpoints</name>
</metric-item>
<metric-item>
  <type>folder</type>
  <name>End User Experience</name>
</metric-item>
<metric-item>
  <type>folder</type>
  <name>Errors</name>
</metric-item>
<metric-item>
  <type>folder</type>
  <name>Business Transaction Performance</name>
</metric-item>
<metric-item>
  <type>folder</type>
  <name>Information Points</name>
</metric-item>
<metric-item>
  <type>folder</type>
  <name>Overall Application Performance</name>
</metric-item>
<metric-item>
  <type>folder</type>
  <name>Application Infrastructure Performance</name>
</metric-item>
<metric-item>
  <type>folder</type>
  <name>Mobile</name>
</metric-item></metric-items>

Retrieve Metric Data

The metric data method lets you get values generated for metrics. To use this method, specify the following parameters to the API:

  • The path of the metric to retrieve.
  • The time frame for the data.

Using the Controller UI is the simplest way to learn how to construct the metric path and time range-related parameters.

  1. Right-click on the metric in the Metric Browser.
  2. Select Copy REST URL. The copied URL includes the path to this metric and time range selected in the UI.  
  3. Certain clients can accept and properly encode the full path value as the metric path parameter. 
  4. Hover over the metric in the tree or copy it using the Copy Full Path option in the right-click menu. 

Certain examples below are shown with the full path value rather than the fully encoded URL value. If you test calls with the full path, avoid using a pipe character at the start or end of the path. 

These sections provide additional details and examples for the metric data method:

Format

GET /controller/rest/applications/application_name/metric-data

Input Parameters

Parameter Name

Parameter Type

Value

Mandatory

metric-pathQuery

The path to the metric in the metric hierarchy.

When including the pipe ( | ) or backslash ( \ ) special characters in the metric-path, you must include an additional backslash to indicate escape.

Yes

rollup

Query

By default, the values of the returned metrics are rolled up into a single data point (rollup=true). To get separate results for all values within the time range, set the Rollup parameter to false in the query.

No

Additional mandatory parameters for specifying time ranges are described in Using Time Ranges

Example

Retrieve metric values for a metric at an absolute path: 

curl --user user1@customer1:your_password "http://demo.appdynamics.com/controller/rest/applications/ECommerce_E2E/metric-data?metric-path=Overall%20Application%20Performance%7CAverage%20Response%20Time%20%28ms%29&time-range-type=BEFORE_NOW&duration-in-mins=15"

<metric-datas><metric-data>
  <metricId>2339</metricId>
  <metricPath>Overall Application Performance|Average Response Time (ms)</metricPath>
  <metricName>BTM|Application Summary|Average Response Time (ms)</metricName>
  <frequency>ONE_MIN</frequency>
  <metricValues>
    <metric-value>
      <startTimeInMillis>1450562160000</startTimeInMillis>
      <value>302</value>
      <min>0</min>
      <max>15212</max>
      <current>15212</current>
      <sum>97800</sum>
      <count>324</count>
      <standardDeviation>0.0</standardDeviation>
      <occurrences>0</occurrences>
      <useRange>true</useRange>
    </metric-value>
  </metricValues>
</metric-data>
</metric-datas>

Metric Response Values

Metrics results include the following fields:

NameDefinition
currentThe value for the current minute. This is used only when the time rollup type used by the Controller is current.
countThe number of times the agent collected the metric over the selected time period.
min, maxThe minimum and maximum values reported across the selected time period. These are not used for all metric types.
occurrencesThe number of data samples taken by the Controller to calculate the standard deviation.
standardDeviationThe intermediate values calculated by the Controller during time rollup used to calculate standard deviation. See Dynamic Baselines.
startTimeInMillisThe startTimeInMillis is the start time of the time range to which the result metric data applies in UNIX epoch time.
sumThe total accumulated value for the metric over the selected time period.
useRangeUsed internally by the Controller to process the metric.
valueThe value value is one of the following for all metric values reported across the configured evaluation time length:
  • Arithmetic average: if the metric time rollup type is average.
  • Sum: if the metric time rollup type is sum.
  • Latest: if the metric time rollup type is current.

min and max values are not available for any count-based or sum-based metric except when the metric is rolled up to hourly or daily data points. These metrics include errors per minute, calls per minute, and so on.

Using Wildcards

When you copy the REST URL in the Metric Browser, you get the path to a specific metric within a specific application and tier. Alternatively, you can use wildcard characters in one or more steps in the URL path to get metric data for entities, including multiple business transactions, tiers, or nodes. 

The following format examples show where to put wildcard characters in various metric paths to achieve particular results. For reading clarity, these format examples use the Full Path for the metric rather than the REST URL. For a full working example, click the expanding link under each format listing: 

  • Retrieve the app agent availability time for all tiers in the application using a wildcard for the tier name:

    /controller/rest/applications/ECommerce_E2E-Fulfillment/metric-data?metric-path=Application Infrastructure Performance|*|Agent|App|Availability&time-range-type=BEFORE_NOW&duration-in-mins=15

    Full Example:

    curl --user user1@customer1:your_password "http://demo.appdynamics.com/controller/rest/applications/ECommerce_E2E-Fulfillment/metric-data?metric-path=Application%20Infrastructure%20Performance%7C*%7CAgent%7CApp%7CAvailability&time-range-type=BEFORE_NOW&duration-in-mins=15"
    
    <metric-datas><metric-data>
      <metricId>2329</metricId>
      <metricPath>Application Infrastructure Performance|Fulfillment-Services|Agent|App|Availability</metricPath>
      <metricName>Agent|App|Availability</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450562460000</startTimeInMillis>
          <value>1</value>
          <min>0</min>
          <max>0</max>
          <current>1</current>
          <sum>15</sum>
          <count>15</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>2329</metricId>
      <metricPath>Application Infrastructure Performance|Fulfillment-Client-Services|Agent|App|Availability</metricPath>
      <metricName>Agent|App|Availability</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450562460000</startTimeInMillis>
          <value>1</value>
          <min>0</min>
          <max>0</max>
          <current>1</current>
          <sum>15</sum>
          <count>15</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    </metric-datas>
  • Retrieve the CPU % Busy metric for all the nodes in all tiers using a wildcard for the tier and node names:

    /controller/rest/applications/ECommerce_E2E-Fulfillment/metric-data?metric-path=Application Infrastructure Performance|*|Individual Nodes|*|Hardware Resources|CPU|%Busy&time-range-type=BEFORE_NOW&duration-in-mins=15

    Full Example:

    curl --user user1@customer1:your_password "http://demo.appdynamics.com/controller/rest/applications/ECommerce_E2E-Fulfillment/metric-data?metric-path=Application%20Infrastructure%20Performance%7C*%7CIndividual%20Nodes%7C*%7CHardware%20Resources%7CCPU%7C%25Busy&time-range-type=BEFORE_NOW&duration-in-mins=15"
    
    <metric-datas><metric-data>
      <metricId>2231</metricId>
      <metricPath>Application Infrastructure Performance|Fulfillment-Client-Services|Individual Nodes|FulfillmentClient|Hardware Resources|CPU|%Busy</metricPath>
      <metricName>Hardware Resources|CPU|%Busy</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563000000</startTimeInMillis>
          <value>10</value>
          <min>2</min>
          <max>82</max>
          <current>6</current>
          <sum>4474</sum>
          <count>450</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>true</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>2231</metricId>
      <metricPath>Application Infrastructure Performance|Fulfillment-Services|Individual Nodes|Fulfillment|Hardware Resources|CPU|%Busy</metricPath>
      <metricName>Hardware Resources|CPU|%Busy</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563000000</startTimeInMillis>
          <value>10</value>
          <min>2</min>
          <max>82</max>
          <current>6</current>
          <sum>4478</sum>
          <count>450</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>true</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    </metric-datas>
  • Retrieve the Calls per Minute metric for all the business transactions on the ECommerce tier using a wildcard for the business transaction name:

    /controller/rest/applications/ACME Book Store Application/metric-data?metric-path=Business Transaction Performance|Business Transactions|ECommerce Server|*|Calls per Minute&time-range-type=BEFORE_NOW&duration-in-mins=15

    Full Example:

    curl --user user1@customer1:your_password "http://demo.appdynamics.com/controller/rest/applications/ECommerce_E2E/metric-data?metric-path=Business%20Transaction%20Performance%7CBusiness%20Transactions%7CECommerce-Services%7C*%7CCalls%20per%20Minute&time-range-type=BEFORE_NOW&duration-in-mins=15"
    <metric-datas><metric-data>
      <metricId>4042</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|/json/cart/all.GET|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:125|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563420000</startTimeInMillis>
          <value>0</value>
          <min>0</min>
          <max>0</max>
          <current>0</current>
          <sum>5</sum>
          <count>30</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>9784</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|/appdynamicspilot/WEB-INF|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:183|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563420000</startTimeInMillis>
          <value>0</value>
          <min>2147483647</min>
          <max>-2147483648</max>
          <current>0</current>
          <sum>0</sum>
          <count>0</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>5574</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|/appdynamicspilot/404.jsp|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:140|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563420000</startTimeInMillis>
          <value>0</value>
          <min>2147483647</min>
          <max>-2147483648</max>
          <current>0</current>
          <sum>0</sum>
          <count>0</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4033</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|/json/items/all.GET|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:124|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563420000</startTimeInMillis>
          <value>0</value>
          <min>0</min>
          <max>0</max>
          <current>0</current>
          <sum>5</sum>
          <count>30</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4060</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|/user/login.POST|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:127|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563420000</startTimeInMillis>
          <value>0</value>
          <min>0</min>
          <max>0</max>
          <current>0</current>
          <sum>5</sum>
          <count>30</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>5592</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|/cart/{id}.DELETE|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:142|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563420000</startTimeInMillis>
          <value>0</value>
          <min>2147483647</min>
          <max>-2147483648</max>
          <current>0</current>
          <sum>0</sum>
          <count>0</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>5583</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|/cart/{id}.GET|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:141|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563420000</startTimeInMillis>
          <value>0</value>
          <min>2147483647</min>
          <max>-2147483648</max>
          <current>0</current>
          <sum>0</sum>
          <count>0</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4024</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|/json/cart/co.GET|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:123|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563420000</startTimeInMillis>
          <value>0</value>
          <min>0</min>
          <max>0</max>
          <current>0</current>
          <sum>5</sum>
          <count>30</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>2477</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|/user/.POST|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:92|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563420000</startTimeInMillis>
          <value>5</value>
          <min>0</min>
          <max>0</max>
          <current>3</current>
          <sum>71</sum>
          <count>30</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>5601</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|/cart/co.GET|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:143|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563420000</startTimeInMillis>
          <value>0</value>
          <min>2147483647</min>
          <max>-2147483648</max>
          <current>0</current>
          <sum>0</sum>
          <count>0</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4099</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|UserLogin.memberLogin|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:129|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563420000</startTimeInMillis>
          <value>0</value>
          <min>2147483647</min>
          <max>-2147483648</max>
          <current>0</current>
          <sum>0</sum>
          <count>0</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4138</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|/appdynamicspilot/|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:132|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563420000</startTimeInMillis>
          <value>0</value>
          <min>0</min>
          <max>0</max>
          <current>0</current>
          <sum>4</sum>
          <count>30</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4108</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewItems.getAllItems|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:130|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563420000</startTimeInMillis>
          <value>0</value>
          <min>0</min>
          <max>0</max>
          <current>0</current>
          <sum>4</sum>
          <count>30</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4129</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewCart.sendItems|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:131|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563420000</startTimeInMillis>
          <value>0</value>
          <min>0</min>
          <max>0</max>
          <current>0</current>
          <sum>2</sum>
          <count>30</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4051</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|/json/cart/{id}.GET|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:126|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563420000</startTimeInMillis>
          <value>1</value>
          <min>0</min>
          <max>0</max>
          <current>0</current>
          <sum>13</sum>
          <count>30</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4156</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewCart.addToCart|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:134|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563420000</startTimeInMillis>
          <value>0</value>
          <min>0</min>
          <max>0</max>
          <current>0</current>
          <sum>3</sum>
          <count>30</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4147</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|/json/fault/getfaults.GET|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:133|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563420000</startTimeInMillis>
          <value>9</value>
          <min>0</min>
          <max>0</max>
          <current>9</current>
          <sum>130</sum>
          <count>30</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>2630</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|/items/all.GET|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:93|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563420000</startTimeInMillis>
          <value>5</value>
          <min>0</min>
          <max>0</max>
          <current>0</current>
          <sum>76</sum>
          <count>30</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4090</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|UserLogOut.memberLogOut|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:128|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563420000</startTimeInMillis>
          <value>0</value>
          <min>2147483647</min>
          <max>-2147483648</max>
          <current>0</current>
          <sum>0</sum>
          <count>0</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    </metric-datas>
  • Retrieve data for multiple metrics for the ViewCart.addToCart transaction on the ECommerce-Services server:

    /controller/rest/applications/ECommerce_E2E/metric-data?metric-path=Business Transaction Performance|Business Transactions|ECommerce Server|ViewCart.addToCart|*&time-range-type=BEFORE_NOW&duration-in-mins=15

    Full Example:

    curl --user user1@customer1:your_password "http://demo.appdynamics.com/controller/rest/applications/ECommerce_E2E/metric-data?metric-path=Business%20Transaction%20Performance%7CBusiness%20Transactions%7CECommerce-Services%7CViewCart.addToCart%7C*&time-range-type=BEFORE_NOW&duration-in-mins=15"
    
    <metric-datas><metric-data>
      <metricId>4155</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewCart.addToCart|Average Response Time (ms)</metricPath>
      <metricName>BTM|BTs|BT:134|Component:9|Average Response Time (ms)</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450566420000</startTimeInMillis>
          <value>28</value>
          <min>0</min>
          <max>32</max>
          <current>0</current>
          <sum>84</sum>
          <count>3</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>true</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4159</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewCart.addToCart|Number of Very Slow Calls</metricPath>
      <metricName>BTM|BTs|BT:134|Component:9|Number of Very Slow Calls</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450566420000</startTimeInMillis>
          <value>0</value>
          <min>2147483647</min>
          <max>-2147483648</max>
          <current>0</current>
          <sum>0</sum>
          <count>0</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4157</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewCart.addToCart|Errors per Minute</metricPath>
      <metricName>BTM|BTs|BT:134|Component:9|Errors per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450566420000</startTimeInMillis>
          <value>0</value>
          <min>2147483647</min>
          <max>-2147483648</max>
          <current>0</current>
          <sum>0</sum>
          <count>0</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4161</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewCart.addToCart|Average CPU Used (ms)</metricPath>
      <metricName>BTM|BTs|BT:134|Component:9|Average CPU Used (ms)</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450566420000</startTimeInMillis>
          <value>18</value>
          <min>0</min>
          <max>20</max>
          <current>0</current>
          <sum>54</sum>
          <count>3</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>true</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4160</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewCart.addToCart|Stall Count</metricPath>
      <metricName>BTM|BTs|BT:134|Component:9|Stall Count</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450566420000</startTimeInMillis>
          <value>0</value>
          <min>2147483647</min>
          <max>-2147483648</max>
          <current>0</current>
          <sum>0</sum>
          <count>0</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4411</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewCart.addToCart|95th Percentile Response Time (ms)</metricPath>
      <metricName>BTM|BTs|BT:134|Component:9|95th Percentile Response Time (ms)</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450566420000</startTimeInMillis>
          <value>28</value>
          <min>0</min>
          <max>32</max>
          <current>0</current>
          <sum>84</sum>
          <count>3</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>true</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4335</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewCart.addToCart|Normal Average Response Time (ms)</metricPath>
      <metricName>BTM|BTs|BT:134|Component:9|Normal Average Response Time (ms)</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450566420000</startTimeInMillis>
          <value>28</value>
          <min>0</min>
          <max>32</max>
          <current>0</current>
          <sum>84</sum>
          <count>3</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>true</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4162</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewCart.addToCart|Average Block Time (ms)</metricPath>
      <metricName>BTM|BTs|BT:134|Component:9|Average Block Time (ms)</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450566420000</startTimeInMillis>
          <value>0</value>
          <min>0</min>
          <max>0</max>
          <current>0</current>
          <sum>0</sum>
          <count>3</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>true</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4163</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewCart.addToCart|Average Wait Time (ms)</metricPath>
      <metricName>BTM|BTs|BT:134|Component:9|Average Wait Time (ms)</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450566420000</startTimeInMillis>
          <value>0</value>
          <min>0</min>
          <max>0</max>
          <current>0</current>
          <sum>0</sum>
          <count>3</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>true</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4156</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewCart.addToCart|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:134|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450566420000</startTimeInMillis>
          <value>0</value>
          <min>0</min>
          <max>0</max>
          <current>0</current>
          <sum>3</sum>
          <count>30</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4331</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewCart.addToCart|Average Request Size</metricPath>
      <metricName>BTM|BTs|BT:134|Component:9|Average Request Size</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450566420000</startTimeInMillis>
          <value>740</value>
          <min>0</min>
          <max>1057</max>
          <current>0</current>
          <sum>2221</sum>
          <count>3</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>true</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    <metric-data>
      <metricId>4158</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewCart.addToCart|Number of Slow Calls</metricPath>
      <metricName>BTM|BTs|BT:134|Component:9|Number of Slow Calls</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450566420000</startTimeInMillis>
          <value>0</value>
          <min>2147483647</min>
          <max>-2147483648</max>
          <current>0</current>
          <sum>0</sum>
          <count>0</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data>
    </metric-datas>

Disabling Data Rollup

By default, metric data is rolled up for the time frame you request. You can set the rollup parameter to false to get all data points within the time frame. For example:

curl --user user1@customer1:your_password "http://demo.appdynamics.com/controller/rest/applications/ECommerce_E2E/metric-data?rollup=false&metric-path=Overall%20Application%20Performance%7CAverage%20Response%20Time%20%28ms%29&time-range-type=BEFORE_NOW&duration-in-mins=15"

<metric-datas><metric-data>
  <metricId>2339</metricId>
  <metricPath>Overall Application Performance|Average Response Time (ms)</metricPath>
  <metricName>BTM|Application Summary|Average Response Time (ms)</metricName>
  <frequency>ONE_MIN</frequency>
  <metricValues>
    <metric-value>
      <startTimeInMillis>1450503540000</startTimeInMillis>
      <value>334</value>
      <min>0</min>
      <max>3340</max>
      <current>2</current>
      <sum>6678</sum>
      <count>20</count>
      <standardDeviation>0.0</standardDeviation>
      <occurrences>0</occurrences>
      <useRange>true</useRange>
    </metric-value>
    <metric-value>
      <startTimeInMillis>1450503600000</startTimeInMillis>
      <value>771</value>
      <min>1</min>
      <max>11235</max>
      <current>4113</current>
      <sum>15424</sum>
      <count>20</count>
      <standardDeviation>0.0</standardDeviation>
      <occurrences>0</occurrences>
      <useRange>true</useRange>
    </metric-value>
    <metric-value>
      <startTimeInMillis>1450503660000</startTimeInMillis>
      <value>215</value>
      <min>0</min>
      <max>4249</max>
      <current>3</current>
      <sum>4306</sum>
      <count>20</count>
      <standardDeviation>0.0</standardDeviation>
      <occurrences>0</occurrences>
      <useRange>true</useRange>
    </metric-value>
  ... 
  </metricValues>
</metric-data>
</metric-datas>

Using Time Ranges

You can fetch metric data for any time range, including for a range between specific points, such as from 2:00 to 2:15 pm Monday, or for a relative time range.

Time-based input parameters for the metric data API method let you specify a time range in several ways, as described in the following table. 

Time Range Input Parameters

Parameter Name

Parameter Type

Value

Mandatory

time-range-type

Query

Possible values are:

  • BEFORE_NOW—must specify the duration-in-mins parameter.
  • BEFORE_TIMEmust specify the duration-in-mins and end-time parameters. 
  • AFTER_TIMEmust specify the duration-in-mins and start-time parameters. 
  • BETWEEN_TIMESmust specify the start-time and end-time parameters. The BETWEEN_TIMES range includes the start- time and excludes the end-time.

Yes

duration-in-mins

Query

Duration (in minutes) to return the metric data.

If time-range-type is BEFORE_NOW, BEFORE_TIME, or AFTER_TIME

start-time

Query

Start time (in milliseconds) from which the metric data is returned in UNIX epoch time.

If time-range-type is AFTER_TIME or BETWEEN_TIMES

end-time

Query

End time (in milliseconds) until which the metric data is returned in UNIX epoch time.

If time-range-type is BEFORE_TIME or BETWEEN_TIMES 

Examples

Most examples on this page use the previous 15 minutes as the request time range. The following format examples show other ways you can define the time range for the request. 

  • Time range of the 15 minutes after December 19, 2015 5:40:00 AM GMT:

    ?time-range-type=AFTER_TIME&start-time=1450532400000&duration-in-mins=15
  • Time range of the 15 minutes before December 19, 2015 6:00:00 AM GMT.

    ?time-range-type=BEFORE_TIME&end-time=1450533600000&duration-in-mins=15
  • Time range between December 19, 2015 6:00:00 AM GMT and December 19, 2015 6:30:00 AM GMT:

    ?time-range-type=BETWEEN_TIMES&start-time=1450533600000&end-time=1450535400000

Retrieving All Other Traffic Business Transaction Metrics

The All Other Traffic business transaction is a type of business transaction that aggregates traffic for new transactions once the business transaction registration limits are reached and uses the special identifier, _APPDYNAMICS_DEFAULT_TX_, in API URI paths. See Business Transactions.

The following shows an example of retrieving the average CPU used by the All Other Traffic business transaction:

curl --user user1@customer1:your_password "http://demo.appdynamics.com:8090/controller/rest/applications/ACME%20Book%20Store%20Application/metric-data?metric-path=Business%20Transaction%20Performance%7CBusiness%20Transactions%7CECommerce%20Server%7C_APPDYNAMICS_DEFAULT_TX_%7CAverage%20CPU%20Used%20%28ms%29&time-range-type=BEFORE_NOW&duration-in-mins=15"

<metric-datas><metric-data>
  <metricId>4000</metricId>
  <metricPath>Business Transaction Performance|Business Transactions|ECommerce Server|_APPDYNAMICS_DEFAULT_TX_|Average CPU Used (ms)</metricPath>
  <metricName>BTM|BTs|BT:78|Component:12|Average CPU Used (ms)</metricName>
  <frequency>ONE_MIN</frequency>
  <metricValues>
    <metric-value>
      <startTimeInMillis>1450570800000</startTimeInMillis>
      <value>22</value>
      <min>0</min>
      <max>50</max>
      <current>20</current>
      <sum>3140</sum>
      <count>146</count>
      <standardDeviation>0.0</standardDeviation>
      <occurrences>0</occurrences>
      <useRange>true</useRange>
    </metric-value>
  </metricValues>
</metric-data>
</metric-datas>

Retrieve Transaction Snapshots

Snapshots contain details on transactions, by request segment. The time range parameters are the same for snapshots as for retrieving metrics. You can similarly specify a relative time range or a specific range. See Using Time Ranges.  

Format

GET /controller/rest/applications/application_name/request-snapshots

Input parameters

Parameter Name

Parameter Type

Value

Mandatory

application_name

URI

Provide either the application name or application id.

Yes

time-range-type

Query

Possible values are:

  • BEFORE_NOW—must specify the duration-in-mins parameter.
  • BEFORE_TIME—must specify the duration-in-mins and end-time parameters. 
  • AFTER_TIME—must specify the duration-in-mins and start-time parameters. 
  • BETWEEN_TIMES—must specify the start-time and end-time parameters. The BETWEEN_TIMES range includes the start- time and excludes the end-time.

Yes

duration-in-mins

Query

Duration (in minutes) to return the data.

If time-range-type is BEFORE_NOW, BEFORE_TIME, or AFTER_TIME

start-time

Query

Start time (in milliseconds) from which the data is returned.

If time-range-type is AFTER_TIME or BETWEEN_TIMES

end-time

Query

End time (in milliseconds) until which the data is returned.

If time-range-type is BEFORE_TIME or BETWEEN_TIMES

guids

Query

Array of comma-separated GUIDs for the transaction snapshots. If not specified, retrieves all snapshots in the specified time range.

No

archived

Query

True to retrieve archived snapshots. Default is false.

No

deep-dive-policy

Query

Array of comma-separated snapshot policy filters to apply. Valid values are: 

  • SLA_FAILURE
  • TIME_SAMPLING
  • ERROR_SAMPLING
  • OCCURRENCE_SAMPLING 
  • ON_DEMAND
  • APPLICATION_STARTUP
  • SLOW_DIAGNOSTIC_SESSION
  • ERROR_DIAGNOSTIC_SESSION
  • POLICY_FAILURE_DIAGNOSTIC_SESSION
  • DIAGNOSTIC_SESSION
  • INFLIGHT_SLOW_SESSION

No

application-component-ids

Query

Array of comma-separated tier IDs to filter. The default is all the tiers in the application.

No

application-component-node-ids

Query

Array of comma-separated node ID filters. Default is all the nodes in the application

No

business-transaction-ids

Query

Array of comma-separated business transaction ID filters. Default is all the business transactions in the application.

No

user-experience

Query

Array of comma-separated user experiences filters. Valid values are: 

  • NORMAL
  • SLOW
  • VERY_SLOW
  • STALL
  • ERROR

No

first-in-chain

Query

If true, retrieve only the first request from the chain. Default is false.

No

need-props

Query

If true, the values of the following snapshot properties are included in the output. These values correspond to the values of the data-collector-type parameter. If false, the default, these values are empty in the output.

  • errorDetails
  • errorIDs
  • httpParameters
  • businessData
  • cookies
  • httpHeaders
  • sessionKeys
  • responseHeaders
  • logMessages
  • transactionProperties
  • transactionEvents
  • dotnetProperty

No


need-exit-calls

Query

If true, exit calls are included in the result. Default is false.

No

execution-time-in-milis

Query

If set, retrieves only data for requests with execution times greater than this value.

No

session-id

Query

If set, retrieves data only for this session id.

No

user-principal-id

Query

If set, retrieves data only for this user login. 

No

error-ids

Query

Array of comma-separated error codes to filter by. The default is to retrieve all error codes.

No

starting-request-id, ending-request-id

Query

If set, retrieves data only for this range of request IDs.

No

error-occurred

Query

If true, retrieves only error requests. Default is false.

No

diagnostic-snapshot

Query

If true, retrieves only diagnostic snapshots. Default is false.

No

bad-request

Query

If true, retrieves only slow and error requests. Default is false.

No

diagnostic-session-guid

Query

Array of comma-separated diagnostic session GUIDs to filter.

No

data-collector-name

Query

Used with data-collector-value to filter snapshot collection based on the value of a data collector.

No

data-collector-value

Query

Used with data-collector-name to filter snapshot collection based on the value of a data collector.

If data-collector-name is set.

data-collector-type

Query

Used with data-collector-name and data-collector-value to filter snapshot collection based on the value of a data collector. Some of the values contain spaces. All are case-sensitive and where indicated the spaces are required. Valid values are:

  • Error IDs
  • Stack Traces
  • Error Detail
  • Http Parameter
  • Business Data (This type is a method invocation data collector.)
  • Cookie
  • Http Header
  • Session Key
  • Response Header
  • Log Message
  • Transaction Property
  • Transaction Event
  • Dotnet Property
  • isProtoBuf
  • EUM Request GUID

output

Query

HTTP Request parameter included as part of the URL to change the output format Valid values are XML (default) or JSON.

No

maximum-resultsQueryIf specified, the number of maximum results will be returned. If not specified, a default of 600 results can be returned at most.No

Examples 

  • Retrieve list of transaction snapshots for the ACME Book Store:

    /controller/rest/applications/ECommerce_E2E-Fulfillment/request-snapshots?time-range-type=BEFORE_NOW&duration-in-mins=5

    Full Example:

    curl --user user1@customer1:your_password "http://demo.appdynamics.com/controller/rest/applications/ECommerce_E2E-Fulfillment/request-snapshots?time-range-type=BEFORE_NOW&duration-in-mins=5"
    
    <request-segment-datas><request-segment-data>
      <id>0</id>
      <archived>false</archived>
      <requestGUID>18a9ae17-33a8-4d24-b3fa-558fe42b98b5</requestGUID>
      <businessTransactionId>113</businessTransactionId>
      <applicationId>8</applicationId>
      <applicationComponentId>14</applicationComponentId>
      <applicationComponentNodeId>13</applicationComponentNodeId>
      <async>false</async>
      <threadID>58</threadID>
      <threadName>http-nio-8080-exec-8</threadName>
      <localStartTime>1450574075422</localStartTime>
      <serverStartTime>1450574075422</serverStartTime>
      <firstInChain>true</firstInChain>
      <callChain>Component:14</callChain>
      <localID>0</localID>
      <errorOccured>false</errorOccured>
      <hasDeepDiveData>true</hasDeepDiveData>
      <userExperience>NORMAL</userExperience>
      <timeTakenInMilliSecs>3693</timeTakenInMilliSecs>
      <cpuTimeTakenInMilliSecs>19</cpuTimeTakenInMilliSecs>
      <warningThreshold>5318 ms. 3.0x of standard deviation [453.7 ms] for moving average [3956.8 ms] (minimum baseline: 200 ms) for the last 11617 minutes.</warningThreshold>
      <criticalThreshold>5772 ms. 4.0x of standard deviation [453.7 ms] for moving average [3956.8 ms] (minimum baseline: 600 ms) for the last 11617 minutes.</criticalThreshold>
      <summary>Scheduled Snapshots: one every 10 minutes.</summary>
      <errorSummary></errorSummary>
      <diagnosticSessionGUID></diagnosticSessionGUID>
      <deepDivePolicy>TIME_SAMPLING</deepDivePolicy>
      <delayedDeepDive>false</delayedDeepDive>
      <delayedDeepDiveOffSet>0</delayedDeepDiveOffSet>
      <exitCallsDataTruncated>false</exitCallsDataTruncated>
      <URL>/appdynamicspilot/rest/fulfillment</URL>
      <errorIDs/>
      <errorDetails/>
      <httpParameters/>
      <businessData/>
      <cookies/>
      <httpHeaders/>
      <sessionKeys/>
      <responseHeaders/>
      <logMessages/>
      <transactionProperties/>
      <transactionEvents/>
      <unresolvedCallInCallChain>false</unresolvedCallInCallChain>
      <dotnetProperty/>
      <endToEndLatency>-1</endToEndLatency>
    </request-segment-data>
    ...
    <request-segment-data>
      <id>0</id>
      <archived>false</archived>
      <requestGUID>bfce5066-2409-4a4b-a869-6afcc06614d6</requestGUID>
      <businessTransactionId>113</businessTransactionId>
      <applicationId>8</applicationId>
      <applicationComponentId>14</applicationComponentId>
      <applicationComponentNodeId>13</applicationComponentNodeId>
      <async>false</async>
      <threadID>60</threadID>
      <threadName>http-nio-8080-exec-10</threadName>
      <localStartTime>1450574082926</localStartTime>
      <serverStartTime>1450574082926</serverStartTime>
      <firstInChain>true</firstInChain>
      <callChain>Component:14</callChain>
      <localID>0</localID>
      <errorOccured>false</errorOccured>
      <hasDeepDiveData>true</hasDeepDiveData>
      <userExperience>NORMAL</userExperience>
      <timeTakenInMilliSecs>3634</timeTakenInMilliSecs>
      <cpuTimeTakenInMilliSecs>16</cpuTimeTakenInMilliSecs>
      <warningThreshold>5318 ms. 3.0x of standard deviation [453.7 ms] for moving average [3956.8 ms] (minimum baseline: 200 ms) for the last 11617 minutes.</warningThreshold>
      <criticalThreshold>5772 ms. 4.0x of standard deviation [453.7 ms] for moving average [3956.8 ms] (minimum baseline: 600 ms) for the last 11617 minutes.</criticalThreshold>
      <summary>[null]</summary>
      <errorSummary></errorSummary>
      <diagnosticSessionGUID></diagnosticSessionGUID>
      <deepDivePolicy>CROSS_APP_POLICY</deepDivePolicy>
      <delayedDeepDive>false</delayedDeepDive>
      <delayedDeepDiveOffSet>0</delayedDeepDiveOffSet>
      <exitCallsDataTruncated>false</exitCallsDataTruncated>
      <URL>/appdynamicspilot/rest/fulfillment</URL>
      <errorIDs/>
      <errorDetails/>
      <httpParameters/>
      <businessData/>
      <cookies/>
      <httpHeaders/>
      <sessionKeys/>
      <responseHeaders/>
      <logMessages/>
      <transactionProperties/>
      <transactionEvents/>
      <unresolvedCallInCallChain>false</unresolvedCallInCallChain>
      <dotnetProperty/>
      <endToEndLatency>-1</endToEndLatency>
    </request-segment-data>
    </request-segment-datas>
  • Retrieve list of transaction snapshots including the snapshot fields that are associated with an HTTP parameter data collector:

    /controller/rest/applications/ECommerce_E2E-Fulfillment/request-snapshots?time-range-type=BEFORE_NOW&duration-in-mins=5&data-collector-type=Http Parameter&data-collector-name=param1&data-collector-value=%5B100%5D&need-props=true

    Full Example:

    curl --user user1@customer1:your_password "http://demo.appdynamics.com/controller/rest/applications/ECommerce_E2E-Fulfillment/request-snapshots?time-range-type=BEFORE_NOW&duration-in-mins=5&data-collector-type=Http%20Parameter&data-collector-name=param1&data-collector-value=%5B100%5D&need-props=true"
     
    <request-segment-datas><request-segment-data>
       <id>0</id>
       <archived>false</archived>
       <requestGUID>07532d68-42b8-4a79-877a-dedf2912a2cf</requestGUID>
       <businessTransactionId>128</businessTransactionId>
       <applicationId>2</applicationId>
       <applicationComponentId>5</applicationComponentId>
       <applicationComponentNodeId>4</applicationComponentNodeId>
       <async>false</async>
       <threadID>60</threadID>
       <threadName>http-8000-Processor24</threadName>
       <localStartTime>1389164292752</localStartTime>
       <serverStartTime>1389164292752</serverStartTime>
       <firstInChain>true</firstInChain>
       <callChain>Component:5</callChain>
       <localID>0</localID>
       <errorOccured>true</errorOccured>
       <hasDeepDiveData>true</hasDeepDiveData>
       <userExperience>ERROR</userExperience>
       <timeTakenInMilliSecs>105</timeTakenInMilliSecs>
       <cpuTimeTakenInMilliSecs>3839000</cpuTimeTakenInMilliSecs>
       <summary>[Manual Diagnostic Session] - org.hibernate.util.JDBCExceptionReporter : Cannot create PoolableConnectionFactory (Unknown database 'appdy') </summary>
       <errorSummary/>
       <diagnosticSessionGUID>d70a41d9-a96f-46e8-9fbc-31061c6e452f</diagnosticSessionGUID>
       <deepDivePolicy>ON_DEMAND</deepDivePolicy>
       <delayedDeepDive>false</delayedDeepDive>
       <delayedDeepDiveOffSet>0</delayedDeepDiveOffSet>
       <exitCallsDataTruncated>false</exitCallsDataTruncated>
       <URL>/appdynamicspilot/1.bookslist</URL>
       <httpSessionID>088B2A2DD0EF77424DD0EB3346A441F9</httpSessionID>
       <errorIDs>
       <long>29</long>
       </errorIDs>
       <errorDetails>
       <name-value>
       <id>0</id>
       <name>1. org.hibernate.util.JDBCExceptionReporter</name>
       <value>org.hibernate.util.JDBCExceptionReporter : Cannot create PoolableConnectionFactory (Unknown database 'appdy')</value>
       </name-value>
       </errorDetails>
       <httpParameters>
       <name-value>
       <id>0</id>
       <name>param1</name>
       <value>[100]</value>
       </name-value>
       </httpParameters>
       <businessData/>
       <cookies/>
       <httpHeaders/>
       <sessionKeys/>
       <responseHeaders/>
       <logMessages/>
       <transactionProperties>
       <name-value>
       <id>0</id>
       <name>Servlet URI</name>
       <value>/appdynamicspilot/WEB-INF/presentation/bookslist.jsp</value>
       </name-value>
       <name-value>
       <id>0</id>
       <name>ProcessID</name>
       <value>65331</value>
       </name-value>
       </transactionProperties>
       <transactionEvents/>
       <unresolvedCallInCallChain>false</unresolvedCallInCallChain>
       <dotnetProperty/>
    </request-segment-data></request-segment-datas>

Retrieve Controller Audit History

The Controller audit history is a record of the configuration and user activities in the Controller configuration. The ControllerAuditHistory API method returns the audit log for the time range specified. The output format can be JSON or CSV. This information is the same as that found in the audit.log file. See Platform Log Files and Log File Information by Platform

Format

GET /controller/ ControllerAuditHistory?startTime=<start-time>&endTime=<end-time>&include=<field>:<value>&exclude=<field>:<value>

Input parameters

Parameter Name

Parameter Type

Value

Mandatory

start-time

Query

Start time in the format: yyyy-MM-dd'T'HH:mm:ss.SSSZ

Yes

end-time

Query

End time in the format: yyyy-MM-dd'T'HH:mm:ss.SSSZ

Yes

time-zone-idQueryTime zoneNo
includeQueryRestricted information in the Controller audit historyNo
excludeQueryRestricted information in the Controller audit historyNo
  • To control the size of the output, the range between the start-time and end-time cannot exceed 24 hours. For periods longer than 24 hours, use multiple queries with consecutive time parameters.
  • Multiple filters of the same type are allowed. 
    • The backend API treats included filters with the same <field> with relationship OR
    • Filters with different <field> with relationship AND. There is no direct interaction between include and exclude filters.
  • Each filter needs to be a parameter, e.g. include=filterName1:filterValue1&include=filterName2:filterValue2. See the below examples:
http://localhost:8080/controller/ControllerAuditHistory?startTime=yyyy-MM-dd&HH:mm:ss.SSSZ&endTime=yyyy-MM-dd&HH:mm:ss.SSSZ?include=filterName1:filterValue1&include=filterName1:filterValue1&exclude=filterName1:filterValue1&exclude=filterName1:filterValue1

Configure Metric Retention by Account

You can configure the Controller to purge stale metrics once a day based on the account.

  • Stale metrics are metrics that have not had new data reported based on the number of days configured. 
  • This only deletes EUM and SIM metrics that are more than two days old.

To configure this option, you must be the Controller owner. SaaS customers cannot use this API.


Format

POST /controller/api/accounts/<account_id>/metricstaleduration/<number_of_days>

Input Parameters

Parameter NameParameter TypeValue
account_idURIThe account ID.
number_of_daysIntegerThe number of days you want to retain stale metrics.

Example

SaaS customers cannot use this API because root@system is owned by our SaaS Operations team.

curl -X POST -u root@system:your_password "http://demo.appdynamics.com:8090/controller/api/accounts/2/metricstaleduration/3"

Configure Metric Retention by Application

You can configure the Controller to purge stale metrics once a day based on application.

  • Stale metrics are metrics that have not had new data reported based on the number of days configured. 
  • This only deletes EUM and SIM metrics that are more than two days old.

To configure this option, you must have administrator permissions or higher.

Format

POST /controller/api/accounts/<account_id>/applications/<application_name>/metricstaleduration/<number_of_days>

Input Parameters

Parameter NameParameter TypeValue
account_idURIThe account ID.
application_idURIThe application ID.
number_of_daysIntegerThe number of days you want to retain stale metrics.

Example

curl -X POST -u user1@customer1:your_password "http://demo.appdynamics.com:8090/controller/api/accounts/2/applications/12/metricstaleduration/3"