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-cc6f0823-7cbd-4d54-b11a-86a1877bca69/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.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMjgwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTQ0NTE2MzN9.VnyCFkHkoOWXIzR2RffPLKISCrOdPzAbZk3zoRCHMLQ
Content-Type: application/json
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-cc6f0823-7cbd-4d54-b11a-86a1877bca69/processes/web/scale" -d '{
  "instances": 3,
  "memory_in_mb": 100,
  "disk_in_mb": 100
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMjgwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTQ0NTE2MzN9.VnyCFkHkoOWXIzR2RffPLKISCrOdPzAbZk3zoRCHMLQ" \
	-H "Content-Type: application/json" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "guid": "4b9c7e7a-689d-4745-8d10-e9b821747416",
  "type": "web",
  "command": null,
  "instances": 3,
  "memory_in_mb": 100,
  "disk_in_mb": 100,
  "created_at": "2016-01-26T22:20:33Z",
  "updated_at": "2016-01-26T22:20:33Z",
  "links": {
    "self": {
      "href": "/v3/processes/4b9c7e7a-689d-4745-8d10-e9b821747416"
    },
    "scale": {
      "href": "/v3/processes/4b9c7e7a-689d-4745-8d10-e9b821747416/scale",
      "method": "PUT"
    },
    "app": {
      "href": "/v3/apps/guid-cc6f0823-7cbd-4d54-b11a-86a1877bca69"
    },
    "space": {
      "href": "/v2/spaces/15db41ec-b713-4683-bf33-932a82a55b42"
    }
  }
}

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