Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/a05c94a3-e4b3-456e-b044-475270919ea7/apps/169346d8-f83f-4317-8308-0f707a380d1c

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.eyJ1c2VyX2lkIjoidWFhLWlkLTI3OCIsImVtYWlsIjoiZW1haWwtMTg1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg4NTU2Nzl9.IUoJb-dQdu_2nlP3I5mfjxQEBTf_Do64Z-3Xbx9WJCc
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/routes/a05c94a3-e4b3-456e-b044-475270919ea7/apps/169346d8-f83f-4317-8308-0f707a380d1c" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3OCIsImVtYWlsIjoiZW1haWwtMTg1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg4NTU2Nzl9.IUoJb-dQdu_2nlP3I5mfjxQEBTf_Do64Z-3Xbx9WJCc" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "a05c94a3-e4b3-456e-b044-475270919ea7",
    "url": "/v2/routes/a05c94a3-e4b3-456e-b044-475270919ea7",
    "created_at": "2016-03-17T21:41:19Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-20",
    "path": "",
    "domain_guid": "f5804a26-df58-412e-95ed-fa2f2a699c18",
    "space_guid": "4886c9ec-4b1a-4a4c-8c8f-acfdd3d97d22",
    "service_instance_guid": null,
    "port": 0,
    "domain_url": "/v2/domains/f5804a26-df58-412e-95ed-fa2f2a699c18",
    "space_url": "/v2/spaces/4886c9ec-4b1a-4a4c-8c8f-acfdd3d97d22",
    "apps_url": "/v2/routes/a05c94a3-e4b3-456e-b044-475270919ea7/apps",
    "route_mappings_url": "/v2/routes/a05c94a3-e4b3-456e-b044-475270919ea7/route_mappings"
  }
}

Headers

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