Skip to content

Consumption

All operations require authentication.

3 operationsv1/me/consumption
Agent setup

Get on-going consumptions for all servicesProduction

GET
/1.0/me/consumption/usage/current

Response

200Transaction[]successful operation
beginDate
read-only
stringdate-time

Begin date

creationDate
read-only
stringdate-time

Creation date

elements
read-only
Element[]

List of product plan code consumption

endDate
read-only
stringdate-time

End date

id
read-only
integer

Transaction ID

lastUpdate
read-only
stringdate-time

Last update

price
read-only
Price

Consumption amount price

serviceId
read-only
integer

Service ID

Reads your token from $OVH_TOKEN

$ curl https://api.eu.ovhcloud.com/1.0/me/consumption/usage/current \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "beginDate": "2024-01-01T12:00:00Z", "creationDate": "2024-01-01T12:00:00Z", "elements": [ { "details": [ { "price": { "currencyCode": null, "text": null, "value": null, "valueInUcents": null }, "quantity": 0, "unique_id": "string" } ], "planCode": "string", "planFamily": "string", "price": { "currencyCode": "AUD", "text": "string", "value": 0, "valueInUcents": 0 }, "quantity": 0 } ], "endDate": "2024-01-01T12:00:00Z", "id": 0, "lastUpdate": "2024-01-01T12:00:00Z", "price": { "currencyCode": "AUD", "text": "string", "value": 0, "valueInUcents": 0 }, "serviceId": 0 }]

Get forecasted consumptions for all servicesProduction

GET
/1.0/me/consumption/usage/forecast

Response

200Transaction[]successful operation
beginDate
read-only
stringdate-time

Begin date

creationDate
read-only
stringdate-time

Creation date

elements
read-only
Element[]

List of product plan code consumption

endDate
read-only
stringdate-time

End date

id
read-only
integer

Transaction ID

lastUpdate
read-only
stringdate-time

Last update

price
read-only
Price

Consumption amount price

serviceId
read-only
integer

Service ID

Reads your token from $OVH_TOKEN

$ curl https://api.eu.ovhcloud.com/1.0/me/consumption/usage/forecast \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "beginDate": "2024-01-01T12:00:00Z", "creationDate": "2024-01-01T12:00:00Z", "elements": [ { "details": [ { "price": { "currencyCode": null, "text": null, "value": null, "valueInUcents": null }, "quantity": 0, "unique_id": "string" } ], "planCode": "string", "planFamily": "string", "price": { "currencyCode": "AUD", "text": "string", "value": 0, "valueInUcents": 0 }, "quantity": 0 } ], "endDate": "2024-01-01T12:00:00Z", "id": 0, "lastUpdate": "2024-01-01T12:00:00Z", "price": { "currencyCode": "AUD", "text": "string", "value": 0, "valueInUcents": 0 }, "serviceId": 0 }]

Get list of transactions between two datesProduction

GET
/1.0/me/consumption/usage/history

Query parameters

beginDate
required
stringdate-time

Begin date

endDate
required
stringdate-time

End date

Response

200Transaction[]successful operation
beginDate
read-only
stringdate-time

Begin date

creationDate
read-only
stringdate-time

Creation date

elements
read-only
Element[]

List of product plan code consumption

endDate
read-only
stringdate-time

End date

id
read-only
integer

Transaction ID

lastUpdate
read-only
stringdate-time

Last update

price
read-only
Price

Consumption amount price

serviceId
read-only
integer

Service ID

Reads your token from $OVH_TOKEN

$ curl https://api.eu.ovhcloud.com/1.0/me/consumption/usage/history \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "beginDate": "2024-01-01T12:00:00Z", "creationDate": "2024-01-01T12:00:00Z", "elements": [ { "details": [ { "price": { "currencyCode": null, "text": null, "value": null, "valueInUcents": null }, "quantity": 0, "unique_id": "string" } ], "planCode": "string", "planFamily": "string", "price": { "currencyCode": "AUD", "text": "string", "value": 0, "valueInUcents": 0 }, "quantity": 0 } ], "endDate": "2024-01-01T12:00:00Z", "id": 0, "lastUpdate": "2024-01-01T12:00:00Z", "price": { "currencyCode": "AUD", "text": "string", "value": 0, "valueInUcents": 0 }, "serviceId": 0 }]