Skip to content

Add comprehensive Cloudflare Pages endpoint support #280

@EmilLindfors

Description

@EmilLindfors

Summary

This issue requests the addition of comprehensive Cloudflare Pages endpoint support to cloudflare-rs. Currently, the library lacks Pages project and deployment management endpoints needed for full Pages operations.

Background

Cloudflare Pages is a JAMstack platform for deploying static sites and full-stack applications. While cloudflare-rs has extensive support for other Cloudflare services, it's missing Pages management functionality.

Missing Functionality

The following Pages API endpoints are currently not implemented:

Project Management

  • GET /accounts/{account_id}/pages/projects - List projects
  • POST /accounts/{account_id}/pages/projects - Create project
  • GET /accounts/{account_id}/pages/projects/{project_name} - Get project details
  • PATCH /accounts/{account_id}/pages/projects/{project_name} - Update project
  • DELETE /accounts/{account_id}/pages/projects/{project_name} - Delete project

Deployment Management

  • GET /accounts/{account_id}/pages/projects/{project_name}/deployments - List deployments
  • POST /accounts/{account_id}/pages/projects/{project_name}/deployments - Create deployment
  • POST /accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}/retry - Retry deployment
  • POST /accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}/rollback - Rollback deployment

Domain Management

  • GET /accounts/{account_id}/pages/projects/{project_name}/domains - List custom domains
  • POST /accounts/{account_id}/pages/projects/{project_name}/domains - Add custom domain
  • DELETE /accounts/{account_id}/pages/projects/{project_name}/domains/{domain_name} - Remove domain

Proposed Solution

Implement a complete pages endpoints module that provides:

  • Project Management: Full CRUD operations for Pages projects
  • Deployment Operations: Create, retry, rollback, and monitor deployments
  • Domain Management: Custom domain configuration and management
  • Build Configuration: Environment variables and build settings
  • API Specification Compliance: 100% compliance with official OpenAPI spec

Impact

This would enable developers to:

  • Manage Pages projects programmatically from Rust applications
  • Automate deployment workflows and CI/CD pipelines
  • Configure custom domains and build settings
  • Build complete static site management tools on Cloudflare's platform

References

I have a complete implementation ready following the same patterns as the D1 module, with full test coverage and spec compliance. Happy to submit a PR if this addition would be welcomed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions