Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/e51fcac7-a41d-461a-ab15-e57660380862/apps/cf9e96bf-c8fd-4e4c-9171-9ab303269b19

Body

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM3OSIsImVtYWlsIjoiZW1haWwtMjgyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjc0ODA4NzB9.gQ8c-o871A1ps9PxWbGRgmeGBgEDIw8vFfmqXjWFl1c
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/routes/e51fcac7-a41d-461a-ab15-e57660380862/apps/cf9e96bf-c8fd-4e4c-9171-9ab303269b19" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM3OSIsImVtYWlsIjoiZW1haWwtMjgyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjc0ODA4NzB9.gQ8c-o871A1ps9PxWbGRgmeGBgEDIw8vFfmqXjWFl1c" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "e51fcac7-a41d-461a-ab15-e57660380862",
    "url": "/v2/routes/e51fcac7-a41d-461a-ab15-e57660380862",
    "created_at": "2015-03-20T18:27:50Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-15",
    "domain_guid": "c6b08231-dbcd-42f8-997c-b75c10786f4a",
    "space_guid": "f1cb257b-2371-4d6b-adb1-a970f88c3754",
    "domain_url": "/v2/domains/c6b08231-dbcd-42f8-997c-b75c10786f4a",
    "space_url": "/v2/spaces/f1cb257b-2371-4d6b-adb1-a970f88c3754",
    "apps_url": "/v2/routes/e51fcac7-a41d-461a-ab15-e57660380862/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: f6faeb6b-8375-4224-bd74-edd55473f577
Content-Length: 570
X-Content-Type-Options: nosniff