Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/a6c3e8a7-5d28-4575-8f49-fcd68efcf197/apps/bb1b8d26-4d47-4f4a-a535-3289c1c9e2aa

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

cURL

curl "https://api.[your-domain.com]/v2/routes/a6c3e8a7-5d28-4575-8f49-fcd68efcf197/apps/bb1b8d26-4d47-4f4a-a535-3289c1c9e2aa" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEyMSIsImVtYWlsIjoiZW1haWwtNzZAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQzODY0MTc5MX0.mIfjBLZkatbSFAUDxmK2ZjHYKw2n9gEbGJ4TxzAeQPU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "a6c3e8a7-5d28-4575-8f49-fcd68efcf197",
    "url": "/v2/routes/a6c3e8a7-5d28-4575-8f49-fcd68efcf197",
    "created_at": "2015-07-27T22:43:11Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-2",
    "path": "",
    "domain_guid": "67df4e5c-82a0-4a9a-89bc-fcc4ebb6aef4",
    "space_guid": "121a9611-9574-42ec-8221-07aaa81ad5a5",
    "domain_url": "/v2/domains/67df4e5c-82a0-4a9a-89bc-fcc4ebb6aef4",
    "space_url": "/v2/spaces/121a9611-9574-42ec-8221-07aaa81ad5a5",
    "apps_url": "/v2/routes/a6c3e8a7-5d28-4575-8f49-fcd68efcf197/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: eff015a3-c4ef-4763-be9a-f4782d6725f4
Content-Length: 585
X-Content-Type-Options: nosniff