Update a Route
PUT /v2/routes/:guid
Request
Route
PUT /v2/routes/fa270067-983e-497c-a979-c427dafa70ec
Body
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the route.
|
|
|
|
domain_guid
|
The guid of the associated domain
|
|
|
- guid-bbb9b3c8-7285-4190-8f11-56f509c15f56
|
space_guid
|
The guid of the associated space
|
|
|
- guid-7c20c304-f50e-4d94-a7bd-800311a79a68
|
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/fa270067-983e-497c-a979-c427dafa70ec" -d '{
"host": "new_host",
"path": "/apps/v1/path"
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM5OSIsImVtYWlsIjoiZW1haWwtMjY3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5NDN9._x99OJnDyDJUvVXq6bxdFXdUzIWEV9IZ-nDk6AnVKFc" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "fa270067-983e-497c-a979-c427dafa70ec",
"url": "/v2/routes/fa270067-983e-497c-a979-c427dafa70ec",
"created_at": "2015-10-07T00:35:43Z",
"updated_at": "2015-10-07T00:35:43Z"
},
"entity": {
"host": "new_host",
"path": "/apps/v1/path",
"domain_guid": "d0f164d2-e520-4bc7-adce-940ef0631be0",
"space_guid": "3fd6e7cf-43c7-416a-a1bc-dba44b4f7415",
"service_instance_guid": null,
"domain_url": "/v2/domains/d0f164d2-e520-4bc7-adce-940ef0631be0",
"space_url": "/v2/spaces/3fd6e7cf-43c7-416a-a1bc-dba44b4f7415",
"apps_url": "/v2/routes/fa270067-983e-497c-a979-c427dafa70ec/apps"
}
}
Headers