Home
Version 3
Apps (Experimental) API

Apps (Experimental) API

Scaling a Process from its App

PUT /v3/apps/:guid/processes/:type/scale

Request

Route

PUT /v3/apps/guid-4b2de865-95a6-47a4-86af-0169ae6b9003/processes/web/scale

Body

Name Description Default Valid Values Example Values
instances Number of instances
memory_in_mb The memory in mb allocated per instance
disk_in_mb The disk in mb allocated per instance
{
  "instances": 3,
  "memory_in_mb": 100,
  "disk_in_mb": 100
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM0NyIsImVtYWlsIjoiZW1haWwtMjM3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE4MDl9.B267iGK8ArhD0Pdit4QKZK928bNBircPJAE9JklXXaY
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-4b2de865-95a6-47a4-86af-0169ae6b9003/processes/web/scale" -d '{
  "instances": 3,
  "memory_in_mb": 100,
  "disk_in_mb": 100
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM0NyIsImVtYWlsIjoiZW1haWwtMjM3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE4MDl9.B267iGK8ArhD0Pdit4QKZK928bNBircPJAE9JklXXaY" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "guid": "edc2dffe-9f0d-416f-a712-890d56de8bae",
  "type": "web",
  "command": null,
  "instances": 3,
  "memory_in_mb": 100,
  "disk_in_mb": 100,
  "created_at": "2015-07-27T22:43:29Z",
  "updated_at": "2015-07-27T22:43:29Z",
  "_links": {
    "self": {
      "href": "/v3/processes/edc2dffe-9f0d-416f-a712-890d56de8bae"
    },
    "scale": {
      "href": "/v3/processes/edc2dffe-9f0d-416f-a712-890d56de8bae/scale",
      "method": "PUT"
    },
    "app": {
      "href": "/v3/apps/guid-4b2de865-95a6-47a4-86af-0169ae6b9003"
    },
    "space": {
      "href": "/v2/spaces/baac2863-4fa7-4662-8c07-5645271640b9"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 6880e428-9606-4648-bd0f-51161e44500d
Content-Length: 627
X-Content-Type-Options: nosniff