Sample - GitHub REST API
POST/repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel

Cancel a GitHub Pages deployment

Cancels a GitHub Pages deployment.

The authenticated user must have write permissions for the GitHub Pages site.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

3 parameters
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
pages_deployment_idintegerrequired
The ID of the Pages deployment. You can also give the commit SHA of the deployment.

2 status codes
204A header with no content is returned.
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 404 is returned: Resource not found.