cURL
curl --request PATCH \ --url {schemes}://api.upsun.com/organizations/{organization_id}/alerts/subscriptions/{subscription_id}/usage \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "alerts": [ { "id": "<string>", "active": true, "config": { "threshold": 123 } } ] } '
{ "current": [ { "id": "<string>", "active": true, "alerts_sent": 123, "last_alert_at": "<string>", "updated_at": "<string>", "config": { "threshold": { "formatted": "<string>", "amount": 123, "unit": "<string>" } } } ], "available": [ { "id": "<string>", "active": true, "alerts_sent": 123, "last_alert_at": "<string>", "updated_at": "<string>", "config": { "threshold": { "formatted": "<string>", "amount": 123, "unit": "<string>" } } } ] }
Updates usage alerts for a subscription.
The ID of the organization. Prefix with name= to retrieve the organization by name instead.
The ID of the subscription.
The list of alerts to update.
Show child attributes
OK
The list of currently set usage alerts.
The list of available usage alerts.