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

Deployments

Deployments represent updates to the running state of an environment.

Deployments are made by applying Deltas to a state defined by an existing deployment. The deployment to be based on is defined by the environment’s from_deploy property. This deployment is usually in the current environment but can be a different environment. If the deployment is from another environment, the state of that environment will be “cloned” into the current environment and a delta is optionally applied to it.

Deployment Definition object

The Deployment Definition object defines the delta to apply to the from_deploy deployment.

{
  "delta_id": "df1ad41807b0390a9b0eaf8688e1f5baece9d764",
  "comment": "Updated version of module-one to v0.3.1"
}
Parameter Description
delta_id [Optional] The ID of the delta that the deployment is based on.
comment [Optional] A user defined comment that can help explain the deployment to others.

Deployment object

{
  "id": "67f1619a57d",
  "delta_id": "df1ad41807b0390a9b0eaf8688e1f5baece9d764",
  "comment": "Updated version of module-one to v0.3.1",
  "env_id": "my-env",
  "status": "in progress",
  "status_changed_at": "2020-05-22T14:58:07Z",
  "from_id": "42d4b302fd3c",
  "created_at": "2020-05-22T14:58:07Z",
  "created_by": "[email protected]"
}
Parameter Description
id ID of the deployment. Unique within an application.
delta_id The ID of the delta that the deployment is based on.
comment An optional comment that can help explain the deployment to others.
env_id The environment that the deployment was run in.
status The current status of the deployment. It can be one of pending, in progress, succeeded or failed.
status_changed_at The time state changed to its current state.
from_id The deployment this deployment is derived from.
created_at A timestamp of when the deployment was created.
created_by The username of the user who created the deployment.

List deployments in an environment.

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

Lists all of the deployments that occurred in the specified environment. Deployments are ordered by the time made.

Parameters

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

Responses

Status Code Description
200 Possibly empty list of deployments.
404 Environment or app not found in the organization.

Starts a deployment in an environment.

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

Starts a new deployment in the specified environment. The supplied Delta is applied to the Set specified in the environment’s from_deploy property - or the null set if there is no from_deploy property.

Parameters

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

Request Body

DeploymentBase

Responses

Status Code Description
201 The deployment.
404 Environment or app not found in the organization.