Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/a9bf1ec7-48f5-49e0-befb-4c3602591325/apps/1cb78ecd-b3d7-42d7-ae60-434a0a91445b

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.eyJ1c2VyX2lkIjoidWFhLWlkLTM1MSIsImVtYWlsIjoiZW1haWwtMjUxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTY0NTIyNDJ9.Fc-2qtobaU2zT-LJi7sx5TvWcxCwdd61wu0quedNhyo
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/routes/a9bf1ec7-48f5-49e0-befb-4c3602591325/apps/1cb78ecd-b3d7-42d7-ae60-434a0a91445b" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM1MSIsImVtYWlsIjoiZW1haWwtMjUxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTY0NTIyNDJ9.Fc-2qtobaU2zT-LJi7sx5TvWcxCwdd61wu0quedNhyo" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "a9bf1ec7-48f5-49e0-befb-4c3602591325",
    "url": "/v2/routes/a9bf1ec7-48f5-49e0-befb-4c3602591325",
    "created_at": "2016-02-19T02:04:02Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-25",
    "path": "",
    "domain_guid": "b7dafe61-0077-4017-adf1-17433e1926c3",
    "space_guid": "b3bfcbb3-b786-41c0-b700-108db832e1db",
    "service_instance_guid": null,
    "port": 0,
    "domain_url": "/v2/domains/b7dafe61-0077-4017-adf1-17433e1926c3",
    "space_url": "/v2/spaces/b3bfcbb3-b786-41c0-b700-108db832e1db",
    "apps_url": "/v2/routes/a9bf1ec7-48f5-49e0-befb-4c3602591325/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 
Content-Length: 636
X-Content-Type-Options: nosniff