Skip to main content
Skip table of contents

Список всех домофонов администратора

Список домофонов

GET /api/admin/v1/intercoms

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

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


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


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


string sort, Поле, по которому нужно отсортировать сервера


string dir, В каком направлении нужно отсортировать. desc - от большего к меньшему, asc - от меньшего к большему


string vendor, Фильтрация по модели. В под ключом intercom_vendors


string status, Фильтрация по статусу. В под ключом intercom_statuses


date from, Начало интервала времени


date to, Конец интервала времени


string department_type, Фильтр по типу входа. В под ключом intercom_statuses

200 OK

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

JSON
{
    "data": [
        {
            "id": 5,
            "title": "test beward",
            "is_online": true,
            "is_registered": false,
            "group_id": 1,
            "camera_id": 28,
            "flat_from": 1,
            "flat_to": 200,
            "flat_offset": null,
            "department": 3,
            "department_name": "Main",
            "department_type": "main",
            "department_type_pretty": "Основной вход",
            "uuid": "50906e9f-273a-4bd0-925e-21d58936c249",
            "address": "City",
            "group": {
                "id": 1,
                "name": "Тестовые камеры",
                "full_pretty": null,
                "is_house": 0,
                "cameras_count": 0,
                "parent_id": null,
                "csa_id": null,
                "intercoms_count": 0
            },
            "created_at": "2023-10-10T08:39:57.000000Z",
            "updated_at": "2023-10-10T14:52:17.000000Z",
            "mac": "18-68-82-31-BD-F2",
            "vendor": "beward",
            "vendor_pretty": "Бевард",
            "status": "installed",
            "status_pretty": "Установлен",
            "switch": null,
            "switch_pretty": null,
            "schema": "http",
            "ip": "192.168.19.191",
            "port": 80,
            "login": "admin",
            "password": "admin",
            "commutators_count": null,
            "connection_type": "matrix_switching",
            "connection_type_pretty": "Матрично-коммутационный",
            "key_count": null
        },
        {
            "id": 1,
            "title": "Спутник1",
            "is_online": true,
            "is_registered": false,
            "group_id": 1,
            "camera_id": 6,
            "flat_from": 1,
            "flat_to": 100,
            "flat_offset": null,
            "department": 1,
            "department_name": "основной",
            "department_type": "main",
            "department_type_pretty": "Основной вход",
            "uuid": "2d68b836-6f27-4650-8dae-9e80ff9bd26f",
            "address": "vbvbvbv",
            "group": {
                "id": 1,
                "name": "Тестовые камеры",
                "full_pretty": null,
                "is_house": 0,
                "cameras_count": 0,
                "parent_id": null,
                "csa_id": null,
                "intercoms_count": 0
            },
            "created_at": "2023-05-10T15:56:14.000000Z",
            "updated_at": "2023-09-19T14:22:24.000000Z",
            "mac": null,
            "vendor": "sputnik",
            "vendor_pretty": "Спутник",
            "status": "installed",
            "status_pretty": "Установлен",
            "switch": "metakom",
            "switch_pretty": "Метаком",
            "schema": null,
            "ip": null,
            "port": null,
            "login": "null",
            "password": "null",
            "commutators_count": 1,
            "connection_type": "matrix_switching_and_smart",
            "connection_type_pretty": "Комбинированный 1",
            "key_count": null
        },
        {
            "id": 2,
            "title": "INTERCO",
            "is_online": false,
            "is_registered": true,
            "group_id": 1,
            "camera_id": 28,
            "flat_from": 1,
            "flat_to": 100,
            "flat_offset": null,
            "department": 2,
            "department_name": null,
            "department_type": null,
            "department_type_pretty": null,
            "uuid": "2d68b836-6f27-4650-8dae-9e80ff9bd26s",
            "address": null,
            "group": {
                "id": 1,
                "name": "Тестовые камеры",
                "full_pretty": null,
                "is_house": 0,
                "cameras_count": 0,
                "parent_id": null,
                "csa_id": null,
                "intercoms_count": 0
            },
            "created_at": null,
            "updated_at": "2023-10-30T10:24:31.000000Z",
            "mac": "02:03:42:31:7C:79",
            "vendor": "interconnection",
            "vendor_pretty": "Интерсвязь",
            "status": null,
            "status_pretty": null,
            "switch": "",
            "switch_pretty": null,
            "schema": "http",
            "ip": "192.168.19.93",
            "port": 8080,
            "login": "root",
            "password": "123456",
            "commutators_count": null,
            "connection_type": null,
            "connection_type_pretty": null,
            "key_count": null
        }
    ],
    "links": {
        "first": "https://vms.local:8000/api/admin/v1/intercoms?page=1",
        "last": "https://vms.local:8000/api/admin/v1/intercoms?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:8000/api/admin/v1/intercoms?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "https://vms.local:8000/api/admin/v1/intercoms",
        "per_page": 15,
        "to": 3,
        "total": 3
    }
}

401 Unauthorized

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

cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/intercoms' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "per_page": 0,
    "page": 0,
    "search": "string",
    "sort": "string",
    "dir": "string",
    "vendor": "string",
    "status": "string",
    "from": "date",
    "to": "date",
    "department_type": "string"
}'
PHP
PHP
$data = array (
  'per_page' => 0,
  'page' => 0,
  'search' => 'string',
  'sort' => 'string',
  'dir' => 'string',
  'vendor' => 'string',
  'status' => 'string',
  'from' => 'date',
  'to' => 'date',
  'department_type' => 'string',
);
$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/intercoms', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.