Home
Version 3
Routes API

Routes API

Associate App with the Route

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

Request

Route

PUT /v2/routes/e1e9f65f-c7f8-4bb5-a632-7a1bdc656e45/apps/72c3b2ea-ae8f-44f0-9a71-84c71f32f1ea

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.eyJ1c2VyX2lkIjoidWFhLWlkLTQzMyIsImVtYWlsIjoiZW1haWwtMzAyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjA1MDY2NjJ9.56XHIozgQZfQP8b5o720JKJH3K0DvGgHtWt-dMno8OQ
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/routes/e1e9f65f-c7f8-4bb5-a632-7a1bdc656e45/apps/72c3b2ea-ae8f-44f0-9a71-84c71f32f1ea" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQzMyIsImVtYWlsIjoiZW1haWwtMzAyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjA1MDY2NjJ9.56XHIozgQZfQP8b5o720JKJH3K0DvGgHtWt-dMno8OQ" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "e1e9f65f-c7f8-4bb5-a632-7a1bdc656e45",
    "url": "/v2/routes/e1e9f65f-c7f8-4bb5-a632-7a1bdc656e45",
    "created_at": "2016-04-06T00:17:42Z",
    "updated_at": null
  },
  "entity": {
    "host": "host-33",
    "path": "",
    "domain_guid": "7227e7f6-ec4e-41b2-8937-5778d60c4efd",
    "space_guid": "bddba5ec-b3b6-4b68-9d6d-01eda63ef0b6",
    "service_instance_guid": null,
    "port": 0,
    "domain_url": "/v2/domains/7227e7f6-ec4e-41b2-8937-5778d60c4efd",
    "space_url": "/v2/spaces/bddba5ec-b3b6-4b68-9d6d-01eda63ef0b6",
    "apps_url": "/v2/routes/e1e9f65f-c7f8-4bb5-a632-7a1bdc656e45/apps",
    "route_mappings_url": "/v2/routes/e1e9f65f-c7f8-4bb5-a632-7a1bdc656e45/route_mappings"
  }
}

Headers

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