Update a Route
PUT /v2/routes/:guid
Request
Route
PUT /v2/routes/b0b1e80e-0a0f-429f-9063-0ed9c997e722
Body
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the route.
|
|
|
|
domain_guid
|
The guid of the associated domain
|
|
|
- guid-a84bf60f-fb2c-46e2-b38c-3c7c8a78e86d
|
space_guid
|
The guid of the associated space
|
|
|
- guid-bcb6353d-42b3-4336-bec0-662dfab017b6
|
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/b0b1e80e-0a0f-429f-9063-0ed9c997e722" -d '{
"port": 10000
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM1OSIsImVtYWlsIjoiZW1haWwtMjYxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjEzNzQ2NDN9.cy_Qm2jB0Njxnzxxsax3znM2w4snnWX40NH4xIJL56I" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "b0b1e80e-0a0f-429f-9063-0ed9c997e722",
"url": "/v2/routes/b0b1e80e-0a0f-429f-9063-0ed9c997e722",
"created_at": "2016-04-16T01:24:03Z",
"updated_at": "2016-04-16T01:24:03Z"
},
"entity": {
"host": "host-31",
"path": "",
"domain_guid": "8e03dec0-7b40-408b-b370-0d8d1d2b1f11",
"space_guid": "b5a34353-e59d-4433-a976-ec0e2b72488e",
"service_instance_guid": null,
"port": 10000,
"domain_url": "/v2/domains/8e03dec0-7b40-408b-b370-0d8d1d2b1f11",
"space_url": "/v2/spaces/b5a34353-e59d-4433-a976-ec0e2b72488e",
"apps_url": "/v2/routes/b0b1e80e-0a0f-429f-9063-0ed9c997e722/apps",
"route_mappings_url": "/v2/routes/b0b1e80e-0a0f-429f-9063-0ed9c997e722/route_mappings"
}
}
Headers
Audit Records Created By The Request
Audit Record: audit.route.update
Attribute Name |
Value |
id
|
58
|
guid
|
c1303120-54c5-4056-a622-1f2715a29ed6
|
created_at
|
2016-04-16 01:24:03 UTC
|
updated_at
|
|
timestamp
|
2016-04-16 01:24:03 UTC
|
type
|
audit.route.update
|
actor
|
uaa-id-359
|
actor_type
|
user
|
actee
|
b0b1e80e-0a0f-429f-9063-0ed9c997e722
|
actee_type
|
route
|
metadata
|
{
"request": {
"port": 10000
}
}
|
space_id
|
|
organization_guid
|
d20c2655-b48d-48ab-9065-8f6e0182faf1
|
space_guid
|
b5a34353-e59d-4433-a976-ec0e2b72488e
|
actor_name
|
email-261@somedomain.com
|
actee_name
|
host-31
|