Update a Route
PUT /v2/routes/:guid
Request
Route
PUT /v2/routes/fc72a0ae-374b-4f06-b96d-38a3864ee91b
Body
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the route.
|
|
|
|
domain_guid
|
The guid of the associated domain
|
|
|
- guid-c5513758-14df-4d90-900b-97f02005c0a4
|
space_guid
|
The guid of the associated space
|
|
|
- guid-a530e046-d654-4a36-9fcf-5df2d890779c
|
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/fc72a0ae-374b-4f06-b96d-38a3864ee91b" -d '{
"port": 10000
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4MSIsImVtYWlsIjoiZW1haWwtMTg4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg4NTU2Nzl9.zkFzOxUWfUrXMDsBs1j-rVTvWxbnDphMHG5dKxPm4go" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "fc72a0ae-374b-4f06-b96d-38a3864ee91b",
"url": "/v2/routes/fc72a0ae-374b-4f06-b96d-38a3864ee91b",
"created_at": "2016-03-17T21:41:19Z",
"updated_at": "2016-03-17T21:41:19Z"
},
"entity": {
"host": "host-23",
"path": "",
"domain_guid": "6077a91b-66f9-4c52-be1f-f7b4b17a8c0d",
"space_guid": "afed22fe-2b38-4976-9a7d-b81356c82531",
"service_instance_guid": null,
"port": 10000,
"domain_url": "/v2/domains/6077a91b-66f9-4c52-be1f-f7b4b17a8c0d",
"space_url": "/v2/spaces/afed22fe-2b38-4976-9a7d-b81356c82531",
"apps_url": "/v2/routes/fc72a0ae-374b-4f06-b96d-38a3864ee91b/apps",
"route_mappings_url": "/v2/routes/fc72a0ae-374b-4f06-b96d-38a3864ee91b/route_mappings"
}
}
Headers
Audit Records Created By The Request
Audit Record: audit.route.update
Attribute Name |
Value |
id
|
45
|
guid
|
423fd6dc-8553-4276-a53d-905f9d0e7b50
|
created_at
|
2016-03-17 21:41:19 UTC
|
updated_at
|
|
timestamp
|
2016-03-17 21:41:19 UTC
|
type
|
audit.route.update
|
actor
|
uaa-id-281
|
actor_type
|
user
|
actee
|
fc72a0ae-374b-4f06-b96d-38a3864ee91b
|
actee_type
|
route
|
metadata
|
{
"request": {
"port": 10000
}
}
|
space_id
|
|
organization_guid
|
5f811c4f-0ec5-4613-a5ea-cf0c716053c6
|
space_guid
|
afed22fe-2b38-4976-9a7d-b81356c82531
|
actor_name
|
email-188@somedomain.com
|
actee_name
|
host-23
|