Skip to content
Start here

List tables in namespace

client.R2DataCatalog.Namespaces.Tables.List(ctx, bucketName, namespace, params) (*NamespaceTableListResponse, error)
GET/accounts/{account_id}/r2-catalog/{bucket_name}/namespaces/{namespace}/tables

Returns a list of tables in the specified namespace within an R2 catalog. Supports pagination for efficient traversal of large table collections.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Workers R2 Data Catalog WriteWorkers R2 Data Catalog Read
ParametersExpand Collapse
bucketName string

Specifies the R2 bucket name.

maxLength63
minLength3
namespace string
params NamespaceTableListParams
AccountID param.Field[string]

Path param: Use this to identify the account.

PageSize param.Field[int64]Optional

Query param: Maximum number of tables to return per page. Defaults to 100, maximum 1000.

maximum1000
minimum1
PageToken param.Field[string]Optional

Query param: Opaque pagination token from a previous response. Use this to fetch the next page of results.

ReturnDetails param.Field[bool]Optional

Query param: Whether to include additional metadata (timestamps, locations). When true, response includes created_at, updated_at, metadata_locations, and locations arrays.

ReturnUUIDs param.Field[bool]Optional

Query param: Whether to include table UUIDs in the response. Set to true to receive the table_uuids array.

ReturnsExpand Collapse
type NamespaceTableListResponse struct{…}

Contains the list of tables with optional pagination.

Identifiers []NamespaceTableListResponseIdentifier

Lists tables in the namespace.

Name string

Specifies the table name.

Namespace []string

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

Details []NamespaceTableListResponseDetailOptional

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

Identifier NamespaceTableListResponseDetailsIdentifier

Specifies a unique table identifier within a catalog.

Name string

Specifies the table name.

Namespace []string

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

TableUUID string

Contains the UUID that persists across renames.

formatuuid
CreatedAt TimeOptional

Indicates the creation timestamp in ISO 8601 format.

formatdate-time
Location stringOptional

Specifies the base S3 URI for table storage location.

MetadataLocation stringOptional

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

UpdatedAt TimeOptional

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

formatdate-time
NextPageToken stringOptional

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

TableUUIDs []stringOptional

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

List tables in namespace

package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/cloudflare-go"
  "github.com/stainless-sdks/cloudflare-go/option"
  "github.com/stainless-sdks/cloudflare-go/r2_data_catalog"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  tables, err := client.R2DataCatalog.Namespaces.Tables.List(
    context.TODO(),
    "my-data-bucket",
    "bronze",
    r2_data_catalog.NamespaceTableListParams{
      AccountID: cloudflare.F("0123456789abcdef0123456789abcdef"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", tables.Identifiers)
}
{
  "errors": [],
  "messages": [],
  "result": {
    "details": [
      {
        "created_at": "2025-10-07T10:00:00Z",
        "identifier": {
          "name": "events",
          "namespace": [
            "bronze"
          ]
        },
        "location": "s3://my-bucket/__r2_data_catalog/wh-id/table-id/",
        "metadata_location": "s3://my-bucket/__r2_data_catalog/wh-id/table-id/metadata/v1.metadata.json",
        "table_uuid": "0199b9a1-28a0-71e0-a73e-b0fc32c8468e",
        "updated_at": "2025-10-07T15:00:00Z"
      },
      {
        "created_at": "2025-10-07T10:30:00Z",
        "identifier": {
          "name": "users",
          "namespace": [
            "bronze"
          ]
        },
        "location": "s3://my-bucket/__r2_data_catalog/wh-id/table-id-2/",
        "metadata_location": "s3://my-bucket/__r2_data_catalog/wh-id/table-id-2/metadata/v2.metadata.json",
        "table_uuid": "0199b9a1-3c74-7731-bf53-d8c67ead079d",
        "updated_at": "2025-10-07T16:00:00Z"
      }
    ],
    "identifiers": [
      {
        "name": "events",
        "namespace": [
          "bronze"
        ]
      },
      {
        "name": "users",
        "namespace": [
          "bronze"
        ]
      }
    ],
    "next_page_token": null,
    "table_uuids": [
      "0199b9a1-28a0-71e0-a73e-b0fc32c8468e",
      "0199b9a1-3c74-7731-bf53-d8c67ead079d"
    ]
  },
  "success": true
}
Returns Examples
{
  "errors": [],
  "messages": [],
  "result": {
    "details": [
      {
        "created_at": "2025-10-07T10:00:00Z",
        "identifier": {
          "name": "events",
          "namespace": [
            "bronze"
          ]
        },
        "location": "s3://my-bucket/__r2_data_catalog/wh-id/table-id/",
        "metadata_location": "s3://my-bucket/__r2_data_catalog/wh-id/table-id/metadata/v1.metadata.json",
        "table_uuid": "0199b9a1-28a0-71e0-a73e-b0fc32c8468e",
        "updated_at": "2025-10-07T15:00:00Z"
      },
      {
        "created_at": "2025-10-07T10:30:00Z",
        "identifier": {
          "name": "users",
          "namespace": [
            "bronze"
          ]
        },
        "location": "s3://my-bucket/__r2_data_catalog/wh-id/table-id-2/",
        "metadata_location": "s3://my-bucket/__r2_data_catalog/wh-id/table-id-2/metadata/v2.metadata.json",
        "table_uuid": "0199b9a1-3c74-7731-bf53-d8c67ead079d",
        "updated_at": "2025-10-07T16:00:00Z"
      }
    ],
    "identifiers": [
      {
        "name": "events",
        "namespace": [
          "bronze"
        ]
      },
      {
        "name": "users",
        "namespace": [
          "bronze"
        ]
      }
    ],
    "next_page_token": null,
    "table_uuids": [
      "0199b9a1-28a0-71e0-a73e-b0fc32c8468e",
      "0199b9a1-3c74-7731-bf53-d8c67ead079d"
    ]
  },
  "success": true
}