Home
Version 3
Processes (Experimental) API

Processes (Experimental) API

Updating a Process

PATCH /v3/processes/:guid

Request

Route

PATCH /v3/processes/c3a6b995-d62e-4d0f-8145-42609ee9ed70

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": "59f40e4a-bc04-4203-a7f6-d36a8dad22f5",
  "stack_guid": "bab2dc2f-e9c2-4dbb-b866-51baba2c86fc",
  "state": "STARTED",
  "command": "X",
  "buildpack": "another-buildpack",
  "health_check_timeout": 70,
  "environment_json": {
    "foo": "bar"
  },
  "type": "worker"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTcwIiwiZW1haWwiOiJlbWFpbC00MUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIucmVhZCIsImNsb3VkX2NvbnRyb2xsZXIud3JpdGUiXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI5NjY0MTM0fQ.J76d4w19XEuq-I1OONPxFWvCqRsHQ_oguCTfdxdxwnk
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/processes/c3a6b995-d62e-4d0f-8145-42609ee9ed70" -d '{
  "memory": 2555,
  "instances": 2,
  "disk_quota": 2048,
  "space_guid": "59f40e4a-bc04-4203-a7f6-d36a8dad22f5",
  "stack_guid": "bab2dc2f-e9c2-4dbb-b866-51baba2c86fc",
  "state": "STARTED",
  "command": "X",
  "buildpack": "another-buildpack",
  "health_check_timeout": 70,
  "environment_json": {
    "foo": "bar"
  },
  "type": "worker"
}' -X PATCH \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTcwIiwiZW1haWwiOiJlbWFpbC00MUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIucmVhZCIsImNsb3VkX2NvbnRyb2xsZXIud3JpdGUiXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI5NjY0MTM0fQ.J76d4w19XEuq-I1OONPxFWvCqRsHQ_oguCTfdxdxwnk" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

200 OK

Body

{
  "guid": "c3a6b995-d62e-4d0f-8145-42609ee9ed70",
  "type": "worker",
  "command": "X",
  "created_at": "2015-04-15T00:55:34Z",
  "updated_at": "2015-04-15T00:55:34Z"
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 04426d6e-3ac1-4d04-a159-2d05f3974e2c
Content-Length: 170
X-Content-Type-Options: nosniff