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-7212d464-c353-4cb0-9245-502826340677/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.eyJ1c2VyX2lkIjoidWFhLWlkLTExNSIsImVtYWlsIjoiZW1haWwtNzdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ1ODU5OTQyOX0.Jk90jxpX7_ARQbpPA31rJDtbzU-LrKkN7dfwXd3acMQ
Content-Type: application/json
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-7212d464-c353-4cb0-9245-502826340677/processes/web/scale" -d '{
  "instances": 3,
  "memory_in_mb": 100,
  "disk_in_mb": 100
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExNSIsImVtYWlsIjoiZW1haWwtNzdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ1ODU5OTQyOX0.Jk90jxpX7_ARQbpPA31rJDtbzU-LrKkN7dfwXd3acMQ" \
	-H "Content-Type: application/json" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "guid": "8bb3ca0f-fc6b-4d99-9325-fcfe11f362ee",
  "type": "web",
  "command": null,
  "instances": 3,
  "memory_in_mb": 100,
  "disk_in_mb": 100,
  "created_at": "2016-03-14T22:30:29Z",
  "updated_at": "2016-03-14T22:30:29Z",
  "links": {
    "self": {
      "href": "/v3/processes/8bb3ca0f-fc6b-4d99-9325-fcfe11f362ee"
    },
    "scale": {
      "href": "/v3/processes/8bb3ca0f-fc6b-4d99-9325-fcfe11f362ee/scale",
      "method": "PUT"
    },
    "app": {
      "href": "/v3/apps/guid-7212d464-c353-4cb0-9245-502826340677"
    },
    "space": {
      "href": "/v2/spaces/2fced657-e252-44ab-8f0c-0057b14bf62f"
    }
  }
}

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