Update a Route
PUT /v2/routes/:guid
Fields
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the route.
|
|
|
|
domain_guid
|
The guid of the associated domain
|
|
|
- guid-cb3c632f-8b37-4242-b83b-c29e542e2b4b
|
space_guid
|
The guid of the associated space
|
|
|
- guid-52d8501b-a437-49c2-98d9-0dca623759fd
|
host
|
The host portion of the route
|
|
|
|
Request
Headers
Route
PUT /v2/routes/8bb76d13-847d-4935-b7f4-636de2102c71
Body
{
"host": "new_host"
}
cURL
curl "https://api.[your-domain.com]/v2/routes/8bb76d13-847d-4935-b7f4-636de2102c71" -d '{
"host": "new_host"
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk3IiwiZW1haWwiOiJlbWFpbC02OEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDIyOTkwODY5fQ.5bEaoXxTZlnld598MY7Wgpn1WaOg5cmjTgS9nhBbyzI" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Headers
Status
201 Created
Body
{
"metadata": {
"guid": "8bb76d13-847d-4935-b7f4-636de2102c71",
"url": "/v2/routes/8bb76d13-847d-4935-b7f4-636de2102c71",
"created_at": "2015-01-27T19:14:29Z",
"updated_at": "2015-01-27T19:14:29Z"
},
"entity": {
"host": "new_host",
"domain_guid": "89e40a01-bef0-4a3c-97c8-6ca3d6fbfa8c",
"space_guid": "e669ffef-0688-4054-bdef-7e8bd6dc3ef3",
"domain_url": "/v2/domains/89e40a01-bef0-4a3c-97c8-6ca3d6fbfa8c",
"space_url": "/v2/spaces/e669ffef-0688-4054-bdef-7e8bd6dc3ef3",
"apps_url": "/v2/routes/8bb76d13-847d-4935-b7f4-636de2102c71/apps"
}
}