List namespaces in catalog
client.r2DataCatalog.namespaces.list(stringbucketName, NamespaceListParams { account_id, page_size, page_token, 3 more } params, RequestOptionsoptions?): NamespaceListResponse { namespaces, details, namespace_uuids, next_page_token }
GET/accounts/{account_id}/r2-catalog/{bucket_name}/namespaces
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.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
List namespaces in catalog
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
const namespaces = await client.r2DataCatalog.namespaces.list('my-data-bucket', {
account_id: '0123456789abcdef0123456789abcdef',
});
console.log(namespaces.namespace_uuids);{
"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"
}
}