Update a Route
PUT /v2/routes/:guid
Request
Route
PUT /v2/routes/ec753925-65b2-4054-b5e2-bd26734e1288
Body
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the route.
|
|
|
|
domain_guid
|
The guid of the associated domain
|
|
|
- guid-09c6bcc4-84a2-4ce9-9f97-0cf9fdc00d40
|
space_guid
|
The guid of the associated space
|
|
|
- guid-77d7b2cd-bb7c-45f7-af83-f20aa5737f0f
|
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/ec753925-65b2-4054-b5e2-bd26734e1288" -d '{
"port": 10000
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQxNyIsImVtYWlsIjoiZW1haWwtMjc5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjM2MTg3Mjh9.mygpnrpuZy6gH5KlAecXAABaDuf1vpSPesxRQO9w5Q0" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "ec753925-65b2-4054-b5e2-bd26734e1288",
"url": "/v2/routes/ec753925-65b2-4054-b5e2-bd26734e1288",
"created_at": "2016-05-12T00:45:27Z",
"updated_at": "2016-05-12T00:45:27Z"
},
"entity": {
"host": "host-29",
"path": "",
"domain_guid": "272090c9-4fe8-418c-8a70-55c88e13cbf0",
"space_guid": "afa88b2e-a7aa-467b-b640-9887cb80627d",
"service_instance_guid": null,
"port": 10000,
"domain_url": "/v2/domains/272090c9-4fe8-418c-8a70-55c88e13cbf0",
"space_url": "/v2/spaces/afa88b2e-a7aa-467b-b640-9887cb80627d",
"apps_url": "/v2/routes/ec753925-65b2-4054-b5e2-bd26734e1288/apps",
"route_mappings_url": "/v2/routes/ec753925-65b2-4054-b5e2-bd26734e1288/route_mappings"
}
}
Headers
Audit Records Created By The Request
Audit Record: audit.route.update
Attribute Name |
Value |
id
|
216
|
guid
|
034acf4e-ca2f-40b6-998c-1f826f4c9d5f
|
created_at
|
2016-05-12 00:45:27 UTC
|
updated_at
|
|
timestamp
|
2016-05-12 00:45:27 UTC
|
type
|
audit.route.update
|
actor
|
uaa-id-417
|
actor_type
|
user
|
actee
|
ec753925-65b2-4054-b5e2-bd26734e1288
|
actee_type
|
route
|
metadata
|
{
"request": {
"port": 10000
}
}
|
space_id
|
|
organization_guid
|
cec3560b-19fa-4376-b123-b9de1207464b
|
space_guid
|
afa88b2e-a7aa-467b-b640-9887cb80627d
|
actor_name
|
email-279@somedomain.com
|
actee_name
|
host-29
|