Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/225f7551-8ad6-4550-b91b-f41f59f2798e/apps/da32d013-b90f-4cc6-8fff-3a0811aee1b4

Body

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwIiwiZW1haWwiOiJlbWFpbC0xMEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDMyMzEzNjAzfQ.vyd8Y-dAjM79CXTZ6pHBlrVQ7XcG-rw7ZslwBl2lyqU
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/routes/225f7551-8ad6-4550-b91b-f41f59f2798e/apps/da32d013-b90f-4cc6-8fff-3a0811aee1b4" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwIiwiZW1haWwiOiJlbWFpbC0xMEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDMyMzEzNjAzfQ.vyd8Y-dAjM79CXTZ6pHBlrVQ7XcG-rw7ZslwBl2lyqU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "225f7551-8ad6-4550-b91b-f41f59f2798e",
    "url": "/v2/routes/225f7551-8ad6-4550-b91b-f41f59f2798e",
    "created_at": "2015-05-15T16:53:23Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-10",
    "path": "",
    "domain_guid": "537b5cb6-59ca-4ed6-8a24-818558db4aad",
    "space_guid": "8b14f2dc-bcca-4160-b54e-cf40dbe08725",
    "domain_url": "/v2/domains/537b5cb6-59ca-4ed6-8a24-818558db4aad",
    "space_url": "/v2/spaces/8b14f2dc-bcca-4160-b54e-cf40dbe08725",
    "apps_url": "/v2/routes/225f7551-8ad6-4550-b91b-f41f59f2798e/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 15a9d025-8b6b-4b6e-8bb1-d80abdb9a5e2
Content-Length: 586
X-Content-Type-Options: nosniff