Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/e7255794-721e-4413-85f8-b34b79319255/apps/6a557aa8-cb28-4669-a7a7-27023f358998

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

cURL

curl "https://api.[your-domain.com]/v2/routes/e7255794-721e-4413-85f8-b34b79319255/apps/6a557aa8-cb28-4669-a7a7-27023f358998" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQyMCIsImVtYWlsIjoiZW1haWwtMzEwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzk0MjYyMTd9.84jPpLv4os9E5ORnUYKfALcR2cWcF7yARTEJjIVrpv4" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "e7255794-721e-4413-85f8-b34b79319255",
    "url": "/v2/routes/e7255794-721e-4413-85f8-b34b79319255",
    "created_at": "2015-08-06T00:36:57Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-23",
    "path": "",
    "domain_guid": "2e5dc965-3668-4b2c-a6a4-989227f8d317",
    "space_guid": "c37603cd-84b8-4c81-af2d-1f0c4c40df36",
    "domain_url": "/v2/domains/2e5dc965-3668-4b2c-a6a4-989227f8d317",
    "space_url": "/v2/spaces/c37603cd-84b8-4c81-af2d-1f0c4c40df36",
    "apps_url": "/v2/routes/e7255794-721e-4413-85f8-b34b79319255/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 5c69d846-f096-407e-adc2-9abacc38855b
Content-Length: 586
X-Content-Type-Options: nosniff