Home
Version 3
Routes API

Routes API

Update a Route

PUT /v2/routes/:guid

Request

Route

PUT /v2/routes/61292ec3-24ce-4425-955c-5a177280e81c

Body

Name Description Default Valid Values Example Values
guid The guid of the route.
domain_guid The guid of the associated domain
  • guid-adc5a08e-0394-4219-b176-aa46f3d3fdf3
space_guid The guid of the associated space
  • guid-c6b5abc6-b8cb-4cbb-9375-c8e1cb173799
host The host portion of the route
port The port of the route. Supported for domains of TCP router groups only.
  • 1024-65535
  • 50000
path The path for a route as raw text. 1) Paths must be between 2 and 128 characters 2) Paths must start with a forward slash "/" 3) Paths must not contain a "?"
  • /apps/v1/path
  • /apps/v2/path
{
  "port": 10000
}

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/routes/61292ec3-24ce-4425-955c-5a177280e81c" -d '{
  "port": 10000
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM1MCIsImVtYWlsIjoiZW1haWwtMjUwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTY0NTIyNDJ9.BHVTZ98L_ZpXjDGqxc9_6drd9JwCKr05wx52wNtPGmU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "61292ec3-24ce-4425-955c-5a177280e81c",
    "url": "/v2/routes/61292ec3-24ce-4425-955c-5a177280e81c",
    "created_at": "2016-02-19T02:04:02Z",
    "updated_at": "2016-02-19T02:04:02Z"
  },
  "entity": {
    "host": "host-24",
    "path": "",
    "domain_guid": "220230ff-ec71-475b-93b7-e3a39073872e",
    "space_guid": "7d6a7132-3e3d-4577-a501-2ef4f23141bc",
    "service_instance_guid": null,
    "port": 10000,
    "domain_url": "/v2/domains/220230ff-ec71-475b-93b7-e3a39073872e",
    "space_url": "/v2/spaces/7d6a7132-3e3d-4577-a501-2ef4f23141bc",
    "apps_url": "/v2/routes/61292ec3-24ce-4425-955c-5a177280e81c/apps"
  }
}

Headers

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

Audit Records Created By The Request

Audit Record: audit.route.update

Attribute Name Value
id 174
guid 6183dce9-5094-40e6-a4b1-fda08356d824
created_at 2016-02-19 02:04:02 UTC
updated_at
timestamp 2016-02-19 02:04:02 UTC
type audit.route.update
actor uaa-id-350
actor_type user
actee 61292ec3-24ce-4425-955c-5a177280e81c
actee_type route
metadata
{
  "request": {
    "port": 10000
  }
}
space_id
organization_guid d724c367-e2f5-495f-bf39-f0be689d440a
space_guid 7d6a7132-3e3d-4577-a501-2ef4f23141bc
actor_name email-250@somedomain.com
actee_name host-24