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",
"company_guid": "6fbe27b7-f1ae-4d7a-a1a5-76d8fa9aa311",
"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,
"login_lock_until": null,
"login_fail_count": 0,
"auth_mode": 0,
"has_api_key": true,
"preferences": {},
"created": "2022-09-01 00:31:13+0900",
"updated": "2022-09-11 21:08:39+0900"
}
]
}
- total_count (32-bit integer): Total number of the user lists that match the search keyword
- users (Array): User list
- guid (String): User GUID
- company_guid (String): Company 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), Company 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. - 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
- login_fail_count (32-bit integer): Number of consecutive failed login attempts
- auth_mode (32-bit integer): AAuthentication mode;
0: Use both internal/external authentication methods.1: Use only external authentication. - has_api_key (Boolean): Whether to have API key or not
- 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)
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."
}