Create a Domain owned by the given Organization (deprecated)
POST /v2/domains
Request
Route
POST /v2/domains
Body
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the domain.
|
|
|
|
name
|
The name of the domain.
|
|
|
- example.com
- foo.example.com
|
wildcard
|
Allow routes with non-empty hosts
|
|
|
|
owning_organization_guid
|
The organization that owns the domain. If not specified, the domain is shared.
|
|
|
|
{
"name": "exmaple.com",
"wildcard": true,
"owning_organization_guid": "ba3be70a-a88a-463c-990a-5e0999050fee"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/domains" -d '{
"name": "exmaple.com",
"wildcard": true,
"owning_organization_guid": "ba3be70a-a88a-463c-990a-5e0999050fee"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4MiIsImVtYWlsIjoiZW1haWwtMTE0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjEzNzQ2MzB9.uoj8qJ1Mxw1LkzQX__VLfDHcg30BkON1UhM3WRVZDoM" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "572dac82-3bd0-48b1-a1ef-b80ea515aeb6",
"url": "/v2/domains/572dac82-3bd0-48b1-a1ef-b80ea515aeb6",
"created_at": "2016-04-16T01:23:50Z",
"updated_at": null
},
"entity": {
"name": "exmaple.com",
"owning_organization_guid": "ba3be70a-a88a-463c-990a-5e0999050fee",
"shared_organizations": [
],
"owning_organization_url": "/v2/organizations/ba3be70a-a88a-463c-990a-5e0999050fee",
"spaces_url": "/v2/domains/572dac82-3bd0-48b1-a1ef-b80ea515aeb6/spaces"
}
}
Headers