Get Users
Gets a list of the users that match the search keyword.
Required Permissions
Requires the MEMBER role or higher.
HTTP Request
GET /api/sonar/users
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
https://HOSTNAME/api/sonar/users
Request Parameters
| Key | Required | Type | Description | Note |
|---|---|---|---|---|
| offset | X | 32-bit integer | Number of records to skip | Default: 0 |
| limit | X | 32-bit integer | Maximum number of records to load | If not specified, load all records |
| keywords | X | String | Keyword | Search available by login, name, title, dept, phone, mobile. |
| company_guid | X | String | Company GUID | Option only available for a cluster administrator |
| guids | X | List (of strings) | User GUID list | Comma-separated GUID list |
Success Response
{
"total_count": 1,
"users": [
{
"guid": "ffaf431b-653a-4329-8f83-913cbb00342d",
"login": "joshua",
"name": "Joshua",
"title": null,
"dept": null,
"phone": null,
"mobile": null,
"email": "joshua@example.com",
"locale": "ko",
"role_id": 1,
"role_name": "MASTER",
"home_menu_id": 18,
"user_group_guids": [],
"trust_hosts": [],
"idle_behavior": "lock",
"idle_timeout": 3600,
"password_expiration": -1,
"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
}
]
}
- total_count (32-bit integer): Total number of the user lists that match the search keyword
- users (Array): User list
- guid (String): User GUID
- login (String): Login user name
- name (String): User name
- title (String): Title
- dept (String): Department
- phone (String): Phone number
- phone (String): Mobile number
- email (String): Email
- locale (String): Language.
enorko - 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
- 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
7to3650. 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
0to5. If set to0, account will be locked immediately upon the first authentication failure. - login_lock_interval (32-bit integer): Account lockout duration. Min.
1to max.100000000minutes. - 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 attempts
- 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.
nullif 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;nullif 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.
nullmeans unlimited - max_query_row_limit (32-bit integer): Maximum number of result rows selectable in the query menu. One of
10000,100000,1000000;nullmeans unlimited
Error Responses
offset or limit value is not an integer
HTTP status code 400
{
"error_code": "invalid-argument",
"error_msg": "'offset' parameter should be int type"
}
offset or limit value is negative
HTTP status code 400
{
"error_code": "invalid-argument",
"error_msg": "'offset' must be greater than or equal to 0."
}
Identifier is not in valid GUID format
HTTP status code 400
{
"error_code": "invalid-param-type",
"error_msg": "company_guid should be guid type."
}