Alerts
Rules an environment is watched for, and the alerts they raise. Authentication, errors and limits are on the overview.
List alert channels
GET /api/v1/projects/{project_id}/environments/{environment_id}/alert-channels
Parameters
| Name | In | Type | Description |
|---|---|---|---|
project_id required | path | string | prj_ ID |
environment_id required | path | string | env_ ID |
Responses
| Status | Description | Body |
|---|---|---|
200 | Oldest first | AlertChannel[] |
401 | No API key, or it is invalid or revoked | Problem |
404 | No such environment, or no access | Problem |
429 | Over the key's rate limit; Retry-After says when to try again | Problem |
Create alert channel
POST /api/v1/projects/{project_id}/environments/{environment_id}/alert-channels
Parameters
| Name | In | Type | Description |
|---|---|---|---|
project_id required | path | string | prj_ ID |
environment_id required | path | string | env_ ID |
Request body
JSON, CreateAlertChannel.
| Field | Type | Description |
|---|---|---|
target | string | A member's email address, or the webhook's URL. |
type | ChannelType | Read after the caller's access is checked. |
Responses
| Status | Description | Body |
|---|---|---|
201 | Created; alerts opened from now on are sent to it | AlertChannel |
401 | No API key, or it is invalid or revoked | Problem |
403 | A viewer | Problem |
404 | No such environment, or no access | Problem |
409 | The environment already sends to it | Problem |
422 | Not a member's address, or not a public URL | Problem |
429 | Over the key's rate limit; Retry-After says when to try again | Problem |
Delete alert channel
DELETE /api/v1/projects/{project_id}/environments/{environment_id}/alert-channels/{alert_channel_id}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
project_id required | path | string | prj_ ID |
environment_id required | path | string | env_ ID |
alert_channel_id required | path | string | ach_ ID |
Responses
Test alert channel
POST /api/v1/projects/{project_id}/environments/{environment_id}/alert-channels/{alert_channel_id}/test
Send it a test notice.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
project_id required | path | string | prj_ ID |
environment_id required | path | string | env_ ID |
alert_channel_id required | path | string | ach_ ID |
Responses
List alert rules
GET /api/v1/projects/{project_id}/environments/{environment_id}/alert-rules
Parameters
| Name | In | Type | Description |
|---|---|---|---|
project_id required | path | string | prj_ ID |
environment_id required | path | string | env_ ID |
Responses
Create alert rule
POST /api/v1/projects/{project_id}/environments/{environment_id}/alert-rules
Parameters
| Name | In | Type | Description |
|---|---|---|---|
project_id required | path | string | prj_ ID |
environment_id required | path | string | env_ ID |
Request body
JSON, CreateAlertRule.
| Field | Type | Description |
|---|---|---|
destination_id | string | null | dst_ ID, for a destination rule; every destination when left out. |
enabled | boolean | null | |
kind | AlertKind | Read after the caller's access is checked, so an unknown kind is a 422 only for someone who may make rules. |
minutes | integer (int32) | null | Default 10 for destination_failing, 5 for verification_failures, 60 otherwise. |
source_id | string | null | src_ ID, for a source rule; every source when left out. |
threshold | integer (int32) | null | Default 10 for verification_failures, 1 for dead_letters, 80 for quota. |
Responses
| Status | Description | Body |
|---|---|---|
201 | Created; evaluated from the next minute | AlertRule |
401 | No API key, or it is invalid or revoked | Problem |
403 | A viewer | Problem |
404 | No such environment, or no access | Problem |
422 | An invalid subject, window or threshold | Problem |
429 | Over the key's rate limit; Retry-After says when to try again | Problem |
Delete alert rule
DELETE /api/v1/projects/{project_id}/environments/{environment_id}/alert-rules/{alert_rule_id}
The rule and its alerts.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
project_id required | path | string | prj_ ID |
environment_id required | path | string | env_ ID |
alert_rule_id required | path | string | alr_ ID |
Responses
Get alert rule
GET /api/v1/projects/{project_id}/environments/{environment_id}/alert-rules/{alert_rule_id}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
project_id required | path | string | prj_ ID |
environment_id required | path | string | env_ ID |
alert_rule_id required | path | string | alr_ ID |
Responses
Update alert rule
PATCH /api/v1/projects/{project_id}/environments/{environment_id}/alert-rules/{alert_rule_id}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
project_id required | path | string | prj_ ID |
environment_id required | path | string | env_ ID |
alert_rule_id required | path | string | alr_ ID |
Request body
JSON, UpdateAlertRule.
| Field | Type | Description |
|---|---|---|
enabled | boolean | null | |
minutes | integer (int32) | null | |
threshold | integer (int32) | null |
Responses
List alerts
GET /api/v1/projects/{project_id}/environments/{environment_id}/alerts
Parameters
| Name | In | Type | Description |
|---|---|---|---|
project_id required | path | string | prj_ ID |
environment_id required | path | string | env_ ID |
open | query | boolean | Only alerts still open. |
limit | query | integer (int64) | At most this many, 1 to 100; default 50. |