Update the application configurations.

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


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

Request body explanation

Name Type Required Description
description string No The updated application description.
template string Yes The updated Compose yaml template, which must be escaped in the JSON format.
version string No The updated application version. The updated version must be different from the original version. Otherwise, HTTP code 409 is returned.
latest_image bool No Whether or not to pull the latest image.
environment map Environment variable Key/value used to replace the environment variable in the Compose template.

Response information

Response line (ResponseLine)

HTTP/1.1 202 Accepted

Special response header (ResponseHead)

None.

Response body (ResponseBody)

None.

Example

Request example

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

  "description": "This is a test 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