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": "a4258f26-8589-459f-a624-0600540baf14"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/domains" -d '{
"name": "exmaple.com",
"wildcard": true,
"owning_organization_guid": "a4258f26-8589-459f-a624-0600540baf14"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE3MSIsImVtYWlsIjoiZW1haWwtMTA0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDI2MDE1MzR9.yX-0wQtTz0vaSVpq6BpVMC9dZ275Qg0hn6dg2gv0Ibc" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "c1d627bb-5bce-43c5-a80a-8b6c92a6f34d",
"url": "/v2/domains/c1d627bb-5bce-43c5-a80a-8b6c92a6f34d",
"created_at": "2015-09-11T18:38:54Z",
"updated_at": null
},
"entity": {
"name": "exmaple.com",
"owning_organization_guid": "a4258f26-8589-459f-a624-0600540baf14",
"shared_organizations": [
],
"owning_organization_url": "/v2/organizations/a4258f26-8589-459f-a624-0600540baf14",
"spaces_url": "/v2/domains/c1d627bb-5bce-43c5-a80a-8b6c92a6f34d/spaces"
}
}
Headers