Update an application in blue-green release.

Request information

Request line (RequestLine)

POST /projects/{name}/update HTTP/1.1

Request line parameter (URI Param)

Name  Type  Required Description 
name  string  Yes  Application name

Special request header (RequestHead)

Content-Type: application/json

Request body (RequestBody)

JSON object

    "update_method": "string",
    "description": "string",
    "template": "string",
    "version": "string",
    "latest_image": true,
    "environment": {
       "key": "value",

Request body explanation

Name  Type  Required Description 
update_method string Yes The update method of the application. Use blue-green as the string.
description string No  The description of the updated application.
template  string Yes The updated Docker Compose yaml template, which must be escaped in the JSON format.
version  string Yes The updated application version. The updated version must be different from the original version. Otherwise, the HTTP code 409 is returned.
latest_image bool  No  Set whether to pull the latest image.
environment map Environment variable Use key/value pairs to replace the environment variables in the Compose template.

Response information

Response line (ResponseLine)

HTTP/1.1 202 Accepted

Special response header (ResponseHead)


Response body (ResponseBody)



Request example 

POST /projects/test_01/update HTTP/1.1
Content-Type: application/json

  "update_method": "blue-green",
  "description": "This is a test_01 application",
  "template": "web:\r\n image: nginx",
  "version": "2.0",
  "latest_image": true,
  "environment": {
    "USER": "abc",
    "PWD": "newpwd"

Response example 

HTTP/1.1 202 Accepted