Home
Version 3
Processes (Experimental) API

Processes (Experimental) API

Updating a Process

PATCH /v3/processes/:guid

Fields

Name Description Default Valid Values Example Values

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

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTg1IiwiZW1haWwiOiJlbWFpbC01NUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIucmVhZCIsImNsb3VkX2NvbnRyb2xsZXIud3JpdGUiXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDIyMzIzNTMzfQ.hOkGkIHM6gkv-CQGlp6kXRHEBNwV6mmmYvtrIZHmoEc
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PATCH /v3/processes/65a77114-ce2b-4e8c-acfc-a16f49fb2fc6

Body

{
  "memory": 2555,
  "instances": 2,
  "disk_quota": 2048,
  "space_guid": "56041dbd-599e-4202-85c2-e827ceae00a5",
  "stack_guid": "926e2758-3b96-47ac-95da-68d9a72cd443",
  "state": "STARTED",
  "command": "X",
  "buildpack": "another-buildpack",
  "health_check_timeout": 70,
  "environment_json": {
    "foo": "bar"
  },
  "type": "worker"
}

cURL

curl "https://api.[your-domain.com]/v3/processes/65a77114-ce2b-4e8c-acfc-a16f49fb2fc6" -d '{
  "memory": 2555,
  "instances": 2,
  "disk_quota": 2048,
  "space_guid": "56041dbd-599e-4202-85c2-e827ceae00a5",
  "stack_guid": "926e2758-3b96-47ac-95da-68d9a72cd443",
  "state": "STARTED",
  "command": "X",
  "buildpack": "another-buildpack",
  "health_check_timeout": 70,
  "environment_json": {
    "foo": "bar"
  },
  "type": "worker"
}' -X PATCH \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTg1IiwiZW1haWwiOiJlbWFpbC01NUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIucmVhZCIsImNsb3VkX2NvbnRyb2xsZXIud3JpdGUiXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDIyMzIzNTMzfQ.hOkGkIHM6gkv-CQGlp6kXRHEBNwV6mmmYvtrIZHmoEc" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: c1fe370d-19c1-4d28-93cf-dfe536f43f0c
Content-Length: 72
X-Content-Type-Options: nosniff

Status

200 OK

Body

{
  "guid": "65a77114-ce2b-4e8c-acfc-a16f49fb2fc6",
  "type": "worker"
}