The API is currently in beta. We are looking for feedback on both the API design itself and the documentation.

Environments

Environments are independent spaces where applications can run. An application is always deployed into an environment.

Environment object

{
  "id": "my-env",
  "name": "My Environment",
  "type": "development",
  "last_deploy": {
    ...
  },
  "from_deploy": {
    ...
  },
  "created_at": "2020-05-22T14:57:15Z",
  "created_by": "[email protected]"
}
Parameter Description
id ID of the app; is unique within an organization.
name Human-friendly name of the app.
type For example development, staging, or production.
last_deploy The last deployment to happen in the environment.
from_deploy The base to be used for the next deployment to the environment.
created_at A timestamp of when the app was created.
created_by The username of the user who created the app.

List all environments in an app.

GET /orgs/{orgId}/apps/{appId}/envs

Lists all of the environments that exist in the specified app.

Parameters

Parameter Description
orgId ID of the organization
appId ID of the app

Responses

Status Code Description
200 List of environments

Adds a new environment to an app.

POST /orgs/{orgId}/apps/{appId}/envs

Creates a new environment and adds it to the specified app.

Parameters

Parameter Description
orgId ID of the organization
appId ID of the app

Request Body

EnvironmentDefinition

Responses

Status Code Description
201 The environment just created.
409 The environment name already exists.

Gets a specific environment in an app.

GET /orgs/{orgId}/apps/{appId}/envs/{envId}

Lists all of the environments athat exists in the specified app.

Parameters

Parameter Description
orgId ID of the organization
appId ID of the app
envId ID of the environment

Responses

Status Code Description
200 Environment not found in the app.
404 The environment.

Delete an environment from an application.

DELETE /orgs/{orgId}/apps/{appId}/envs/{envId}

Permanently deletes an environment from the specified application. This operation cannot be undone.

Parameters

Parameter Description
orgId ID of the organization
appId ID of the app
envId ID of the environment

Responses

Status Code Description
204 Environment suscessfully deleted.
404 Environment not found in the organization.

Rebases the environment.

PUT /orgs/{orgId}/apps/{appId}/envs/{envId}/from_deploy_id

Changes the base of the environment to the specified deployment. The next deployment by delta will use the set of this deployment as its base.

Parameters

Parameter Description
orgId ID of the organization
appId ID of the app
envId ID of the environment

Request Body

Responses

Status Code Description
204 Environment successfully rebased.
404 Environment not found in the organization.