Cloudflare R2 Table Management API
The Table Management API from Cloudflare R2 — 1 operation(s) for table management.
The Table Management API from Cloudflare R2 — 1 operation(s) for table management.
openapi: 3.0.3
info:
title: Cloudflare R2 Cloudflare Buckets Table Management API
description: Cloudflare API endpoints for managing R2 object storage buckets, objects, CORS, lifecycle policies, custom domains, event notifications, data catalog, and temporary credentials.
version: 4.0.0
termsOfService: https://www.cloudflare.com/website-terms/
contact:
name: Cloudflare Developer Docs
url: https://developers.cloudflare.com/r2/
servers:
- url: https://api.cloudflare.com/client/v4
description: Cloudflare API v4
tags:
- name: Table Management
paths:
/accounts/{account_id}/r2-catalog/{bucket_name}/namespaces/{namespace}/tables:
get:
description: 'Returns a list of tables in the specified namespace within an R2 catalog.
Supports pagination for efficient traversal of large table collections.
'
operationId: list-tables
parameters:
- description: Identifies the account.
in: path
name: account_id
required: true
schema:
$ref: '#/components/schemas/r2-data-catalog_account-id'
- description: Specifies the R2 bucket name.
in: path
name: bucket_name
required: true
schema:
$ref: '#/components/schemas/r2-data-catalog_bucket-name'
- description: 'The namespace identifier.
For nested namespaces, use %1F as separator (e.g., "bronze%1Fanalytics").
'
example: bronze
in: path
name: namespace
required: true
schema:
type: string
- description: 'Opaque pagination token from a previous response.
Use this to fetch the next page of results.
'
example: MSYxNzU5NzU2MTI4NTU2Njk2JjAxOTliOWEzLTkxMmUtN2ZhMS05YzllLTg5MTAxMGQzYTg0MQ
in: query
name: page_token
schema:
type: string
- description: 'Maximum number of tables to return per page.
Defaults to 100, maximum 1000.
'
example: 100
in: query
name: page_size
schema:
default: 100
maximum: 1000
minimum: 1
type: integer
- description: 'Whether to include table UUIDs in the response.
Set to true to receive the table_uuids array.
'
example: true
in: query
name: return_uuids
schema:
default: false
type: boolean
- description: 'Whether to include additional metadata (timestamps, locations).
When true, response includes created_at, updated_at, metadata_locations, and locations arrays.
'
example: true
in: query
name: return_details
schema:
default: false
type: boolean
responses:
'200':
content:
application/json:
example:
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
schema:
allOf:
- $ref: '#/components/schemas/r2-data-catalog_api-response-single'
- properties:
result:
$ref: '#/components/schemas/r2-data-catalog_table-list-response'
type: object
description: List of tables retrieved successfully.
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/r2-data-catalog_api-response-common-failure'
description: Bad request (e.g., invalid page_size, malformed namespace).
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/r2-data-catalog_api-response-common-failure'
description: Authentication failed.
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/r2-data-catalog_api-response-common-failure'
description: Forbidden.
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/r2-data-catalog_api-response-common-failure'
description: Catalog or namespace not found.
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/r2-data-catalog_api-response-common-failure'
description: Internal server error.
security:
- api_token: []
- api_email: []
api_key: []
summary: List tables in namespace
tags:
- Table Management
x-api-token-group:
- Workers R2 Data Catalog Write
- Workers R2 Data Catalog Read
components:
schemas:
r2-data-catalog_api-response-errors:
description: Contains errors if the API call was unsuccessful.
items:
properties:
code:
description: Specifies the error code.
type: integer
message:
description: Describes the error.
type: string
required:
- code
- message
type: object
type: array
r2-data-catalog_api-response-success:
description: Indicates whether the API call was successful.
example: true
type: boolean
r2-data-catalog_api-response-messages:
description: Contains informational messages.
items:
properties:
code:
description: Specifies the message code.
type: integer
message:
description: Contains the message text.
type: string
required:
- code
- message
type: object
type: array
r2-data-catalog_namespace-identifier:
description: 'Specifies the hierarchical namespace parts as an array of strings.
For example, ["bronze", "analytics"] represents the namespace "bronze.analytics".
'
example:
- bronze
- analytics
items:
type: string
maxItems: 16
minItems: 1
type: array
r2-data-catalog_table-details:
description: Contains table with metadata.
properties:
created_at:
description: Indicates the creation timestamp in ISO 8601 format.
format: date-time
nullable: true
type: string
identifier:
$ref: '#/components/schemas/r2-data-catalog_table-identifier'
location:
description: Specifies the base S3 URI for table storage location.
nullable: true
type: string
metadata_location:
description: Contains the S3 URI to table metadata file. Null for staged tables.
nullable: true
type: string
table_uuid:
description: Contains the UUID that persists across renames.
format: uuid
type: string
updated_at:
description: Shows the last update timestamp in ISO 8601 format. Null if never updated.
format: date-time
nullable: true
type: string
required:
- identifier
- table_uuid
type: object
r2-data-catalog_account-id:
description: Use this to identify the account.
example: 0123456789abcdef0123456789abcdef
pattern: ^[a-fA-F0-9]{32}$
type: string
r2-data-catalog_api-response-single:
properties:
errors:
$ref: '#/components/schemas/r2-data-catalog_api-response-errors'
messages:
$ref: '#/components/schemas/r2-data-catalog_api-response-messages'
success:
$ref: '#/components/schemas/r2-data-catalog_api-response-success'
required:
- success
- errors
- messages
type: object
r2-data-catalog_bucket-name:
description: Specifies the R2 bucket name.
example: my-data-bucket
maxLength: 63
minLength: 3
pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$
type: string
r2-data-catalog_api-response-common-failure:
properties:
errors:
items:
properties:
code:
type: integer
message:
type: string
type: object
minItems: 1
type: array
messages:
items:
type: object
type: array
success:
enum:
- false
type: boolean
type: object
r2-data-catalog_table-identifier:
description: Specifies a unique table identifier within a catalog.
properties:
name:
description: Specifies the table name.
example: events
type: string
namespace:
$ref: '#/components/schemas/r2-data-catalog_namespace-identifier'
required:
- namespace
- name
type: object
r2-data-catalog_table-list-response:
description: Contains the list of tables with optional pagination.
properties:
details:
description: 'Contains detailed metadata for each table when return_details is true.
Each object includes identifier, UUID, timestamps, and locations.
'
items:
$ref: '#/components/schemas/r2-data-catalog_table-details'
nullable: true
type: array
identifiers:
description: Lists tables in the namespace.
items:
$ref: '#/components/schemas/r2-data-catalog_table-identifier'
type: array
next_page_token:
description: 'Use this opaque token to fetch the next page of results.
A null or absent value indicates the last page.
'
example: MSYxNzU5NzU2MTI4NTU2Njk2JjAxOTliOWEzLTkxMmUtN2ZhMS05YzllLTg5MTAxMGQzYTg0MQ
nullable: true
type: string
table_uuids:
description: 'Contains UUIDs for each table when return_uuids is true.
The order corresponds to the identifiers array.
'
example:
- 0199b9a1-28a0-71e0-a73e-b0fc32c8468e
- 0199b9a1-3c74-7731-bf53-d8c67ead079d
items:
format: uuid
type: string
nullable: true
type: array
required:
- identifiers
type: object
securitySchemes:
api_email:
in: header
name: X-Auth-Email
type: apiKey
api_key:
in: header
name: X-Auth-Key
type: apiKey
api_token:
scheme: bearer
type: http
user_service_key:
in: header
name: X-Auth-User-Service-Key
type: apiKey