Home
Version 3
Routes API

Routes API

Update a Route

PUT /v2/routes/:guid

Request

Route

PUT /v2/routes/ab3bd54b-08b6-45c7-9900-7334a1543fee

Body

Name Description Default Valid Values Example Values
guid The guid of the route.
domain_guid The guid of the associated domain
  • guid-182500d4-3a44-4854-9855-d36e28ddec26
space_guid The guid of the associated space
  • guid-1d22beb4-aa8e-40a3-b6ea-82f0f8736121
host The host portion of the route
{
  "host": "new_host"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM5IiwiZW1haWwiOiJlbWFpbC0zOUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI5MDM4Njk5fQ.69xt2ZAM9BYoYHbObrsZ89RG14wXKY764wQJAa5Tlxg
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/routes/ab3bd54b-08b6-45c7-9900-7334a1543fee" -d '{
  "host": "new_host"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM5IiwiZW1haWwiOiJlbWFpbC0zOUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI5MDM4Njk5fQ.69xt2ZAM9BYoYHbObrsZ89RG14wXKY764wQJAa5Tlxg" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "ab3bd54b-08b6-45c7-9900-7334a1543fee",
    "url": "/v2/routes/ab3bd54b-08b6-45c7-9900-7334a1543fee",
    "created_at": "2015-04-07T19:11:39Z",
    "updated_at": "2015-04-07T19:11:39Z"
  },
  "entity": {
    "host": "new_host",
    "domain_guid": "da2695a7-a528-464d-b94d-9f1dae9991c1",
    "space_guid": "5c85d433-ab32-4f27-ba58-135f6b9c40c2",
    "domain_url": "/v2/domains/da2695a7-a528-464d-b94d-9f1dae9991c1",
    "space_url": "/v2/spaces/5c85d433-ab32-4f27-ba58-135f6b9c40c2",
    "apps_url": "/v2/routes/ab3bd54b-08b6-45c7-9900-7334a1543fee/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: e8d1fb0b-88e6-49cf-8eca-e2e09c777a90
Content-Length: 589
X-Content-Type-Options: nosniff