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": "9f73d318-03e0-43e2-af2b-526c02d742aa"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/domains" -d '{
"name": "exmaple.com",
"wildcard": true,
"owning_organization_guid": "9f73d318-03e0-43e2-af2b-526c02d742aa"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1NiIsImVtYWlsIjoiZW1haWwtMTE3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg1OTk0MzN9.oEEfv8rvjkZlr7tzKrSOMvISF7S0gvrnkOzf3aTqlUA" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "4a30325d-6dfd-4965-ba3c-60a484b58f6a",
"url": "/v2/domains/4a30325d-6dfd-4965-ba3c-60a484b58f6a",
"created_at": "2016-03-14T22:30:33Z",
"updated_at": null
},
"entity": {
"name": "exmaple.com",
"owning_organization_guid": "9f73d318-03e0-43e2-af2b-526c02d742aa",
"shared_organizations": [
],
"owning_organization_url": "/v2/organizations/9f73d318-03e0-43e2-af2b-526c02d742aa",
"spaces_url": "/v2/domains/4a30325d-6dfd-4965-ba3c-60a484b58f6a/spaces"
}
}
Headers