Creating a Route
POST /v2/routes/
Request
Route
POST /v2/routes
Body
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the route.
|
|
|
|
domain_guid
|
The guid of the associated domain
|
|
|
- guid-44754de3-e1ad-47ef-b168-8c93fd1e0b68
|
space_guid
|
The guid of the associated space
|
|
|
- guid-8a66bcf2-9c3b-4bcd-bec4-90f8ab831f64
|
host
|
The host portion of the route
|
|
|
|
{
"domain_guid": "4d3787dc-aec0-41a9-834c-e0db3dabeaec",
"space_guid": "d468a051-b952-4ea4-9eb0-f1940518f80c"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/routes" -d '{
"domain_guid": "4d3787dc-aec0-41a9-834c-e0db3dabeaec",
"space_guid": "d468a051-b952-4ea4-9eb0-f1940518f80c"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMxMyIsImVtYWlsIjoiZW1haWwtMjE1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjU5NDg2NzJ9.xUW6TOlSOufFWeOKFx5t8eKRNiZjxzJqVRSiT9oASds" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "da9d0d4d-8437-4b8a-b721-5a9dd721f6cf",
"url": "/v2/routes/da9d0d4d-8437-4b8a-b721-5a9dd721f6cf",
"created_at": "2015-03-03T00:51:12Z",
"updated_at": null
},
"entity": {
"host": "",
"domain_guid": "4d3787dc-aec0-41a9-834c-e0db3dabeaec",
"space_guid": "d468a051-b952-4ea4-9eb0-f1940518f80c",
"domain_url": "/v2/domains/4d3787dc-aec0-41a9-834c-e0db3dabeaec",
"space_url": "/v2/spaces/d468a051-b952-4ea4-9eb0-f1940518f80c",
"apps_url": "/v2/routes/da9d0d4d-8437-4b8a-b721-5a9dd721f6cf/apps"
}
}
Headers