Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/474fadab-b486-4ff5-a62e-943c5154fc38/apps/389b21e4-b700-4e98-a6d5-f55eb2532bd8

Body

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMwOCIsImVtYWlsIjoiZW1haWwtMjEwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjU5NDg2NzJ9.FvZ0DD3UtPD3_aKhXJYPUDAQ0tHY5qQVL-2B1NOBHFc
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/routes/474fadab-b486-4ff5-a62e-943c5154fc38/apps/389b21e4-b700-4e98-a6d5-f55eb2532bd8" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMwOCIsImVtYWlsIjoiZW1haWwtMjEwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjU5NDg2NzJ9.FvZ0DD3UtPD3_aKhXJYPUDAQ0tHY5qQVL-2B1NOBHFc" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "474fadab-b486-4ff5-a62e-943c5154fc38",
    "url": "/v2/routes/474fadab-b486-4ff5-a62e-943c5154fc38",
    "created_at": "2015-03-03T00:51:12Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-6",
    "domain_guid": "041f08ea-5425-4a24-b62b-8434ff3d494b",
    "space_guid": "ad26ad97-ff05-447b-91c7-f2b664fdb010",
    "domain_url": "/v2/domains/041f08ea-5425-4a24-b62b-8434ff3d494b",
    "space_url": "/v2/spaces/ad26ad97-ff05-447b-91c7-f2b664fdb010",
    "apps_url": "/v2/routes/474fadab-b486-4ff5-a62e-943c5154fc38/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 5464ed31-422d-421a-94ee-b1511e48e3e2
Content-Length: 569
X-Content-Type-Options: nosniff