Skip to content
Start here

Namespaces

List namespaces in catalog
r2_data_catalog.namespaces.list(strbucket_name, NamespaceListParams**kwargs) -> NamespaceListResponse
GET/accounts/{account_id}/r2-catalog/{bucket_name}/namespaces
ModelsExpand Collapse
class NamespaceListResponse:

Contains the list of namespaces with optional pagination.

namespaces: List[List[str]]

Lists namespaces in the catalog.

details: Optional[List[Detail]]

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

namespace: List[str]

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

namespace_uuid: str

Contains the UUID that persists across renames.

formatuuid
created_at: Optional[datetime]

Indicates the creation timestamp in ISO 8601 format.

formatdate-time
updated_at: Optional[datetime]

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

formatdate-time
namespace_uuids: Optional[List[str]]

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

next_page_token: Optional[str]

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
r2_data_catalog.namespaces.tables.list(strnamespace, TableListParams**kwargs) -> TableListResponse
GET/accounts/{account_id}/r2-catalog/{bucket_name}/namespaces/{namespace}/tables
ModelsExpand Collapse
class TableListResponse:

Contains the list of tables with optional pagination.

identifiers: List[Identifier]

Lists tables in the namespace.

name: str

Specifies the table name.

namespace: List[str]

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

details: Optional[List[Detail]]

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

identifier: DetailIdentifier

Specifies a unique table identifier within a catalog.

name: str

Specifies the table name.

namespace: List[str]

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

table_uuid: str

Contains the UUID that persists across renames.

formatuuid
created_at: Optional[datetime]

Indicates the creation timestamp in ISO 8601 format.

formatdate-time
location: Optional[str]

Specifies the base S3 URI for table storage location.

metadata_location: Optional[str]

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

updated_at: Optional[datetime]

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

formatdate-time
next_page_token: Optional[str]

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

table_uuids: Optional[List[str]]

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

NamespacesTablesMaintenance Configs

Get table maintenance configuration
r2_data_catalog.namespaces.tables.maintenance_configs.get(strtable_name, MaintenanceConfigGetParams**kwargs) -> MaintenanceConfigGetResponse
GET/accounts/{account_id}/r2-catalog/{bucket_name}/namespaces/{namespace}/tables/{table_name}/maintenance-configs
Update table maintenance configuration
r2_data_catalog.namespaces.tables.maintenance_configs.update(strtable_name, MaintenanceConfigUpdateParams**kwargs) -> MaintenanceConfigUpdateResponse
POST/accounts/{account_id}/r2-catalog/{bucket_name}/namespaces/{namespace}/tables/{table_name}/maintenance-configs
ModelsExpand Collapse
class MaintenanceConfigGetResponse:

Contains table maintenance configuration.

maintenance_config: MaintenanceConfig

Configures maintenance for the table.

compaction: Optional[MaintenanceConfigCompaction]

Configures compaction settings for table optimization.

state: Literal["enabled", "disabled"]

Specifies the state of maintenance operations.

One of the following:
"enabled"
"disabled"
target_size_mb: Literal["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: Optional[MaintenanceConfigSnapshotExpiration]

Configures snapshot expiration settings.

max_snapshot_age: str

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: int

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

formatint64
minimum1
state: Literal["enabled", "disabled"]

Specifies the state of maintenance operations.

One of the following:
"enabled"
"disabled"
class MaintenanceConfigUpdateResponse:

Configures maintenance for the table.

compaction: Optional[Compaction]

Configures compaction settings for table optimization.

state: Literal["enabled", "disabled"]

Specifies the state of maintenance operations.

One of the following:
"enabled"
"disabled"
target_size_mb: Literal["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: Optional[SnapshotExpiration]

Configures snapshot expiration settings.

max_snapshot_age: str

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: int

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

formatint64
minimum1
state: Literal["enabled", "disabled"]

Specifies the state of maintenance operations.

One of the following:
"enabled"
"disabled"