Delete a Deployment with the APC API

The examples on this page show common ways to use the APC API — they’re not a complete API reference. For the full, interactive API documentation for your installation, including every available query, mutation, and type, go to https://houston.<your-base-domain>/v1, and click on the Docs tab. See Develop and test APC API queries for more on using the built-in GraphQL explorer.

To delete a Deployment, you need:

  • Either System Admin or Workspace Admin permissions
  • A Deployment ID. To retrieve this value, run astro deployment list or request the id value in the workspaceDeployment query.

The following example mutation deletes a Deployment, then returns the ID of the Deployment to confirm that it was successfully deleted.

1mutation DeleteDeployment {
2 deleteDeployment (
3 deploymentUuid: "<deployment-id>"
4 ) {
5 id
6 }
7}