POST /v2/uptime/checks/{check_id}/alerts
To create an Uptime alert, send a POST request to /v2/uptime/checks/$CHECK_ID/alerts
specifying the attributes
in the table below in the JSON body.
Servers
- https://api.digitalocean.com
Path parameters
Name | Type | Required | Description |
---|---|---|---|
check_id |
String | Yes |
A unique identifier for a check. |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
id |
String | No |
A unique ID that can be used to identify and reference the alert. |
threshold |
Integer | No |
The threshold at which the alert will enter a trigger state. The specific threshold is dependent on the alert type. |
name |
String | Yes |
A human-friendly display name. |
comparison |
String | No |
The comparison operator used against the alert's threshold. Possible values:
|
period |
String | Yes |
Period of time the threshold must be exceeded to trigger the alert. Possible values:
|
type |
String | Yes |
The type of alert. Possible values:
|
notifications |
Object | Yes |
The notification settings for a trigger alert. |
notifications.slack[] |
Array | Yes |
Slack integration details. |
notifications.slack[].channel |
String | Yes |
Slack channel to notify of an alert trigger. |
notifications.slack[].url |
String | Yes |
Slack Webhook URL. |
notifications.email[] |
Array | Yes |
An email to notify on an alert trigger. The Email has to be one that is verified on that DigitalOcean account. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.