List Buckets
GET/accounts/{account_id}/r2/buckets
Lists a page of R2 buckets in the account and selected jurisdiction. Use the returned cursor to retrieve the next page.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
Accepted Permissions (at least one required)
List Buckets
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/r2/buckets \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
"string"
],
"result": {
"buckets": [
{
"creation_date": "creation_date",
"jurisdiction": "default",
"location": "apac",
"name": "example-bucket",
"storage_class": "Standard"
}
]
},
"success": true,
"result_info": {
"cursor": "1-JTdCJTIydiUyMiUzQTElMkMlMjJzdGFydEFmdGVyJTIyJTNBJTIyZGF2aWRwdWJsaWMlMjIlN0Q=",
"per_page": 20
}
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
"string"
],
"result": {
"buckets": [
{
"creation_date": "creation_date",
"jurisdiction": "default",
"location": "apac",
"name": "example-bucket",
"storage_class": "Standard"
}
]
},
"success": true,
"result_info": {
"cursor": "1-JTdCJTIydiUyMiUzQTElMkMlMjJzdGFydEFmdGVyJTIyJTNBJTIyZGF2aWRwdWJsaWMlMjIlN0Q=",
"per_page": 20
}
}