Home
Version 3
Apps (Experimental) API

Apps (Experimental) API

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

Body

Name Description Default Valid Values Example Values
{
  "name": "my_app",
  "space_guid": "c265b1be-d709-43da-be08-e9006fe9a948"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExOSIsImVtYWlsIjoiZW1haWwtODFAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNzMyMzk2MH0.NLSVCpGwb9gahTtLQYkit7mzA4X5wGd3ayr2Iu_aD3g
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps" -d '{
  "name": "my_app",
  "space_guid": "c265b1be-d709-43da-be08-e9006fe9a948"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExOSIsImVtYWlsIjoiZW1haWwtODFAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNzMyMzk2MH0.NLSVCpGwb9gahTtLQYkit7mzA4X5wGd3ayr2Iu_aD3g" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "guid": "e830b6a7-3617-411d-be14-c6de0f4cc93f",
  "name": "my_app",
  "desired_state": "STOPPED",
  "_links": {
    "self": {
      "href": "/v3/apps/e830b6a7-3617-411d-be14-c6de0f4cc93f"
    },
    "processes": {
      "href": "/v3/apps/e830b6a7-3617-411d-be14-c6de0f4cc93f/processes"
    },
    "packages": {
      "href": "/v3/apps/e830b6a7-3617-411d-be14-c6de0f4cc93f/packages"
    },
    "space": {
      "href": "/v2/spaces/c265b1be-d709-43da-be08-e9006fe9a948"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: ea426cdf-0f02-4883-8f39-fae1b267839f
Content-Length: 483
X-Content-Type-Options: nosniff