Skip to content

Alerting

All operations require authentication.

7 operationsv1/cloud/project
Agent setup

List billing alertsProduction

GET
/1.0/cloud/project/{serviceName}/alerting

Returns the IDs of the billing alerts configured on the project.

Path parameters

serviceName
required
string

Service name

Response

200string[]successful operation

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/cloud/project/{serviceName}/alerting \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ "00000000-0000-0000-0000-000000000000"]

Get a billing alertProduction

GET
/1.0/cloud/project/{serviceName}/alerting/{id}

Returns the configuration of the billing alert: threshold, service, receivers and status.

Path parameters

id
required
stringuuid

Id

serviceName
required
string

Service name

Response

200Alertingsuccessful operation
creationDate
read-only
stringdate-time

Creation date

delay
required
integer

Delay of the alert in seconds

email
string

Email. DEPRECATED: use emails

emails
string[]

Receiver of the alert

formattedMonthlyThreshold
read-only
Price

formatted monthly threshold

id
read-only
stringuuid

ID of the alert

monthlyThreshold
required
integer

Monthly threshold

name
string

Name of the alert

service
ServiceEnum

Service of the alert

Valuesai_endpointallblock_storagedata_platforminstancesinstances_gpuinstances_without_gpuobjet_storageranchersnapshot
status
read-only
StatusEnum

Status of the alert

Valuesdeleteddisabledok

Example uses id = 00000000-0000-0000-0000-000000000000, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/cloud/project/{serviceName}/alerting/{id} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "creationDate": "2024-01-01T12:00:00Z", "delay": 0, "email": "string", "emails": [ "string" ], "formattedMonthlyThreshold": { "currencyCode": "AUD", "priceInUcents": 0, "text": "string", "value": 0 }, "id": "00000000-0000-0000-0000-000000000000", "monthlyThreshold": 0, "name": "string", "service": "ai_endpoint", "status": "deleted"}

Create a billing alertProduction

POST
/1.0/cloud/project/{serviceName}/alerting

Creates a billing alert with a monthly threshold, for one service or for all services. Sends an email to the receivers when the monthly spend on the service exceeds the threshold. Use emails, as email is deprecated.

Path parameters

serviceName
required
string

Service name

Request body (required)

creationDate
read-only
stringdate-time

Creation date

delay
required
integer

Delay of the alert in seconds

email
string

Email. DEPRECATED: use emails

emails
string[]

Receiver of the alert

formattedMonthlyThreshold
read-only
Price

formatted monthly threshold

id
read-only
stringuuid

ID of the alert

monthlyThreshold
required
integer

Monthly threshold

name
string

Name of the alert

service
ServiceEnum

Service of the alert

Valuesai_endpointallblock_storagedata_platforminstancesinstances_gpuinstances_without_gpuobjet_storageranchersnapshot
status
read-only
StatusEnum

Status of the alert

Valuesdeleteddisabledok

Response

200Alertingsuccessful operation
creationDate
read-only
stringdate-time

Creation date

delay
required
integer

Delay of the alert in seconds

email
string

Email. DEPRECATED: use emails

emails
string[]

Receiver of the alert

formattedMonthlyThreshold
read-only
Price

formatted monthly threshold

id
read-only
stringuuid

ID of the alert

monthlyThreshold
required
integer

Monthly threshold

name
string

Name of the alert

service
ServiceEnum

Service of the alert

Valuesai_endpointallblock_storagedata_platforminstancesinstances_gpuinstances_without_gpuobjet_storageranchersnapshot
status
read-only
StatusEnum

Status of the alert

Valuesdeleteddisabledok

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/cloud/project/{serviceName}/alerting \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "creationDate": "2024-01-01T12:00:00Z", "delay": 0, "email": "string", "emails": [ "string" ], "formattedMonthlyThreshold": { "currencyCode": "AUD", "priceInUcents": 0, "text": "string", "value": 0 }, "id": "00000000-0000-0000-0000-000000000000", "monthlyThreshold": 0, "name": "string", "service": "ai_endpoint", "status": "deleted"}

Delete a billing alertProduction

DELETE
/1.0/cloud/project/{serviceName}/alerting/{id}

Deletes the billing alert configuration.

Path parameters

id
required
stringuuid

Id

serviceName
required
string

Service name

Response

200—successful operation

Example uses id = 00000000-0000-0000-0000-000000000000, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/cloud/project/{serviceName}/alerting/{id} \
  -H "authorization: Bearer $OVH_TOKEN"

Update a billing alertProduction

PUT
/1.0/cloud/project/{serviceName}/alerting/{id}

Updates the threshold, service, receivers, delay or status of the billing alert. Use emails, as email is deprecated.

Path parameters

id
required
stringuuid

Id

serviceName
required
string

Service name

Request body (required)

delay
integer

Delay of the alert in seconds

email
string

Email. DEPRECATED: use emails

emails
string[]

Receiver of the alert

monthlyThreshold
integer

Monthly threshold

name
string

Name of the alert

service
ServiceEnum

Service of the alert

Valuesai_endpointallblock_storagedata_platforminstancesinstances_gpuinstances_without_gpuobjet_storageranchersnapshot
status
StatusEnum

Status of the alert

Valuesdeleteddisabledok

Response

200—successful operation

Example uses id = 00000000-0000-0000-0000-000000000000, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/cloud/project/{serviceName}/alerting/{id} \
  -H "authorization: Bearer $OVH_TOKEN"

List sent alertsProduction

GET
/1.0/cloud/project/{serviceName}/alerting/{id}/alert

Returns the IDs of the alerts already sent for this billing alert.

Path parameters

id
required
stringuuid

Id

serviceName
required
string

Service name

Response

200integer[]successful operation

Example uses id = 00000000-0000-0000-0000-000000000000, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/cloud/project/{serviceName}/alerting/{id}/alert \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ 0]

Get a sent alertProduction

GET
/1.0/cloud/project/{serviceName}/alerting/{id}/alert/{alertId}

Returns when the alert was sent and to which email addresses.

Path parameters

alertId
required
integer

Alert ID

id
required
stringuuid

Id

serviceName
required
string

Service name

Response

200Alertsuccessful operation
alertDate
read-only
stringdate-time

Send date

alertId
read-only
integer

Alert ID

emails
read-only
string[]

Receivers of the alert

Example uses alertId = 0, id = 00000000-0000-0000-0000-000000000000, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/cloud/project/{serviceName}/alerting/{id}/alert/{alertId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "alertDate": "2024-01-01T12:00:00Z", "alertId": 0, "emails": [ "string" ]}