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-17152d3b-a31d-436b-841e-237494cee9cc
space_guid The guid of the associated space
  • guid-a07f27b1-a3c3-4b51-ab86-437715c66eb8
host The host portion of the route

Request

Headers

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

Route

PUT /v2/routes/070fd822-597b-42c5-9cab-16e00333b403

Body

{
  "host": "new_host"
}

cURL

curl "https://api.[your-domain.com]/v2/routes/070fd822-597b-42c5-9cab-16e00333b403" -d '{
  "host": "new_host"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM2OCIsImVtYWlsIjoiZW1haWwtMjcwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQ0NzE3MDl9.lK0j4x8RRXOffvRLiACqKhx5tKEzSrzG1FeTw6JezGk" \
	-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: cd66d123-13c2-4389-9117-ad25a0c9e620
Content-Length: 589
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "070fd822-597b-42c5-9cab-16e00333b403",
    "url": "/v2/routes/070fd822-597b-42c5-9cab-16e00333b403",
    "created_at": "2015-02-13T22:35:09Z",
    "updated_at": "2015-02-13T22:35:09Z"
  },
  "entity": {
    "host": "new_host",
    "domain_guid": "9086f734-3b02-4fea-8e54-af1442703268",
    "space_guid": "b54b5f82-ac85-4e58-8158-fd907ca81802",
    "domain_url": "/v2/domains/9086f734-3b02-4fea-8e54-af1442703268",
    "space_url": "/v2/spaces/b54b5f82-ac85-4e58-8158-fd907ca81802",
    "apps_url": "/v2/routes/070fd822-597b-42c5-9cab-16e00333b403/apps"
  }
}