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": "97456e9e-b155-4f41-bc7b-83757784d62b"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/domains" -d '{
"name": "exmaple.com",
"wildcard": true,
"owning_organization_guid": "97456e9e-b155-4f41-bc7b-83757784d62b"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3MSIsImVtYWlsIjoiZW1haWwtMjAyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTY0NTIyMzl9.D2BW7Kf3xB397XrpdRLQEh7C_MzL2EG5JsTQxszRyZU" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "e4efa31e-dd1d-44e9-a145-81b4fcee6719",
"url": "/v2/domains/e4efa31e-dd1d-44e9-a145-81b4fcee6719",
"created_at": "2016-02-19T02:03:59Z",
"updated_at": null
},
"entity": {
"name": "exmaple.com",
"owning_organization_guid": "97456e9e-b155-4f41-bc7b-83757784d62b",
"shared_organizations": [
],
"owning_organization_url": "/v2/organizations/97456e9e-b155-4f41-bc7b-83757784d62b",
"spaces_url": "/v2/domains/e4efa31e-dd1d-44e9-a145-81b4fcee6719/spaces"
}
}
Headers