Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/5993e892-e542-4e02-8dcf-7d07c16bc42e/apps/105f77ed-21a8-4ead-a00f-144c6b635e70

Body

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

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/routes/5993e892-e542-4e02-8dcf-7d07c16bc42e/apps/105f77ed-21a8-4ead-a00f-144c6b635e70" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5NSIsImVtYWlsIjoiZW1haWwtMTQ3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjYxODc3NDd9._4nlrFZS1hLdMqbtKSGKtaD5o6sUNqVCweUY3ATSOIQ" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "5993e892-e542-4e02-8dcf-7d07c16bc42e",
    "url": "/v2/routes/5993e892-e542-4e02-8dcf-7d07c16bc42e",
    "created_at": "2015-03-05T19:15:47Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-9",
    "domain_guid": "3092445c-8f61-41d8-9415-1cf14f150b91",
    "space_guid": "2b79dfdb-b028-4e2e-9aa7-43a7b88da75a",
    "domain_url": "/v2/domains/3092445c-8f61-41d8-9415-1cf14f150b91",
    "space_url": "/v2/spaces/2b79dfdb-b028-4e2e-9aa7-43a7b88da75a",
    "apps_url": "/v2/routes/5993e892-e542-4e02-8dcf-7d07c16bc42e/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: cef554d4-df4c-4fb2-95d9-13a981e43cf7
Content-Length: 569
X-Content-Type-Options: nosniff