latestOpenAPI 3.0.02026-08-10221235717.8 KB

e21ad140ec3c

public
Deployment

Start a new Deployment.

At Humanitec, Deployments are defined as changes to the state of the Environment. The state can be changed by defining a set of desired changes to the current state via a Deployment Delta or by resetting the current state after a previous Deployment. (See Environment Rebase.) Both types of changes can be combined into a single Deployment during which the Delta is applied to the Rebased state.

When specifying a Delta, a Delta ID must be used. That Delta must have been committed to the Delta store prior to the Deployment.

A Set ID can also be defined in the deployment to force the state of the environment to a particular state. This will be ignored if the Delta is specified.

NOTE:

Directly setting a set_id in a deployment is not recommended as it will not record history of where the set came from. If the intention is to replicate an existing environment, use the environment rebasing approach described above.

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

Path parameters

orgIdstring required

The Organization ID.

appIdstring required

The Application ID.

envIdstring required

The Environment ID.

Request body

commentstring

An optional comment to help communicate the purpose of the Deployment.

delta_idstring

ID of the Deployment Delta describing the changes to the current Environment for this Deployment.

mode'full' | 'incremental'

The deployment mode. Must be "full" or "incremental". Defaults to "full" when absent. "incremental" is only valid in direct (non-legacy) mode.

set_idstring

ID of the Deployment Set describing the state of the Environment after Deployment.

value_set_version_idstring nullable

ID of the Value Set Version describe the values to be used for this Deployment.

Example request

{
  "comment": "Updated version of module-one to v0.3.1",
  "created_at": "2020-05-22T14:58:07Z",
  "created_by": "a.user@example.com",
  "delta_id": "df1ad41807b0390a9b0eaf8688e1f5baece9d764",
  "env_id": "my-env",
  "from_id": "42d4b302fd3c",
  "id": "67f1619a57d",
  "status": "in progress",
  "status_changed_at": "2020-05-22T14:59:01Z"
}

Response

A description of the Deployment.

commentstring required

An optional comment to help communicate the purpose of the Deployment.

created_atstring date-time required

The Timestamp of when the Deployment was initiated.

created_bystring required

The user who initiated the Deployment.

delta_idstring

ID of the Deployment Delta describing the changes to the current Environment for this Deployment.

env_idstring required

The Environment where the Deployment occurred.

export_filestring required
dependency_graph_idstring

The ID of the Dependency Graph which holds the sorted list of the resources provisioned with this deployment. The referenced Graph does not include resources of type k8s-cluster and k8s-namespace (and logging in case of deployments executed in Operator mode).

legacy_modeboolean

Defines if it's a Legacy Mode deployment, nil means either the mode is unknown or the deployment not yet finished.

operator_versionstring

The version of the Humanitec Operator that performed this Deployment. Only set in Operator Mode; nil if the version is unknown, could not be retrieved, or the Deployment has not yet finished.

modestring

The deployment mode. Either "full" or "incremental". "incremental" is only valid in direct (non-legacy) mode.

export_statusstring required
from_idstring required

The ID of the Deployment that this Deployment was based on.

idstring required

The ID of the Deployment.

set_idstring required

ID of the Deployment Set describing the state of the Environment after Deployment.

statusstring required

The current status of the Deployment. Can be pending, in progress, succeeded, or failed.

status_changed_atstring date-time required

The timestamp of the last status change. If status is succeeded or failed it it will indicate when the Deployment finished.

value_set_version_idstring nullable

ID of the Value Set Version describe the values to be used for this Deployment.

Example response

{
  "comment": "Updated version of module-one to v0.3.1",
  "created_at": "2020-05-22T14:58:07Z",
  "created_by": "a.user@example.com",
  "delta_id": "df1ad41807b0390a9b0eaf8688e1f5baece9d764",
  "env_id": "my-env",
  "from_id": "42d4b302fd3c",
  "id": "67f1619a57d",
  "status": "in progress",
  "status_changed_at": "2020-05-22T14:59:01Z"
}