Home
Version 3
Processes (Experimental) API

Processes (Experimental) API

Create a Docker 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

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMwOSIsImVtYWlsIjoiZW1haWwtMjM0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTY1MjY3MTV9.N5cFPAu4YlXYj-6ouU844Rr5nPq_2kJ4fl2aakhB0uI
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": "3cb88f07-a734-4f72-9cf3-ec48a939fd2a",
  "stack_guid": "6a9b7883-d373-485c-992f-7f8a23f7c951",
  "docker_image": "cloudfoundry/hello",
  "environment_json": {
    "CF_DIEGO_BETA": "true",
    "CF_DIEGO_RUN_BETA": "true"
  }
}

cURL

curl "https://api.[your-domain.com]/v3/processes" -d '{
  "name": "process",
  "memory": 256,
  "instances": 2,
  "disk_quota": 1024,
  "space_guid": "3cb88f07-a734-4f72-9cf3-ec48a939fd2a",
  "stack_guid": "6a9b7883-d373-485c-992f-7f8a23f7c951",
  "docker_image": "cloudfoundry/hello",
  "environment_json": {
    "CF_DIEGO_BETA": "true",
    "CF_DIEGO_RUN_BETA": "true"
  }
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMwOSIsImVtYWlsIjoiZW1haWwtMjM0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTY1MjY3MTV9.N5cFPAu4YlXYj-6ouU844Rr5nPq_2kJ4fl2aakhB0uI" \
	-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: bb5b3e7f-825d-47e2-b5e6-1bf3eb70e233
Content-Length: 52
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "guid": "2bcb6394-fede-41bc-9e3e-ea8df991dda9"
}