Home
Version 3
Routes Mapping API

Routes Mapping API

Updating a Route Mapping

PUT /v2/route_mappings/:guid

Request

Route

PUT /v2/route_mappings/2a6b6a79-aa5c-4206-af48-c90c19ab5bd0

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

cURL

curl "https://api.[your-domain.com]/v2/route_mappings/2a6b6a79-aa5c-4206-af48-c90c19ab5bd0" -d '{
  "app_port": 8889
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM2NSIsImVtYWlsIjoiZW1haWwtMjY3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MTJ9.S7_KEVC0TAXYKQxv5fuUzsemjaB3_Adu0xeexwA04kw" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "2a6b6a79-aa5c-4206-af48-c90c19ab5bd0",
    "url": "/v2/route_mappings/2a6b6a79-aa5c-4206-af48-c90c19ab5bd0",
    "created_at": "2016-04-22T19:33:32Z",
    "updated_at": "2016-04-22T19:33:32Z"
  },
  "entity": {
    "app_port": 8889,
    "app_guid": "bdff79fe-d7ca-4617-93b8-fa7f7ab81c94",
    "route_guid": "e29f4bc6-6664-42d2-80bf-38f17b5f1f10",
    "app_url": "/v2/apps/bdff79fe-d7ca-4617-93b8-fa7f7ab81c94",
    "route_url": "/v2/routes/e29f4bc6-6664-42d2-80bf-38f17b5f1f10"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: d93fa1c5-21ef-40fe-8265-2b46ca756b8f
Content-Length: 514
X-Content-Type-Options: nosniff