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

Route

PATCH /v3/processes/319aa3a2-9a98-4924-adcf-27129987019e

Body

{
  "memory": 2555,
  "instances": 2,
  "disk_quota": 2048,
  "space_guid": "c30c6dae-c306-4b1f-ac32-d1b2d1251bd8",
  "stack_guid": "3ff8058e-9ae3-4744-8a30-526f203e21d6",
  "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/319aa3a2-9a98-4924-adcf-27129987019e" -d '{
  "memory": 2555,
  "instances": 2,
  "disk_quota": 2048,
  "space_guid": "c30c6dae-c306-4b1f-ac32-d1b2d1251bd8",
  "stack_guid": "3ff8058e-9ae3-4744-8a30-526f203e21d6",
  "state": "STARTED",
  "command": "X",
  "buildpack": "another-buildpack",
  "health_check_timeout": 70,
  "environment_json": {
    "foo": "bar"
  },
  "type": "worker"
}' -X PATCH \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTgiLCJlbWFpbCI6ImVtYWlsLThAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNDMxMDExOX0.8A4X47M5iJ02O9yL3fZcK6ZEWSLlF2INg76W1xZ5Sj8" \
	-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: dddfbb94-de28-4b69-95ef-7a4e62f16272
Content-Length: 90
X-Content-Type-Options: nosniff

Status

200 OK

Body

{
  "guid": "319aa3a2-9a98-4924-adcf-27129987019e",
  "type": "worker",
  "command": "X"
}