Create a Docker Process
POST /v3/processes
Request
Route
POST /v3/processes
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
|
|
|
Body
Name |
Description |
Default |
Valid Values |
Example Values |
{
"name": "process",
"memory": 256,
"instances": 2,
"disk_quota": 1024,
"space_guid": "23883b84-8e29-4e2b-9c7f-4302a21158b2",
"stack_guid": "e09d4ea1-c99f-4ae4-a8d3-ad81986b8800",
"state": "STOPPED",
"command": "run me",
"buildpack": null,
"health_check_timeout": 70,
"docker_image": "cloudfoundry/hello",
"environment_json": {
"foo": "bar"
},
"type": "worker"
}
Headers
cURL
curl "https://api.[your-domain.com]/v3/processes" -d '{
"name": "process",
"memory": 256,
"instances": 2,
"disk_quota": 1024,
"space_guid": "23883b84-8e29-4e2b-9c7f-4302a21158b2",
"stack_guid": "e09d4ea1-c99f-4ae4-a8d3-ad81986b8800",
"state": "STOPPED",
"command": "run me",
"buildpack": null,
"health_check_timeout": 70,
"docker_image": "cloudfoundry/hello",
"environment_json": {
"foo": "bar"
},
"type": "worker"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwMCIsImVtYWlsIjoiZW1haWwtMTMxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjkwMzg3MDV9.ksDe4_D2YvzQUnuDCDi0zN5xC_fCMgBIN8m99ublF1o" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"guid": "6eca0f74-5386-4108-be78-08ae8a6a565f",
"type": "worker",
"command": "run me"
}
Headers