Versions Compared

Key

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

/api/users/username/:username

Loads details about user specified by username. It has got perfect use for apps that are not using BellaDati Global Admin account. Which is majority of client apps.

Resource Information

Request Parameters

Parameters

Detail

Example

username

Username of the user to fetch.

myusername@example.com
exclude(optional) removes information from Response Structureemail,lastLogin

Response Structure

JSON response contains one JSON object with following elements:

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/users/username/myusername@example.com

The JSON format response:

Code Block
javascript
javascript
{
  "id": "123",
  "username": "myusername@example.com",
  "domain_id": "45",
  "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"
    }
  ]
}


Sv translation
languageja

/api/users/username/:username

usernameで指定されたユーザに関する詳細を読み込みます

リソース情報

リクエストパラメータ

パラメーター

詳細

ユーザ名

ユーザのユーザ名は、フェッチします

myusername@example.com

レスポンスの構造

JSONレスポンスは、次の要素のように1の JSONオブジェクトが含まれます。

説明
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/users/username/myusername@example.com

JSON形式の応答:

Code Block
javascript
javascript
{
  "id": "123",
  "username": "myusername@example.com",
  "domain_id": "45",
  "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"
    }
  ]
}