Skip to content

Commit d24c710

Browse files
authored
r2 apis (#30653)
1 parent ce3c5fb commit d24c710

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

src/content/docs/r2/api/index.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
---
22
title: API
3-
description: Access R2 storage through the S3-compatible API or the Workers API.
3+
description: Access R2 storage through the S3-compatible API, Workers API, or Cloudflare REST API.
44
pcx_content_type: navigation
55
sidebar:
66
order: 6
7-
group:
8-
hideIndex: true
97
products:
108
- r2
119
---
1210

1311
import { DirectoryListing } from "~/components"
1412

15-
<DirectoryListing />
13+
R2 provides three API surfaces for interacting with your data:
14+
15+
- **[Workers API](/r2/api/workers/workers-api-reference/):** An in-Worker API accessed by binding an R2 bucket to a [Worker](/workers/). Use the Workers API to read, write, and list objects from within a Worker.
16+
- **[S3-compatible API](/r2/api/s3/api/):** An S3-compatible HTTP API available at `https://<ACCOUNT_ID>.r2.cloudflarestorage.com`. Use existing S3 SDKs and tools to interact with R2.
17+
- **[Cloudflare REST API](/api/resources/r2/):** The `api.cloudflare.com` REST API used by the Cloudflare Dashboard and Wrangler CLI. Supports bucket management and object operations. [Rate limits apply](/r2/platform/limits/#cloudflare-rest-api). Use the S3-compatible API or Workers API for high-throughput workloads.

src/content/docs/r2/platform/limits.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,9 @@ Managed public bucket access through an `r2.dev` subdomain is not intended for p
4444
- Bandwidth (throughput) may also be throttled when using the `r2.dev` endpoint.
4545

4646
For production use cases, connect a [custom domain](/r2/buckets/public-buckets/#custom-domains) to your bucket. Custom domains allow you to serve content from a domain you control (for example, `assets.example.com`), configure fine-grained caching, set up redirect and rewrite rules, mutate content via [Cloudflare Workers](/workers/), and get detailed URL-level analytics for content served from your R2 bucket.
47+
48+
## Cloudflare REST API
49+
50+
The [Cloudflare REST API](/api/resources/r2/) is rate limited to 1,200 requests per five minutes across all R2 REST API operations on your account.
51+
52+
For high-throughput object operations, use the [S3-compatible API](/r2/api/s3/api/) or [Workers API](/r2/api/workers/workers-api-reference/) instead. The Cloudflare REST API is best suited for lower-volume management and configuration operations.

0 commit comments

Comments
 (0)