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": "de1f4f1a-10ed-452e-9f81-edf7a9539b66"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/domains" -d '{
"name": "exmaple.com",
"wildcard": true,
"owning_organization_guid": "de1f4f1a-10ed-452e-9f81-edf7a9539b66"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwNSIsImVtYWlsIjoiZW1haWwtMTM1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDgwMzg5NTV9.r702AA6SXLVoqw1E3Z4ZJYeXRYg0EK9MymYEABNZq-s" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "54be454a-f763-4190-8317-001703406c06",
"url": "/v2/domains/54be454a-f763-4190-8317-001703406c06",
"created_at": "2015-11-13T17:02:35Z",
"updated_at": null
},
"entity": {
"name": "exmaple.com",
"owning_organization_guid": "de1f4f1a-10ed-452e-9f81-edf7a9539b66",
"shared_organizations": [
],
"owning_organization_url": "/v2/organizations/de1f4f1a-10ed-452e-9f81-edf7a9539b66",
"spaces_url": "/v2/domains/54be454a-f763-4190-8317-001703406c06/spaces"
}
}
Headers