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-90c53be5-ffbd-47f4-b6b3-4b9ce9da71a7/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.eyJ1c2VyX2lkIjoidWFhLWlkLTIyNiIsImVtYWlsIjoiZW1haWwtMTYxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTMzMTA5ODF9.I0TpWpwAuQZzM-7nj2xWWZQPr-_8nsk1YIc9SR4Gk0Q
Content-Type: application/json
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-90c53be5-ffbd-47f4-b6b3-4b9ce9da71a7/processes/web/scale" -d '{
  "instances": 3,
  "memory_in_mb": 100,
  "disk_in_mb": 100
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIyNiIsImVtYWlsIjoiZW1haWwtMTYxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTMzMTA5ODF9.I0TpWpwAuQZzM-7nj2xWWZQPr-_8nsk1YIc9SR4Gk0Q" \
	-H "Content-Type: application/json" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "guid": "1b1703f9-4ba3-49b4-8b14-5bd1d95e7e77",
  "type": "web",
  "command": null,
  "instances": 3,
  "memory_in_mb": 100,
  "disk_in_mb": 100,
  "created_at": "2016-01-13T17:29:41Z",
  "updated_at": "2016-01-13T17:29:41Z",
  "links": {
    "self": {
      "href": "/v3/processes/1b1703f9-4ba3-49b4-8b14-5bd1d95e7e77"
    },
    "scale": {
      "href": "/v3/processes/1b1703f9-4ba3-49b4-8b14-5bd1d95e7e77/scale",
      "method": "PUT"
    },
    "app": {
      "href": "/v3/apps/guid-90c53be5-ffbd-47f4-b6b3-4b9ce9da71a7"
    },
    "space": {
      "href": "/v2/spaces/1f8ab5b3-d511-4f4f-935f-c23c3cbd6564"
    }
  }
}

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.032008
Content-Length: 626