Create a Shared Domain
POST /v2/shared_domains
Request
Route
POST /v2/shared_domains
Body
Name |
Description |
Default |
Valid Values |
Example Values |
name
|
The name of the domain.
|
|
|
- example.com
- foo.example.com
|
internal
|
Flag that sets the domain as an internal domain.
Internal domains are used for internal app to app networking only.
|
false
|
|
|
router_group_guid
|
The guid of the router group. Not used with internal domains.
|
|
|
|
{
"name": "example.com",
"router_group_guid": "my-random-guid"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/shared_domains" -d '{
"name": "example.com",
"router_group_guid": "my-random-guid"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMyMiIsImVtYWlsIjoiZW1haWwtMjE3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTd9.D722Jh8vyqN7FX-Cz5ySht2wlRci3-UJ_4S5HIL1BSY" \
-H "Host: example.org" \
-H "Content-Type: application/json" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "43436c2d-2b4f-45c2-9f50-e530e1cedba6",
"url": "/v2/shared_domains/43436c2d-2b4f-45c2-9f50-e530e1cedba6",
"created_at": "2016-06-08T16:41:37Z",
"updated_at": "2016-06-08T16:41:26Z"
},
"entity": {
"name": "example.com",
"internal": false,
"router_group_guid": "my-random-guid",
"router_group_type": "tcp"
}
}
Headers