---
title: "Get the List of Users"
method: GET
path: "/api/user-list"
tags: ["user"]
---

# Get the List of Users

`GET /api/user-list`

This function is an API endpoint that allows an authenticated admin to retrieve a paginated list of users. It is tagged with "user" for OpenAPI documentation.

## Parameters

- `current`: The current page number.

- `pageSize`: The number of users per page.

- `email`: The email to filter the users by.

- `name`: The name to filter the users by.

## Returns

If successful, this function returns a `Json<UserList>` object, which includes a success message, the total number of users, and the list of users.  <br> If no users are found, this function returns a `status::NotFound` error.  <br>

## Errors

This function will return an error if the system is in maintenance mode, or if no users are found.

# Example

GET /api/user-list?current=1&pageSize=10&email=test@test.com&name=Test

## Query parameters

- `current` integer, required
- `pageSize` integer, required
- `email` string, nullable
- `name` string, nullable

## Response `200`

- UserList
  - `msg` string, required
  - `total` integer, required
  - `data` UserListResponse[], required
    - `guid` string, required
    - `name` string, required
    - `email` string, required
    - `note` string, nullable
    - `status` integer, required
    - `group_name` string, required
    - `is_admin` boolean, required

## Other responses

- `404`

## Changes

- **2024-05-20** `b66a109db88a` — 2 info
  - api tag `user` added
  - api tag `User` removed
- **2024-05-19** `fafd43b82c78` — 2 info
  - api tag `User` added
  - api tag `user` removed

[Change history](https://skmtc.dev/nesaku/apis/sctgdesk-api-server/changes/api/user-list/get.md)

---

[API](https://skmtc.dev/nesaku/apis/sctgdesk-api-server.md) · [All operations](https://skmtc.dev/nesaku/apis/sctgdesk-api-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nesaku/sctgdesk-api-server/revisions/b1c0e7a4434f/schema)
