Understanding API v2 response when the alert condition is set to Average Across Nodes

Prev Next

Problem Statement

If a test has an alert condition with node threshold set as “Average Across Nodes”, the node details do not appear in the REST API v2 call for GET /v2/tests/alerts and when includeNodeDetails is set to true we get an error message.

Call:
https://io.catchpoint.com/api/v2/tests/alerts?testIds={exampleTestId}&includeNodeDetails=true&pageNumber=1&pageSize=100
Response:
 "errors": [
    {
      "message": "The Alert does not exist or does not match the filter criteria, change or relax the filter criteria and try again."
    }
  ],

Example

1. Alert condition set to Node

When the alert condition of a test is set to Node and Include Node Details parameter in the API call is set to True the response includes the node details such as node ID and node Name.
Alert set to node.png

 "alertType": {
          "id": 15,
          "name": "Availability"
        },
        "criticalTrigger": 10, 
        "node": {
          "id": 3457,
          "name": "New York, US - AT&T"
        }

2. Alert condition set to Average Across Nodes

When the alert condition of a test is set to Average Across Node and Include Node Details parameter in the API call is set to True the response includes an error message.
Alert set to average across node.png

  "errors": [
    {
      "message": "The Alert does not exist or does not match the filter criteria, change or relax the filter criteria and try again."
    }
  ]

Conclusion

When the alert condition of a test is set to Average Across Nodes the node details are not returned in the API response of GET /v2/tests/alerts which is by design and expected as we can't show the node details if the alert is generated for values that are averaged across several nodes.