User sessions

List active sessions

Introduction

List active sessions of a specified user

URI

GET /admin-api/user/list_active_sessions

Request example

Shell

curl https://{admin-site}/admin-api/user/list_active_sessions

Response example

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
}

Delete Session

Introduction

Delete all sessions of a specified user

URI

DELETE /admin-api/user/delete_sessions
'{
    uid: 2
  }'

Parameters

  • uid

    type: integer

    required: yes

    description: Session of the user

Request example

Shell

curl -X DELETE https://{admin-site}/admin-api/user/delete_sessions

Response example

Status: 200 OK
{
  "time": 1614926868,
  "status": 0,
  "msg": "sessions deleted"
}