使用者 Session
獲取活躍的 Session 列表
URI
GET /admin-api/user/list_active_sessions
請求示例
Shell
curl http://{admin-site}/admin-api/user/list_active_sessions
響應示例
Status: 200 OK
{
"time": 1614926543,
"data": {
"data": [{
"uid": 2,
"plugin": "Builtin",
"username": "edge-admin",
"remote_addr": "120.24.93.123",
"expires": 1615024689
}, {
"uid": 2,
"plugin": "Builtin",
"username": "edge-admin",
"remote_addr": "120.24.93.123",
"expires": 1616981168
}],
"meta": {
"count": 2
}
},
"status": 0
}
刪除指定使用者的 Session
URI
DELETE /admin-api/user/delete_sessions
'{
uid: 2
}'
URI引數
uid
type: integer
required: yes
description: Session 將被刪除的使用者 id
請求示例
Shell
curl -X DELETE http://{admin-site}/admin-api/user/delete_sessions
響應示例
Status: 200 OK
{
"time": 1614926868,
"status": 0,
"msg": "sessions deleted"
}