Home
Version 3
Stacks API

Stacks API

creates a stack

POST /v2/stacks

Request

Route

POST /v2/stacks

Body

Name Description Default Valid Values Example Values
name The name for the stack.
description The description for the stack
{"name":"example_stack","description":"Description for the example stack"}

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/stacks" -d '{"name":"example_stack","description":"Description for the example stack"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTY3IiwiZW1haWwiOiJlbWFpbC0zOEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDM2ODI5Nzc1fQ.--hWJXHyBoC8EtW4OsdfxD_IGPX0hL7VsVvH8WmHqlU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "2efe3436-217e-4d66-8ddb-5810af05971b",
    "url": "/v2/stacks/2efe3436-217e-4d66-8ddb-5810af05971b",
    "created_at": "2015-07-06T23:22:55Z",
    "updated_at": null
  },
  "entity": {
    "name": "example_stack",
    "description": "Description for the example stack"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/stacks/2efe3436-217e-4d66-8ddb-5810af05971b
X-VCAP-Request-ID: 6acc28ed-cae7-477b-9ff7-37b43ed906ae
Content-Length: 305
X-Content-Type-Options: nosniff