Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/41cebe7f-0bd5-484d-96a9-bada89c52bf7/apps/777fed10-3030-453e-9c1c-4d0543959b77

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

cURL

curl "https://api.[your-domain.com]/v2/routes/41cebe7f-0bd5-484d-96a9-bada89c52bf7/apps/777fed10-3030-453e-9c1c-4d0543959b77" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk4MDF9.xZajNHvH3HQ1OODl4otk_bpb-MwazlLvds6SciugfAM" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "41cebe7f-0bd5-484d-96a9-bada89c52bf7",
    "url": "/v2/routes/41cebe7f-0bd5-484d-96a9-bada89c52bf7",
    "created_at": "2015-07-06T23:23:21Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-17",
    "path": "",
    "domain_guid": "1f9fedec-6213-4866-b88d-ead9dda10b75",
    "space_guid": "28e2a8bb-13eb-4586-985b-6767d99e4a4b",
    "domain_url": "/v2/domains/1f9fedec-6213-4866-b88d-ead9dda10b75",
    "space_url": "/v2/spaces/28e2a8bb-13eb-4586-985b-6767d99e4a4b",
    "apps_url": "/v2/routes/41cebe7f-0bd5-484d-96a9-bada89c52bf7/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: ff711f6c-781f-4216-be39-7bcdcffa9b57
Content-Length: 586
X-Content-Type-Options: nosniff