Environments
Create, rename and delete the environments of a project.
An environment (production, staging, preview, ...) holds a set of services that reach each other over a private network. Each project starts with one; add more to run a copy of your app. Environments are listed with their project by GET /projects.
The same endpoints also answer at /api/projects/{projectId}/environments and /api/environments/{environmentId} for a key of any product, see Projects.
The environment object:
{ "id": "7f6e5d4c-3b2a-4190-8f7e-6d5c4b3a2910", "name": "staging", "projectId": "3b0cd5ac-ac26-4012-9b28-17466f73788c" }Create an environment
/containers/projects/{projectId}/environments201.Prop
Type
curl -X POST https://api.helipod.io/api/containers/projects/$PROJECT/environments \
-H "Authorization: Bearer hel_your_key" -H "Content-Type: application/json" \
-d '{ "name": "staging" }'A name the project already uses answers 409 ENVIRONMENT_EXISTS. A project key can add environments to its own project.
Rename an environment
/containers/environments/{environmentId}{ "name": "..." } with the same rules. Returns the environment object.Delete an environment
/containers/environments/{environmentId}Prop
Type
curl -X DELETE https://api.helipod.io/api/containers/environments/$ENV \
-H "Authorization: Bearer hel_your_key" -H "Content-Type: application/json" \
-d '{ "confirm": "staging" }'Returns { "id": "...", "deleted": true }. While it still has services the call answers 409 ENVIRONMENT_NOT_EMPTY: delete them first. A missing or wrong confirm answers 400 CONFIRMATION_REQUIRED.