Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/7a2eb3f2-d22a-46c0-a491-5db752c30b2b/apps/39dded08-dbb0-4e1f-af96-3a3a901b492c

Body

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

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/routes/7a2eb3f2-d22a-46c0-a491-5db752c30b2b/apps/39dded08-dbb0-4e1f-af96-3a3a901b492c" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3NCIsImVtYWlsIjoiZW1haWwtMTk1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjk2NjQxNDd9.HTIn3duWHrKJNxObJiJ78IcqES7eFJ0zEq3qzqSlwSM" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "7a2eb3f2-d22a-46c0-a491-5db752c30b2b",
    "url": "/v2/routes/7a2eb3f2-d22a-46c0-a491-5db752c30b2b",
    "created_at": "2015-04-15T00:55:47Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-10",
    "domain_guid": "3af12600-cf5b-4198-a359-ff9695c5bf39",
    "space_guid": "8cc7219e-c266-41af-a534-424cefc3cc96",
    "domain_url": "/v2/domains/3af12600-cf5b-4198-a359-ff9695c5bf39",
    "space_url": "/v2/spaces/8cc7219e-c266-41af-a534-424cefc3cc96",
    "apps_url": "/v2/routes/7a2eb3f2-d22a-46c0-a491-5db752c30b2b/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 0c3d273d-8653-41fd-b05f-e80b631650a1
Content-Length: 570
X-Content-Type-Options: nosniff