Update a Route
PUT /v2/routes/:guid
Request
Route
PUT /v2/routes/169dde2a-faf1-4453-9300-207f02bc1319
Body
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the route.
|
|
|
|
domain_guid
|
The guid of the associated domain
|
|
|
- guid-b08581a3-b6a2-472c-99c2-524399df0d59
|
space_guid
|
The guid of the associated space
|
|
|
- guid-116b0647-31f9-4002-b251-152c319c7755
|
host
|
The host portion of the route
|
|
|
|
port
|
The port of the route. Supported for domains of TCP router groups only.
|
|
|
|
path
|
The path for a route as raw text. 1) Paths must be between 2 and 128 characters 2) Paths must start with a / 3) Paths must not contain a "?"
|
|
|
- /apps/v1/path
- /apps/v2/path
|
{
"port": 10000
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/routes/169dde2a-faf1-4453-9300-207f02bc1319" -d '{
"port": 10000
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4MSIsImVtYWlsIjoiZW1haWwtMTg3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTE0MTM2ODl9.jTcQE6eFP2L1GDEnxNEuhshayUwNuJ5QxbffCem_Hxk" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "169dde2a-faf1-4453-9300-207f02bc1319",
"url": "/v2/routes/169dde2a-faf1-4453-9300-207f02bc1319",
"created_at": "2015-12-22T18:28:09Z",
"updated_at": "2015-12-22T18:28:09Z"
},
"entity": {
"host": "host-20",
"path": "",
"domain_guid": "a9ce99e1-b7cc-4046-b88b-e1331779f977",
"space_guid": "47b5e7ce-1980-47b0-8349-ceba2241352f",
"service_instance_guid": null,
"port": 10000,
"domain_url": "/v2/domains/a9ce99e1-b7cc-4046-b88b-e1331779f977",
"space_url": "/v2/spaces/47b5e7ce-1980-47b0-8349-ceba2241352f",
"apps_url": "/v2/routes/169dde2a-faf1-4453-9300-207f02bc1319/apps"
}
}
Headers