Skip to main content
Skip table of contents

Список пользователей, которым доступна камера

Список пользователей которым доступна камера

Список пользователей которым доступна камера

GET /api/admin/v1/cameras/{camera}/users

Параметры метода

int camera, уникальный идентификатор камеры

200 OK

Список пользователей

JSON
{
    "data": [
        {
            "id": 503197,
            "name": "user",
            "login": "user@mail.com",
            "created_at": "2021-07-16T15:31:53.000000Z",
            "updated_at": "2023-01-09T15:29:17.000000Z",
            "expired_at": "2025-07-08T12:30:31.000000Z",
            "user_type": "special",
            "parent_id": null,
            "parent": null,
            "is_licence_limit_reached": true,
            "ptz_priority": 1,
            "access_token_id": null
        },
        {
            "id": 961959,
            "name": "user2",
            "login": "user2@mail.com",
            "created_at": "2022-07-20T17:57:15.000000Z",
            "updated_at": "2023-02-01T19:28:50.000000Z",
            "expired_at": null,
            "user_type": "subuser",
            "parent_id": 946953,
            "parent": {
                "id": 946953,
                "name": null,
                "login": "223800115150024",
                "created_at": "2022-07-07T17:40:57.000000Z",
                "updated_at": "2023-02-01T17:57:58.000000Z",
                "expired_at": null,
                "user_type": "user",
                "is_licence_limit_reached": true,
                "ptz_priority": 10,
                "access_token_id": null
            },
            "is_licence_limit_reached": true,
            "ptz_priority": 10,
            "access_token_id": null
        }
    ],
    "links": {
        "first": "http://127.0.0.1:8080/api/admin/v1/cameras/7454/users?page=1",
        "last": "http://127.0.0.1:8080/api/admin/v1/cameras/7454/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": "http://127.0.0.1:8080/api/admin/v1/cameras/7454/users?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "http://127.0.0.1:8080/api/admin/v1/cameras/7454/users",
        "per_page": 25,
        "to": 2,
        "total": 2
    }
}

401 Unauthorized

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

cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/cameras/{camera}/users' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "camera": 0
}'
PHP
PHP
$data = array (
  'camera' => 0,
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'GET',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/admin/v1/cameras/{camera}/users', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.