Update a Route
PUT /v2/routes/:guid
Request
Route
PUT /v2/routes/19d59d91-2f9a-4495-bdb3-bd0e00992192
Body
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the route.
|
|
|
|
domain_guid
|
The guid of the associated domain
|
|
|
- guid-701052fc-8221-4bb9-a1f4-6e0417617672
|
space_guid
|
The guid of the associated space
|
|
|
- guid-8c7f22f0-5b4b-4739-8453-60365b449f90
|
host
|
The host portion of the route. Required for shared-domains.
|
|
|
|
port
|
The port of the route. Supported for domains of TCP router groups only.
|
|
|
|
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
cURL
curl "https://api.[your-domain.com]/v2/routes/19d59d91-2f9a-4495-bdb3-bd0e00992192" -d '{
"port": 10000
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2OCIsImVtYWlsIjoiZW1haWwtMTM2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MDF9.jJefZXkvoplRu-SWtkslTixSK8_vnKeqoB2RcrwqqNI" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "19d59d91-2f9a-4495-bdb3-bd0e00992192",
"url": "/v2/routes/19d59d91-2f9a-4495-bdb3-bd0e00992192",
"created_at": "2016-04-22T19:33:21Z",
"updated_at": "2016-04-22T19:33:21Z"
},
"entity": {
"host": "host-13",
"path": "",
"domain_guid": "5770213b-d9f0-4b9b-9389-497965ca5f6c",
"space_guid": "abad8768-818c-4935-994d-40f061608227",
"service_instance_guid": null,
"port": 10000,
"domain_url": "/v2/domains/5770213b-d9f0-4b9b-9389-497965ca5f6c",
"space_url": "/v2/spaces/abad8768-818c-4935-994d-40f061608227",
"apps_url": "/v2/routes/19d59d91-2f9a-4495-bdb3-bd0e00992192/apps",
"route_mappings_url": "/v2/routes/19d59d91-2f9a-4495-bdb3-bd0e00992192/route_mappings"
}
}
Headers
Audit Records Created By The Request
Audit Record: audit.route.update
Attribute Name |
Value |
id
|
31
|
guid
|
797109a5-d011-42f5-9902-a91542051274
|
created_at
|
2016-04-22 19:33:21 UTC
|
updated_at
|
|
timestamp
|
2016-04-22 19:33:21 UTC
|
type
|
audit.route.update
|
actor
|
uaa-id-168
|
actor_type
|
user
|
actee
|
19d59d91-2f9a-4495-bdb3-bd0e00992192
|
actee_type
|
route
|
metadata
|
{
"request": {
"port": 10000
}
}
|
space_id
|
|
organization_guid
|
826844b5-2ef6-41b0-9971-ac861d917cc1
|
space_guid
|
abad8768-818c-4935-994d-40f061608227
|
actor_name
|
email-136@somedomain.com
|
actee_name
|
host-13
|