Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/2fdd5169-ae7f-44ab-86ec-f39e97ab18cc/apps/fa175893-6353-44b8-a47c-83601c4b4565

Body

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTkxIiwiZW1haWwiOiJlbWFpbC05MEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDM1MTAyODUwfQ.A7CJDN-rJY2dpKpPf5vTzrYBw0yJeT3E7Q3XiSBPI_k
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/routes/2fdd5169-ae7f-44ab-86ec-f39e97ab18cc/apps/fa175893-6353-44b8-a47c-83601c4b4565" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTkxIiwiZW1haWwiOiJlbWFpbC05MEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDM1MTAyODUwfQ.A7CJDN-rJY2dpKpPf5vTzrYBw0yJeT3E7Q3XiSBPI_k" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "2fdd5169-ae7f-44ab-86ec-f39e97ab18cc",
    "url": "/v2/routes/2fdd5169-ae7f-44ab-86ec-f39e97ab18cc",
    "created_at": "2015-06-16T23:40:50Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-22",
    "path": "",
    "domain_guid": "78c3a003-603f-456b-adf8-aad714e79e9e",
    "space_guid": "ad04a9fa-7e40-4704-aad2-a8aa0049cee5",
    "domain_url": "/v2/domains/78c3a003-603f-456b-adf8-aad714e79e9e",
    "space_url": "/v2/spaces/ad04a9fa-7e40-4704-aad2-a8aa0049cee5",
    "apps_url": "/v2/routes/2fdd5169-ae7f-44ab-86ec-f39e97ab18cc/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 16222ec8-93d5-4ed1-8ad1-e8ef48218eb6
Content-Length: 586
X-Content-Type-Options: nosniff