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.
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
Lists all R2 Super Slurper migration jobs for the account with their status.
Retrieves detailed status and configuration for a specific R2 Super Slurper migration job.
Creates a new R2 Super Slurper migration job to transfer objects from a source bucket (e.g. S3, GCS, R2) to R2.
Cancels all running R2 Super Slurper migration jobs for the account. Any objects in the middle of a transfer will finish, but no new objects will start transferring.
Cancels a specific R2 Super Slurper migration job. Any objects in the middle of a transfer will finish, but no new objects will start transferring.
Pauses a running R2 Super Slurper migration job. The job can be resumed later to continue transferring.
Retrieves current progress metrics for an R2 Super Slurper migration job
Resumes a paused R2 Super Slurper migration job, continuing the transfer from where it stopped.
r2.super_slurper.jobs.logs
Methods
Gets log entries for an R2 Super Slurper migration job, showing migration status changes, errors, etc.
Temporary Credentials
r2.temporary_credentials
Methods
Creates temporary access credentials on a bucket that can be optionally scoped to prefixes or objects.
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Account ID.
Whether the API call was successful.
Domain types