Optional Parameters
stack_id
alert_name
Returns comprehensive details about the specified stack alert configuration.
Retrieves the alert settings including notification channels, thresholds, and current status for the specified alert type on the stack.
Common Alert Names:
- deployment_success: Deployment completed successfully
- deployment_failure: Deployment failed
- server_down: Server became unavailable
- server_up: Server became available
- scaling_complete: Auto-scaling operation completed
- backup_complete: Backup operation completed
Status Code | Description |
---|---|
200 | Success - Returns alert configuration details |
400 | Bad Request - Invalid alert name |
401 | Unauthorized - Authentication failed or missing OAuth token |
403 | Forbidden - OAuth token lacks required `public` scope |
404 | Not Found - Stack not found |
Request
curl -X GET \
"https://app.cloud66.com/api/3/stacks/:stack_id/alerts/:alert_name" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Response
{
"response": {
"name": "deployment_success",
"description": "Notifies when a deployment completes successfully",
"channels": [
{
"type": "email",
"enabled": true,
"recipients": [
"admin@example.com"
]
},
{
"type": "slack",
"enabled": true,
"webhook_url": "https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK"
}
],
"active": true,
"settings": {
"frequency": "immediate",
"threshold": 1
}
}
}
Optional Parameters
stack_id
Returns a collection of alert configurations for the specified stack.
Stack alerts provide notification capabilities for various stack events including deployments, server status changes, and system health monitoring. Each alert can be configured with multiple notification channels.
Available Alert Types:
- deployment_success: Deployment completed successfully
- deployment_failure: Deployment failed
- server_down: Server became unavailable
- server_up: Server became available
- scaling_complete: Auto-scaling operation completed
- backup_complete: Backup operation completed
Status Code | Description |
---|---|
200 | Success - Returns list of stack alert configurations |
401 | Unauthorized - Authentication failed or missing OAuth token |
403 | Forbidden - OAuth token lacks required `public` scope |
404 | Not Found - Stack not found |
Request
curl -X GET \
"https://app.cloud66.com/api/3/stacks/:stack_id/alerts" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Response
{
"response": [
{
"name": "deployment_success",
"description": "Notifies when a deployment completes successfully",
"channels": [
{
"type": "email",
"enabled": true,
"recipients": [
"admin@example.com"
]
},
{
"type": "slack",
"enabled": true,
"webhook_url": "https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK"
}
],
"active": true
},
{
"name": "server_down",
"description": "Notifies when a server goes down",
"channels": [
{
"type": "email",
"enabled": true,
"recipients": [
"ops@example.com",
"admin@example.com"
]
}
],
"active": true
}
]
}
Optional Parameters
stack_id
alerts
Updates multiple stack alert configurations in a single operation.
Modifies notification settings for specified alerts on the stack. Validates changes against business rules and permissions before applying updates.
Configurable Alert Types:
- deployment_success: Deployment completed successfully
- deployment_failure: Deployment failed
- server_down: Server became unavailable
- server_up: Server became available
- scaling_complete: Auto-scaling operation completed
- backup_complete: Backup operation completed
Channel Configuration:
- email: Recipients list with email addresses
- slack: Webhook URL for Slack integration
- webhook: Custom webhook endpoints
- sms: SMS notification settings
This endpoint allows updating multiple alert configurations simultaneously. Only specified alerts in the request will be modified - other existing alerts remain unchanged.
Status Code | Description |
---|---|
200 | Success - Alerts updated successfully |
400 | Bad Request - Invalid alert configuration or parameters |
401 | Unauthorized - Authentication failed or missing OAuth token |
403 | Forbidden - OAuth token lacks required `admin` scope |
422 | Unprocessable Entity - Validation errors in alert settings |
Request
curl -X PUT \
"https://app.cloud66.com/api/3/stacks/:stack_id/alerts" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Response
{
"response": {
"ok": true,
"message": "Alerts updated successfully"
}
}