Update a Route
PUT /v2/routes/:guid
Request
Route
PUT /v2/routes/1d641f4c-65cb-45da-b14c-2125762fc305
Body
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the route.
|
|
|
|
domain_guid
|
The guid of the associated domain
|
|
|
- guid-f8dd041a-90a0-4a6b-a500-334c945f2d89
|
space_guid
|
The guid of the associated space
|
|
|
- guid-ac2ab6a7-2a67-44d7-b06b-536841b8caf6
|
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/1d641f4c-65cb-45da-b14c-2125762fc305" -d '{
"port": 10000
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzMyIsImVtYWlsIjoiZW1haWwtOTRAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ1ODU5OTQzMX0.FXmPIH3uIAULj0qWGc1bWK3jyQoqHYd-IK592PLWBf8" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "1d641f4c-65cb-45da-b14c-2125762fc305",
"url": "/v2/routes/1d641f4c-65cb-45da-b14c-2125762fc305",
"created_at": "2016-03-14T22:30:31Z",
"updated_at": "2016-03-14T22:30:31Z"
},
"entity": {
"host": "host-14",
"path": "",
"domain_guid": "742cb103-6a8a-4357-8811-89b4205d3214",
"space_guid": "798c9383-5e08-412e-953d-8c4c56a8c7d3",
"service_instance_guid": null,
"port": 10000,
"domain_url": "/v2/domains/742cb103-6a8a-4357-8811-89b4205d3214",
"space_url": "/v2/spaces/798c9383-5e08-412e-953d-8c4c56a8c7d3",
"apps_url": "/v2/routes/1d641f4c-65cb-45da-b14c-2125762fc305/apps",
"route_mappings_url": "/v2/routes/1d641f4c-65cb-45da-b14c-2125762fc305/route_mappings"
}
}
Headers
Audit Records Created By The Request
Audit Record: audit.route.update
Attribute Name |
Value |
id
|
174
|
guid
|
be8c6768-9b11-4bad-a31a-f976de1097db
|
created_at
|
2016-03-14 22:30:31 UTC
|
updated_at
|
|
timestamp
|
2016-03-14 22:30:31 UTC
|
type
|
audit.route.update
|
actor
|
uaa-id-133
|
actor_type
|
user
|
actee
|
1d641f4c-65cb-45da-b14c-2125762fc305
|
actee_type
|
route
|
metadata
|
{
"request": {
"port": 10000
}
}
|
space_id
|
|
organization_guid
|
395d0e1b-43eb-4682-8f38-87e8c41f6376
|
space_guid
|
798c9383-5e08-412e-953d-8c4c56a8c7d3
|
actor_name
|
email-94@somedomain.com
|
actee_name
|
host-14
|