Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/88629341-1a30-4b25-803f-1998849426ee/apps/56818e82-d38b-4be7-b531-ed5eae96e788

Body

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

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/routes/88629341-1a30-4b25-803f-1998849426ee/apps/56818e82-d38b-4be7-b531-ed5eae96e788" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIzMSIsImVtYWlsIjoiZW1haWwtMTc3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzI3NzQ5OTJ9.gOjfKxhcecLLoSv9cZ4F_gfPKdXWBHZIZxTBO211Mpg" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "88629341-1a30-4b25-803f-1998849426ee",
    "url": "/v2/routes/88629341-1a30-4b25-803f-1998849426ee",
    "created_at": "2015-05-21T01:03:12Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-10",
    "path": "",
    "domain_guid": "2a6b01c8-1860-47c0-828d-bb6433019c2a",
    "space_guid": "b3dd9c1e-d774-4ba9-87d1-674240b8883e",
    "domain_url": "/v2/domains/2a6b01c8-1860-47c0-828d-bb6433019c2a",
    "space_url": "/v2/spaces/b3dd9c1e-d774-4ba9-87d1-674240b8883e",
    "apps_url": "/v2/routes/88629341-1a30-4b25-803f-1998849426ee/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: db50f316-f57e-4002-b4a3-a25f2ae6f18d
Content-Length: 586
X-Content-Type-Options: nosniff