namespaces
Creates, updates, deletes, gets or lists a namespaces resource.
Overview
| Name | namespaces |
| Type | Resource |
| Id | cloudflare.r2_data_catalog.namespaces |
Fields
The following fields are returned by SELECT queries:
- list
List of namespaces retrieved successfully.
| Name | Datatype | Description |
|---|---|---|
details | array | Contains detailed metadata for each namespace when return_details is true. Each object includes the namespace, UUID, and timestamps. |
namespace_uuids | array | Contains UUIDs for each namespace when return_uuids is true. The order corresponds to the namespaces array. |
namespaces | array | Lists namespaces in the catalog. |
next_page_token | string | Use this opaque token to fetch the next page of results. A null or absent value indicates the last page. (example: MSYxNzU5NzU1NTc4NTA0MTk0JjAxOTliOTliLTJjODgtNzNiMy04ZGJiLTQyMWUwZThmMjc1Nw) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | account_id, bucket_name | page_token, page_size, parent, return_uuids, return_details | Returns a list of namespaces in the specified R2 catalog. Supports hierarchical filtering and pagination for efficient traversal of large namespace hierarchies. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
bucket_name | string | The R2 bucket name. |
page_size | integer | Maximum number of namespaces to return per page. Defaults to 100, maximum 1000. |
page_token | string | Opaque pagination token from a previous response. Use this to fetch the next page of results. |
parent | string | 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. |
return_details | boolean | Whether to include additional metadata (timestamps). When true, response includes created_at and updated_at arrays. |
return_uuids | boolean | Whether to include namespace UUIDs in the response. Set to true to receive the namespace_uuids array. |
SELECT examples
- list
Returns a list of namespaces in the specified R2 catalog. Supports hierarchical filtering and pagination for efficient traversal of large namespace hierarchies.
SELECT
details,
namespace_uuids,
namespaces,
next_page_token
FROM cloudflare.r2_data_catalog.namespaces
WHERE account_id = '{{ account_id }}' -- required
AND bucket_name = '{{ bucket_name }}' -- required
AND page_token = '{{ page_token }}'
AND page_size = '{{ page_size }}'
AND parent = '{{ parent }}'
AND return_uuids = '{{ return_uuids }}'
AND return_details = '{{ return_details }}'
;