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": "3a0223d1-b09a-43a4-9795-ae3d166c0ca4"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/domains" -d '{
"name": "exmaple.com",
"wildcard": true,
"owning_organization_guid": "3a0223d1-b09a-43a4-9795-ae3d166c0ca4"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1NSIsImVtYWlsIjoiZW1haWwtMTg2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDk1MzE1Mjh9.mF5v6F17NV0zjCtL9qh7tvqVTb80mFsjzx_Fn2taXuo" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "cb369499-87f2-40dc-a08e-ba54633e8c02",
"url": "/v2/domains/cb369499-87f2-40dc-a08e-ba54633e8c02",
"created_at": "2015-11-30T23:38:48Z",
"updated_at": null
},
"entity": {
"name": "exmaple.com",
"owning_organization_guid": "3a0223d1-b09a-43a4-9795-ae3d166c0ca4",
"shared_organizations": [
],
"owning_organization_url": "/v2/organizations/3a0223d1-b09a-43a4-9795-ae3d166c0ca4",
"spaces_url": "/v2/domains/cb369499-87f2-40dc-a08e-ba54633e8c02/spaces"
}
}
Headers