Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Sv translation
languageen

/api/domains/create

Creates new domain.

Note

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


Code Block
languagejs
{
  "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:

Code Block
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.

 

Sv translation
languageja

/api/domains/create

新規ドメインを作成します。

Note

このリソースは、グローバル管理者用唯一のマルチドメイン構成で利用可能です。

リソース情報

リソースURL 

https://service.belladati.com/api/domains/create

HTTPメソッド

POST

リクエストパラメーター

パラメーター

詳細

data

次のJSON形式で送信するフォームコンテンツ:

パラメーター詳細
nameドメイン名
description(任意)ドメイン説明
dateFormat(任意)ドメインの日付フォーマット - デフォルト:"M/d/yyyy"
timeFormat(任意)ドメインの時間フォーマット - デフォルト:"h:mm:ss a"
timeZone(任意)ドメインのタイムゾーン
locale(任意)ドメインロケール  - サポートされる言語のコード
parameters

(任意)配列がすべての追加のパラメータを含みます

template

(任意)ドメインテンプレートが次の定義を持ちます:

説明
idドメインテンプレート識別子
usernameSuffix(任意)コピーユーザーの間に使用されるサフィックス


id(任意)ドメインテンプレート識別子



Code Block
languagejs
{
  "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
}


サンプルリクエスト/レスポンス

curl使用:

Code Block
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

フォームが正常に送信された場合、サーバは200のHTTPステータスコードと新しいドメインのIDを含む本体で応答します。