You are viewing the Apigee Management API reference documentation. For the main product docs, and to search all docs, go to

Create Alert

Resource Summary


Content Type

application/json, text/plain


API Monitoring Alerts,



Create Alert

Create an alert.


Note: You can set up a maximum of 20 alerts per organization. The alert settings apply to all users in the organization; they are not per user. If you change the alert settings, they change for all users in your organization.


Note: Edge imposes a quota on this API of 60 calls per minute per organization. This quota is calculated by multiplying 20 (number of allowed alerts) * 3 = 60 calls. 


For more information and examples of this API, see Managing alerts and notifications using the API.


The example below in the Request Body shows the JSON payload for this API. The following sections describe this payload in more detail:

Alerts JSON

Property Type Description
organization string Organization name.
environment string Environment name.
name string, maximum length=100 Alert name.
enabled boolean, default=true If true, this alert is triggered when conditions are met, and any configured notifications are sent.
description string Alert description.
playbook string A message for consumers of this alert that contains instructions and links for how to resolve the cause.
conditions array, minLength=1, maxLength=5 An array of conditions that must all be satisfied for this alert to trigger. See the Conditions table below.
notifications string, minimum length=0 An array of notification endpoints that the alert is sent to when triggered. Notifications fire repeatedly, at most throttleIntervalSeconds apart, while triggered. For example:
"notifications": [ 
  "channel": "email", 
  "destination": "" 
  • channel - A string specifying the channel on which to notify as:
    • email
    • pagerduty
    • slack
    • webhook
  • destination - A string specifying the destination to which the notification is sent based on the value of channel.
reportEnabled boolean, default=false If true, a custom report is created based on alert condition.
throttleIntervalSeconds integer

The minimum amount of time, in seconds, between repeated notifications for a triggered alert.


Values must be in increments of 60 second (one minute), meaning 300 (5 minutes), 360 (6 minutes), 420 (seven minutes), etc.


The minimum value is 300 seconds (5 minutes). The maximum value is 86400 seconds (24 hours). 

Conditions JSON

Property Type Description
description string, maximum length=1000 Alert condition description.
dimensions object An object of key-value pairs that identify the metric resources. For example, an environment, proxy, or a set of targets in a proxy. See the dimensions table below.
metric number Metric monitored for the resources specified by dimension. Possible value:
  • rate
  • count
  • tps
  • totalLatency
  • targetLatency
threshold number Threshold value that is compared against the metric value using comparator to determine if this condition is met. For rate metric, this value is in the range 0-1.
durationSeconds number Duration, in seconds, for which the metric value must continuously match the threshold value using the comparator operator to determine if this condition is met. For example, given the following parameters:
 "durationSeconds": 300, 
 "threshold": 0.015,

The condition is met when the metric is greater than or equal to 0.015 for 300 seconds (5 minutes), and not below that value at any time within that duration.


The only allowed values are:

  • 60 (1 minute)
  • 120 (2 minutes)
  • 180 (3 minutes)
  • 240 (4 minutes)
  • 300 (5 minutes)
  • 600 (10 minutes)
  • 900 (15 minutes)
  • 1200 (20 minutes)
  • 1800 (30 minutes)
  • 3600 (1 hour)
comparator string Operator that is used to compare the metric value against the threshold value to determine if this condition is met. Possible values:
  • > or gt (greater than)
  • < or lt (less than)
  • >= or gte (greater than or equal to)
  • <= or lte (less than or equal to)
  • == (equal to)

Dimensions JSON

Key Value
env Environment name.
proxy Proxy name, or the special value ANY or ALL, to monitor any proxy in the environment.
region Region name, or the special value ANY to monitor any region.
target Target name, or the special value ANY or ALL, to monitor any target in the proxy.
developerApp Developer app name, or the special value ANY, to monitor any developer app in the environment.
collection Collection ID, to monitor collection of targets or proxy.
statusCode Status code, such as 5xx, 4xx, 404, 2xx on whose rate or count if violated the alert should be fired. You can specify a single status code between 200-299, 400-599, and the wildcard values of 2xx, 4xx, or 5xx. Not valid for latency alerts.
percentile Percentile (50, 90, 95, 99) of the latency value that, if violated, the alert is fired.
faultCodeCategory Fault code category. Valid in conjunction with faultCodeSubCategory. Not valid if statusCode is present. Not valid for latency alerts.
faultCodeSubCategory Fault code subcategory. Can only be specified if you specify a value to faultCodeCategory. Specify a specific subcategory, ALL, or ANY. ALL specifies that all subcategories must have been violated for the alert to trigger. ANY specifies to trigger the alert if any subcategory fault has been violated.

Fault code name. Can only be specified if you specify a value to faultCodeSubCategory. Specify a specific name, ALL, or ANY. You can only specify a name if you specified an explicit subcategory to faultCodeSubCategory. That is, faultCodeSubCategory cannot be set to ALL or ANY.

ALL specifies that all fault code names must have been violated for the alert to trigger. ANY specifies to trigger the alert if any fault code name has been violated.


Resource URL /alerts

Header Parameters

Name Values Description

OAuth token. Replace $TOKEN with your access token. See Get the tokens.


Specify Content Type.

Request Body

HTTP Basic

OAuth 2.0



Make a request and see the response.

Make a request and see the response.

Make a request and see the response.


Help or comments?

  • If something's not working: Ask the Apigee Community or see Apigee Support.
  • If something's wrong with the docs: Click the "Send Feedback" button.
    (Incorrect? Unclear? Broken link? Typo?)