Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Removed translated content for 'zh'
Sv translation
languageen

/api/domains/:domain_id/users

List users for domain specified by domain ID.

Note

This resource is available only for Global admin or Domain admin.

Resource Information

Request Parameters

ParameterDetailExample
domain_idDomain identifier123

Response Structure

JSON response contains array "users" that contains multiple user objects with following definition:

NameDescription
idUser identifier
usernameUsername
domain_idDomain identifier
firstNameUser first name
lastNameUser last name
emailUser email address
activeBoolean flag indicating if user is active
infoUser detail information
firstLoginDate and time of user's first login
lastLoginDate and time of user's last login
phoneUser phone number
timeZoneUser time zone
localeUser locale - code of supported language
roles

Array containing all user roles where each role has following structure:

NameDescription
roleRole name - please see list of supported values
groups

Array containing all user groups where user belongs. Each group has following structure:

NameDescription
idUser group identifier
nameUser group name

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\"" https://service.belladati.com/api/domains/123/users

The JSON format response:

Code Block
javascript
javascript
{
  "users": [
    {
      "id": "222",
      "username": "myusername@example.com",
      "domain_id": "123",
      "firstName": "John",
      "lastName": "Doe",
      "email": "myusername@example.com",
      "active": true,
      "info": "I'm pretty cool",
      "firstLogin": "Thu, 14 Jan 2012 15:33:28 GMT",
      "lastLogin": "Tue, 12 Apr 2016 11:40:58 GMT",
      "phone": "(555) 123 456 789",
      "timeZone": "Europe/Prague",
      "locale": "cs",
      "roles": [
        {
          "role": "WORKSPACE_ADMIN"
        }
      ],
      "groups": [
        {
          "id": "56",
          "name": "My User Group nr.1"
        }
      ]
    },
    {
      "id": "345",
      "username": "fooUsername",
      "domain_id": "123",
      "firstName": "Adam",
      "lastName": "Sandleros",
      "email": "sandleros@example.com",
      "active": false,
      "info": null,
      "firstLogin": "Thu, 14 Jan 2012 15:33:28 GMT",
      "lastLogin": "Tue, 31 Mar 2016 11:40:58 GMT",
      "phone": null,
      "timeZone": null,
      "locale": "en",
      "roles": [],
      "groups": []
    }
  ]
}
Sv translation
languageja

/api/domains/:domain_id/users

ドメインIDによって指定されたユーザーをリストにします。

Note

このリソースは、グローバル管理者またはドメイン管理者のために利用可能です。

リソース情報

リクエストパラメーター

パラメーター詳細
domain_idドメイン識別子123

レスポンスの構造

JSONレスポンスには、以下の定義を持つ複数のユーザーオブジェクトを含む配列 "users"が含まれています。

説明
idユーザ識別子
usernameユーザ名
domain_idドメイン識別子
firstNameユーザ名前
lastNameユーザーの姓
emailユーザーのメールアドレス
activeドメインがアクティブである場合に示すBoolean フラグ
infoユーザの詳細情報
firstLoginユーザーの最初のログイン時間と日付
lastLoginユーザーの最後のログイン時間と日付
phoneユーザーの電話番号
timeZoneユーザのタイムゾーン
localeユーザーのロケール - サポートされる言語のコード
roles

配列がすべてのユーザーロールを含みます。各役割は、以下の構造を持ちます:

説明
role役割 - サポートされる値のリストをご参照してください。


groups

配列はユーザが所属するすべてのユーザーグループを含みます。各グループの構造は次の通りです:

説明
idユーザーグループ識別子
nameユーザグループ名


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

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\"" https://service.belladati.com/api/domains/123/users

JSONフォーマットのレスポンス:

Code Block
javascript
javascript
{
  "users": [
    {
      "id": "222",
      "username": "myusername@example.com",
      "domain_id": "123",
      "firstName": "John",
      "lastName": "Doe",
      "email": "myusername@example.com",
      "active": true,
      "info": "I'm pretty cool",
      "firstLogin": "Thu, 14 Jan 2012 15:33:28 GMT",
      "lastLogin": "Tue, 12 Apr 2016 11:40:58 GMT",
      "phone": "(555) 123 456 789",
      "timeZone": "Europe/Prague",
      "locale": "cs",
      "roles": [
        {
          "role": "WORKSPACE_ADMIN"
        }
      ],
      "groups": [
        {
          "id": "56",
          "name": "My User Group nr.1"
        }
      ]
    },
    {
      "id": "345",
      "username": "fooUsername",
      "domain_id": "123",
      "firstName": "Adam",
      "lastName": "Sandleros",
      "email": "sandleros@example.com",
      "active": false,
      "info": null,
      "firstLogin": "Thu, 14 Jan 2012 15:33:28 GMT",
      "lastLogin": "Tue, 31 Mar 2016 11:40:58 GMT",
      "phone": null,
      "timeZone": null,
      "locale": "en",
      "roles": [],
      "groups": []
    }
  ]
}