Home
Version 3
Routes API

Routes API

Update a Route

PUT /v2/routes/:guid

Request

Route

PUT /v2/routes/11640704-d5ef-406e-815b-aa8b90c822ac

Body

Name Description Default Valid Values Example Values
guid The guid of the route.
domain_guid The guid of the associated domain
  • guid-6904b9a2-8dd2-411c-b589-a8f71d8ec4e1
space_guid The guid of the associated space
  • guid-e704fa17-c238-4676-bd9a-05ec888a9593
host The host portion of the route
{
  "host": "new_host"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQzIiwiZW1haWwiOiJlbWFpbC00MUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI2NjMzODk3fQ.w-5WMeF0kE9pgTbbBLYq9tiEdIvr6P5nsx9kDDcHPLg
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/routes/11640704-d5ef-406e-815b-aa8b90c822ac" -d '{
  "host": "new_host"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQzIiwiZW1haWwiOiJlbWFpbC00MUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI2NjMzODk3fQ.w-5WMeF0kE9pgTbbBLYq9tiEdIvr6P5nsx9kDDcHPLg" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "11640704-d5ef-406e-815b-aa8b90c822ac",
    "url": "/v2/routes/11640704-d5ef-406e-815b-aa8b90c822ac",
    "created_at": "2015-03-10T23:11:37Z",
    "updated_at": "2015-03-10T23:11:37Z"
  },
  "entity": {
    "host": "new_host",
    "domain_guid": "dfa7cbc4-cf51-4a4b-950d-aaf5c9ad5a2b",
    "space_guid": "874eecfd-5b34-47b4-84e6-757a723ebc31",
    "domain_url": "/v2/domains/dfa7cbc4-cf51-4a4b-950d-aaf5c9ad5a2b",
    "space_url": "/v2/spaces/874eecfd-5b34-47b4-84e6-757a723ebc31",
    "apps_url": "/v2/routes/11640704-d5ef-406e-815b-aa8b90c822ac/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: c5b7cbf2-bf93-4e94-88d7-b1ba6c2559a6
Content-Length: 589
X-Content-Type-Options: nosniff