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

Route

PUT /v2/routes/f9f954e8-f446-4bad-b233-b1627cf52141/apps/5853b0c2-12ec-471d-8dc7-a18fd29f80e1

cURL

curl "https://api.[your-domain.com]/v2/routes/f9f954e8-f446-4bad-b233-b1627cf52141/apps/5853b0c2-12ec-471d-8dc7-a18fd29f80e1" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM3NCIsImVtYWlsIjoiZW1haWwtMjc2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQ0NzE3MDl9.G833gYrwUNWhQg-OrcTykJuVQcxd3_l0hsmgO4RA8h0" \
	-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: ef981f38-0e4d-4960-804a-9ba9ea3b0cba
Content-Length: 570
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "f9f954e8-f446-4bad-b233-b1627cf52141",
    "url": "/v2/routes/f9f954e8-f446-4bad-b233-b1627cf52141",
    "created_at": "2015-02-13T22:35:09Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-20",
    "domain_guid": "f1f3b58b-c61a-487d-9e5c-2fff2a5462d2",
    "space_guid": "d6c65021-0664-4bbf-8b29-0499cd9a4750",
    "domain_url": "/v2/domains/f1f3b58b-c61a-487d-9e5c-2fff2a5462d2",
    "space_url": "/v2/spaces/d6c65021-0664-4bbf-8b29-0499cd9a4750",
    "apps_url": "/v2/routes/f9f954e8-f446-4bad-b233-b1627cf52141/apps"
  }
}