Home
Version 3
Processes (Experimental) API

Processes (Experimental) API

Updating a Process

PATCH /v3/processes/:guid

Request

Route

PATCH /v3/processes/692bd236-240f-4819-9871-95823ae85cd7

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": "5b83d03e-d3cf-451f-93c7-6433b3b66268",
  "stack_guid": "cff65a93-c029-486b-b4a8-611a8ecb8be6",
  "state": "STARTED",
  "command": "X",
  "buildpack": "another-buildpack",
  "health_check_timeout": 70,
  "environment_json": {
    "foo": "bar"
  },
  "type": "worker"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwNiIsImVtYWlsIjoiZW1haWwtODVAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNjYzMzkwMH0.JBVWRpcseXVriLdNtcuwKEbYAvauVKcVCAC74tWpGgE
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/processes/692bd236-240f-4819-9871-95823ae85cd7" -d '{
  "memory": 2555,
  "instances": 2,
  "disk_quota": 2048,
  "space_guid": "5b83d03e-d3cf-451f-93c7-6433b3b66268",
  "stack_guid": "cff65a93-c029-486b-b4a8-611a8ecb8be6",
  "state": "STARTED",
  "command": "X",
  "buildpack": "another-buildpack",
  "health_check_timeout": 70,
  "environment_json": {
    "foo": "bar"
  },
  "type": "worker"
}' -X PATCH \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwNiIsImVtYWlsIjoiZW1haWwtODVAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNjYzMzkwMH0.JBVWRpcseXVriLdNtcuwKEbYAvauVKcVCAC74tWpGgE" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "guid": "692bd236-240f-4819-9871-95823ae85cd7",
  "type": "worker",
  "command": "X"
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: cf5216fc-9ce8-41af-a414-aabae3f462ec
Content-Length: 90
X-Content-Type-Options: nosniff