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.eyJ1c2VyX2lkIjoidWFhLWlkLTgzIiwiZW1haWwiOiJlbWFpbC01NEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIucmVhZCIsImNsb3VkX2NvbnRyb2xsZXIud3JpdGUiXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDIyOTkwODY4fQ.fkGzPiyyABgDhArKk__HUeN9mJubOeAQuQtlll9Ndyg
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PATCH /v3/processes/0d7cfbd9-c2e6-4a2f-934c-beefaf14f0e5

Body

{
  "memory": 2555,
  "instances": 2,
  "disk_quota": 2048,
  "space_guid": "8014fdf6-1ae9-4ef7-b771-216265a2b260",
  "stack_guid": "db67099c-5ffb-4614-a677-11de17194579",
  "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/0d7cfbd9-c2e6-4a2f-934c-beefaf14f0e5" -d '{
  "memory": 2555,
  "instances": 2,
  "disk_quota": 2048,
  "space_guid": "8014fdf6-1ae9-4ef7-b771-216265a2b260",
  "stack_guid": "db67099c-5ffb-4614-a677-11de17194579",
  "state": "STARTED",
  "command": "X",
  "buildpack": "another-buildpack",
  "health_check_timeout": 70,
  "environment_json": {
    "foo": "bar"
  },
  "type": "worker"
}' -X PATCH \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTgzIiwiZW1haWwiOiJlbWFpbC01NEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIucmVhZCIsImNsb3VkX2NvbnRyb2xsZXIud3JpdGUiXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDIyOTkwODY4fQ.fkGzPiyyABgDhArKk__HUeN9mJubOeAQuQtlll9Ndyg" \
	-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: 4f77a5f9-10b6-498e-a41e-dc1687887cbe
Content-Length: 72
X-Content-Type-Options: nosniff

Status

200 OK

Body

{
  "guid": "0d7cfbd9-c2e6-4a2f-934c-beefaf14f0e5",
  "type": "worker"
}