Update a Route
PUT /v2/routes/:guid
Request
Route
PUT /v2/routes/671ec360-6b67-4719-825c-4c7bbe79ad8e
Body
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the route.
|
|
|
|
domain_guid
|
The guid of the associated domain
|
|
|
- guid-5cedb21b-b9df-4d4e-a202-517eb261ad9b
|
space_guid
|
The guid of the associated space
|
|
|
- guid-acc06461-ba7b-47dd-ac1f-666e3d450db2
|
host
|
The host portion of the route
|
|
|
|
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 / 3) Paths must not contain a "?"
|
|
|
- /apps/v1/path
- /apps/v2/path
|
{
"host": "new_host",
"path": "/apps/v1/path",
"port": 10000
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/routes/671ec360-6b67-4719-825c-4c7bbe79ad8e" -d '{
"host": "new_host",
"path": "/apps/v1/path",
"port": 10000
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM3NSIsImVtYWlsIjoiZW1haWwtMjc3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDUzNjIzMTh9.k3BrWFJbergK-OjmkZ2jbeVxZKib55Fto_W4Tvf_G_8" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "671ec360-6b67-4719-825c-4c7bbe79ad8e",
"url": "/v2/routes/671ec360-6b67-4719-825c-4c7bbe79ad8e",
"created_at": "2015-10-13T17:31:58Z",
"updated_at": "2015-10-13T17:31:58Z"
},
"entity": {
"host": "new_host",
"path": "/apps/v1/path",
"domain_guid": "f1095059-0cb0-4536-aff2-c5d9ece0e9bf",
"space_guid": "ff1c9177-3375-4582-aac0-9b474decd431",
"service_instance_guid": null,
"port": 10000,
"domain_url": "/v2/domains/f1095059-0cb0-4536-aff2-c5d9ece0e9bf",
"space_url": "/v2/spaces/ff1c9177-3375-4582-aac0-9b474decd431",
"apps_url": "/v2/routes/671ec360-6b67-4719-825c-4c7bbe79ad8e/apps"
}
}
Headers