Skip to main content
Skip table of contents

Список пользователей. VMS Admin API

Возвращает список пользователей

GET/api/admin/v1/users

Headers

Authorization

Bearer token

Accept

application/json

X-Client

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

X-UUID

unique device id

Body

searchrequired

int

Поиск по логину и имени пользователя

per_pagerequired

int

Количество элементов в одной странице пагинации. По умолчанию 25 штук

pagerequired

int

Номер страницы пагинации

Response

200

Успешный ответ

JSON
{
    "data": [
        {
            "id": 3,
            "name": "user",
            "login": "user",
            "created_at": "2021-05-27 15:43:37",
            "cameras_count": 0
        },
        {
            "id": 4,
            "name": "user",
            "login": "user",
            "created_at": "2021-05-27 15:43:37",
            "cameras_count": 0
        },
        {
            "id": 13,
            "name": "user",
            "login": "user",
            "created_at": "",
            "cameras_count": 22
        },
        {
            "id": 19,
            "name": "user",
            "login": "user",
            "created_at": "2021-08-11 17:35:13",
            "cameras_count": 0
        },
        {
            "id": 95,
            "name": "user",
            "login": "user",
            "created_at": "",
            "cameras_count": 1
        }
    ],
    "links": {
        "first": "https://vms.local/api/admin/v1/users?page=1",
        "last": "https://vms.local/api/admin/v1/users?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "pagination.previous",
                "active": false
            },
            {
                "url": "https://vms.local/api/admin/v1/users?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "https://vms.local/api/admin/v1/users",
        "per_page": 25,
        "to": 5,
        "total": 5
    }
}
401

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

Пример

JSON
curl -k --location --request GET 'https://vms.local/api/admin/v1/users?search=int&per_page=int&page=int' \
--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.