Update a Route
PUT /v2/routes/:guid
Request
Route
PUT /v2/routes/5dcaa663-8758-415d-b30d-166b2ab2b4c4
Body
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the route.
|
|
|
|
domain_guid
|
The guid of the associated domain
|
|
|
- guid-00dbeeca-a27d-4f7e-9e56-4da1dad38a70
|
space_guid
|
The guid of the associated space
|
|
|
- guid-592dda4d-c3dd-44d8-8bb7-ef632d103e6d
|
host
|
The host portion of the route
|
|
|
|
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
|
{
"host": "new_host",
"path": "/apps/v1/path"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/routes/5dcaa663-8758-415d-b30d-166b2ab2b4c4" -d '{
"host": "new_host",
"path": "/apps/v1/path"
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3NyIsImVtYWlsIjoiZW1haWwtMTk0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzM5ODExMTN9.Piaj_EC9Hp1fuiHG1scwlLIfnRpe015XsUsvB0MP_Ss" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "5dcaa663-8758-415d-b30d-166b2ab2b4c4",
"url": "/v2/routes/5dcaa663-8758-415d-b30d-166b2ab2b4c4",
"created_at": "2015-06-04T00:05:13Z",
"updated_at": "2015-06-04T00:05:13Z"
},
"entity": {
"host": "new_host",
"path": "/apps/v1/path",
"domain_guid": "b2654095-055d-4bce-b2dc-7c967651f284",
"space_guid": "769c28c6-b747-4064-9025-46a96658f7a8",
"domain_url": "/v2/domains/b2654095-055d-4bce-b2dc-7c967651f284",
"space_url": "/v2/spaces/769c28c6-b747-4064-9025-46a96658f7a8",
"apps_url": "/v2/routes/5dcaa663-8758-415d-b30d-166b2ab2b4c4/apps"
}
}
Headers