Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/c6aa1284-6ead-4935-9685-49af39c5c520/apps/ee63f380-d278-4218-9282-25ce98f43bd7

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

cURL

curl "https://api.[your-domain.com]/v2/routes/c6aa1284-6ead-4935-9685-49af39c5c520/apps/ee63f380-d278-4218-9282-25ce98f43bd7" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQyNCIsImVtYWlsIjoiZW1haWwtMjg2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjM2MTg3Mjh9.CI0ADfCs0nWbexfDbir8HDk69L4wRM6hdKfoFSDNaOM" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "c6aa1284-6ead-4935-9685-49af39c5c520",
    "url": "/v2/routes/c6aa1284-6ead-4935-9685-49af39c5c520",
    "created_at": "2016-05-12T00:45:28Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-36",
    "path": "",
    "domain_guid": "1bc51d01-359c-4254-b93f-bb9c0b45cfb3",
    "space_guid": "bcbe4ea3-2a54-45bf-89b3-5a41c2c61f59",
    "service_instance_guid": null,
    "port": null,
    "domain_url": "/v2/domains/1bc51d01-359c-4254-b93f-bb9c0b45cfb3",
    "space_url": "/v2/spaces/bcbe4ea3-2a54-45bf-89b3-5a41c2c61f59",
    "apps_url": "/v2/routes/c6aa1284-6ead-4935-9685-49af39c5c520/apps",
    "route_mappings_url": "/v2/routes/c6aa1284-6ead-4935-9685-49af39c5c520/route_mappings"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: b68b251d-27d2-453a-9fb2-a89e13a27861
Content-Length: 731
X-Content-Type-Options: nosniff