Home
Version 3
Routes API

Routes API

Associate App with the Route

PUT /v2/routes/:guid/apps/:app_guid

Request

Route

PUT /v2/routes/de7ad094-4ad0-4319-b690-061948fb5756/apps/d6b90374-00a8-4702-8ebe-a2b33e2fa895

Body

Name Description Default Valid Values Example Values
guid The guid of the route.

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/routes/de7ad094-4ad0-4319-b690-061948fb5756/apps/d6b90374-00a8-4702-8ebe-a2b33e2fa895" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM5IiwiZW1haWwiOiJlbWFpbC0zN0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI2NjMzODk2fQ.WCZVqJyBWFqGq0I_04qCzLaKsjNcsetEke6b8qZH3kw" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "de7ad094-4ad0-4319-b690-061948fb5756",
    "url": "/v2/routes/de7ad094-4ad0-4319-b690-061948fb5756",
    "created_at": "2015-03-10T23:11:36Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-4",
    "domain_guid": "3634b072-7944-4582-93f0-9a97026f949d",
    "space_guid": "ac4650ac-e77b-4b6a-8000-312aa827cd6f",
    "domain_url": "/v2/domains/3634b072-7944-4582-93f0-9a97026f949d",
    "space_url": "/v2/spaces/ac4650ac-e77b-4b6a-8000-312aa827cd6f",
    "apps_url": "/v2/routes/de7ad094-4ad0-4319-b690-061948fb5756/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 6d504665-61b5-4c21-a952-23fd36d5db08
Content-Length: 569
X-Content-Type-Options: nosniff