Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/4939e919-dc8d-495a-a58b-a44fefd2cf01/apps/2dc6a516-26e8-41c7-8d78-d447db2bf063

Parameters

Name Description Valid Values Example Values
app_guid The guid of the app

Body

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

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/routes/4939e919-dc8d-495a-a58b-a44fefd2cf01/apps/2dc6a516-26e8-41c7-8d78-d447db2bf063" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM5OSIsImVtYWlsIjoiZW1haWwtMjcwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTMzMTA5OTF9.loGzkEJrz7pJZ6sSgsC1KqlVjKBHrz3fEfNd1r3UmMc" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "4939e919-dc8d-495a-a58b-a44fefd2cf01",
    "url": "/v2/routes/4939e919-dc8d-495a-a58b-a44fefd2cf01",
    "created_at": "2016-01-13T17:29:51Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-20",
    "path": "",
    "domain_guid": "049d2ef0-fb61-47a1-8992-7341e6b2f0e1",
    "space_guid": "f1d1322f-c3b8-4794-afd3-a857bed1b964",
    "service_instance_guid": null,
    "port": 0,
    "domain_url": "/v2/domains/049d2ef0-fb61-47a1-8992-7341e6b2f0e1",
    "space_url": "/v2/spaces/f1d1322f-c3b8-4794-afd3-a857bed1b964",
    "apps_url": "/v2/routes/4939e919-dc8d-495a-a58b-a44fefd2cf01/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 
Content-Length: 636
X-Content-Type-Options: nosniff