edit-icon download-icon

Scale a service

Last Updated: Jan 09, 2018

Description

Scale the containers in a service to a specific number.

Request information

Request line (RequestLine)

  1. POST /services/{service_id}/scale HTTP/1.1

Request line parameter (URI Param)

Name Type Required? Description
service_id string Yes The service ID in the format of {project_name}_{service_name}.

Special request header (RequestHead)

None

Request body (RequestBody)

JSON object

  1. {
  2. "type": "string",
  3. "value": "int"
  4. }

Response information

Response line (ResponseLine)

  1. HTTP/1.1 200 OK

Special response header (ResponseHead)

None

Response body (ResponseBody)

None

Example

Request example

Change the number of containers in test_web service to three.

  1. POST /services/test_web/scale HTTP/1.1
  2. Content-Type: application/json
  3. {
  4. "type": "scale_to",
  5. "value": 3
  6. }

Return example

  1. HTTP/1.1 200 OK
Thank you! We've received your feedback.