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

Route

PUT /v2/routes/2355ccef-4db7-44c0-9c6c-239c30889693/apps/cab3796b-8ca2-453f-9f2b-cd01aa64e4c1

cURL

curl "https://api.[your-domain.com]/v2/routes/2355ccef-4db7-44c0-9c6c-239c30889693/apps/cab3796b-8ca2-453f-9f2b-cd01aa64e4c1" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1MiIsImVtYWlsIjoiZW1haWwtMTI1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTc0NjIzNjB9._Zmi9XH6QvplFzdrluL-F3zjNZA5FW11uZaReXAHi5A" \
	-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: f5d07388-63fa-402c-bd4c-48b33cff8ceb
Content-Length: 574
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "2355ccef-4db7-44c0-9c6c-239c30889693",
    "url": "/v2/routes/2355ccef-4db7-44c0-9c6c-239c30889693",
    "created_at": "2014-11-24T19:32:40+00:00",
    "updated_at": null
  },
  "entity": {
    "host": "host-2",
    "domain_guid": "ea7576ba-b5fc-4a0d-83d6-dbc26803254b",
    "space_guid": "684c304f-53d3-49a6-bbd4-1ab8a0fff9d9",
    "domain_url": "/v2/domains/ea7576ba-b5fc-4a0d-83d6-dbc26803254b",
    "space_url": "/v2/spaces/684c304f-53d3-49a6-bbd4-1ab8a0fff9d9",
    "apps_url": "/v2/routes/2355ccef-4db7-44c0-9c6c-239c30889693/apps"
  }
}