Skip to content

Usage

All operations require authentication.

8 operationsv1/cloud/project
Agent setup

Get current usageProduction

GET
/1.0/cloud/project/{serviceName}/usage/current

Returns the usage and price of the project for the current month, by resource type: hourly, monthly and per-unit resources.

Path parameters

serviceName
required
string

Service name

Response

200UsageCurrentsuccessful operation
hourlyUsage
read-only
HourlyResources

Hourly usage

lastUpdate
read-only
stringdate-time

Entry last update

monthlyUsage
read-only
MonthlyResources

Monthly usage

period
read-only
Period

Usage dates (from/to)

resourcesUsage
read-only
TypedResources[]

Resource usage (billed per hour/minute/second/unit)

totalPrice
read-only
Price

Total price

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/cloud/project/{serviceName}/usage/current \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "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

GET
/1.0/cloud/project/{serviceName}/usage/forecast

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

serviceName
required
string

Service name

Response

200UsageForecastsuccessful operation
hourlyUsage
read-only
HourlyResources

Hourly forecast

lastUpdate
read-only
stringdate-time

Entry last update

monthlyUsage
read-only
MonthlyResources

Monthly forecast

period
read-only
Period

Forecast dates (from/to)

resourcesUsage
read-only
TypedResources[]

Resource usage forecast (billed per hour/minute/second/unit)

totalPrice
read-only
Price

Total price

usableCredits
read-only
UsedCredits

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"
ResponseExample
{ "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

GET
/1.0/cloud/project/{serviceName}/usage/plans

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

serviceName
required
string

Service name

Query parameters

flavor
string

Flavor to filter plans on

month
integer

Month of the period to extract plans consumption

year
integer

Year of the period to extract plans consumption

Response

200PlanResponsesuccessful operation
flavors
read-only
Flavor[]

List of consumption details by flavor

period
read-only
Period

Requested period

projectId
read-only
string

Project ID of the fetched plans

totalSavings
read-only
Price

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"
ResponseExample
{ "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

GET
/1.0/cloud/project/{serviceName}/usage/history/{usageId}

Returns the usage and price of the project for one past period, by resource type.

Path parameters

serviceName
required
string

Service name

usageId
required
string

Usage ID

Response

200UsageHistoryDetailsuccessful operation
hourlyUsage
read-only
HourlyResources

Hourly usage

id
read-only
string

Usage id

lastUpdate
read-only
stringdate-time

Entry last update

monthlyUsage
read-only
MonthlyResources

Monthly usage

period
read-only
Period

Usage dates (from/to)

resourcesUsage
read-only
TypedResources[]

Resource usage (billed per hour/minute/second/unit)

totalPrice
read-only
Price

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"
ResponseExample
{ "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

GET
/1.0/cloud/project/{serviceName}/usage/history

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

serviceName
required
string

Service name

Query parameters

from
stringdate-time

Filter results having date superior to from

to
stringdate-time

Filter results having date inferior to

Response

200UsageHistory[]successful operation
id
read-only
string

Usage id

lastUpdate
read-only
stringdate-time

Entry last update

period
read-only
Period

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"
ResponseExample
[ { "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

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

Path parameters

serviceName
required
string

The project id

Response

200integer[]successful operation

Example uses serviceName = string

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

Get a project creditProduction

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

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

id
required
integer

Credit id

serviceName
required
string

The project id

Response

200Creditsuccessful operation
available_credit
read-only
Price

Available credit

bill
read-only
string

Credit bill id

description
read-only
string

Credit description

id
read-only
integer

Credit id

products
read-only
string[]

Use credits on following products

total_credit
read-only
Price

Total credit

used_credit
read-only
Price

Used credit

validity
read-only
VoucherValidity

Credit validity

voucher
read-only
string

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"
ResponseExample
{ "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

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

Path parameters

serviceName
required
string

The project id

Request body (required)

code
required
string

Voucher code

Response

200—successful operation

Example uses serviceName = string

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