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.eyJ1c2VyX2lkIjoidWFhLWlkLTEzMiIsImVtYWlsIjoiZW1haWwtMTAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQzMTAxMjZ9.gEfCJVExbTrpUk-FunqVWBGFblFclwPbLjwSFmwA21o
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/routes/b5dc3b2c-d66c-4b51-bd4d-3120095b0ebd/apps/ae63d21b-c5f5-427f-9bf3-f80f9ba4903b

cURL

curl "https://api.[your-domain.com]/v2/routes/b5dc3b2c-d66c-4b51-bd4d-3120095b0ebd/apps/ae63d21b-c5f5-427f-9bf3-f80f9ba4903b" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzMiIsImVtYWlsIjoiZW1haWwtMTAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQzMTAxMjZ9.gEfCJVExbTrpUk-FunqVWBGFblFclwPbLjwSFmwA21o" \
	-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: dffa6abe-a3aa-4156-bcb3-b5d219d53ee0
Content-Length: 569
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "b5dc3b2c-d66c-4b51-bd4d-3120095b0ebd",
    "url": "/v2/routes/b5dc3b2c-d66c-4b51-bd4d-3120095b0ebd",
    "created_at": "2015-02-12T01:42:06Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-6",
    "domain_guid": "31ee4283-9148-4c45-9803-89a55a843755",
    "space_guid": "6dde9c83-8f1b-4e55-a3a7-08d1082c6aa7",
    "domain_url": "/v2/domains/31ee4283-9148-4c45-9803-89a55a843755",
    "space_url": "/v2/spaces/6dde9c83-8f1b-4e55-a3a7-08d1082c6aa7",
    "apps_url": "/v2/routes/b5dc3b2c-d66c-4b51-bd4d-3120095b0ebd/apps"
  }
}