Home
Version 3
Routes API

Routes API

Update a Route

PUT /v2/routes/:guid

Request

Route

PUT /v2/routes/a41ce5ae-0972-4bdd-a883-11aadc2d083c

Body

Name Description Default Valid Values Example Values
guid The guid of the route.
domain_guid The guid of the associated domain
  • guid-52a7a0aa-5715-4410-9cd6-eb84fc661e5e
space_guid The guid of the associated space
  • guid-05d9bb29-4c42-46fa-bff0-aecc7a094a9d
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 "?"
  • /apps/v1/path
  • /apps/v2/path
{
  "port": 10000
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQyOSIsImVtYWlsIjoiZW1haWwtMjk4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjA1MDY2NjJ9.8KgpGJd8OTYCbPgFT0rdNDOwKT1SXCaQaJAgRZ_jO7U
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/routes/a41ce5ae-0972-4bdd-a883-11aadc2d083c" -d '{
  "port": 10000
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQyOSIsImVtYWlsIjoiZW1haWwtMjk4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjA1MDY2NjJ9.8KgpGJd8OTYCbPgFT0rdNDOwKT1SXCaQaJAgRZ_jO7U" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "a41ce5ae-0972-4bdd-a883-11aadc2d083c",
    "url": "/v2/routes/a41ce5ae-0972-4bdd-a883-11aadc2d083c",
    "created_at": "2016-04-06T00:17:42Z",
    "updated_at": "2016-04-06T00:17:42Z"
  },
  "entity": {
    "host": "host-29",
    "path": "",
    "domain_guid": "e3a641a7-6d38-4c1a-8206-50cd50d1e8a6",
    "space_guid": "580935c5-787c-4abb-9125-82f5003d3d6a",
    "service_instance_guid": null,
    "port": 10000,
    "domain_url": "/v2/domains/e3a641a7-6d38-4c1a-8206-50cd50d1e8a6",
    "space_url": "/v2/spaces/580935c5-787c-4abb-9125-82f5003d3d6a",
    "apps_url": "/v2/routes/a41ce5ae-0972-4bdd-a883-11aadc2d083c/apps",
    "route_mappings_url": "/v2/routes/a41ce5ae-0972-4bdd-a883-11aadc2d083c/route_mappings"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 
Content-Length: 750
X-Content-Type-Options: nosniff

Audit Records Created By The Request

Audit Record: audit.route.update

Attribute Name Value
id 217
guid 960f1c9a-4f64-4cb3-80ad-575dc3ab6e60
created_at 2016-04-06 00:17:42 UTC
updated_at
timestamp 2016-04-06 00:17:42 UTC
type audit.route.update
actor uaa-id-429
actor_type user
actee a41ce5ae-0972-4bdd-a883-11aadc2d083c
actee_type route
metadata
{
  "request": {
    "port": 10000
  }
}
space_id
organization_guid b2f67007-8315-4283-939e-1c4049d1b2bb
space_guid 580935c5-787c-4abb-9125-82f5003d3d6a
actor_name email-298@somedomain.com
actee_name host-29