/api/domains/create

Creates new domain.

This resource is available only for Global admin and only in multi-domain configurations.

Resource Information

Request Parameters

Parameter

Detail

Example

data

Form contents to submit in following JSON format:

ParameterDetail
nameDomain name
description(Optional) Domain description
dateFormat(Optional) Domain date format - default: "M/d/yyyy"
timeFormat(Optional) Domain time format - default: "h:mm:ss a"
timeZone(Optional) Domain time zone
locale(Optional) Domain locale code of supported language
parameters

(Optional) Array containing all additional parameters

template

(Optional) Domain template with following definition:

NameDescription
idDomain template identifier
usernameSuffix(Optional) Suffix used during copying users


id(Optional) Domain template identifier


{
  "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.

 

  • No labels