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-5b93f274-816d-471d-9873-d3baabf3f96c
|
space_guid
|
The guid of the associated space
|
|
|
- guid-51e70967-a567-42cf-b800-0cf407045cdf
|
host
|
The host portion of the route
|
|
|
|
Request
Headers
Route
PUT /v2/routes/d158c4eb-fb2a-4c82-b4eb-1cca3fb92bff
Body
{
"host": "new_host"
}
cURL
curl "https://api.[your-domain.com]/v2/routes/d158c4eb-fb2a-4c82-b4eb-1cca3fb92bff" -d '{
"host": "new_host"
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTg4IiwiZW1haWwiOiJlbWFpbC01OEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDIyMzIzNTM0fQ.aDwO640-zhsRRKwYw7kEhHrasqQuxUxQNH-ULvNalv8" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Headers
Status
201 Created
Body
{
"metadata": {
"guid": "d158c4eb-fb2a-4c82-b4eb-1cca3fb92bff",
"url": "/v2/routes/d158c4eb-fb2a-4c82-b4eb-1cca3fb92bff",
"created_at": "2015-01-20T01:52:13+00:00",
"updated_at": "2015-01-20T01:52:13+00:00"
},
"entity": {
"host": "new_host",
"domain_guid": "1e76387b-6734-47e7-9d94-5587df89e645",
"space_guid": "f8206374-2ae8-4a91-93c1-8b3ee3574d4e",
"domain_url": "/v2/domains/1e76387b-6734-47e7-9d94-5587df89e645",
"space_url": "/v2/spaces/f8206374-2ae8-4a91-93c1-8b3ee3574d4e",
"apps_url": "/v2/routes/d158c4eb-fb2a-4c82-b4eb-1cca3fb92bff/apps"
}
}