curl --request POST \
--url https://api.gcore.com/cloud/v1/pricing/{region_id}/billing_reservation \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"has_windows": false,
"period": "MONTHS12",
"resources": [
{
"resource_name": "bm1-hf-medium",
"resource_type": "flavor",
"resource_value": 2
}
]
}'
{
"activity_period": "<string>",
"activity_period_length": 123,
"amount_prices": {
"commit_price_per_month": "<string>",
"commit_price_per_unit": "<string>",
"commit_price_total": "<string>",
"currency_code": "<string>",
"overcommit_price_per_month": "<string>",
"overcommit_price_per_unit": "<string>",
"overcommit_price_total": "<string>"
},
"price_status": "error",
"region_id": 123,
"region_name": "<string>",
"resources": [
{
"activity_period": "<string>",
"activity_period_length": 123,
"commit_price_per_month": "<string>",
"commit_price_per_unit": "<string>",
"commit_price_total": "<string>",
"overcommit_price_per_month": "<string>",
"overcommit_price_per_unit": "<string>",
"overcommit_price_total": "<string>",
"resource_name": "<string>",
"unit_name": "<string>",
"unit_size_month": "<string>",
"unit_size_total": "<string>"
}
]
}
Response all price features for reservation from active billing plat current user or use query filter.
For calculate discount of reservation compare price and over_commit_price
curl --request POST \
--url https://api.gcore.com/cloud/v1/pricing/{region_id}/billing_reservation \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"has_windows": false,
"period": "MONTHS12",
"resources": [
{
"resource_name": "bm1-hf-medium",
"resource_type": "flavor",
"resource_value": 2
}
]
}'
{
"activity_period": "<string>",
"activity_period_length": 123,
"amount_prices": {
"commit_price_per_month": "<string>",
"commit_price_per_unit": "<string>",
"commit_price_total": "<string>",
"currency_code": "<string>",
"overcommit_price_per_month": "<string>",
"overcommit_price_per_unit": "<string>",
"overcommit_price_total": "<string>"
},
"price_status": "error",
"region_id": 123,
"region_name": "<string>",
"resources": [
{
"activity_period": "<string>",
"activity_period_length": 123,
"commit_price_per_month": "<string>",
"commit_price_per_unit": "<string>",
"commit_price_total": "<string>",
"overcommit_price_per_month": "<string>",
"overcommit_price_per_unit": "<string>",
"overcommit_price_total": "<string>",
"resource_name": "<string>",
"unit_name": "<string>",
"unit_size_month": "<string>",
"unit_size_total": "<string>"
}
]
}
API key for authentication. Make sure to include the word apikey
, followed by a single space and then your token.
Example: apikey 1234$abcdef
Region ID
1
OK
The response is of type object
.
Was this page helpful?