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-698784cf-abaf-4307-a7fe-9be666fc45ab/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.eyJ1c2VyX2lkIjoidWFhLWlkLTM2NCIsImVtYWlsIjoiZW1haWwtMjY2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDk1MzE1MzV9.OAQ2zXEBm80HGzpJKG2CTSjk7zW9bMX_oU7-cs7RVJ0
Content-Type: application/json
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-698784cf-abaf-4307-a7fe-9be666fc45ab/processes/web/scale" -d '{
  "instances": 3,
  "memory_in_mb": 100,
  "disk_in_mb": 100
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM2NCIsImVtYWlsIjoiZW1haWwtMjY2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDk1MzE1MzV9.OAQ2zXEBm80HGzpJKG2CTSjk7zW9bMX_oU7-cs7RVJ0" \
	-H "Content-Type: application/json" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "guid": "54c350e7-32a9-4ce2-ba83-2014af53b5dc",
  "type": "web",
  "command": null,
  "instances": 3,
  "memory_in_mb": 100,
  "disk_in_mb": 100,
  "created_at": "2015-11-30T23:38:55Z",
  "updated_at": "2015-11-30T23:38:55Z",
  "links": {
    "self": {
      "href": "/v3/processes/54c350e7-32a9-4ce2-ba83-2014af53b5dc"
    },
    "scale": {
      "href": "/v3/processes/54c350e7-32a9-4ce2-ba83-2014af53b5dc/scale",
      "method": "PUT"
    },
    "app": {
      "href": "/v3/apps/guid-698784cf-abaf-4307-a7fe-9be666fc45ab"
    },
    "space": {
      "href": "/v2/spaces/f3efacaa-7594-47af-9e5b-45790f718584"
    }
  }
}

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
X-Runtime: 0.036121
Content-Length: 626