Update a Route
PUT /v2/routes/:guid
Request
Route
PUT /v2/routes/d3db5d11-76a8-407c-9294-55c2152718b6
Body
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the route.
|
|
|
|
domain_guid
|
The guid of the associated domain
|
|
|
- guid-472ef739-f692-4f89-8e51-e23975d9aaf9
|
space_guid
|
The guid of the associated space
|
|
|
- guid-c3077be0-15ab-4bc8-ab1b-d22bd0739470
|
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/d3db5d11-76a8-407c-9294-55c2152718b6" -d '{
"port": 10000
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2MSIsImVtYWlsIjoiZW1haWwtMTI4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTQ0NTE2MTd9.r_LYS3dXHeRVfnEmTyVGXvau2KurQa2DnyiR1_dvEhA" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "d3db5d11-76a8-407c-9294-55c2152718b6",
"url": "/v2/routes/d3db5d11-76a8-407c-9294-55c2152718b6",
"created_at": "2016-01-26T22:20:17Z",
"updated_at": "2016-01-26T22:20:17Z"
},
"entity": {
"host": "host-13",
"path": "",
"domain_guid": "a69866d9-cde7-463f-8a76-2dd13a8d9d0b",
"space_guid": "124d1af6-39f5-42b3-89e9-25e73a163ce0",
"service_instance_guid": null,
"port": 10000,
"domain_url": "/v2/domains/a69866d9-cde7-463f-8a76-2dd13a8d9d0b",
"space_url": "/v2/spaces/124d1af6-39f5-42b3-89e9-25e73a163ce0",
"apps_url": "/v2/routes/d3db5d11-76a8-407c-9294-55c2152718b6/apps"
}
}
Headers