> For the complete documentation index, see [llms.txt](https://eohelp.weaver.com.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://eohelp.weaver.com.co/open-api/3-user-management.md).

# 3 User Management

## get user list

<mark style="color:blue;">`GET`</mark> `api/user/users`

<mark style="background-color:blue;">Parameter Example</mark>

`{ autoFixPage: 1 limit: 10 order_by: {"list_number":"desc"} page: 2 search: {"user_name":["System","like"],"phone_number":["123123","like"]} }`

#### Request Body

| Name        | Type | Description              |
| ----------- | ---- | ------------------------ |
| autoFixPage | int  | start page               |
| search      | json | Query conditions         |
| page        | int  | page number              |
| order\_by   | json | sort                     |
| limit       | int  | display records per page |

{% tabs %}
{% tab title="200: OK " %}
{% tabs %}
{% tab title="Result" %}

{% endtab %}

{% tab title="Example" %}

```json
{
     "status": 1,
     "data": {
         "total": 669, // Total users
         "list": [ // User list
             {
                 "user_id": "admin", // User ID non-admin user start with WV
                 "user_accounts": "admin", // Username
                 "user_name": "System admin", // Real name
                 "user_name_py": "xitongguanliyuan",
                 "user_name_zm": "xtgly",
                 "user_job_number": "2058", // Personal no.
                 "list_number": null, // Series no.
                 "user_position": 4, // Position ID
                 "user_has_many_role": [
                     {
                         "user_id": "admin",
                         "role_id": 1,
                         "created_at": "2018-05-11 16:13:17",
                         "updated_at": "2018-05-11 16:13:17",
                         "deleted_at": null,
                         "has_one_role": {
                             "role_id": 1,
                             "role_name": "OA Admin", // User Admin, if user with multiple roles, then user_has_many_role get multiple roles
                             "role_no": 0,
                             "role_name_py": "OAguanliyuan",
                             "role_name_zm": "OAgly",
                             "created_at": "2015-11-18 05:21:37",
                             "updated_at": "2017-03-05 15:35:54",
                             "deleted_at": null
                         }
                     }
                 ],
                 "user_has_one_info": {
                     "user_id": "admin",
                     "sex": "1", // Gender 1-Male 0-Female
                     "birthday": "0000-00-00", // Birth date
                     "dept_phone_number": "", // Department Tel.
                     "faxes": "", // Fax
                     "home_address": "", // Home address
                     "home_zip_code": "", // Postal code
                     "home_phone_number": "", //Home tel
                     "phone_number": "", // Mobile
                     "weixin": "", // Wechat
                     "email": "", // email
                     "oicq_no": "", // QQ
                     "msn": "msn", // msn
                     "notes": "",
                     "theme": "theme7",
                     "sms_on": "0",
                     "menu_hide": "2",
                     "avatar_source": "",
                     "avatar_thumb": "",
                     "signature_picture": "",
                     "created_at": "2015-08-25 04:05:45",
                     "updated_at": "2018-05-29 15:53:02",
                     "deleted_at": null
                 },
                 "user_has_one_system_info": {
                     "user_id": "admin",
                     "dept_id": 2, // User department ID
                     "max_role_no": 0,
                     "post_priv": "1",
                     "post_dept": "",
                     "duty_type": 1,
                     "last_login_time": "2018-06-15 14:13:14",
                     "last_pass_time": "2018-04-24 10:54:15",
                     "shortcut": "2,3,57,98,252,5,",
                     "sms_login": "0",
                     "wap_allow": 1,
                     "login_usbkey": "0",
                     "usbkey_pin": "",
                     "user_status": 1, // User status, all user here will be active users
                     "is_autohrms": 1,
                     "created_at": "2015-08-25 04:05:45",
                     "updated_at": "2018-06-15 14:13:14",
                     "deleted_at": null,
                     "user_system_info_belongs_to_department": {
                         "dept_id": 2,
                         "dept_name": "IT Department", // User department
                         "tel_no": "",
                         "fax_no": "",
                         "parent_id": 59,
                         "dept_name_py": "yanfabu",
                         "dept_name_zm": "yfb",
                         "arr_parent_id": "0,59",
                         "has_children": 0,
                         "dept_sort": 1,
                         "deleted_at": null,
                         "created_at": "2015-11-10 11:22:22",
                         "updated_at": "2017-05-16 02:40:34"
                     }
                 },
                 "user_has_one_attendance_scheduling_info": {
                     "scheduling_id": 1,
                     "user_id": "admin"
                 },
                 "user_position_name": "IT Manager" // User's position
             },
         ...
     }
}
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="400: Bad Request " %}
{% tabs %}
{% tab title="Result" %}

{% endtab %}

{% tab title="Example" %}

```json
{
    "status": 0,
    "errors": [
        {
            "code": "0x000003",
            "message": "未知错误"
        }
    ]
}
```

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

| Name   | Type    | Description                  |
| ------ | ------- | ---------------------------- |
| status | boolean | (0) Access failed            |
| errors | array   | Access failure error message |

| Field  | Type    | Description              |
| ------ | ------- | ------------------------ |
| status | boolean | (1) Access is successful |
