Home
Version 3
Processes (Experimental) API

Processes (Experimental) API

Create a Process

POST /v3/processes

Fields

Name Description Default Valid Values Example Values

Parameters

Name Description Valid Values Example Values
name Name of process
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.eyJ1c2VyX2lkIjoidWFhLWlkLTUzIiwiZW1haWwiOiJlbWFpbC0zNEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIucmVhZCIsImNsb3VkX2NvbnRyb2xsZXIud3JpdGUiXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI0NDcxNjg2fQ.Xw4kAJ7wWXWhk61nXogLxzHcrZ7AA3tcV-T9rcLBa94
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

POST /v3/processes

Body

{
  "name": "process",
  "memory": 256,
  "instances": 2,
  "disk_quota": 1024,
  "space_guid": "a1f0b90d-01d1-440e-a22a-e5df1db5db3a",
  "stack_guid": "6f81dd82-e132-4547-9b74-92663401c519",
  "state": "STOPPED",
  "command": "run me",
  "buildpack": "another-buildpack",
  "health_check_timeout": 70,
  "environment_json": {
    "foo": "bar"
  },
  "type": "worker"
}

cURL

curl "https://api.[your-domain.com]/v3/processes" -d '{
  "name": "process",
  "memory": 256,
  "instances": 2,
  "disk_quota": 1024,
  "space_guid": "a1f0b90d-01d1-440e-a22a-e5df1db5db3a",
  "stack_guid": "6f81dd82-e132-4547-9b74-92663401c519",
  "state": "STOPPED",
  "command": "run me",
  "buildpack": "another-buildpack",
  "health_check_timeout": 70,
  "environment_json": {
    "foo": "bar"
  },
  "type": "worker"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTUzIiwiZW1haWwiOiJlbWFpbC0zNEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIucmVhZCIsImNsb3VkX2NvbnRyb2xsZXIud3JpdGUiXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI0NDcxNjg2fQ.Xw4kAJ7wWXWhk61nXogLxzHcrZ7AA3tcV-T9rcLBa94" \
	-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: 9fcce17f-581e-4736-a5e5-be329144ac66
Content-Length: 95
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "guid": "1c8adc46-a3df-46d7-a105-bbb94dbba904",
  "type": "worker",
  "command": "run me"
}