Routes API

Update a Route

PUT /v2/routes/:guid

Request

Route

PUT /v2/routes/0fe9f34a-9eff-4674-9dda-dbf4058847a0

Body

Name Description Default Valid Values Example Values
guid The guid of the route.
domain_guid The guid of the associated domain
  • guid-244496cb-d2a0-48e0-8c7c-03bf901a368b
space_guid The guid of the associated space
  • guid-bd1e911f-c9f3-434b-b8f5-a03c486d2294
host The host portion of the route. Required for shared-domains.
port The port of the route. Supported for domains of TCP router groups only.
  • 1024-65535
  • 50000
path The path for a route as raw text. 1) Paths must be between 2 and 128 characters 2) Paths must start with a forward slash "/" 3) Paths must not contain a "?" Note: not supported for internal routes.
  • /apps/v1/path
  • /apps/v2/path
{
  "port": 10000
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzOSIsImVtYWlsIjoiZW1haWwtOTRAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2NjAwODg4OX0.0RuDylimFFyOssUEVNC5SbIH4NM7wxwmv86cBjTAhMo
Host: example.org
Content-Type: application/json
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/routes/0fe9f34a-9eff-4674-9dda-dbf4058847a0" -d '{
  "port": 10000
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzOSIsImVtYWlsIjoiZW1haWwtOTRAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2NjAwODg4OX0.0RuDylimFFyOssUEVNC5SbIH4NM7wxwmv86cBjTAhMo" \
	-H "Host: example.org" \
	-H "Content-Type: application/json" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "0fe9f34a-9eff-4674-9dda-dbf4058847a0",
    "url": "/v2/routes/0fe9f34a-9eff-4674-9dda-dbf4058847a0",
    "created_at": "2016-06-08T16:41:29Z",
    "updated_at": "2016-06-08T16:41:29Z"
  },
  "entity": {
    "host": "host-16",
    "path": "",
    "domain_guid": "087ceb57-8a0a-447c-aa6d-c7be77675162",
    "space_guid": "51be649e-982d-499f-a283-bca4c28823d3",
    "service_instance_guid": null,
    "port": 10000,
    "domain_url": "/v2/shared_domains/087ceb57-8a0a-447c-aa6d-c7be77675162",
    "space_url": "/v2/spaces/51be649e-982d-499f-a283-bca4c28823d3",
    "apps_url": "/v2/routes/0fe9f34a-9eff-4674-9dda-dbf4058847a0/apps",
    "route_mappings_url": "/v2/routes/0fe9f34a-9eff-4674-9dda-dbf4058847a0/route_mappings"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: b5c3e235-ebd8-4834-bd95-67d917dccf9f
Content-Length: 757
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.route.update

Attribute Name Value
id 194
guid 25a57d7a-6228-4b0b-a3ff-de5599eb08fa
created_at 2016-06-08 16:41:29 UTC
updated_at
timestamp 2016-06-08 16:41:29 UTC
type audit.route.update
actor uaa-id-139
actor_type user
actee 0fe9f34a-9eff-4674-9dda-dbf4058847a0
actee_type route
metadata
{
  "request": {
    "port": 10000
  }
}
space_id
organization_guid 39edcb84-12fd-46c8-a8e6-b1b03c2a4a52
space_guid 51be649e-982d-499f-a283-bca4c28823d3
actor_name [email protected]
actee_name host-16