Cloud Alerts
Create alert
post
/triggers/Create a Cloud Alert that watches a metric on a server and notifies you when it crosses your threshold.
Autorización
Authorization
Authorization*string
Bearer YOUR_API_TOKEN con un token de API. También vale la cabecera X-API-Key: YOUR_API_TOKEN.
Cuerpo de la petición
application/jsonObligatorio
project_id*integer
name*string
description?string | null
target_type*TriggerTargetType
Valores
"vps""baremetal""availability_group""object_storage_bucket""organization"target_id*string
metric_type*TriggerMetricType
Valores
"cpu""ram""disk""network_in""network_out""storage_size_gb""storage_egress_gb_month""storage_error_rate_5xx""storage_error_rate_403""storage_cost_month"operator*TriggerOperator
Valores
"gt""lt""gte""lte""eq"threshold*number
duration_seconds?integer
Por defecto
300cooldown_seconds?integer
Por defecto
600actions*array<TriggerActionCreate>
Propiedades (5)
action_type*TriggerActionType
Valores
"notify""destroy_vps""create_vps"notificator_id?string | null
Notificator ID. Required for the notify action.
config?record<string, any> | null
Required for the create_vps action: name, template_name, plan_name and location_name.
order?integer
Por defecto
0enabled?boolean
Por defecto
trueRespuestas
Successful Response
application/json
id*string
project_id*integer
name*string
description*string | null
target_type*TriggerTargetType
Valores
"vps""baremetal""availability_group""object_storage_bucket""organization"target_id*string
target_name?string | null
metric_type*TriggerMetricType
Valores
"cpu""ram""disk""network_in""network_out""storage_size_gb""storage_egress_gb_month""storage_error_rate_5xx""storage_error_rate_403""storage_cost_month"operator*TriggerOperator
Valores
"gt""lt""gte""lte""eq"threshold*number
duration_seconds*integer
cooldown_seconds*integer
status*TriggerStatus
Valores
"enabled""disabled""triggered""resolved"last_triggered_at*string | null
Formato
date-timelast_resolved_at*string | null
Formato
date-timecreated_at*string
Formato
date-timeupdated_at*string
Formato
date-timeactions?array<TriggerActionOut>
Propiedades (7)
id*string
action_type*TriggerActionType
Valores
"notify""destroy_vps""create_vps"notificator_id*string | null
config*record<string, any> | null
order*integer
enabled*boolean
created_at*string
Formato
date-time