Update a Route
PUT /v2/routes/:guid
Request
Route
PUT /v2/routes/527294bf-1f33-478b-b7e2-b97b206499d0
Body
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the route.
|
|
|
|
domain_guid
|
The guid of the associated domain
|
|
|
- guid-385192a0-5533-4a08-8211-21604223ae93
|
space_guid
|
The guid of the associated space
|
|
|
- guid-50955701-9c49-413e-ae4f-a297d20f3c4c
|
host
|
The host portion of the route
|
|
|
|
{
"host": "new_host"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/routes/527294bf-1f33-478b-b7e2-b97b206499d0" -d '{
"host": "new_host"
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMxNCIsImVtYWlsIjoiZW1haWwtMjE2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjU5NDg2NzJ9.jFtgBZmtekXcNEMeTz6ixPTioCfw1RgyZPDKJ8QRTBI" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "527294bf-1f33-478b-b7e2-b97b206499d0",
"url": "/v2/routes/527294bf-1f33-478b-b7e2-b97b206499d0",
"created_at": "2015-03-03T00:51:12Z",
"updated_at": "2015-03-03T00:51:12Z"
},
"entity": {
"host": "new_host",
"domain_guid": "484ba5bc-6028-4ec6-bbd4-31b952ea39b9",
"space_guid": "2f2b03b2-0659-4398-8cc9-3eb31f893ded",
"domain_url": "/v2/domains/484ba5bc-6028-4ec6-bbd4-31b952ea39b9",
"space_url": "/v2/spaces/2f2b03b2-0659-4398-8cc9-3eb31f893ded",
"apps_url": "/v2/routes/527294bf-1f33-478b-b7e2-b97b206499d0/apps"
}
}
Headers