Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/598cb1de-aa36-408b-b9dc-a8f3fbccfe68/apps/8026b4bc-bef3-49a8-948f-ffda05b240b6

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.eyJ1c2VyX2lkIjoidWFhLWlkLTE2NCIsImVtYWlsIjoiZW1haWwtMTMyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MDF9.9239pJNQnR6sI9hQGHJi23dyiME21iuz6KNLl8XlXWk
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/routes/598cb1de-aa36-408b-b9dc-a8f3fbccfe68/apps/8026b4bc-bef3-49a8-948f-ffda05b240b6" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2NCIsImVtYWlsIjoiZW1haWwtMTMyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MDF9.9239pJNQnR6sI9hQGHJi23dyiME21iuz6KNLl8XlXWk" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "598cb1de-aa36-408b-b9dc-a8f3fbccfe68",
    "url": "/v2/routes/598cb1de-aa36-408b-b9dc-a8f3fbccfe68",
    "created_at": "2016-04-22T19:33:21Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-10",
    "path": "",
    "domain_guid": "86ce96dd-71d8-496e-9527-150eacfb9525",
    "space_guid": "8aeb18e6-044a-4719-b4a1-3578629ed5e3",
    "service_instance_guid": null,
    "port": null,
    "domain_url": "/v2/domains/86ce96dd-71d8-496e-9527-150eacfb9525",
    "space_url": "/v2/spaces/8aeb18e6-044a-4719-b4a1-3578629ed5e3",
    "apps_url": "/v2/routes/598cb1de-aa36-408b-b9dc-a8f3fbccfe68/apps",
    "route_mappings_url": "/v2/routes/598cb1de-aa36-408b-b9dc-a8f3fbccfe68/route_mappings"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 779668e2-c901-4045-8cd0-85eb8995d73a
Content-Length: 731
X-Content-Type-Options: nosniff