Updates the emails and slack webhook destinations for app alerts. Emails must be associated to a user with access to the app.
Name | Type | Required | Description | Default Value |
---|---|---|---|---|
app_id |
string | True | The app ID | |
alert_id |
string | True | The alert ID | |
body |
JSON or IO[bytes] | True |
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
req = {
"emails": ["[email protected]"],
"slack_webhooks": [
{
"url": "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX",
"channel": "Channel Name",
}
],
}
post_resp = client.apps.assign_alert_destinations("12345", "24556", req)
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.