Skip to main content
Skip table of contents

Просмотр пользователя

Просмотр пользователя.

GET/api/admin/v1/users/{user}

Headers

Authorization

Bearer token

Accept

application/json

X-Client

ios-cctv|android-cctv|thick-legal|web

X-UUID

unique device id

Body

useroptional

int

Уникальный идентификатор пользователя

Response

200

Возвращает объект пользователя

JSON
{
    "id": 5,
    "name": "user",
    "login": "user",
    "created_at": "2022-11-16 18:05:06",
    "user_type": "user",
    "cameras": [
        {
            "id": 1,
            "name": "Камера 1",
            "status": "inactive",
            "type": "media_server_v2",
            "start_at": null,
            "group_id": 2,
            "top_group_id": 1,
            "order": 0,
            "created_at": "2022-11-16T15:22:00.000000Z",
            "updated_at": "2022-11-16T15:22:14.000000Z",
            "origin": null,
            "group_type": "public",
            "folder_id": null,
            "is_sensitive": 0,
            "is_public": 0,
            "count_issues": 0,
            "azimuth": null,
            "location": null,
            "is_user_owner": false,
            "pack_id": null,
            "source": "manual",
            "archive_storage_days": null,
            "is_archive_recording": false,
            "is_increased_reconnect": 0,
            "model_id": null,
            "is_sound_enabled": true,
            "is_need_replace": false,
            "ip": "192.168.204.13",
            "path": [
                1,
                2
            ],
            "bridge_id": null,
            "uuid": null,
            "deleted_at": null,
            "archive_recording_type": "fulltime",
            "is_auto_create_streams": false,
            "host_id": null,
            "is_enabled": 1,
            "is_editable": true,
            "is_intercom": 1,
            "services_list": {
                "ptz": false,
                "motion_detect": false
            },
            "pivot": {
                "user_id": 5,
                "camera_id": 1,
                "order": 0,
                "name": "Камера 1",
                "login_id": 1,
                "is_favorite": 0,
                "status": "blocked"
            },
            "group": {
                "id": 2,
                "parent_id": 1,
                "depth": 1,
                "path_index": 0,
                "name": "Камеры",
                "csa_id": null,
                "is_house": 1,
                "type": "cameras",
                "uuid": null,
                "created_at": "2022-11-16T15:22:00.000000Z",
                "updated_at": "2022-11-17T09:48:10.000000Z",
                "user_id": null,
                "is_legal": 0,
                "cameras_count": 0,
                "short_pretty": "Камеры",
                "full_pretty": "Камеры",
                "top_group_id": 1,
                "intercoms_count": 0,
                "csa": null
            },
            "services": []
        }
    ],
    "subusers": [
        {
            "id": 11,
            "name": "subuser@mail.com",
            "login": "",
            "created_at": "2022-11-16 18:05:07",
            "permissions": [
                {
                    "id": 9,
                    "name": "layouts-store",
                    "display_name": "Создание раскладки",
                    "group": "Раскладки"
                }
            ]
        }
    ],
    "permissions": [
        {
            "id": 1,
            "name": "logins-store",
            "display_name": "Добавление логина",
            "group": "Логин"
        }
    ],
    "billing_info": {
        "data": [
            {
                "csa": [
                    "75766"
                ],
                "login": "login",
                "status": "status",
                "user_type": "user_type",
                "billing_id": "billing_id",
                "billing_extra": {
                    "data": {
                        "key_1": "value_1",
                        "key_2": "value_2",
                        "key_3": "value_3",
                        "key_4": "value_4",
                        "key_5": "value_5",
                        "key_6": "value_6"
                    },
                    "extra": [
                        {
                            "key_1": "value_1",
                            "key_2": "value_2",
                            "key_3": "value_3",
                            "key_4": "value_4",
                            "key_5": "value_5",
                            "key_6": "value_6"
                        }
                    ]
                }
            }
        ]
    },
    "events": [],
    "analytic_license": [
        {
            "type": "analytic_l1",
            "type_pretty": "LIC-XXXX-YY-L1",
            "all": 20,
            "free": 20,
            "used": 0
        },
        {
            "type": "analytic_l2",
            "type_pretty": "LIC-XXXX-YY-L2",
            "all": 20,
            "free": 20,
            "used": 0
        },
        {
            "type": "analytic_l3",
            "type_pretty": "LIC-XXXX-YY-L3",
            "all": 20,
            "free": 20,
            "used": 0
        }
    ],
    "intercoms": [
        {
            "id": 1,
            "title": null,
            "is_online": false,
            "group_id": 4,
            "camera_id": 1,
            "flat_from": 1,
            "flat_to": 41,
            "flat_offset": null,
            "department": 1,
            "department_name": "department_name",
            "department_type": "main",
            "department_type_pretty": "Вход",
            "uuid": "9f44078b-0326-4143-a0c2-932a3137ba90",
            "address": "г. Город, ул. Улица 1",
            "created_at": "2022-11-16 18:08:36",
            "updated_at": "2022-11-17 11:27:48",
            "mac": "08:13:c0:00:00:82",
            "vendor": "interconnection",
            "vendor_pretty": "Интерсвязь",
            "status": "installed",
            "status_pretty": "Установлен",
            "switch": "metakom",
            "switch_pretty": "Метаком",
            "schema": "http",
            "ip": "192.168.18.207",
            "port": 8080,
            "login": "root",
            "password": "123456",
            "commutators_count": 2
        }
    ],
    "intercom_flats": [
        {
            "id": 1,
            "flat": 1,
            "key_count": null,
            "users_count": null,
            "intercom_id": 1,
            "number": "user@vms.local",
            "duplicate_number": "+xxxxxxxxxxxx",
            "is_duplicated_sip_line_available": true,
            "is_analog_line_enable": false,
            "is_sip_line_enable": false
        }
    ],
    "intercom_keys": [
        {
            "id": 1,
            "key": "131231",
            "intercom_id": 1,
            "created_at": "2022-11-28 10:58:19",
            "updated_at": "2022-11-28 11:13:25"
        }
    ]
}
401

Токен авторизации не передан или не валидный, см. Получение токена

Пример

JSON
curl -k --location --request GET 'https://vms.local/api/admin/v1/users/{user}' \
--header 'Authorization:Bearer token' \
--header 'Accept:application/json' \
--header 'X-Client:ios-cctv|android-cctv|thick-legal|web' \
--header 'X-UUID:unique device id'
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.