Update a Route
PUT /v2/routes/:guid
Request
Route
PUT /v2/routes/fcbf6e9d-8e61-4fd8-a8c2-2149339c34f4
Body
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the route.
|
|
|
|
domain_guid
|
The guid of the associated domain
|
|
|
- guid-620f481e-4eb4-4d77-9628-2ca606babc4a
|
space_guid
|
The guid of the associated space
|
|
|
- guid-45ac768e-b395-45de-a629-8a476a613b61
|
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/fcbf6e9d-8e61-4fd8-a8c2-2149339c34f4" -d '{
"host": "new_host",
"path": "/apps/v1/path",
"port": 10000
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIzOSIsImVtYWlsIjoiZW1haWwtMTQzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NDd9.k7hcqU-aflLvyibX1reWHcFuV4MxUU0x_ioeYABQ9NY" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "fcbf6e9d-8e61-4fd8-a8c2-2149339c34f4",
"url": "/v2/routes/fcbf6e9d-8e61-4fd8-a8c2-2149339c34f4",
"created_at": "2015-10-15T23:52:27Z",
"updated_at": "2015-10-15T23:52:27Z"
},
"entity": {
"host": "new_host",
"path": "/apps/v1/path",
"domain_guid": "86ddfb29-d18c-49ad-ab2c-1f4eb6a1bd66",
"space_guid": "e45ac021-074c-4d17-9531-a0e6dcb11f48",
"service_instance_guid": null,
"port": 10000,
"domain_url": "/v2/domains/86ddfb29-d18c-49ad-ab2c-1f4eb6a1bd66",
"space_url": "/v2/spaces/e45ac021-074c-4d17-9531-a0e6dcb11f48",
"apps_url": "/v2/routes/fcbf6e9d-8e61-4fd8-a8c2-2149339c34f4/apps"
}
}
Headers