Skip to content

Attach Alert to Load Balancer

POST
/gateway/{gateway_id}/alerts/
curl --request POST \
--url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/gateway/{gateway_id}/alerts/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"alert_id": 17
}'

Attaches an alert you already made for Load Balancers, so the Load Balancer is watched against it and notifications go to the alert’s channels. The Load Balancer must be Running. An alert can be attached to a Load Balancer once. Needs the Create permission for Load Balancers.

gateway_id
required
integer

Load Balancer ID

project_id
required
integer

Project ID

active_iam
integer

Active IAM ID (To access contact person account) Find your Active IAM ID here

location
required
string
Allowed values: Delhi Chennai

Location

Media typeapplication/json
object
alert_id
required

ID of an alert of this project and region whose resource type is Load Balancer.

integer

Example

17

The alert was attached

Media typeapplication/json
object
code
integer
message
string
data
object
id

ID of the attachment. Use it in the paths that take attachment_id.

integer
gateway

ID of the Load Balancer.

integer
gateway_name

Name of the Load Balancer.

string
alert
object
id
integer
name
string
location
string
resource_type

The kind of resource the alert is for.

string
metric_type

The measure the alert watches.

string
metric_type_unit

The unit of the measure.

string
nullable
operator

How the measure is compared with the threshold.

string
threshold_value

The value the measure is compared with.

number
severity
string
evaluate_for

How long the condition must hold before the alert fires.

string
nullable
created_by

Who created it.

object
id
integer
name
string
email
string
username
string
created_at
string
updated_at
string
alert_name
string
grafana_rule_uid

ID of the alert rule that watches the Load Balancer.

string
nullable
created_at
string
updated_at
string
errors
object

Example

{
"code": 200,
"message": "Success",
"data": {
"id": 63,
"gateway": 42,
"gateway_name": "example-lb",
"alert": {
"id": 17,
"name": "High error rate",
"location": "Delhi",
"resource_type": "Load Balancer",
"metric_type": "example",
"metric_type_unit": "example",
"operator": "example",
"severity": "example",
"created_by": {
"id": 101,
"name": "A User",
"email": "user@example.com",
"username": "auser"
},
"created_at": "2026-10-21T11:17:29Z",
"updated_at": "2026-10-21T11:17:29Z"
},
"alert_name": "High error rate",
"grafana_rule_uid": "a1b2c3d4e5",
"created_at": "2026-10-21T11:17:29Z",
"updated_at": "2026-10-21T11:17:29Z"
},
"errors": {}
}

alert_id is missing, or is not an alert of this project and region made for Load Balancers, or is already attached to this Load Balancer. errors is an object keyed by field. The same 400 is returned, with the project’s own text, when project_id is missing or not a number.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 400,
"message": "Bad Request",
"data": {}
}

The Load Balancer does not exist in this project and region, is not Running, the alert’s measure is not one a Load Balancer of this type offers, or the alert could not be attached. errors is the reason.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 412,
"message": "Precondition Failed",
"data": {}
}