Cloudflare::API::R2

NAME

Cloudflare::API::R2 - manage R2 buckets through Cloudflare's REST API

SYNOPSIS

my $r2=$api->r2();
my $bucket=$r2->create_bucket({ name => 'my-app-assets' });
my $page=$r2->list_buckets(full_response => 1);

DESCRIPTION

Bucket management uses the account ID on Cloudflare::API. This module does not transfer bucket objects; use R2's S3-compatible API for object operations.

METHODS

Every JSON method accepts full_response => 1. Bucket names are percent-encoded as path components. Create and update bodies must be hash references.

ERRORS

Missing account context, invalid names or bodies, HTTP and transport failures, and Cloudflare envelope failures cause exceptions as described in Cloudflare::API.

SEE ALSO

Cloudflare::API

AUTHOR

Andrew Speer andrew.speer@isolutions.com.au

LICENSE and COPYRIGHT

Copyright (c) 2026 Andrew Speer. This software is free software under the same terms as Perl 5.