Home
Version 3
Routes API

Routes API

Update a Route

PUT /v2/routes/:guid

Request

Route

PUT /v2/routes/61369bc2-7292-453f-9225-0fc5ef45f831

Body

Name Description Default Valid Values Example Values
guid The guid of the route.
domain_guid The guid of the associated domain
  • guid-6c1c6c36-3ee2-4dfe-8231-5bee6195f226
space_guid The guid of the associated space
  • guid-a35c6fdc-6ac0-4f4e-a0af-8a6022f26983
host The host portion of the route
{
  "host": "new_host"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5MiIsImVtYWlsIjoiZW1haWwtMTQ0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjYxODc3NDd9.Y_jl4UEro5FD70IG6dzrLdcXsPKHkpaRrZfcD1qs4ZI
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/routes/61369bc2-7292-453f-9225-0fc5ef45f831" -d '{
  "host": "new_host"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5MiIsImVtYWlsIjoiZW1haWwtMTQ0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjYxODc3NDd9.Y_jl4UEro5FD70IG6dzrLdcXsPKHkpaRrZfcD1qs4ZI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "61369bc2-7292-453f-9225-0fc5ef45f831",
    "url": "/v2/routes/61369bc2-7292-453f-9225-0fc5ef45f831",
    "created_at": "2015-03-05T19:15:47Z",
    "updated_at": "2015-03-05T19:15:47Z"
  },
  "entity": {
    "host": "new_host",
    "domain_guid": "e0535b4d-2e4d-4c42-ac01-de0cd8a5fa29",
    "space_guid": "685429b0-0954-4700-a67e-7671bf67fed3",
    "domain_url": "/v2/domains/e0535b4d-2e4d-4c42-ac01-de0cd8a5fa29",
    "space_url": "/v2/spaces/685429b0-0954-4700-a67e-7671bf67fed3",
    "apps_url": "/v2/routes/61369bc2-7292-453f-9225-0fc5ef45f831/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 02b5bfb4-6b48-4dc9-ace1-b789ef19fca3
Content-Length: 589
X-Content-Type-Options: nosniff