Home
Version 3
Routes Mapping API

Routes Mapping API

Updating a Route Mapping

PUT /v2/route_mappings/:guid

Request

Route

PUT /v2/route_mappings/cf679611-4849-4b28-89a2-6bdbcace7a60

Body

Name Description Default Valid Values Example Values
app_port Port on which the application should listen, and to which requests for the mapped route will be routed. Must be among those already configured for the app.
{
  "app_port": 8889
}

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/route_mappings/cf679611-4849-4b28-89a2-6bdbcace7a60" -d '{
  "app_port": 8889
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTUiLCJlbWFpbCI6ImVtYWlsLTVAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2MzYxODcwM30.qwLUZfCMF7TvfbPqEPOYVvXYz59tkMMKETq8712sRrA" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "cf679611-4849-4b28-89a2-6bdbcace7a60",
    "url": "/v2/route_mappings/cf679611-4849-4b28-89a2-6bdbcace7a60",
    "created_at": "2016-05-12T00:45:03Z",
    "updated_at": "2016-05-12T00:45:03Z"
  },
  "entity": {
    "app_port": 8889,
    "app_guid": "54a2f320-27e7-435d-9da4-ed4d342bd4a3",
    "route_guid": "7964ec7b-6d52-4ae7-8790-7be4ea96d4bb",
    "app_url": "/v2/apps/54a2f320-27e7-435d-9da4-ed4d342bd4a3",
    "route_url": "/v2/routes/7964ec7b-6d52-4ae7-8790-7be4ea96d4bb"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 49efb215-f632-4d2d-b7fd-d744b525983e
Content-Length: 514
X-Content-Type-Options: nosniff