List namespaces in catalog
Returns a list of namespaces in the specified R2 catalog. Supports hierarchical filtering and pagination for efficient traversal of large namespace hierarchies.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Accepted Permissions (at least one required)
Path Parameters
Query Parameters
Maximum number of namespaces to return per page. Defaults to 100, maximum 1000.
Opaque pagination token from a previous response. Use this to fetch the next page of results.
Parent namespace to filter by. Only returns direct children of this namespace. For nested namespaces, use %1F as separator (e.g., "bronze%1Fanalytics"). Omit this parameter to list top-level namespaces.
List namespaces in catalog
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/r2-catalog/$BUCKET_NAME/namespaces \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"{
"errors": [
{
"code": 0,
"message": "message"
}
],
"messages": [
{
"code": 0,
"message": "message"
}
],
"success": true,
"result": {
"namespaces": [
[
"bronze",
"analytics"
]
],
"details": [
{
"namespace": [
"bronze",
"analytics"
],
"namespace_uuid": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"created_at": "2019-12-27T18:11:19.117Z",
"updated_at": "2019-12-27T18:11:19.117Z"
}
],
"namespace_uuids": [
"0199b999-6869-7383-bb1f-d30e059d5326",
"0199b99b-2c88-73b3-8dbb-421e0e8f2757"
],
"next_page_token": "MSYxNzU5NzU1NTc4NTA0MTk0JjAxOTliOTliLTJjODgtNzNiMy04ZGJiLTQyMWUwZThmMjc1Nw"
}
}Returns Examples
{
"errors": [
{
"code": 0,
"message": "message"
}
],
"messages": [
{
"code": 0,
"message": "message"
}
],
"success": true,
"result": {
"namespaces": [
[
"bronze",
"analytics"
]
],
"details": [
{
"namespace": [
"bronze",
"analytics"
],
"namespace_uuid": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"created_at": "2019-12-27T18:11:19.117Z",
"updated_at": "2019-12-27T18:11:19.117Z"
}
],
"namespace_uuids": [
"0199b999-6869-7383-bb1f-d30e059d5326",
"0199b99b-2c88-73b3-8dbb-421e0e8f2757"
],
"next_page_token": "MSYxNzU5NzU1NTc4NTA0MTk0JjAxOTliOTliLTJjODgtNzNiMy04ZGJiLTQyMWUwZThmMjc1Nw"
}
}