Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/4784c6a6-6521-4786-82a8-32329ed475d6/apps/771dfab4-5ed3-4482-9952-6bca5e525033

Body

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

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/routes/4784c6a6-6521-4786-82a8-32329ed475d6/apps/771dfab4-5ed3-4482-9952-6bca5e525033" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4MyIsImVtYWlsIjoiZW1haWwtMjAwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzM5ODExMTR9.GuV7zSaBnfiQE3R4ikI_OdNUdGtGkvNL7Apd5PADrKI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "4784c6a6-6521-4786-82a8-32329ed475d6",
    "url": "/v2/routes/4784c6a6-6521-4786-82a8-32329ed475d6",
    "created_at": "2015-06-04T00:05:13Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-13",
    "path": "",
    "domain_guid": "c067fccf-a18a-4565-a19e-a2627dca6e9d",
    "space_guid": "d13a4148-633f-4524-bdff-6b90c4a41785",
    "domain_url": "/v2/domains/c067fccf-a18a-4565-a19e-a2627dca6e9d",
    "space_url": "/v2/spaces/d13a4148-633f-4524-bdff-6b90c4a41785",
    "apps_url": "/v2/routes/4784c6a6-6521-4786-82a8-32329ed475d6/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 8de1e351-01cc-4b6f-a235-b41a21fa7057
Content-Length: 586
X-Content-Type-Options: nosniff