Cloudflare.NET.Analytics
1.1.1
dotnet add package Cloudflare.NET.Analytics --version 1.1.1
NuGet\Install-Package Cloudflare.NET.Analytics -Version 1.1.1
<PackageReference Include="Cloudflare.NET.Analytics" Version="1.1.1" />
<PackageVersion Include="Cloudflare.NET.Analytics" Version="1.1.1" />
<PackageReference Include="Cloudflare.NET.Analytics" />
paket add Cloudflare.NET.Analytics --version 1.1.1
#r "nuget: Cloudflare.NET.Analytics, 1.1.1"
#:package Cloudflare.NET.Analytics@1.1.1
#addin nuget:?package=Cloudflare.NET.Analytics&version=1.1.1
#tool nuget:?package=Cloudflare.NET.Analytics&version=1.1.1
Cloudflare.NET SDK
An unofficial, strongly-typed .NET SDK for the Cloudflare API. Built with testability and maintainability in mind.
Documentation | Getting Started | API Reference
Packages
| Package | Description |
|---|---|
| Cloudflare.NET.Api | Core REST API client for Zones, DNS, Security, and R2 bucket management |
| Cloudflare.NET.R2 | High-level S3-compatible client for R2 object storage |
| Cloudflare.NET.Analytics | GraphQL client for Cloudflare Analytics API |
dotnet add package Cloudflare.NET.Api
dotnet add package Cloudflare.NET.R2 # Optional
dotnet add package Cloudflare.NET.Analytics # Optional
Example
// Register in Program.cs
builder.Services.AddCloudflareApiClient(builder.Configuration);
builder.Services.AddCloudflareR2Client(builder.Configuration);
// Inject and use
public class MyService(ICloudflareApiClient cf)
{
public async Task<DnsRecord?> FindRecordAsync(string zoneId, string hostname)
=> await cf.Zones.FindDnsRecordByNameAsync(zoneId, hostname);
}
Features
Strongly-typed API · Full IntelliSense with comprehensive XML documentation and proper nullability annotations
CI/CD Pipeline · Every commit triggers automated builds and tests; releases published automatically to NuGet
Resilience Built-in · Automatic retries, circuit breaker, rate limiting, and configurable timeouts via Polly
Multi-account Support · Named clients and keyed services for managing multiple Cloudflare accounts
Dependency Injection · First-class support for
Microsoft.Extensions.DependencyInjectionwithIHttpClientFactoryS3-Compatible R2 · Intelligent multipart uploads, presigned URLs, and automatic retry handling
Testable by Design · Integration tests against real Cloudflare APIs and unit tests for request/response validation
Get Started
<div align="center">
📚 Ready to dive in?
Explore the Full Documentation →
Comprehensive guides, configuration options, multi-account setup, and more.
</div>
API Coverage
| API Family | Features |
|---|---|
| Zones | DNS Records, Bulk Import/Export, Cache Purge, Zone Details, Custom Hostnames (SaaS) |
| Zone Security | IP Access Rules, Zone Lockdown, User-Agent Rules, WAF Rulesets |
| Accounts | R2 Buckets, R2 Custom Domains, R2 CORS, R2 Lifecycle Policies |
| Account Security | IP Access Rules, WAF Rulesets |
| R2 Client | Upload, Download, Multipart, Presigned URLs, Batch Delete |
| Analytics | GraphQL queries for traffic, security, and R2 metrics |
See API Coverage for full details and roadmap.
Supported Frameworks
| Package | .NET 8 | .NET 9 | .NET 10 | Strong Named |
|---|---|---|---|---|
| Cloudflare.NET.Api | ✅ | ✅ | ✅ | ✅ |
| Cloudflare.NET.R2 | ✅ | ✅ | ✅ | ✅ |
| Cloudflare.NET.Analytics | ✅ | ✅ | ✅ | ❌* |
*
Cloudflare.NET.Analyticscannot be strong-named because its dependency (GraphQL.Client) is not strong-named.
Contributing
We welcome contributions! Whether it's bug reports, feature requests, or code contributions.
License
This project is licensed under the Apache 2.0 License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Cloudflare.NET.Api (>= 1.3.2)
- GraphQL.Client (>= 6.1.0)
- GraphQL.Client.Serializer.SystemTextJson (>= 6.1.0)
-
net8.0
- Cloudflare.NET.Api (>= 1.3.2)
- GraphQL.Client (>= 6.1.0)
- GraphQL.Client.Serializer.SystemTextJson (>= 6.1.0)
-
net9.0
- Cloudflare.NET.Api (>= 1.3.2)
- GraphQL.Client (>= 6.1.0)
- GraphQL.Client.Serializer.SystemTextJson (>= 6.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.