/api/domains/create
Creates new domain.
This resource is available only for Global admin and only in multi-domain configurations.
Resource Information
Resource URL | |
---|---|
HTTP Method | POST |
Request Parameters
Parameter | Detail | Example | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | Form contents to submit in following JSON format:
| { "name": "My New Domain", "description": "This is my domain description", "dateFormat": "yyyy-MM-dd", "timeFormat": "hh:mm:ss", "timeZone": "Asia/Hong_Kong", "locale": "zh", "parameters": [ { "myKey1": "myValue1" }, { "myKey2": null } ], "template": { "id": 123, "usernameSuffix": "_NewUser" }, "id": 123 } |
Sample Request / Response
Using curl
:
curl -H "Authorization: OAuth realm=\"https://service.belladati.com/\", oauth_consumer_key=\"myConsumer\", oauth_token=\"mh7an9dkrg59\", oauth_timestamp=\"135131231\", oauth_nonce=\"randomString\"" -d "data={\"name\":\"My New Domain\"}" https://service.belladati.com/api/domains/create
When the form has been submitted successfully, the server replies with an HTTP status code of 200 and a body that contains ID of new domain.
Overview
Content Tools