How do I obtain the ClusterID for my Object Storage Bucket?
I'm trying to obtain a list of my bucket's contents via the Linode API using the endpoint in this section of the API documentation.
The documentation suggests that we need to provide a "clusterID" in the endpoint URL. While I know the name of my bucket, I don't know what the "clusterID" should be. How can I obtain this information?
1 Reply
This is a great question! One easy way to obtain the cluster IDs for all of the Object Storage buckets on your account would be to make an API call to the following endpoint:
This will return a list of the buckets that you currently own, and you’ll find the cluster ID for each bucket within the value of the cluster
field. Here’s an example for one of my buckets:
{
"cluster" : "eu-central-1",
"hostname" : "testbucket.eu-central-1.linodeobjects.com",
"label" : "testbucket",
"created" : "2020-06-24T18:30:16",
"size" : 1172962,
"objects" : 10
}
In this case, the clusterID
for this bucket would be eu-central-1
.
If you're just getting started with our API, you may want to check out the following guide:
It's also possible to interact with your Object Storage buckets via the Linode CLI (which is a wrapper around our API). Once you've installed and configured the CLI, you can run the following command to list a bucket's objects (replace $BucketLabel
with the name of your bucket):
linode-cli obj ls $BucketLabel
I hope this helps! :)