Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/e05f2bdb-532e-4ff5-8ce8-5df760ee2fed/apps/d2835f0f-05f6-4b52-8852-8c39b0b8b685

Body

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

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/routes/e05f2bdb-532e-4ff5-8ce8-5df760ee2fed/apps/d2835f0f-05f6-4b52-8852-8c39b0b8b685" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ2IiwiZW1haWwiOiJlbWFpbC00NkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI5MDM4Njk5fQ.WC7EDwEsfydiELwjfuCYKsSUizszALGrKeS4WtWmnDM" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "e05f2bdb-532e-4ff5-8ce8-5df760ee2fed",
    "url": "/v2/routes/e05f2bdb-532e-4ff5-8ce8-5df760ee2fed",
    "created_at": "2015-04-07T19:11:39Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-12",
    "domain_guid": "ca1c014f-feda-4f2b-89b3-426dc09744ba",
    "space_guid": "60a77271-1f3d-445d-95be-f59cea3b95d3",
    "domain_url": "/v2/domains/ca1c014f-feda-4f2b-89b3-426dc09744ba",
    "space_url": "/v2/spaces/60a77271-1f3d-445d-95be-f59cea3b95d3",
    "apps_url": "/v2/routes/e05f2bdb-532e-4ff5-8ce8-5df760ee2fed/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 444657fc-62f4-4141-acf7-05fbf15e854b
Content-Length: 570
X-Content-Type-Options: nosniff