Get User

Retrieves information of a specified user.

Required Permissions

Requires the MEMBER role or higher.

HTTP Request

GET /api/sonar/users/:guid
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     https://HOSTNAME/api/sonar/users/ffaf431b-653a-4329-8f83-913cbb00342d
Request Parameter
KeyRequiredTypeDescriptionNote
guidOStringUser GUID

Success Response

{
  "user": {
    "guid": "ffaf431b-653a-4329-8f83-913cbb00342d",
    "login": "joshua",
    "name": "Joshua",
    "title": null,
    "dept": null,
    "phone": null,
    "mobile": null,
    "email": "joshua@example.com",
    "locale": null,
    "role_id": 1,
    "role_name": "MASTER",
    "home_menu_id": 18,
    "granted_tables": [
      {
        "type": "TABLE",
        "name": "weblog",
        "read_only": true,
        "created": "2022-09-11 21:23:45+0900"
      }
    ],
    "user_granted_profiles": [
      {
        "type": "PROFILE",
        "guid": "2011297e-6a3f-45de-92a3-8c187edb62d2",
        "name": "testdb (Database)",
        "read_only": true,
        "created": "2022-09-11 21:23:45+0900"
      }
    ],
    "group_granted_profiles": [],
    "user_group_guids": ["28c1251b-2f7c-4c58-95a1-fc4a1ead877e"],
    "trust_hosts": [],
    "idle_behavior": "lock",
    "idle_timeout": 3600,
    "password_expiration": 7,
    "last_pw_change": "2022-09-11 21:08:39+0900",
    "login_lock_count": 5,
    "login_lock_interval": 10,
    "old_passwd_count": 0,
    "login_lock_until": null,
    "login_fail_count": 0,
    "last_login": "2022-09-11 21:10:02+0900",
    "last_deactivate_unlock": null,
    "is_deactivated": false,
    "auth_mode": 0,
    "has_api_key": true,
    "api_key": "3c9e8f7a-1b2c-4d3e-9f8a-7b6c5d4e3f2a",
    "preferences": {},
    "created": "2022-09-01 00:31:13+0900",
    "updated": "2022-09-11 21:08:39+0900",
    "mfa_enabled": false,
    "mfa_type": null,
    "otp_registered": false,
    "max_concurrent_queries": null,
    "max_query_row_limit": null
  }
}
  • user (Map): User account
    • guid (String): User GUID
    • login (String): Login user name
    • name (String): User name
    • title (String): Title
    • dept (String): Department
    • phone (String): Phone number
    • mobile (String): Mobile number
    • email (String): Email
    • locale (String): Locale. en or ko
    • role_id (32-bit integer): Role ID. Guest (0), Cluster administrator (1), Administrator (2), User (3)
    • role_name (String): Role name
    • home_menu_id (32-bit integer): Home menu ID to appear after login
    • granted_tables (Array)
      • type (String): Always TABLE.
      • name (String): Table name
      • read_only (Boolean): Whether read-only or not
      • created (String): Date and time of creation (yyyy-MM-dd HH:mm:ssZ)
    • user_granted_profiles (Array)
      • type (String): Always PROFILE.
      • guid (String): Profile GUID
      • name (String): Profile name
      • read_only (Boolean): Whether read-only or not
      • created (String): Date and time of creation (yyyy-MM-dd HH:mm:ssZ)
    • group_granted_profiles (Array)
      • type (String): Always PROFILE.
      • guid (String): Profile GUID
      • name (String): Profile name
      • read_only (Boolean): Whether read-only or not
      • created (String): Date and time of creation (yyyy-MM-dd HH:mm:ssZ)
    • user_group_guids (Array): GUID list of user groups to which user belongs
    • trust_hosts (String): List of trusted ip addresses. If specified, access from IP addresses other than these specified ones is not allowed.
    • idle_behavior (String): Idle session timeout behavior. Screen lock (lock) or auto logout (logout)
    • idle_timeout (32-bit integer): Idle session timeout time (seconds). Value ranges from 0 to 604,800 (seconds). 0 (unlimited)
    • password_expiration (32-bit integer): Password expiration period (in days). Value ranges from 7 to 3650. System default (-1), Unlimited (0).
    • last_pw_change (String): Date and time of last password change (yyyy-MM-dd HH:mm:ssZ)
    • login_lock_count (32-bit integer): Account lockout threshold. Value ranges from 0 to 5. If set to 0, account will be locked immediately upon the first authentication failure.
    • login_lock_interval (32-bit integer): Account lockout duration. Min. 1 to max. 100000000 minutes.
    • old_passwd_count (32-bit integer): Password history count. The number of previous passwords remembered to prevent a user from reusing a recently used password.
    • login_lock_until (String): Date and time of account unlock (yyyy-MM-dd HH:mm:ssZ )
    • login_fail_count (32-bit integer): Number of consecutive failed login attempt
    • last_login (String): Date and time of last login (yyyy-MM-dd HH:mm:ssZ)
    • last_deactivate_unlock (String): Date and time of last release from deactivation (yyyy-MM-dd HH:mm:ssZ)
    • is_deactivated (Boolean): Whether the account is deactivated
    • auth_mode (32-bit integer): Authentication mode; 0: Use both internal/external authentication methods. 1: Use only external authentication.
    • has_api_key (Boolean): Whether to have API key or not
    • api_key (String): API key value. null if no API key exists
    • preferences (Map): Preference list
    • created (String): Date and time of creation (yyyy-MM-dd HH:mm:ssZ)
    • updated (String): Date and time of last modification (yyyy-MM-dd HH:mm:ssZ)
    • mfa_enabled (Boolean): Whether MFA is enabled
    • mfa_type (String): MFA authentication type. One of OTP, PASSWORD, MAIL, SMS; null if not set
    • otp_registered (Boolean): Whether the OTP seed is registered
    • max_concurrent_queries (32-bit integer): Maximum number of ad hoc queries that can run concurrently. null means unlimited
    • max_query_row_limit (32-bit integer): Maximum number of result rows selectable in the query menu. One of 10000, 100000, 1000000; null means unlimited

Error Responses

User Identifier is not in valid GUID format

HTTP status code 400

{
  "error_code": "invalid-param-type",
  "error_msg": "guid should be guid type."
}
User is not found or No read privileges

HTTP status code 200

{
  "user": null
}