Stacks API

Create 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.eyJ1c2VyX2lkIjoidWFhLWlkLTMzIiwiZW1haWwiOiJlbWFpbC0yOUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDY2MDA4ODgzfQ._IAWbA37CGfIiGHKP3_kwVgk7Llbr26bPgvggkoW9nw
Host: example.org
Content-Type: application/json
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.eyJ1c2VyX2lkIjoidWFhLWlkLTMzIiwiZW1haWwiOiJlbWFpbC0yOUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDY2MDA4ODgzfQ._IAWbA37CGfIiGHKP3_kwVgk7Llbr26bPgvggkoW9nw" \
	-H "Host: example.org" \
	-H "Content-Type: application/json" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "c7d0b591-2572-4d23-bf7c-9dac95074a9e",
    "url": "/v2/stacks/c7d0b591-2572-4d23-bf7c-9dac95074a9e",
    "created_at": "2016-06-08T16:41:23Z",
    "updated_at": "2016-06-08T16:41:26Z"
  },
  "entity": {
    "name": "example_stack",
    "description": "Description for the example stack"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/stacks/c7d0b591-2572-4d23-bf7c-9dac95074a9e
X-VCAP-Request-ID: cb041733-bfee-46a7-9c36-7533e684a2a2
Content-Length: 305
X-Content-Type-Options: nosniff