Home
Version 3
Processes (Experimental) API

Processes (Experimental) API

Updating a Process

PATCH /v3/processes/:guid

Request

Route

PATCH /v3/processes/9d584f58-2ae0-4b85-9c7b-c2fdcd157b2b

Parameters

Name Description Valid Values Example Values
memory Amount of memory (MB) allocated to each instance
instances Number of instances
disk_quota Amount of disk space (MB) allocated to each instance
space_guid Guid of associated Space
stack_guid Guid of associated Stack
state Desired state of process
command Start command for process
buildpack Buildpack used to stage process
health_check_timeout Health check timeout for process
docker_image Name of docker image containing process
environment_json JSON key-value pairs for ENV variables
type Type of the process

Body

Name Description Default Valid Values Example Values
{
  "memory": 2555,
  "instances": 2,
  "disk_quota": 2048,
  "space_guid": "6f219852-0436-4d97-9353-62935eba337b",
  "stack_guid": "a63f1e83-3d86-4966-8ad1-10d848d072e6",
  "state": "STARTED",
  "command": "X",
  "buildpack": "another-buildpack",
  "health_check_timeout": 70,
  "environment_json": {
    "foo": "bar"
  },
  "type": "worker"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5OSIsImVtYWlsIjoiZW1haWwtMTMxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjc0ODA4NTJ9.wiBZanI-2g9DRCsODHf4XJpmW9shKcmY-Dk1OuYbIIA
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/processes/9d584f58-2ae0-4b85-9c7b-c2fdcd157b2b" -d '{
  "memory": 2555,
  "instances": 2,
  "disk_quota": 2048,
  "space_guid": "6f219852-0436-4d97-9353-62935eba337b",
  "stack_guid": "a63f1e83-3d86-4966-8ad1-10d848d072e6",
  "state": "STARTED",
  "command": "X",
  "buildpack": "another-buildpack",
  "health_check_timeout": 70,
  "environment_json": {
    "foo": "bar"
  },
  "type": "worker"
}' -X PATCH \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5OSIsImVtYWlsIjoiZW1haWwtMTMxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjc0ODA4NTJ9.wiBZanI-2g9DRCsODHf4XJpmW9shKcmY-Dk1OuYbIIA" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "guid": "9d584f58-2ae0-4b85-9c7b-c2fdcd157b2b",
  "type": "worker",
  "command": "X"
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: c1806cd2-8088-4a57-ab41-996724d67dd3
Content-Length: 90
X-Content-Type-Options: nosniff