Home
Version 3
Routes Mapping API

Routes Mapping API

Updating a Route Mapping

PUT /v2/route_mappings/:guid

Request

Route

PUT /v2/route_mappings/a5e35b1d-692c-47ef-b546-1ebfae67595f

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

cURL

curl "https://api.[your-domain.com]/v2/route_mappings/a5e35b1d-692c-47ef-b546-1ebfae67595f" -d '{
  "app_port": 8889
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQyNyIsImVtYWlsIjoiZW1haWwtMjg5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg5MDJ9.wbJbX2NLZSFbTp5gWGOcMUj_113RZS5c3t_c7SHJV0w" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "a5e35b1d-692c-47ef-b546-1ebfae67595f",
    "url": "/v2/route_mappings/a5e35b1d-692c-47ef-b546-1ebfae67595f",
    "created_at": "2016-06-08T16:41:42Z",
    "updated_at": "2016-06-08T16:41:42Z"
  },
  "entity": {
    "app_port": 8889,
    "app_guid": "651434e0-25d0-417f-b88b-962e5fe6eb8a",
    "route_guid": "4b649f4f-40ce-4e25-99da-2c742f10a0c8",
    "app_url": "/v2/apps/651434e0-25d0-417f-b88b-962e5fe6eb8a",
    "route_url": "/v2/routes/4b649f4f-40ce-4e25-99da-2c742f10a0c8"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: b46ec058-659a-4bcc-b04c-ce5d9a454dad
Content-Length: 514
X-Content-Type-Options: nosniff