Update a Route
PUT /v2/routes/:guid
Request
Route
PUT /v2/routes/befaea4a-04b6-40a6-b66a-9a8cefa6ba91
Body
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the route.
|
|
|
|
domain_guid
|
The guid of the associated domain
|
|
|
- guid-b0a4d63e-9325-4df3-8b3a-5b0c0e0a8fea
|
space_guid
|
The guid of the associated space
|
|
|
- guid-075a7689-1ac2-493e-8882-f513955c26f5
|
host
|
The host portion of the route
|
|
|
|
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"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/routes/befaea4a-04b6-40a6-b66a-9a8cefa6ba91" -d '{
"host": "new_host",
"path": "/apps/v1/path"
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQxNCIsImVtYWlsIjoiZW1haWwtMzA2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk4MDF9.amPC0fTrTImOXsXP6KAYl7N9_G_fkzATdRSgsQhMzww" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "befaea4a-04b6-40a6-b66a-9a8cefa6ba91",
"url": "/v2/routes/befaea4a-04b6-40a6-b66a-9a8cefa6ba91",
"created_at": "2015-07-06T23:23:21Z",
"updated_at": "2015-07-06T23:23:21Z"
},
"entity": {
"host": "new_host",
"path": "/apps/v1/path",
"domain_guid": "5009cc83-eba2-4af0-ab87-fcc0deb18f27",
"space_guid": "debd5143-04d6-4644-8a9e-2ad4f575d8fa",
"domain_url": "/v2/domains/5009cc83-eba2-4af0-ab87-fcc0deb18f27",
"space_url": "/v2/spaces/debd5143-04d6-4644-8a9e-2ad4f575d8fa",
"apps_url": "/v2/routes/befaea4a-04b6-40a6-b66a-9a8cefa6ba91/apps"
}
}
Headers