R2
r2
Buckets
r2.buckets
Methods
Lists all R2 buckets on your account.
Gets properties of an existing R2 bucket.
Creates a new R2 bucket.
Updates properties of an existing R2 bucket.
Deletes an existing R2 bucket.
Domain types
A single R2 bucket.
Methods
Get the CORS policy for a bucket.
Set the CORS policy for a bucket.
Delete the CORS policy for a bucket.
Methods
Gets a list of all custom domains registered with an existing R2 bucket.
Get the configuration for a custom domain on an existing R2 bucket.
Register a new custom domain for an existing R2 bucket.
Edit the configuration for a custom domain on an existing R2 bucket.
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Account ID.
Name of the bucket.
Name of the custom domain.
Jurisdiction where objects in this bucket are guaranteed to be stored.
Whether the API call was successful.
Remove custom domain registration from an existing R2 bucket.
Methods
Gets state of public access over the bucket's R2-managed (r2.dev) domain.
Updates state of public access over the bucket's R2-managed (r2.dev) domain.
Methods
List all event notification rules for a bucket.
Get a single event notification rule.
Create event notification rule.
Delete an event notification rule. If no body is provided, all rules for specified queue will be deleted.
Methods
Get object lifecycle rules for a bucket.
Set the object lifecycle rules for a bucket.
Methods
Gets configuration for Sippy for an existing R2 bucket.
Sets configuration for Sippy for an existing R2 bucket.
Disables Sippy on this bucket.
Domain types
Super Slurper
r2.super_slurper
r2.super_slurper.connectivity_precheck
Methods
Check whether tokens are valid against the source bucket
Check whether tokens are valid against the target bucket
r2.super_slurper.jobs
Methods
List jobs
Get job details
Create a job
Abort all jobs
Abort a job
Pause a job
Get job progress
Resume a job
r2.super_slurper.jobs.logs
Methods
Get job logs
Temporary Credentials
r2.temporary_credentials
Methods
Creates temporary access credentials on a bucket that can be optionally scoped to prefixes or objects.
Domain types