HelipodDocs

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 environment object:

{ "id": "7f6e5d4c-3b2a-4190-8f7e-6d5c4b3a2910", "name": "staging", "projectId": "3b0cd5ac-ac26-4012-9b28-17466f73788c" }

Create an environment

POST/containers/projects/{projectId}/environments
Adds an empty environment to the project. Returns 201.

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

PATCH/containers/environments/{environmentId}
Takes { "name": "..." } with the same rules. Returns the environment object.

Delete an environment

DELETE/containers/environments/{environmentId}
Deletes an environment that has no services.

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.

Database branches

If the project has a database, an environment can also have its own database branch. See Branches.

On this page