Получение текущего пользователя
Возвращает объект текущего пользователя.
GET/api/v1/users/selfHeaders |
Authorization | Bearer token |
Accept | application/json |
X-Client | ios-cctv|android-cctv|thick-legal|web |
X-UUID | unique device id |
Response |
| Возвращает JSON объект пользователя |
JSON
{
"id": 13,
"login": "user",
"name": "user",
"parent_id": null,
"permissions": [
{
"id": 223,
"name": "any-permission"
},
{
"id": 221,
"name": "any-permission"
},
{
"id": 222,
"name": "any-permission"
},
{
"id": 220,
"name": "any-permission"
}
],
"created_at": "",
"updated_at": "2022-04-21 16:37:46",
"access_token_id": "c862e3c5a5a87d8b2756e4ad44a43f0a71cbf9cf3063cae019802d0b032ee17f32f69364e7aadb23",
"can_update_password": true,
"analytic_license": [
{
"type": "analytic_l1",
"type_pretty": "LIC-XXXX-YY-L1",
"all": 100,
"free": 98,
"used": 2
},
{
"type": "analytic_l2",
"type_pretty": "LIC-XXXX-YY-L2",
"all": 100,
"free": 100,
"used": 0
},
{
"type": "analytic_l3",
"type_pretty": "LIC-XXXX-YY-L3",
"all": 100,
"free": 99,
"used": 1
}
]
}
|
| |
Пример |
JSON
curl -k --location --request GET 'https://vms.local/api/v1/users/self' \
--header 'Authorization:Bearer token' \
--header 'Accept:application/json' \
--header 'X-Client:ios-cctv|android-cctv|thick-legal|web' \
--header 'X-UUID:unique device id'
|