Deleting Environments
You can delete an environment to permanently remove its database and all associated configuration. This action cannot be undone.
Restrictions
Section titled “Restrictions”The following rules apply when deleting an environment:
- The
masterenvironment cannot be deleted. It serves as the root of your project and must always exist. - An environment with active child branches cannot be deleted. You must first delete or archive all child environments before removing a parent.
- An environment undergoing a merge cannot be deleted. Wait for the merge to complete or cancel it before attempting deletion.
What Happens During Deletion
Section titled “What Happens During Deletion”When you delete an environment, Archie Core performs a complete cleanup of all dedicated resources:
- Permanent Data Removal: The dedicated PostgreSQL database and all its associated security credentials are permanently deleted.
- Configuration Cleanup: All environment-specific settings — including file providers, authentication methods, and security policies (CORS, Rate Limits) — are removed from the project.
- API & Gateway Removal: Any custom API gateway routes and API management configurations scoped to the environment are decommissioned.
- Platform Unregistration: The environment is removed from the project hierarchy, and its context is no longer available across the platform.
GraphQL API
Section titled “GraphQL API”Mutation: deleteEnvironment
Section titled “Mutation: deleteEnvironment”mutation DeleteEnvironment($input: DeleteEnvironmentInput!) { deleteEnvironment(input: $input) { success message }}Variables:
{ "input": { "projectId": "f7e4a264-d659-4719-91e8-c2d74654e529", "environmentName": "staging" }}Response:
{ "data": { "deleteEnvironment": { "success": true, "message": "Environment deleted successfully" } }}