Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/ef1b76e6-52e7-4727-91d7-a4b1f49ea08f/apps/ca3edd8e-c8f8-436f-8b38-6baf437240a1

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.eyJ1c2VyX2lkIjoidWFhLWlkLTY2IiwiZW1haWwiOiJlbWFpbC02NEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ3MTE2ODMzfQ.qjArZ3fmLUBhswbYCseiIJcCKpWLrZ3JAn5wlDKBAR8
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/routes/ef1b76e6-52e7-4727-91d7-a4b1f49ea08f/apps/ca3edd8e-c8f8-436f-8b38-6baf437240a1" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTY2IiwiZW1haWwiOiJlbWFpbC02NEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ3MTE2ODMzfQ.qjArZ3fmLUBhswbYCseiIJcCKpWLrZ3JAn5wlDKBAR8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "ef1b76e6-52e7-4727-91d7-a4b1f49ea08f",
    "url": "/v2/routes/ef1b76e6-52e7-4727-91d7-a4b1f49ea08f",
    "created_at": "2015-11-03T00:53:52Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-12",
    "path": "",
    "domain_guid": "07ab255a-4a88-4089-9288-ca6ff75250eb",
    "space_guid": "043756e3-bfb4-4bd0-9047-bd8901fc222b",
    "service_instance_guid": null,
    "port": 0,
    "domain_url": "/v2/domains/07ab255a-4a88-4089-9288-ca6ff75250eb",
    "space_url": "/v2/spaces/043756e3-bfb4-4bd0-9047-bd8901fc222b",
    "apps_url": "/v2/routes/ef1b76e6-52e7-4727-91d7-a4b1f49ea08f/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 61f2ae6a-a073-4f89-bfb9-997f9ed663a3
Content-Length: 636
X-Content-Type-Options: nosniff