Anomaly Violation API

Retrieve a list of anomaly violation for an application

This API returns a list of all the anomaly violations and suspected causes for an application within a specified time period.

Resource URL

GET <controller_url>/controller/anomaly/rest/api/v1/applications/{applicationId}/anomalies

Request/Response Format

JSON

URL Parameters

NameTypeDescriptionMandatory
applicationId

Integer

Example: 15

The ID of the application for which you want to retrieve the anomaly violations.

Yes

startTime

Integer

Example: 1683785904000

The start time in milliseconds from which you want to fetch the anomaly violations.

Yes

endTime

Integer

Example: 1683786904000

The end time in milliseconds upto which you want to fetch the anomaly violations.

Yes

fetchSuspectedCause

Boolean:

  • true

  • false

If you want to fetch suspected causes for the anomalies, specify this parameter as true.

Optional

pageSize

Integer

Example: 10

The number of items to return per page. If the value is negative or zero, all items will be returned without pagination.

Optional

pageNumber

Integer

Example: 10

The page number to retrieve by using the 0-based indexing. 0 represents the first page, 1 represents the second page, and so on. This parameter value must be always positive. Specifying a negative value results in a bad request error.

Optional

Example 1

Fetch the anomalies associated with an application.

Request:

curl -u username:password <controller_url>/controller/anomaly/rest/api/v1/applications/14/anomalies?startTime=1756338391000&endTime=1756880352000&fetchSuspectedCause=false'

Response:

{

  "violationListItem": [

    {

      "id": 1,

      "status": "RESOLVED",

      "description": "AppDynamics has detected a problem. [\"Average Response Time (ms)\"] is violating.",

      "startTime": 1756374240000,

      "endTime": 1756375440000,

      "duration": 1200000,

      "affectedEntityId": 35,

      "affectedEntityName": "/orders",

      "affectedEntityType": "BUSINESS_TRANSACTION",

      "eventDetailMap": null

    },

    {

      "id": 2,

      "status": "RESOLVED",

      "description": "AppDynamics has detected a problem. [\"Average Response Time (ms)\"] is violating.",

      "startTime": 1756377900000,

      "endTime": 1756379280000,

      "duration": 1380000,

      "affectedEntityId": 35,

      "affectedEntityName": "/orders",

      "affectedEntityType": "BUSINESS_TRANSACTION",

      "eventDetailMap": null

    }

   



  ]

}

Example 2

Fetch the anomalies along with the suspected causes of an application.

Request:

curl -u username:password <controller_url>/controller/anomaly/rest/api/v1/applications/14/anomalies?startTime=1756338391000&endTime=1756880352000&fetchSuspectedCause=true'

Response:

{

  "violationListItem": [

    {

      "id": 1,

      "status": "RESOLVED",

      "description": "AppDynamics has detected a problem. [\"Average Response Time (ms)\"] is violating.",

      "startTime": 1756374240000,

      "endTime": 1756375440000,

      "duration": 1200000,

      "affectedEntityId": 35,

      "affectedEntityName": "/orders",

      "affectedEntityType": "BUSINESS_TRANSACTION",

      "eventDetailMap": {

        "5713": {

          "eventSeverity": "ERROR",

          "eventType": "ANOMALY_OPEN_CRITICAL",

          "eventTime": 1756374240000,

          "eventSummary": "AppDynamics has detected a Critical Anomaly on /orders of originating tier ApacheWebServer-AUG28-v1. The following metrics are deviating: [Average Response Time (ms)]",

          "suspectedCauses": []

        },

        "5806": {

          "eventSeverity": "WARN",

          "eventType": "ANOMALY_DOWNGRADED",

          "eventTime": 1756374780000,

          "eventSummary": "Anomaly state changed from Critical to Warning on /orders of originating tier ApacheWebServer-AUG28-v1. The following metrics are deviating: [Average Response Time (ms)]",

          "suspectedCauses": []

        }

      }

    },

    {

      "id": 2,

      "status": "RESOLVED",

      "description": "AppDynamics has detected a problem. [\"Average Response Time (ms)\"] is violating.",

      "startTime": 1756377900000,

      "endTime": 1756379280000,

      "duration": 1380000,

      "affectedEntityId": 35,

      "affectedEntityName": "/orders",

      "affectedEntityType": "BUSINESS_TRANSACTION",

      "eventDetailMap": {

        "6359": {

          "eventSeverity": "ERROR",

          "eventType": "ANOMALY_OPEN_CRITICAL",

          "eventTime": 1756377900000,

          "eventSummary": "AppDynamics has detected a Critical Anomaly on /orders of originating tier ApacheWebServer-AUG28-v1. The following metrics are deviating: [Average Response Time (ms)]",

          "suspectedCauses": [

            {

              "entityType": "APPLICATION_COMPONENT_NODE",

              "entityId": 243,

              "entityName": "OrderServiceNode-AUG28-v1",

              "affectedEntityMetricIds": [

                {

                  "metricId": 34318,

                  "metricName": "BTM|BTs|BT:35|Component:41|Exit Call:HTTP|To:36|Component:36|Exit Call:HTTP|To:40|Component:40|Average Response Time (ms)"

                }

              ],

              "rcaSummary": "/orders is possibly affected by issue on OrderServiceNode-AUG28-v1",

              "metricBandInfo": {

                "34318": {

                  "upper": 531.338,

                  "lower": 55.676,

                  "modelType": 1

                }

              }

            }

          ]

        },

        "6443": {

          "eventSeverity": "WARN",

          "eventType": "ANOMALY_DOWNGRADED",

          "eventTime": 1756378560000,

          "eventSummary": "Anomaly state changed from Critical to Warning on /orders of originating tier ApacheWebServer-AUG28-v1. The following metrics are deviating: [Average Response Time (ms)]",

          "suspectedCauses": [

            {

              "entityType": "APPLICATION_COMPONENT_NODE",

              "entityId": 243,

              "entityName": "OrderServiceNode-AUG28-v1",

              "affectedEntityMetricIds": [

                {

                  "metricId": 34318,

                  "metricName": "BTM|BTs|BT:35|Component:41|Exit Call:HTTP|To:36|Component:36|Exit Call:HTTP|To:40|Component:40|Average Response Time (ms)"

                }

              ],

              "rcaSummary": "/orders is possibly affected by issue on OrderServiceNode-AUG28-v1",

              "metricBandInfo": {

                "34318": {

                  "upper": 531.338,

                  "lower": 55.676,

                  "modelType": 1

                }

              }

            }

          ]

        }

      }

    }

   

 ]

}