Creating a Route
POST /v2/routes/
Fields
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the route.
|
|
|
|
domain_guid
|
The guid of the associated domain
|
|
|
- guid-ee6ae83b-40bd-4f87-b48f-46e479d1970e
|
space_guid
|
The guid of the associated space
|
|
|
- guid-0f372668-5fe5-49d9-a4d8-c41cab141203
|
host
|
The host portion of the route
|
|
|
|
Request
Headers
Route
POST /v2/routes
Body
{
"domain_guid": "399c663f-33fa-44d1-9590-4941c66d603d",
"space_guid": "b34c7dcf-e509-411a-b22e-16c296d5d03c"
}
cURL
curl "https://api.[your-domain.com]/v2/routes" -d '{
"domain_guid": "399c663f-33fa-44d1-9590-4941c66d603d",
"space_guid": "b34c7dcf-e509-411a-b22e-16c296d5d03c"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwNSIsImVtYWlsIjoiZW1haWwtMTU3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTk5ODk5NzR9.qwwN6Cjq36QEhV_V-uYRvKmjLpoytLA4K-XPa0B05HA" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Headers
Status
201 Created
Body
{
"metadata": {
"guid": "6db55cd5-441a-443c-8b83-d052fb8e23eb",
"url": "/v2/routes/6db55cd5-441a-443c-8b83-d052fb8e23eb",
"created_at": "2014-12-24T01:39:33+00:00",
"updated_at": null
},
"entity": {
"host": "",
"domain_guid": "399c663f-33fa-44d1-9590-4941c66d603d",
"space_guid": "b34c7dcf-e509-411a-b22e-16c296d5d03c",
"domain_url": "/v2/domains/399c663f-33fa-44d1-9590-4941c66d603d",
"space_url": "/v2/spaces/b34c7dcf-e509-411a-b22e-16c296d5d03c",
"apps_url": "/v2/routes/6db55cd5-441a-443c-8b83-d052fb8e23eb/apps"
}
}