Update a Route
PUT /v2/routes/:guid
Request
Route
PUT /v2/routes/1df59bcc-a47c-4762-b793-61f1b2e6e5f3
Body
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the route.
|
|
|
|
domain_guid
|
The guid of the associated domain
|
|
|
- guid-5f688173-7bdc-4b8b-83d9-a06e24a9ee5e
|
space_guid
|
The guid of the associated space
|
|
|
- guid-844924a0-18d3-46fd-bd39-dd3b8d0674d0
|
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/1df59bcc-a47c-4762-b793-61f1b2e6e5f3" -d '{
"port": 10000
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM3MyIsImVtYWlsIjoiZW1haWwtMjc1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDk1MzE1MzV9.a6JmlK4DQN07J5pFhcHG2tkKQRyHZcyTTjcApG2onJA" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "1df59bcc-a47c-4762-b793-61f1b2e6e5f3",
"url": "/v2/routes/1df59bcc-a47c-4762-b793-61f1b2e6e5f3",
"created_at": "2015-11-30T23:38:55Z",
"updated_at": "2015-11-30T23:38:55Z"
},
"entity": {
"host": "host-15",
"path": "",
"domain_guid": "fef11ae6-30cd-4d0e-88b7-ef7737d0c6f6",
"space_guid": "8a27c503-19a8-4704-939c-aac293ac3add",
"service_instance_guid": null,
"port": 10000,
"domain_url": "/v2/domains/fef11ae6-30cd-4d0e-88b7-ef7737d0c6f6",
"space_url": "/v2/spaces/8a27c503-19a8-4704-939c-aac293ac3add",
"apps_url": "/v2/routes/1df59bcc-a47c-4762-b793-61f1b2e6e5f3/apps"
}
}
Headers