Home
Version 3
Routes API

Routes API

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

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk3IiwiZW1haWwiOiJlbWFpbC02OEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDIyOTkwODY5fQ.5bEaoXxTZlnld598MY7Wgpn1WaOg5cmjTgS9nhBbyzI
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

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

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: ef86d0af-a679-47f3-aa43-cb9e24321935
Content-Length: 589
X-Content-Type-Options: nosniff

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"
  }
}