Skip to content
Start here

Namespaces

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
ModelsExpand Collapse
NamespaceListResponse { namespaces, details, namespace_uuids, next_page_token }

Contains the list of namespaces with optional pagination.

namespaces: Array<Array<string>>

Lists namespaces in the catalog.

details?: Array<Detail> | null

Contains detailed metadata for each namespace when return_details is true. Each object includes the namespace, UUID, and timestamps.

namespace: Array<string>

Specifies the hierarchical namespace parts as an array of strings. For example, [“bronze”, “analytics”] represents the namespace “bronze.analytics”.

namespace_uuid: string

Contains the UUID that persists across renames.

formatuuid
created_at?: string | null

Indicates the creation timestamp in ISO 8601 format.

formatdate-time
updated_at?: string | null

Shows the last update timestamp in ISO 8601 format. Null if never updated.

formatdate-time
namespace_uuids?: Array<string> | null

Contains UUIDs for each namespace when return_uuids is true. The order corresponds to the namespaces array.

next_page_token?: string | null

Use this opaque token to fetch the next page of results. A null or absent value indicates the last page.

NamespacesTables

List tables in namespace
client.r2DataCatalog.namespaces.tables.list(stringbucketName, stringnamespace, TableListParams { account_id, page_size, page_token, 2 more } params, RequestOptionsoptions?): TableListResponse { identifiers, details, next_page_token, table_uuids }
GET/accounts/{account_id}/r2-catalog/{bucket_name}/namespaces/{namespace}/tables
ModelsExpand Collapse
TableListResponse { identifiers, details, next_page_token, table_uuids }

Contains the list of tables with optional pagination.

identifiers: Array<Identifier>

Lists tables in the namespace.

name: string

Specifies the table name.

namespace: Array<string>

Specifies the hierarchical namespace parts as an array of strings. For example, [“bronze”, “analytics”] represents the namespace “bronze.analytics”.

details?: Array<Detail> | null

Contains detailed metadata for each table when return_details is true. Each object includes identifier, UUID, timestamps, and locations.

identifier: Identifier { name, namespace }

Specifies a unique table identifier within a catalog.

name: string

Specifies the table name.

namespace: Array<string>

Specifies the hierarchical namespace parts as an array of strings. For example, [“bronze”, “analytics”] represents the namespace “bronze.analytics”.

table_uuid: string

Contains the UUID that persists across renames.

formatuuid
created_at?: string | null

Indicates the creation timestamp in ISO 8601 format.

formatdate-time
location?: string | null

Specifies the base S3 URI for table storage location.

metadata_location?: string | null

Contains the S3 URI to table metadata file. Null for staged tables.

updated_at?: string | null

Shows the last update timestamp in ISO 8601 format. Null if never updated.

formatdate-time
next_page_token?: string | null

Use this opaque token to fetch the next page of results. A null or absent value indicates the last page.

table_uuids?: Array<string> | null

Contains UUIDs for each table when return_uuids is true. The order corresponds to the identifiers array.

NamespacesTablesMaintenance Configs

Get table maintenance configuration
client.r2DataCatalog.namespaces.tables.maintenanceConfigs.get(stringbucketName, stringnamespace, stringtableName, MaintenanceConfigGetParams { account_id } params, RequestOptionsoptions?): MaintenanceConfigGetResponse { maintenance_config }
GET/accounts/{account_id}/r2-catalog/{bucket_name}/namespaces/{namespace}/tables/{table_name}/maintenance-configs
Update table maintenance configuration
client.r2DataCatalog.namespaces.tables.maintenanceConfigs.update(stringbucketName, stringnamespace, stringtableName, MaintenanceConfigUpdateParams { account_id, compaction, snapshot_expiration } params, RequestOptionsoptions?): MaintenanceConfigUpdateResponse { compaction, snapshot_expiration }
POST/accounts/{account_id}/r2-catalog/{bucket_name}/namespaces/{namespace}/tables/{table_name}/maintenance-configs
ModelsExpand Collapse
MaintenanceConfigGetResponse { maintenance_config }

Contains table maintenance configuration.

maintenance_config: MaintenanceConfig { compaction, snapshot_expiration }

Configures maintenance for the table.

compaction?: Compaction { state, target_size_mb }

Configures compaction settings for table optimization.

state: "enabled" | "disabled"

Specifies the state of maintenance operations.

One of the following:
"enabled"
"disabled"
target_size_mb: "64" | "128" | "256" | "512"

Sets the target file size for compaction in megabytes. Defaults to “128”.

One of the following:
"64"
"128"
"256"
"512"
snapshot_expiration?: SnapshotExpiration { max_snapshot_age, min_snapshots_to_keep, state }

Configures snapshot expiration settings.

max_snapshot_age: string

Specifies the maximum age for snapshots. The system deletes snapshots older than this age. Format: where unit is d (days), h (hours), m (minutes), or s (seconds). Examples: “7d” (7 days), “48h” (48 hours), “2880m” (2,880 minutes). Defaults to “7d”.

min_snapshots_to_keep: number

Specifies the minimum number of snapshots to retain. Defaults to 100.

formatint64
minimum1
state: "enabled" | "disabled"

Specifies the state of maintenance operations.

One of the following:
"enabled"
"disabled"
MaintenanceConfigUpdateResponse { compaction, snapshot_expiration }

Configures maintenance for the table.

compaction?: Compaction { state, target_size_mb }

Configures compaction settings for table optimization.

state: "enabled" | "disabled"

Specifies the state of maintenance operations.

One of the following:
"enabled"
"disabled"
target_size_mb: "64" | "128" | "256" | "512"

Sets the target file size for compaction in megabytes. Defaults to “128”.

One of the following:
"64"
"128"
"256"
"512"
snapshot_expiration?: SnapshotExpiration { max_snapshot_age, min_snapshots_to_keep, state }

Configures snapshot expiration settings.

max_snapshot_age: string

Specifies the maximum age for snapshots. The system deletes snapshots older than this age. Format: where unit is d (days), h (hours), m (minutes), or s (seconds). Examples: “7d” (7 days), “48h” (48 hours), “2880m” (2,880 minutes). Defaults to “7d”.

min_snapshots_to_keep: number

Specifies the minimum number of snapshots to retain. Defaults to 100.

formatint64
minimum1
state: "enabled" | "disabled"

Specifies the state of maintenance operations.

One of the following:
"enabled"
"disabled"