Implementation:Infiniflow Ragflow AdminService
| Knowledge Sources | |
|---|---|
| Domains | Frontend, API, Admin |
| Last Updated | 2026-02-12 06:00 GMT |
Overview
Concrete frontend HTTP API client defining all admin panel endpoints for user management, role management, and system configuration in the RAGFlow frontend.
Description
The services/admin-service.ts module defines API endpoint functions for: user CRUD (list, create, update, delete), role management (list, create, update, delete, permissions), whitelist management, system settings, service status monitoring, and task executor management.
Usage
Import these service functions in admin panel hooks and components that need to communicate with the RAGFlow admin API endpoints.
Code Reference
Source Location
- Repository: Infiniflow_Ragflow
- File: web/src/services/admin-service.ts
- Lines: 1-320
Signature
export const listUsers: (params) => Promise<Response>;
export const createUser: (data) => Promise<Response>;
export const updateUser: (data) => Promise<Response>;
export const deleteUser: (id: string) => Promise<Response>;
export const listRoles: () => Promise<Response>;
export const getSystemSettings: () => Promise<Response>;
// ... additional endpoint definitions
Import
import { listUsers, createUser, getSystemSettings } from '@/services/admin-service';
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| params | object | Varies | Query/body parameters per endpoint |
Outputs
| Name | Type | Description |
|---|---|---|
| returns | Promise<Response> | API response with data payload |
Usage Examples
import { listUsers } from '@/services/admin-service';
const response = await listUsers({ page: 1, pageSize: 20 });
console.log(response.data.users);