Skip to main content
GET
Get All Users

Get All Users

Retrieve all users with pagination and filtering. Only accessible by administrators.

Endpoint

Description

This endpoint allows administrators to retrieve a paginated list of all users in the system. It supports filtering by various criteria including role, license, status, and search terms. This is an administrative endpoint that requires appropriate permissions.

Authentication

Required. Include your API key in the Authorization header.

Request

Query Parameters

Example Request

With search:

Response

Success Response (200)

Response Fields

Example Usage

JavaScript

Python

cURL

Error Responses

401 Unauthorized

403 Forbidden

Filtering Examples

Search by Name or Email

Filter by Role

Filter by License

Filter by Status

Sort by Last Active

Use Cases

  • User Management: View and manage all users in the system
  • User Analytics: Analyze user distribution by role, license, or status
  • Search and Filter: Find specific users based on various criteria
  • Administrative Tasks: Support administrative operations and reporting

Role Descriptions

  • admin: Full system access with administrative control
  • user: Standard access to chat features and personal knowledge bases
  • globalReader: Read-only access to admin panel with viewing permissions

License Descriptions

  • Essential: Basic tier with 29,000 points/month
  • Growth: Mid-tier with enhanced features
  • Ultra: Premium tier with maximum features
  • Early Access: Beta tier with experimental capabilities

Rate Limits

This endpoint follows the standard rate limits:
  • 60 requests per minute
  • 1000 requests per hour

授权

Authorization
string
header
必填

API key authentication using Bearer token format. Example: Authorization: Bearer sk-your-api-key-here

查询参数

page
integer
默认值:1

Page number for pagination

必填范围: x >= 1
limit
integer
默认值:20

Number of users per page

必填范围: 1 <= x <= 100

Search term for name, email, or username

role
enum<string>

Filter by user role

可用选项:
admin,
user,
globalReader
license
enum<string>

Filter by user license

可用选项:
Essential,
Growth,
Ultra,
Early Access
status
enum<integer>

Filter by user status (0=inactive, 1=active)

可用选项:
0,
1
sortBy
string
默认值:createdAt

Field to sort by

sortOrder
enum<string>
默认值:desc

Sort order

可用选项:
asc,
desc

响应

List of users

success
boolean
示例:

true

users
object[]
pagination
object