Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/6ad5b55f-e79a-4c0d-ba3b-20e292b3d295/apps/2934f05f-3a2a-4579-823f-df1631fb2903

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.eyJ1c2VyX2lkIjoidWFhLWlkLTI1NCIsImVtYWlsIjoiZW1haWwtMTg3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDI2MDE1NDB9.LgHsIT0jkw2OaTkVA5mpzhi-Q3WgO9IHzD-l2Q_VmqA
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/routes/6ad5b55f-e79a-4c0d-ba3b-20e292b3d295/apps/2934f05f-3a2a-4579-823f-df1631fb2903" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1NCIsImVtYWlsIjoiZW1haWwtMTg3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDI2MDE1NDB9.LgHsIT0jkw2OaTkVA5mpzhi-Q3WgO9IHzD-l2Q_VmqA" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "6ad5b55f-e79a-4c0d-ba3b-20e292b3d295",
    "url": "/v2/routes/6ad5b55f-e79a-4c0d-ba3b-20e292b3d295",
    "created_at": "2015-09-11T18:39:00Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-18",
    "path": "",
    "domain_guid": "fc94c3e7-610d-48f4-bed6-4e259f00eb0d",
    "space_guid": "925f30c5-e666-4c54-880d-da049bf1587a",
    "service_instance_guid": "b2bb2fb6-40a6-4838-9b55-3d62a452be78",
    "domain_url": "/v2/domains/fc94c3e7-610d-48f4-bed6-4e259f00eb0d",
    "space_url": "/v2/spaces/925f30c5-e666-4c54-880d-da049bf1587a",
    "service_instance_url": "/v2/service_instances/b2bb2fb6-40a6-4838-9b55-3d62a452be78",
    "apps_url": "/v2/routes/6ad5b55f-e79a-4c0d-ba3b-20e292b3d295/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 83ff600a-7e24-468a-bf04-6babb54e6a06
Content-Length: 745
X-Content-Type-Options: nosniff