Home
Version 3
Routes API

Routes API

Update a Route

PUT /v2/routes/:guid

Request

Route

PUT /v2/routes/295524ee-7325-4ff2-aaf0-3917de159a12

Body

Name Description Default Valid Values Example Values
guid The guid of the route.
domain_guid The guid of the associated domain
  • guid-499705e3-8d62-4f47-8c4f-e1759dd5ba9c
space_guid The guid of the associated space
  • guid-a91c964f-fc32-4fdd-9315-a50b4185a981
host The host portion of the route
{
  "host": "new_host"
}

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/routes/295524ee-7325-4ff2-aaf0-3917de159a12" -d '{
  "host": "new_host"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4MCIsImVtYWlsIjoiZW1haWwtMjAxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjk2NjQxNDd9.omZtQIY3fF3npPw3IQOe9HGeIynrWaP83OzQ3y2_PU8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "295524ee-7325-4ff2-aaf0-3917de159a12",
    "url": "/v2/routes/295524ee-7325-4ff2-aaf0-3917de159a12",
    "created_at": "2015-04-15T00:55:47Z",
    "updated_at": "2015-04-15T00:55:47Z"
  },
  "entity": {
    "host": "new_host",
    "domain_guid": "4870c9dd-ee13-4fdf-aa3b-979f11932409",
    "space_guid": "e1c4388e-0ec2-40e9-8b6a-c1b7f170534c",
    "domain_url": "/v2/domains/4870c9dd-ee13-4fdf-aa3b-979f11932409",
    "space_url": "/v2/spaces/e1c4388e-0ec2-40e9-8b6a-c1b7f170534c",
    "apps_url": "/v2/routes/295524ee-7325-4ff2-aaf0-3917de159a12/apps"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 23f124c4-deb4-4e06-b763-701f2a316008
Content-Length: 589
X-Content-Type-Options: nosniff