Список активных сессий пользователя. Текущая сессия помечена is_current=true
GET/api/v1/sessionsHeaders |
Authorization | Bearer token |
Accept | application/json |
X-Client | ios-cctv|android-cctv|thick-legal|web |
X-UUID | unique device id |
Response |
| Успешный ответ |
JSON
[
{
"id": "cd5cce244f8a30dbe15e623ba0b10a609284e487f985046e010de42f0ed44f460dfa8801b8649a80",
"user_agent": "Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36",
"client": "web",
"online": true,
"ip": "192.168.98.189",
"is_current": true
},
{
"id": "7927faf7396cc20f446bda364da8b737e683d5dfdeac8300a42c74c06bad96d56cc8d3a3c73d1f00",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36",
"client": "web",
"online": true,
"ip": "192.168.17.89",
"is_current": false
},
{
"id": "de5a528baf2d2dcdda4db2bd9583450c3b38c6a1fd627ee8a9b8c404efd3881c16d8b2d710d361b3",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36",
"client": "web",
"online": false,
"ip": "192.168.18.148",
"is_current": false
},
{
"id": "657b0a759cf359c93740135190b5c9cda9ecfa70bae23c5c88e2878d5d64dc9831862562c9fdea53",
"user_agent": "iPhone XR 14.7.1 / 1.1.0.158 / IOS",
"client": "ios",
"online": false,
"ip": "192.168.18.90",
"is_current": false
},
{
"id": "6437b3fccdedffd333b5cfa8883bf4691261c28b6d892a4eb8cf7589daec272bada41108e05b63c9",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36",
"client": "web",
"online": true,
"ip": "192.168.98.178",
"is_current": false
}
]
|
| |
Пример |
JSON
curl -k --location --request GET 'https://vms.local/api/v1/sessions' \
--header 'Authorization:Bearer token' \
--header 'Accept:application/json' \
--header 'X-Client:ios-cctv|android-cctv|thick-legal|web' \
--header 'X-UUID:unique device id'
|