Skip to main content

namespaces

Creates, updates, deletes, gets or lists a namespaces resource.

Overview

Namenamespaces
TypeResource
Idcloudflare.r2_data_catalog.namespaces

Fields

The following fields are returned by SELECT queries:

List of namespaces retrieved successfully.

NameDatatypeDescription
detailsarrayContains detailed metadata for each namespace when return_details is true. Each object includes the namespace, UUID, and timestamps.
namespace_uuidsarrayContains UUIDs for each namespace when return_uuids is true. The order corresponds to the namespaces array.
namespacesarrayLists namespaces in the catalog.
next_page_tokenstringUse 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:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectaccount_id, bucket_namepage_token, page_size, parent, return_uuids, return_detailsReturns 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.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
bucket_namestringThe R2 bucket name.
page_sizeintegerMaximum number of namespaces to return per page. Defaults to 100, maximum 1000.
page_tokenstringOpaque pagination token from a previous response. Use this to fetch the next page of results.
parentstringParent 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_detailsbooleanWhether to include additional metadata (timestamps). When true, response includes created_at and updated_at arrays.
return_uuidsbooleanWhether to include namespace UUIDs in the response. Set to true to receive the namespace_uuids array.

SELECT examples

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 }}'
;