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": "fac91723-7fa3-447a-b4a8-9b16b3007d1e"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4MiIsImVtYWlsIjoiZW1haWwtMjE0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjc0ODA4NjN9.86k-7v9B9-NxZbLiSQ8f1XOq6xLhJinQoufIPVAgQlA
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": "fac91723-7fa3-447a-b4a8-9b16b3007d1e"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4MiIsImVtYWlsIjoiZW1haWwtMjE0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjc0ODA4NjN9.86k-7v9B9-NxZbLiSQ8f1XOq6xLhJinQoufIPVAgQlA" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "guid": "35cabdb0-cf9a-43c8-a60d-1de12d5babf9",
  "name": "my_app",
  "desired_state": "STOPPED",
  "_links": {
    "self": {
      "href": "/v3/apps/35cabdb0-cf9a-43c8-a60d-1de12d5babf9"
    },
    "processes": {
      "href": "/v3/apps/35cabdb0-cf9a-43c8-a60d-1de12d5babf9/processes"
    },
    "packages": {
      "href": "/v3/apps/35cabdb0-cf9a-43c8-a60d-1de12d5babf9/packages"
    },
    "space": {
      "href": "/v2/spaces/fac91723-7fa3-447a-b4a8-9b16b3007d1e"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 806a8877-7609-4cd4-be4c-190122ff01a1
Content-Length: 483
X-Content-Type-Options: nosniff