Create an App
POST /v3/apps
Request
Route
POST /v3/apps
Parameters
Name |
Description |
Valid Values |
Example Values |
name
|
Name of the App
|
|
|
space_guid
|
GUID of associated Space
|
|
|
environment_variables
|
Environment variables to be used for the App when running
|
|
|
Body
Name |
Description |
Default |
Valid Values |
Example Values |
{
"name": "my_app",
"space_guid": "db2bfdb3-bc86-4441-a7f2-516a48ff755e",
"environment_variables": {
"open": "source"
}
}
Headers
cURL
curl "https://api.[your-domain.com]/v3/apps" -d '{
"name": "my_app",
"space_guid": "db2bfdb3-bc86-4441-a7f2-516a48ff755e",
"environment_variables": {
"open": "source"
}
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3MiIsImVtYWlsIjoiZW1haWwtMjE4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzI3NzQ5OTV9.EkRbBI_G489dMM-W9CNLQv0f-_RAP5mmDPDq6UBZ4Gs" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"guid": "8c794065-41c8-4a8f-8021-d935e0dac056",
"name": "my_app",
"desired_state": "STOPPED",
"total_desired_instances": 0,
"created_at": "2015-05-21T01:03:15Z",
"updated_at": null,
"environment_variables": {
"open": "source"
},
"_links": {
"self": {
"href": "/v3/apps/8c794065-41c8-4a8f-8021-d935e0dac056"
},
"processes": {
"href": "/v3/apps/8c794065-41c8-4a8f-8021-d935e0dac056/processes"
},
"packages": {
"href": "/v3/apps/8c794065-41c8-4a8f-8021-d935e0dac056/packages"
},
"space": {
"href": "/v2/spaces/db2bfdb3-bc86-4441-a7f2-516a48ff755e"
},
"start": {
"href": "/v3/apps/8c794065-41c8-4a8f-8021-d935e0dac056/start",
"method": "PUT"
},
"stop": {
"href": "/v3/apps/8c794065-41c8-4a8f-8021-d935e0dac056/stop",
"method": "PUT"
},
"assign_current_droplet": {
"href": "/v3/apps/8c794065-41c8-4a8f-8021-d935e0dac056/current_droplet",
"method": "PUT"
}
}
}
Headers