AppDynamics Metrics API

Retrieve metric hierarchy and metric data for monitored applications with configurable time ranges and aggregation.

OpenAPI Specification

appdynamics-metrics-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: AppDynamics Alert and Respond Actions Metrics API
  description: The AppDynamics Alert and Respond API enables programmatic management of health rules, policies, and actions within the AppDynamics Controller. Developers can create, update, and delete health rules that define performance thresholds, configure alerting policies that determine how violations are handled, and set up automated response actions. This API is essential for automating incident response workflows and integrating AppDynamics alerting with external notification and ticketing systems.
  version: 23.x
  contact:
    name: Splunk AppDynamics Support
    url: https://www.appdynamics.com/support
  termsOfService: https://www.cisco.com/c/en/us/about/legal/cloud-and-software.html
servers:
- url: https://{controller-host}/controller
  description: AppDynamics Controller
  variables:
    controller-host:
      default: example.saas.appdynamics.com
      description: The hostname of your AppDynamics Controller instance.
security:
- bearerAuth: []
- basicAuth: []
tags:
- name: Metrics
  description: Retrieve metric hierarchy and metric data for monitored applications with configurable time ranges and aggregation.
paths:
  /rest/applications/{applicationId}/metrics:
    get:
      operationId: listMetricHierarchy
      summary: List metric hierarchy for an application
      description: Returns the metric tree hierarchy for the specified application. Use this to discover available metric paths before retrieving metric data. Supports wildcard characters in the metric-path parameter.
      tags:
      - Metrics
      parameters:
      - $ref: '#/components/parameters/applicationId'
      - name: metric-path
        in: query
        required: false
        description: The metric path to browse. Supports wildcard characters. If not specified, returns the top level of the metric hierarchy.
        schema:
          type: string
      - $ref: '#/components/parameters/outputFormat'
      responses:
        '200':
          description: Successful retrieval of metric hierarchy
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetricFolder'
        '401':
          description: Unauthorized - invalid or missing credentials
        '404':
          description: Application not found
  /rest/applications/{applicationId}/metric-data:
    get:
      operationId: getMetricData
      summary: Get metric data for an application
      description: Returns metric data for the specified metric path and time range. The rollup parameter controls whether data is aggregated into a single value or returned as individual data points. Supports wildcard characters in the metric-path parameter.
      tags:
      - Metrics
      parameters:
      - $ref: '#/components/parameters/applicationId'
      - name: metric-path
        in: query
        required: true
        description: The full metric path to retrieve data for. Supports wildcard characters using the pipe delimiter for path levels.
        schema:
          type: string
        example: Application Infrastructure Performance|*|Agent|App|Availability
      - name: time-range-type
        in: query
        required: true
        description: The type of time range to use for the query.
        schema:
          type: string
          enum:
          - BEFORE_NOW
          - BEFORE_TIME
          - AFTER_TIME
          - BETWEEN_TIMES
      - name: duration-in-mins
        in: query
        required: false
        description: Duration in minutes for BEFORE_NOW and BEFORE_TIME time range types.
        schema:
          type: integer
          minimum: 1
      - name: start-time
        in: query
        required: false
        description: Start time in Unix epoch milliseconds for AFTER_TIME and BETWEEN_TIMES time range types.
        schema:
          type: integer
          format: int64
      - name: end-time
        in: query
        required: false
        description: End time in Unix epoch milliseconds for BEFORE_TIME and BETWEEN_TIMES time range types.
        schema:
          type: integer
          format: int64
      - name: rollup
        in: query
        required: false
        description: When true, aggregates data into a single data point. When false, returns individual data points. Defaults to true.
        schema:
          type: boolean
          default: true
      - $ref: '#/components/parameters/outputFormat'
      responses:
        '200':
          description: Successful retrieval of metric data
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetricData'
        '400':
          description: Bad request - invalid parameters or metric path
        '401':
          description: Unauthorized - invalid or missing credentials
        '404':
          description: Application or metric not found
components:
  schemas:
    MetricData:
      type: object
      description: Metric data returned for a specific metric path containing one or more data points depending on the rollup parameter.
      properties:
        metricId:
          type: integer
          format: int64
          description: The internal numeric identifier for the metric.
        metricName:
          type: string
          description: The full metric path name.
        metricPath:
          type: string
          description: The hierarchical path of the metric using pipe delimiters.
        frequency:
          type: string
          description: The frequency of the metric data points.
        metricValues:
          type: array
          description: The array of metric data point values.
          items:
            $ref: '#/components/schemas/MetricValue'
    MetricValue:
      type: object
      description: A single metric data point with statistical values for a time period.
      properties:
        startTimeInMillis:
          type: integer
          format: int64
          description: The start time of this data point in Unix epoch milliseconds.
        occurrences:
          type: integer
          description: The number of observations in this time period.
        current:
          type: integer
          format: int64
          description: The current or last observed value.
        min:
          type: integer
          format: int64
          description: The minimum value observed in this time period.
        max:
          type: integer
          format: int64
          description: The maximum value observed in this time period.
        count:
          type: integer
          format: int64
          description: The total count of observations.
        sum:
          type: integer
          format: int64
          description: The sum of all values in this time period.
        value:
          type: integer
          format: int64
          description: The computed value based on the rollup type.
        standardDeviation:
          type: number
          format: double
          description: The standard deviation of values in this time period.
    MetricFolder:
      type: object
      description: A node in the metric hierarchy representing either a folder or a leaf metric.
      properties:
        name:
          type: string
          description: The name of this metric folder or metric.
        type:
          type: string
          description: The type of this node - either folder or leaf.
          enum:
          - folder
          - leaf
  parameters:
    applicationId:
      name: applicationId
      in: path
      required: true
      description: The numeric ID or name of the business application.
      schema:
        type: string
    outputFormat:
      name: output
      in: query
      required: false
      description: The output format for the response. Defaults to XML if not specified.
      schema:
        type: string
        enum:
        - JSON
        - XML
        default: XML
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: OAuth 2.0 access token obtained from the /controller/api/oauth/access_token endpoint.
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic authentication using user@account:password format.
externalDocs:
  description: Alert and Respond API Documentation
  url: https://docs.appdynamics.com/appd/23.x/latest/en/extend-appdynamics/appdynamics-apis/alert-and-respond-api