Pages

pages

Pages

Projects

pages.projects

Methods

Create Project -> Envelope<>
post/accounts/{account_id}/pages/projects

Create a new project.

Delete Project -> Envelope<unknown>
delete/accounts/{account_id}/pages/projects/{project_name}

Delete a project by name.

Update Project -> Envelope<>
patch/accounts/{account_id}/pages/projects/{project_name}

Set new attributes for an existing project. Modify environment variables. To delete an environment variable, set the key to null.

Security
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example: X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example: X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194

Parameters
account_id: string

Identifier

project_name: string

Name of the project.

Response fields
errors: Array<>
messages: Array<>
result:
success: false | true

Whether the API call was successful

Request example
200Example
Get Project -> Envelope<>
get/accounts/{account_id}/pages/projects/{project_name}

Fetch a project by name.

Get Projects -> SinglePage<>
get/accounts/{account_id}/pages/projects

Fetch a list of all user projects.

Purge Build Cache -> Envelope<unknown>
post/accounts/{account_id}/pages/projects/{project_name}/purge_build_cache

Purge all cached build artifacts for a Pages project

Domain types

Deployment = { id, aliases, build_config, 13 more... }
Project = { id, build_config, canonical_deployment, 8 more... }
Stage = { ended_on, name, started_on, 1 more... }
PagesProjects

Deployments

pages.projects.deployments

Methods

Create Deployment -> Envelope<>
post/accounts/{account_id}/pages/projects/{project_name}/deployments

Start a new deployment from production. The repository and account must have already been authorized on the Cloudflare Pages dashboard.

Delete Deployment -> Envelope<unknown>
delete/accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}

Delete a deployment.

Get Deployment Info -> Envelope<>
get/accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}

Fetch information about a deployment.

Get Deployments -> SinglePage<>
get/accounts/{account_id}/pages/projects/{project_name}/deployments

Fetch a list of project deployments.

Retry Deployment -> Envelope<>
post/accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}/retry

Retry a previous deployment.

Rollback Deployment -> Envelope<>
post/accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}/rollback

Rollback the production deployment to a previous deployment. You can only rollback to succesful builds on production.

pages.projects.deployments.history

pages.projects.deployments.history.logs

Methods

Get Deployment Logs -> Envelope<{ data, includes_container_logs, total }>
get/accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}/history/logs

Fetch deployment logs for a project.

pages.projects.domains

Methods

Add Domain -> Envelope<{ id, certificate_authority, created_on, 6 more... }>
post/accounts/{account_id}/pages/projects/{project_name}/domains

Add a new domain for the Pages project.

Delete Domain -> Envelope<unknown>
delete/accounts/{account_id}/pages/projects/{project_name}/domains/{domain_name}

Delete a Pages project's domain.

Patch Domain -> Envelope<{ id, certificate_authority, created_on, 6 more... }>
patch/accounts/{account_id}/pages/projects/{project_name}/domains/{domain_name}

Retry the validation status of a single domain.

Get Domain -> Envelope<{ id, certificate_authority, created_on, 6 more... }>
get/accounts/{account_id}/pages/projects/{project_name}/domains/{domain_name}

Fetch a single domain.

Get Domains -> SinglePage<{ id, certificate_authority, created_on, 6 more... }>
get/accounts/{account_id}/pages/projects/{project_name}/domains

Fetch a list of all domains associated with a Pages project.