You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

/api/users/username/:username

Loads details about user specified by username.

Resource Information

Request Parameters

Parameters

Detail

Example

username

Username of the user to fetch.

myusername@example.com

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
rolesArray containing all user roles
groupsArray containing all user groups where user belongs

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\"" https://service.belladati.com/api/users/username/myusername@example.com

The JSON format response:

{
  "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"
    }
  ]
}
  • No labels