Skip to main content
GET
/
cloud
/
v2
/
reservations
Python
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
billing_reservations = client.cloud.billing_reservations.list()
print(billing_reservations.count)
{
  "count": 1,
  "results": [
    {
      "active_billing_plan_id": 123,
      "active_overcommit": {
        "active_from": "2023-11-07T05:31:56Z",
        "plan_item_id": 666,
        "price_per_month": "<string>",
        "price_per_unit": "<string>",
        "price_total": "<string>",
        "subscription_id": 12344
      },
      "commit": {
        "active_from": "2023-11-07T05:31:56Z",
        "active_to": "2023-11-07T05:31:56Z",
        "price_per_month": "<string>",
        "price_per_unit": "<string>",
        "price_total": "<string>",
        "subscription_id": 123
      },
      "hardware_info": {
        "cpu": "2xIntel Xeon 8468",
        "disk": "8 x 3.84 TB NVMe",
        "ram": "2TB RAM"
      },
      "region_name": "<string>",
      "resource_count": 123,
      "resource_name": "<string>",
      "unit_name": "<string>",
      "unit_size_month": "<string>",
      "unit_size_total": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Query Parameters

metric_name
string

Metric name for the resource (e.g., 'bm1-hf-medium_min')

order_by
enum<string>
default:active_from.desc

Order by field and direction.

Available options:
active_from.asc,
active_from.desc,
active_to.asc,
active_to.desc
region_id
integer

Region for reservation

show_inactive
boolean
default:true

Include inactive commits in the response

Response

200 - application/json

OK

count
integer
required

Number of objects

Required range: x >= 0
results
BillingReservationV2ItemResponseSerializer · object[]
required

Objects