Skip to main content
GET
/
storage
/
v4
/
object_storages
/
{storage_id}
/
buckets
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
)
page = client.storage.object_storages.buckets.list(
    storage_id=0,
)
page = page.results[0]
print(page.storage_id)
{
  "count": 5,
  "results": [
    {
      "cors": {
        "allowed_origins": [
          "https://example.com",
          "*"
        ]
      },
      "lifecycle": {
        "expiration_days": 30
      },
      "name": "my-bucket",
      "policy": {
        "is_public": true
      },
      "storage_id": 123
    }
  ]
}

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

Path Parameters

storage_id
integer<int64>
required

Storage ID

Query Parameters

offset
integer<uint64>

Number of records to skip before beginning to return results

Required range: x >= 0
limit
integer<uint64>
default:10

Max number of records in response

Required range: 1 <= x <= 1000

Response

BucketListEndpointResV4

count
integer<int64>
required

Total number of buckets

Example:

5

results
BucketDetailResV4 Bucket with its current CORS, lifecycle, and access policy. Null sub-objects mean not configured. · object[]
required

The list of buckets with full configuration details