Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/f3b82a55-220d-4fc2-8568-12d84178d969/apps/1d68ec6f-dc92-4d81-8976-3549259d922e

Body

Name Description Default Valid Values Example Values
guid The guid of the route.

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExOCIsImVtYWlsIjoiZW1haWwtNjdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQzMTY0NjYzMH0.WPPFwruZEONbL2bdioIh9zRhcYmI6RJ7IlnaHJzo-bc
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/routes/f3b82a55-220d-4fc2-8568-12d84178d969/apps/1d68ec6f-dc92-4d81-8976-3549259d922e" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExOCIsImVtYWlsIjoiZW1haWwtNjdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQzMTY0NjYzMH0.WPPFwruZEONbL2bdioIh9zRhcYmI6RJ7IlnaHJzo-bc" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "f3b82a55-220d-4fc2-8568-12d84178d969",
    "url": "/v2/routes/f3b82a55-220d-4fc2-8568-12d84178d969",
    "created_at": "2015-05-07T23:37:10Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-2",
    "domain_guid": "d86b138c-8e6c-49d8-9b9a-c4bb671c4169",
    "space_guid": "84f97c15-3e03-40af-9f67-3469c2c08ee5",
    "path": "",
    "domain_url": "/v2/domains/d86b138c-8e6c-49d8-9b9a-c4bb671c4169",
    "space_url": "/v2/spaces/84f97c15-3e03-40af-9f67-3469c2c08ee5",
    "apps_url": "/v2/routes/f3b82a55-220d-4fc2-8568-12d84178d969/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 783eddd5-a77c-4240-a05e-0f2fecae71e7
Content-Length: 585
X-Content-Type-Options: nosniff