Update a Route
PUT /v2/routes/:guid
Request
Route
PUT /v2/routes/171d193c-54cb-4c61-9e8e-8fa7cc03510e
Body
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the route.
|
|
|
|
domain_guid
|
The guid of the associated domain
|
|
|
- guid-0f84b83c-edf5-413b-bcef-c7d08ac17e93
|
space_guid
|
The guid of the associated space
|
|
|
- guid-289f5fb8-31d3-468f-ac23-c3a33e7d56bd
|
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/171d193c-54cb-4c61-9e8e-8fa7cc03510e" -d '{
"host": "new_host",
"path": "/apps/v1/path"
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NyIsImVtYWlsIjoiZW1haWwtMTgwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDI2MDE1Mzl9.togfYtu8zN18ZOvg0I80nv2A_uGf3JCWoHdei7yNe-o" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "171d193c-54cb-4c61-9e8e-8fa7cc03510e",
"url": "/v2/routes/171d193c-54cb-4c61-9e8e-8fa7cc03510e",
"created_at": "2015-09-11T18:38:59Z",
"updated_at": "2015-09-11T18:38:59Z"
},
"entity": {
"host": "new_host",
"path": "/apps/v1/path",
"domain_guid": "09fc9cd9-61be-436b-936b-40863b1e0ad3",
"space_guid": "d13b2b81-2005-4fa9-a841-6f2b5f1a0a2d",
"service_instance_guid": "6be10249-d3b5-4503-bc3e-04f072249596",
"domain_url": "/v2/domains/09fc9cd9-61be-436b-936b-40863b1e0ad3",
"space_url": "/v2/spaces/d13b2b81-2005-4fa9-a841-6f2b5f1a0a2d",
"service_instance_url": "/v2/service_instances/6be10249-d3b5-4503-bc3e-04f072249596",
"apps_url": "/v2/routes/171d193c-54cb-4c61-9e8e-8fa7cc03510e/apps"
}
}
Headers