Update a Route
PUT /v2/routes/:guid
Request
Route
PUT /v2/routes/23c1b685-349f-4df9-9276-75ed8b338887
Body
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the route.
|
|
|
|
domain_guid
|
The guid of the associated domain
|
|
|
- guid-bc5d723a-132f-49ec-9b9e-15ebaa6b4f53
|
space_guid
|
The guid of the associated space
|
|
|
- guid-21e6417d-5f81-4434-8a6f-757215e88068
|
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/23c1b685-349f-4df9-9276-75ed8b338887" -d '{
"host": "new_host",
"path": "/apps/v1/path"
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMiLCJlbWFpbCI6ImVtYWlsLTNAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQzMjMxMzYwMn0.s3Zrhwq-cmCBYQp5cqOJX8DR1uIu7hDDPhiKLRZPq1M" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "23c1b685-349f-4df9-9276-75ed8b338887",
"url": "/v2/routes/23c1b685-349f-4df9-9276-75ed8b338887",
"created_at": "2015-05-15T16:53:22Z",
"updated_at": "2015-05-15T16:53:22Z"
},
"entity": {
"host": "new_host",
"path": "/apps/v1/path",
"domain_guid": "b1dbe803-54f2-417e-8a17-59a40b202223",
"space_guid": "ab3080d3-939b-4e4c-a6ea-881dae353b50",
"domain_url": "/v2/domains/b1dbe803-54f2-417e-8a17-59a40b202223",
"space_url": "/v2/spaces/ab3080d3-939b-4e4c-a6ea-881dae353b50",
"apps_url": "/v2/routes/23c1b685-349f-4df9-9276-75ed8b338887/apps"
}
}
Headers