Home / Resources / API Reference

Release - Promote

This API endpoint deploys a specific release version of a given project to specified environments or using specific lifecycle phase. If no release version is provided then Jaws Deploy will pick an existing release with the highest version number (according to SemVer 2.0 rules). In such case the specified project needs to have at least one release. Otherwise an error will occur.

This endpoint is especially useful in CI/CD scenarios, where the build server does not track Jaws Deploy release identifiers. In such case it is enough to provide only project ID and the environment name to promote the latest release.

Similar to Release - Deploy response contains unique identifier of the created deployment entity.

Release version comparison and sorting is based on SemVer 2.0. More information: Semantic Versioning 2.0.0 | Semantic Versioning (semver.org)

Request

Parameters
projectId
string
required
Unique identifier of the project to be promoted.
version
string
optional
Version number that should be promoted. When not specified - release with the highest version number will be used.
phaseName
string
optional
Name of the phase to be promoted. When this value is not provided then environments must be provided.
environmentName
string
obsolete
Obsolete. Use environments instead.
environments
array[string]
optional
List of environment names to promote the release to. When this value is not provided then phaseName must be provided.
redownloadPackages
boolean
optional
Instructs the deployment runner to force-download all required packages directly before executing the deployment, even if the packages are already present in the server’s package cache.
deploymentDateUnixMillis
number
optional
Deployment execution date. Allows postponing the deployment until a later date and time. Use Unix epoch time in milliseconds.
excludeStepNames
array[string]
optional
List of project step names that should be excluded in this deployment.
Request body

POST /release/promote
{
  "projectId": "139118d5-bcac-4c92-b1d1-da755d7e78ff",
  "version": "1.0.5-rc2",
  "phaseName": "First phase",
  "environmentName": "Staging",
  "environments": ["Staging", "UAT"],
  "redownloadPackages": false,
  "deploymentDateUnixMillis": 1744308919000,
  "excludeStepNames": ["step A", "step C"]
}

Response

Parameters
deploymentIds
array[string]
List of unique identifiers of created deployments. Use these IDs to fetch deployment logs and state.
Response body

{
  "deploymentIds": [
    "603af550-e241-4a3f-9545-5971c2f455ff",
    "603af550-e241-4a3f-9545-5971c2f45500"
  ]
}