Update an application instance

Last Updated: Sep 12, 2017


Updates configurations of an application instance.

Request information

Request line (RequestLine)

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

Request line parameter (URI Param)

Name Type Required? Description
name string Yes Name of the application instance.

Special request header (RequestHead)

  1. Content-Type: application/json

Request body (RequestBody)

JSON object

  1. {
  2. "description": "string",
  3. "template": "string",
  4. "version": "string",
  5. "latest_image": true,
  6. "environment": {
  7. "key": "value",
  8. ...
  9. }
  10. }

Request body parsing

Name Type Required? Description
description string No Updated description.
template string Yes Updated Docker Compose yaml template, which must be encoded in JSON string.
version string No Updated application version. The new version must be different from the old version; otherwise, HTTP code 409 is returned.
latest_image bool No Whether to pull the latest image or not
environment map Environmental variable key/value pairs, used to replace the environment variables in the Compose template.

Response information

Response line (ResponseLine)

  1. HTTP/1.1 202 Accepted

Special response header (ResponseHead)


Response body (ResponseBody)



Request example

  1. POST /projects/test/update HTTP/1.1
  2. Content-Type: application/json
  3. {
  4. "description": "This is a test application",
  5. "template": "web:\r\n image: nginx",
  6. "version": "2.0",
  7. "latest_image": true,
  8. "environment": {
  9. "USER": "abc",
  10. "PWD": "newpwd"
  11. }
  12. }

Return example

  1. HTTP/1.1 202 Accepted
Thank you! We've received your feedback.