Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/c5702022-f047-40b9-bddf-cba1fb53522f/apps/0f36af27-1b14-4a95-993e-5b874dfb5b15

Parameters

Name Description Valid Values Example Values
app_guid The guid of the app

Body

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk5IiwiZW1haWwiOiJlbWFpbC02NEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ4MDM4OTQ3fQ.s9CEFpObunVxXqqjtdHS6Q04wizU-dtMWXi4imxjWsY
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/routes/c5702022-f047-40b9-bddf-cba1fb53522f/apps/0f36af27-1b14-4a95-993e-5b874dfb5b15" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk5IiwiZW1haWwiOiJlbWFpbC02NEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ4MDM4OTQ3fQ.s9CEFpObunVxXqqjtdHS6Q04wizU-dtMWXi4imxjWsY" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "c5702022-f047-40b9-bddf-cba1fb53522f",
    "url": "/v2/routes/c5702022-f047-40b9-bddf-cba1fb53522f",
    "created_at": "2015-11-13T17:02:27Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-10",
    "path": "",
    "domain_guid": "47b7e8e3-ace0-43bc-b260-1b24d3a398c7",
    "space_guid": "caa991f0-1b25-46cf-8c8c-6fbc7245c507",
    "service_instance_guid": null,
    "port": 0,
    "domain_url": "/v2/domains/47b7e8e3-ace0-43bc-b260-1b24d3a398c7",
    "space_url": "/v2/spaces/caa991f0-1b25-46cf-8c8c-6fbc7245c507",
    "apps_url": "/v2/routes/c5702022-f047-40b9-bddf-cba1fb53522f/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 
Content-Length: 636
X-Content-Type-Options: nosniff