Develop > API calls > Package APIs > Promote a package

Promote a package

Promote a package to the next lifecycle stage if no release gate definition exists for the current lifecycle stage. The out-of-the-box lifecycle stages are Development, Testing, Staging, and Production. Only one active package can be promoted to production at any point of time. If you want to promote another package to production, you must reject the package that is already in production and then promote the other package.

Once a package reaches production, it cannot be promoted further. A package in the rejected state cannot be promoted. Once a package is promoted to production, the entire design is locked to prevent further modification of the application design.

If a release gate definition exists for the current lifecycle stage, the package is not promoted instantly; instead it goes through the release gate actions that are defined. After executing the release gate, if the final status is successful, then the package moves to the next lifecycle stage.

URI Method Parameters Returns
http://[host]:[port]/csa/api/codar/app-package/{packageID}/promote POST
  • Package ID
  • comments

200 - updated
400 - bad request
404 - not found

Example

The following URL was sent:

https://localhost:8444/csa/api/codar/app-package/d05bb6ec-23bf-425a-9c90-240fbc8f99a9/promote

The following JSON was returned:

{
 "promotedToStage": "TESTING",
 "packageName": "Demo_package",
 "packageId": "d05bb6ec-23bf-425a-9c90-240fbc8f99a9" }

}