Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Fields

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

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE0MSIsImVtYWlsIjoiZW1haWwtOTNAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNDEzNzM2Nn0.bhEVDUtAYM6Dwqkz21mr1e12DarEMlcWJu4f5lPXv80
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/routes/d50de721-5db4-455b-aa72-56b6b52af920/apps/c26db5bb-56e7-4376-a490-50b4e1e17ded

cURL

curl "https://api.[your-domain.com]/v2/routes/d50de721-5db4-455b-aa72-56b6b52af920/apps/c26db5bb-56e7-4376-a490-50b4e1e17ded" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE0MSIsImVtYWlsIjoiZW1haWwtOTNAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNDEzNzM2Nn0.bhEVDUtAYM6Dwqkz21mr1e12DarEMlcWJu4f5lPXv80" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 51b06b04-0630-4076-9141-5044c017d9e4
Content-Length: 569
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "d50de721-5db4-455b-aa72-56b6b52af920",
    "url": "/v2/routes/d50de721-5db4-455b-aa72-56b6b52af920",
    "created_at": "2015-02-10T01:42:46Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-9",
    "domain_guid": "7f67f688-b04a-47ff-aee5-aa138535d60e",
    "space_guid": "6d54269e-6e03-45be-9383-f97ccfeaacfa",
    "domain_url": "/v2/domains/7f67f688-b04a-47ff-aee5-aa138535d60e",
    "space_url": "/v2/spaces/6d54269e-6e03-45be-9383-f97ccfeaacfa",
    "apps_url": "/v2/routes/d50de721-5db4-455b-aa72-56b6b52af920/apps"
  }
}