-
Notifications
You must be signed in to change notification settings - Fork 300
Expand file tree
/
Copy pathsystem.js
More file actions
45 lines (40 loc) · 964 Bytes
/
system.js
File metadata and controls
45 lines (40 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import apiClient from './client'
export const systemApi = {
// Get health status
async getHealth() {
const response = await apiClient.get('/health')
return response
},
// Get logs via MCP
async getLogs(lines = 100) {
const response = await apiClient.post('/admin/mcp', {
name: 'read_logs',
arguments: { lines }
})
return response
},
// Get routes info via MCP
async getRoutes() {
const response = await apiClient.post('/admin/mcp', {
name: 'get_routes_info',
arguments: {}
})
return response
},
// Restart service via MCP
async restartService() {
const response = await apiClient.post('/admin/mcp', {
name: 'restart_service',
arguments: {}
})
return response
},
// Get API list via MCP
async getApiList() {
const response = await apiClient.post('/admin/mcp', {
name: 'get_drpy_api_list',
arguments: {}
})
return response
}
}