cloudflare / cloudflare/cloudflare-rs
Add comprehensive Cloudflare Pages endpoint support
- Dominant language
- Rust
- Stars
- 316
- Forks
- 111
- PR merge metrics
- No merged PRs in 30d
Description
## 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
- [Cloudflare Pages Documentation](https://developers.cloudflare.com/pages/)
- [Cloudflare API Documentation](https://developers.cloudflare.com/api/)
- [Pages REST API Reference](https://developers.cloudflare.com/api/operations/pages-project-get-projects)
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.
Contributor guide
Assessment
This issue has not been assessed yet.