Usage
All operations require authentication.
Get current usageProduction
Returns the usage and price of the project for the current month, by resource type: hourly, monthly and per-unit resources.
Path parameters
Service name
Response
Hourly usage
Entry last update
Monthly usage
Usage dates (from/to)
Resource usage (billed per hour/minute/second/unit)
Total price
Example uses serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ cloud/ project/ {serviceName}/ usage/ current \
-H "authorization: Bearer $OVH_TOKEN"{ "hourlyUsage": { "instance": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "instanceId": "string", "quantity": { "unit": null, "value": null }, "resourceId": "string", "totalPrice": 0 } ], "quantity": { "unit": "GiB", "value": 0 }, "reference": "string", "region": "string", "savingsPlanIds": [ "string" ], "totalPrice": 0 } ], "instanceBandwidth": [ { "deploymentMode": "LOCAL-ZONE", "incomingBandwidth": { "quantity": { "unit": "GiB", "value": 0 }, "totalPrice": 0 }, "outgoingBandwidth": { "quantity": { "unit": "GiB", "value": 0 }, "totalPrice": 0 }, "region": "string", "totalPrice": 0 } ], "instanceOption": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "instanceId": "string", "quantity": { "unit": null, "value": null }, "totalPrice": 0 } ], "quantity": { "unit": "GiB", "value": 0 }, "reference": "string", "region": "string", "totalPrice": 0 } ], "managedKubernetesService": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "id": "string", "quantity": { "unit": null, "value": null }, "resourceId": "string", "totalPrice": { "currencyCode": null, "text": null, "value": null } } ], "quantity": { "unit": "GiB", "value": 0 }, "reference": "string", "region": "string", "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } } ], "quantum": { "notebook": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "id": null, "quantity": null, "resourceId": null, "totalPrice": null } ], "quantity": { "unit": "GiB", "value": 0 }, "reference": "string", "region": "string", "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } } ], "processingUnit": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "id": null, "quantity": null, "resourceId": null, "totalPrice": null } ], "quantity": { "unit": "GiB", "value": 0 }, "reference": "string", "region": "string", "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } } ] }, "rancher": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "quantity": { "unit": null, "value": null }, "rancherId": "string", "resourceId": "string", "totalPrice": { "currencyCode": null, "text": null, "value": null } } ], "quantity": { "unit": "GiB", "value": 0 }, "reference": "string", "region": "string", "savingsPlanIds": [ "string" ], "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } } ], "snapshot": [ { "deploymentMode": "LOCAL-ZONE", "instance": { "quantity": { "unit": "GiB", "value": 0 }, "totalPrice": 0 }, "region": "string", "totalPrice": 0, "volume": { "quantity": { "unit": "GiB", "value": 0 }, "totalPrice": 0 } } ], "storage": [ { "bucketName": "string", "deploymentMode": "LOCAL-ZONE", "incomingBandwidth": { "quantity": { "unit": "GiB", "value": 0 }, "resourceIds": [ "string" ], "totalPrice": 0 }, "incomingInternalBandwidth": { "quantity": { "unit": "GiB", "value": 0 }, "resourceIds": [ "string" ], "totalPrice": 0 }, "outgoingBandwidth": { "quantity": { "unit": "GiB", "value": 0 }, "resourceIds": [ "string" ], "totalPrice": 0 }, "outgoingInternalBandwidth": { "quantity": { "unit": "GiB", "value": 0 }, "resourceIds": [ "string" ], "totalPrice": 0 }, "region": "string", "retrievalFees": { "quantity": { "unit": "GiB", "value": 0 }, "resourceIds": [ "string" ], "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } }, "stored": { "quantity": { "unit": "GiB", "value": 0 }, "resourceIds": [ "string" ], "totalPrice": 0 }, "totalPrice": 0, "type": "pca" } ], "volume": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "quantity": { "unit": null, "value": null }, "resourceId": "string", "totalPrice": 0, "volumeId": "string" } ], "quantity": { "unit": "GiB", "value": 0 }, "region": "string", "totalPrice": 0, "type": "string" } ] }, "lastUpdate": "2024-01-01T12:00:00Z", "monthlyUsage": { "certification": [ { "details": [ { "activation": "2024-01-01T12:00:00Z", "totalPrice": 0 } ], "reference": "string", "totalPrice": 0 } ], "instance": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "activation": "2024-01-01T12:00:00Z", "instanceId": "string", "resourceId": "string", "totalPrice": 0 } ], "reference": "string", "region": "string", "totalPrice": 0 } ], "instanceOption": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "instanceId": "string", "totalPrice": 0 } ], "reference": "string", "region": "string", "totalPrice": 0 } ], "savingsPlan": [ { "details": [ { "id": "00000000-0000-0000-0000-000000000000", "period": { "from": null, "to": null }, "planName": "string", "size": 0, "totalPrice": { "currencyCode": null, "text": null, "value": null }, "unitPrice": { "currencyCode": null, "text": null, "value": null } } ], "flavor": "string", "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } } ] }, "period": { "from": "2024-01-01T12:00:00Z", "to": "2024-01-01T12:00:00Z" }, "resourcesUsage": [ { "resources": [ { "components": [ { "id": null, "name": null, "quantity": null, "resourceId": null, "totalPrice": null } ], "deploymentMode": "LOCAL-ZONE", "region": "string" } ], "totalPrice": 0, "type": "string" } ], "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 }}
Get usage forecastProduction
Returns the forecast usage and price of the project at the end of the current month, and the credits that can pay the next bill.
Path parameters
Service name
Response
Hourly forecast
Entry last update
Monthly forecast
Forecast dates (from/to)
Resource usage forecast (billed per hour/minute/second/unit)
Total price
Usable credit to pay next bill
Example uses serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ cloud/ project/ {serviceName}/ usage/ forecast \
-H "authorization: Bearer $OVH_TOKEN"{ "hourlyUsage": { "instance": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "instanceId": "string", "quantity": { "unit": null, "value": null }, "resourceId": "string", "totalPrice": 0 } ], "quantity": { "unit": "GiB", "value": 0 }, "reference": "string", "region": "string", "savingsPlanIds": [ "string" ], "totalPrice": 0 } ], "instanceBandwidth": [ { "deploymentMode": "LOCAL-ZONE", "incomingBandwidth": { "quantity": { "unit": "GiB", "value": 0 }, "totalPrice": 0 }, "outgoingBandwidth": { "quantity": { "unit": "GiB", "value": 0 }, "totalPrice": 0 }, "region": "string", "totalPrice": 0 } ], "instanceOption": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "instanceId": "string", "quantity": { "unit": null, "value": null }, "totalPrice": 0 } ], "quantity": { "unit": "GiB", "value": 0 }, "reference": "string", "region": "string", "totalPrice": 0 } ], "managedKubernetesService": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "id": "string", "quantity": { "unit": null, "value": null }, "resourceId": "string", "totalPrice": { "currencyCode": null, "text": null, "value": null } } ], "quantity": { "unit": "GiB", "value": 0 }, "reference": "string", "region": "string", "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } } ], "quantum": { "notebook": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "id": null, "quantity": null, "resourceId": null, "totalPrice": null } ], "quantity": { "unit": "GiB", "value": 0 }, "reference": "string", "region": "string", "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } } ], "processingUnit": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "id": null, "quantity": null, "resourceId": null, "totalPrice": null } ], "quantity": { "unit": "GiB", "value": 0 }, "reference": "string", "region": "string", "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } } ] }, "rancher": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "quantity": { "unit": null, "value": null }, "rancherId": "string", "resourceId": "string", "totalPrice": { "currencyCode": null, "text": null, "value": null } } ], "quantity": { "unit": "GiB", "value": 0 }, "reference": "string", "region": "string", "savingsPlanIds": [ "string" ], "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } } ], "snapshot": [ { "deploymentMode": "LOCAL-ZONE", "instance": { "quantity": { "unit": "GiB", "value": 0 }, "totalPrice": 0 }, "region": "string", "totalPrice": 0, "volume": { "quantity": { "unit": "GiB", "value": 0 }, "totalPrice": 0 } } ], "storage": [ { "bucketName": "string", "deploymentMode": "LOCAL-ZONE", "incomingBandwidth": { "quantity": { "unit": "GiB", "value": 0 }, "resourceIds": [ "string" ], "totalPrice": 0 }, "incomingInternalBandwidth": { "quantity": { "unit": "GiB", "value": 0 }, "resourceIds": [ "string" ], "totalPrice": 0 }, "outgoingBandwidth": { "quantity": { "unit": "GiB", "value": 0 }, "resourceIds": [ "string" ], "totalPrice": 0 }, "outgoingInternalBandwidth": { "quantity": { "unit": "GiB", "value": 0 }, "resourceIds": [ "string" ], "totalPrice": 0 }, "region": "string", "retrievalFees": { "quantity": { "unit": "GiB", "value": 0 }, "resourceIds": [ "string" ], "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } }, "stored": { "quantity": { "unit": "GiB", "value": 0 }, "resourceIds": [ "string" ], "totalPrice": 0 }, "totalPrice": 0, "type": "pca" } ], "volume": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "quantity": { "unit": null, "value": null }, "resourceId": "string", "totalPrice": 0, "volumeId": "string" } ], "quantity": { "unit": "GiB", "value": 0 }, "region": "string", "totalPrice": 0, "type": "string" } ] }, "lastUpdate": "2024-01-01T12:00:00Z", "monthlyUsage": { "certification": [ { "details": [ { "activation": "2024-01-01T12:00:00Z", "totalPrice": 0 } ], "reference": "string", "totalPrice": 0 } ], "instance": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "activation": "2024-01-01T12:00:00Z", "instanceId": "string", "resourceId": "string", "totalPrice": 0 } ], "reference": "string", "region": "string", "totalPrice": 0 } ], "instanceOption": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "instanceId": "string", "totalPrice": 0 } ], "reference": "string", "region": "string", "totalPrice": 0 } ], "savingsPlan": [ { "details": [ { "id": "00000000-0000-0000-0000-000000000000", "period": { "from": null, "to": null }, "planName": "string", "size": 0, "totalPrice": { "currencyCode": null, "text": null, "value": null }, "unitPrice": { "currencyCode": null, "text": null, "value": null } } ], "flavor": "string", "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } } ] }, "period": { "from": "2024-01-01T12:00:00Z", "to": "2024-01-01T12:00:00Z" }, "resourcesUsage": [ { "resources": [ { "components": [ { "id": null, "name": null, "quantity": null, "resourceId": null, "totalPrice": null } ], "deploymentMode": "LOCAL-ZONE", "region": "string" } ], "totalPrice": 0, "type": "string" } ], "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 }, "usableCredits": { "details": [ { "description": "string", "id": 0, "usedAmount": 0 } ], "totalCredit": 0 }}
Get savings plan consumptionProduction
Returns, for each flavor, the savings plan subscriptions, their coverage and utilization over time, and the amount saved. Filter by flavor, year and month.
Path parameters
Service name
Query parameters
Flavor to filter plans on
Month of the period to extract plans consumption
Year of the period to extract plans consumption
Response
List of consumption details by flavor
Requested period
Project ID of the fetched plans
Total savings for all the flavors
Example uses serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ cloud/ project/ {serviceName}/ usage/ plans \
-H "authorization: Bearer $OVH_TOKEN"{ "flavors": [ { "fees": { "flatFee": { "details": [ { "id": null, "period": null, "planName": null, "size": null, "totalPrice": null, "unitPrice": null } ], "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } }, "overQuota": { "ids": [ "00000000-0000-0000-0000-000000000000" ], "quantity": 0, "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 }, "unitPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } }, "savedAmount": { "currencyCode": "AUD", "text": "string", "value": 0 }, "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } }, "flavor": "string", "periods": [ { "begin": "2024-01-01T12:00:00Z", "consumptionSize": 0, "coverage": "string", "cumulPlanSize": 0, "end": "2024-01-01T12:00:00Z", "plansIds": [ "00000000-0000-0000-0000-000000000000" ], "resourceIds": [ "string" ], "utilization": "string" } ], "subscriptions": [ { "begin": "2024-01-01T12:00:00Z", "end": "2024-01-01T12:00:00Z", "id": "00000000-0000-0000-0000-000000000000", "size": 0 } ] } ], "period": { "from": "2024-01-01T12:00:00Z", "to": "2024-01-01T12:00:00Z" }, "projectId": "string", "totalSavings": { "currencyCode": "AUD", "text": "string", "value": 0 }}
Get a past usage periodProduction
Returns the usage and price of the project for one past period, by resource type.
Path parameters
Service name
Usage ID
Response
Hourly usage
Usage id
Entry last update
Monthly usage
Usage dates (from/to)
Resource usage (billed per hour/minute/second/unit)
Total price
Example uses serviceName = string, usageId = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ cloud/ project/ {serviceName}/ usage/ history/ {usageId} \
-H "authorization: Bearer $OVH_TOKEN"{ "hourlyUsage": { "instance": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "instanceId": "string", "quantity": { "unit": null, "value": null }, "resourceId": "string", "totalPrice": 0 } ], "quantity": { "unit": "GiB", "value": 0 }, "reference": "string", "region": "string", "savingsPlanIds": [ "string" ], "totalPrice": 0 } ], "instanceBandwidth": [ { "deploymentMode": "LOCAL-ZONE", "incomingBandwidth": { "quantity": { "unit": "GiB", "value": 0 }, "totalPrice": 0 }, "outgoingBandwidth": { "quantity": { "unit": "GiB", "value": 0 }, "totalPrice": 0 }, "region": "string", "totalPrice": 0 } ], "instanceOption": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "instanceId": "string", "quantity": { "unit": null, "value": null }, "totalPrice": 0 } ], "quantity": { "unit": "GiB", "value": 0 }, "reference": "string", "region": "string", "totalPrice": 0 } ], "managedKubernetesService": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "id": "string", "quantity": { "unit": null, "value": null }, "resourceId": "string", "totalPrice": { "currencyCode": null, "text": null, "value": null } } ], "quantity": { "unit": "GiB", "value": 0 }, "reference": "string", "region": "string", "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } } ], "quantum": { "notebook": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "id": null, "quantity": null, "resourceId": null, "totalPrice": null } ], "quantity": { "unit": "GiB", "value": 0 }, "reference": "string", "region": "string", "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } } ], "processingUnit": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "id": null, "quantity": null, "resourceId": null, "totalPrice": null } ], "quantity": { "unit": "GiB", "value": 0 }, "reference": "string", "region": "string", "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } } ] }, "rancher": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "quantity": { "unit": null, "value": null }, "rancherId": "string", "resourceId": "string", "totalPrice": { "currencyCode": null, "text": null, "value": null } } ], "quantity": { "unit": "GiB", "value": 0 }, "reference": "string", "region": "string", "savingsPlanIds": [ "string" ], "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } } ], "snapshot": [ { "deploymentMode": "LOCAL-ZONE", "instance": { "quantity": { "unit": "GiB", "value": 0 }, "totalPrice": 0 }, "region": "string", "totalPrice": 0, "volume": { "quantity": { "unit": "GiB", "value": 0 }, "totalPrice": 0 } } ], "storage": [ { "bucketName": "string", "deploymentMode": "LOCAL-ZONE", "incomingBandwidth": { "quantity": { "unit": "GiB", "value": 0 }, "resourceIds": [ "string" ], "totalPrice": 0 }, "incomingInternalBandwidth": { "quantity": { "unit": "GiB", "value": 0 }, "resourceIds": [ "string" ], "totalPrice": 0 }, "outgoingBandwidth": { "quantity": { "unit": "GiB", "value": 0 }, "resourceIds": [ "string" ], "totalPrice": 0 }, "outgoingInternalBandwidth": { "quantity": { "unit": "GiB", "value": 0 }, "resourceIds": [ "string" ], "totalPrice": 0 }, "region": "string", "retrievalFees": { "quantity": { "unit": "GiB", "value": 0 }, "resourceIds": [ "string" ], "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } }, "stored": { "quantity": { "unit": "GiB", "value": 0 }, "resourceIds": [ "string" ], "totalPrice": 0 }, "totalPrice": 0, "type": "pca" } ], "volume": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "quantity": { "unit": null, "value": null }, "resourceId": "string", "totalPrice": 0, "volumeId": "string" } ], "quantity": { "unit": "GiB", "value": 0 }, "region": "string", "totalPrice": 0, "type": "string" } ] }, "id": "string", "lastUpdate": "2024-01-01T12:00:00Z", "monthlyUsage": { "certification": [ { "details": [ { "activation": "2024-01-01T12:00:00Z", "totalPrice": 0 } ], "reference": "string", "totalPrice": 0 } ], "instance": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "activation": "2024-01-01T12:00:00Z", "instanceId": "string", "resourceId": "string", "totalPrice": 0 } ], "reference": "string", "region": "string", "totalPrice": 0 } ], "instanceOption": [ { "deploymentMode": "LOCAL-ZONE", "details": [ { "instanceId": "string", "totalPrice": 0 } ], "reference": "string", "region": "string", "totalPrice": 0 } ], "savingsPlan": [ { "details": [ { "id": "00000000-0000-0000-0000-000000000000", "period": { "from": null, "to": null }, "planName": "string", "size": 0, "totalPrice": { "currencyCode": null, "text": null, "value": null }, "unitPrice": { "currencyCode": null, "text": null, "value": null } } ], "flavor": "string", "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 } } ] }, "period": { "from": "2024-01-01T12:00:00Z", "to": "2024-01-01T12:00:00Z" }, "resourcesUsage": [ { "resources": [ { "components": [ { "id": null, "name": null, "quantity": null, "resourceId": null, "totalPrice": null } ], "deploymentMode": "LOCAL-ZONE", "region": "string" } ], "totalPrice": 0, "type": "string" } ], "totalPrice": { "currencyCode": "AUD", "text": "string", "value": 0 }}
List past usage periodsProduction
Returns the past usage periods of the project. Filter them with the from and to dates, then get the details of one period with its ID.
Path parameters
Service name
Query parameters
Filter results having date superior to from
Filter results having date inferior to
Response
Usage id
Entry last update
Usage dates (from/to)
Example uses serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ cloud/ project/ {serviceName}/ usage/ history \
-H "authorization: Bearer $OVH_TOKEN"[ { "id": "string", "lastUpdate": "2024-01-01T12:00:00Z", "period": { "from": "2024-01-01T12:00:00Z", "to": "2024-01-01T12:00:00Z" } }]
List project credits. Returns the IDs of the credits added to the project.Production
Path parameters
The project id
Response
Example uses serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ cloud/ project/ {serviceName}/ credit \
-H "authorization: Bearer $OVH_TOKEN"[ 0]
Get a project creditProduction
Get a project credit. Returns the total, used and available amounts of the credit, its validity period and the products it applies to.
Path parameters
Credit id
The project id
Response
Available credit
Credit bill id
Credit description
Credit id
Use credits on following products
Total credit
Used credit
Credit validity
Voucher code
Example uses id = 0, serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ cloud/ project/ {serviceName}/ credit/ {id} \
-H "authorization: Bearer $OVH_TOKEN"{ "available_credit": { "currencyCode": "AUD", "text": "string", "value": 0 }, "bill": "string", "description": "string", "id": 0, "products": [ "string" ], "total_credit": { "currencyCode": "AUD", "text": "string", "value": 0 }, "used_credit": { "currencyCode": "AUD", "text": "string", "value": 0 }, "validity": { "from": "2024-01-01T12:00:00Z", "to": "2024-01-01T12:00:00Z" }, "voucher": "string"}
Add a voucher credit. Adds the credit of a voucher code to the project.Production
Path parameters
The project id
Request body (required)
Voucher code
Response
Example uses serviceName = string
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ cloud/ project/ {serviceName}/ credit \
-H "authorization: Bearer $OVH_TOKEN"