Skip to main content
Skip table of contents

Поиск. VMS Admin API

Поиск

Поиск камер. По умолчанию отдаются последние добавленные камеры

GET /api/admin/v1/cameras/search

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

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


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


string ip, поиск осуществляется IP потока


string name, поиск осуществляется имени камеры


string server, поиск осуществляется по основному серверу, на который заведены потоки


uuid uuid, поиск осуществляется по uuid потока, заведенного на камеру


string vendor, поиск осуществляется по вендору (производителю) камеры


string model, поиск осуществляется по модели камеры


string storage, поиск осуществляется по стораджу потока камеры


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


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

200 OK

Возвращает список камер на i странице пагинации

JSON
{
    "data": [
        {
            "id": 959,
            "group_id": 207,
            "status": "active",
            "type": "media_server_v2",
            "pretty_text": ", , г. Город, ул. Улица 1",
            "short_pretty": "г. Город, ул. Улица 1",
            "start_at": "2022-06-22 12:19:59",
            "created_at": "2022-06-22 12:17:31",
            "name": "Камера 1",
            "streams": [
                {
                    "id": 1007,
                    "type": "low",
                    "camera_id": 959,
                    "status": "active",
                    "url": "rtsp://admin:456redko!@192.168.204.23:554/unicast/c1/s2/live",
                    "bitrate": 3760,
                    "resolution": "1920x1080",
                    "output_rate": 0,
                    "ip": "192.168.204.23",
                    "uuid": "e98c552c-57ff-4146-9f5a-9fb3038cccd3",
                    "sound": "tracks-v1",
                    "streams_count": 0,
                    "server": {
                        "id": 5,
                        "type": "media_server_v2",
                        "schema": "https",
                        "domain": "labMS7.vms.local",
                        "internal": "8080",
                        "external": "8443",
                        "m4f": "8443",
                        "rtsp": "5554",
                        "publish": "555",
                        "traffic_in": 17356,
                        "traffic_out": 0,
                        "status": 1,
                        "is_enabled": 1,
                        "is_main": 0,
                        "has_cache": 0,
                        "proxy": ".vms.local",
                        "created_at": "2021-05-27 16:16:26",
                        "updated_at": "2022-06-22 12:56:02",
                        "group_type": "all",
                        "can_delete": false,
                        "streams_limit": 6000,
                        "bitrate_limit": 600000,
                        "extra": {
                            "io": {
                                "read_rate": 0,
                                "read_bytes": 0,
                                "write_rate": 0,
                                "write_bytes": 0
                            },
                            "cpu": {
                                "total": 10,
                                "usage": 10,
                                "stime_sec": 16230,
                                "utime_sec": 16230
                            },
                            "mem": {
                                "rss": 487268352,
                                "share": 9711616,
                                "usage": 2481070080
                            },
                            "net": {
                                "in_bitrate": 17772296,
                                "out_bitrate": 0
                            },
                            "drives": {
                                "/": {
                                    "fs": "ext4",
                                    "mount": "/",
                                    "inode_free": 1475251,
                                    "inode_total": 1605632,
                                    "capacity_free": 1799950336,
                                    "capacity_total": 25759584256
                                },
                                "/boot": {
                                    "fs": "ext4",
                                    "mount": "/boot",
                                    "inode_free": 65220,
                                    "inode_total": 65536,
                                    "capacity_free": 806674432,
                                    "capacity_total": 1023303680
                                },
                                "/storage": {
                                    "fs": "ext4",
                                    "mount": "/storage",
                                    "inode_free": 32761647,
                                    "inode_total": 32768000,
                                    "capacity_free": 398892675072,
                                    "capacity_total": 527371075584
                                }
                            },
                            "server": {
                                "ip4": "192.168.200.19",
                                "name": "MS-21.03-lts",
                                "build": "44ce34f",
                                "uptime": 516417,
                                "startat": 1655375345,
                                "version": "21.03",
                                "hostname": "labMS7.vms.local",
                                "revision": "lts",
                                "timestamp": "20220616091725"
                            },
                            "cluster": {
                                "id": "3",
                                "node": "7",
                                "enable": "true",
                                "hostname": "labMS7.vms.local"
                            },
                            "license": {
                                "own": "Vms",
                                "type": "enterprise",
                                "issued": 1687427762
                            },
                            "streams": {
                                "total": 26,
                                "active": 10,
                                "clients": 0
                            },
                            "storages": {
                                "/storage": {
                                    "fs": "",
                                    "err": 0,
                                    "name": "default",
                                    "mount": "/storage",
                                    "inode_free": 32761647,
                                    "inode_total": 32768000,
                                    "capacity_free": 398892675072,
                                    "capacity_total": 527371075584
                                }
                            }
                        }
                    },
                    "sub_servers": [
                        {
                            "id": 6,
                            "type": "media_server_v2",
                            "schema": "https",
                            "domain": "labMS8.vms.local",
                            "internal": "8080",
                            "external": "8443",
                            "m4f": "8443",
                            "rtsp": "5554",
                            "publish": "555",
                            "traffic_in": 17689,
                            "traffic_out": 0,
                            "status": 1,
                            "is_enabled": 1,
                            "is_main": 0,
                            "has_cache": 0,
                            "proxy": ".vms.local",
                            "created_at": "2021-05-27 16:17:06",
                            "updated_at": "2022-06-22 12:56:02",
                            "group_type": "all",
                            "can_delete": false,
                            "streams_limit": 6000,
                            "bitrate_limit": 600000,
                            "extra": {
                                "io": {
                                    "read_rate": 0,
                                    "read_bytes": 0,
                                    "write_rate": 0,
                                    "write_bytes": 0
                                },
                                "cpu": {
                                    "total": 9,
                                    "usage": 11,
                                    "stime_sec": 11103,
                                    "utime_sec": 11103
                                },
                                "mem": {
                                    "rss": 670244864,
                                    "share": 10559488,
                                    "usage": 2751422464
                                },
                                "net": {
                                    "in_bitrate": 18113768,
                                    "out_bitrate": 0
                                },
                                "drives": {
                                    "/": {
                                        "fs": "ext4",
                                        "mount": "/",
                                        "inode_free": 1472862,
                                        "inode_total": 1605632,
                                        "capacity_free": 18185748480,
                                        "capacity_total": 25759584256
                                    },
                                    "/boot": {
                                        "fs": "ext4",
                                        "mount": "/boot",
                                        "inode_free": 65220,
                                        "inode_total": 65536,
                                        "capacity_free": 806674432,
                                        "capacity_total": 1023303680
                                    },
                                    "/storage": {
                                        "fs": "ext4",
                                        "mount": "/storage",
                                        "inode_free": 32747036,
                                        "inode_total": 32768000,
                                        "capacity_free": 353516720128,
                                        "capacity_total": 527371075584
                                    }
                                },
                                "server": {
                                    "ip4": "192.168.200.20",
                                    "name": "MS-21.03-lts",
                                    "build": "44ce34f",
                                    "uptime": 270004,
                                    "startat": 1655621758,
                                    "version": "21.03",
                                    "hostname": "labMS8.vms.local",
                                    "revision": "lts",
                                    "timestamp": "20220616091725"
                                },
                                "cluster": {
                                    "id": "3",
                                    "node": "8",
                                    "enable": "true",
                                    "hostname": "labMS8.vms.local"
                                },
                                "license": {
                                    "own": "Vms",
                                    "type": "enterprise",
                                    "issued": 1687427762
                                },
                                "streams": {
                                    "total": 26,
                                    "active": 13,
                                    "clients": 0
                                },
                                "storages": {
                                    "/storage": {
                                        "fs": "",
                                        "err": 0,
                                        "name": "default",
                                        "mount": "/storage",
                                        "inode_free": 32747036,
                                        "inode_total": 32768000,
                                        "capacity_free": 353516720128,
                                        "capacity_total": 527371075584
                                    }
                                }
                            }
                        }
                    ],
                    "transfer_servers": [],
                    "transfer_sub_servers": [],
                    "created_at": "2022-06-22 12:19:52",
                    "updated_at": "2022-06-22 12:56:04",
                    "is_preview_from_server": true,
                    "is_archive_from_server": null,
                    "is_enabled": true,
                    "source": "manual",
                    "is_sound_enabled": false,
                    "reconnect_attempt": 0,
                    "reconnect_total": 0,
                    "reconnect_time": null,
                    "disconnections_count": 0,
                    "is_actual": true
                },
                {
                    "id": 1008,
                    "type": "high",
                    "camera_id": 959,
                    "status": "active",
                    "url": "rtsp://admin:456redko!@192.168.204.23:554/unicast/c1/s2/live",
                    "bitrate": 3809,
                    "resolution": "1920x1080",
                    "output_rate": 0,
                    "ip": "192.168.204.23",
                    "uuid": "8d9889ca-9297-4e4e-a869-97f36d766876",
                    "sound": "tracks-v1",
                    "streams_count": 0,
                    "server": {
                        "id": 5,
                        "type": "media_server_v2",
                        "schema": "https",
                        "domain": "labMS7.vms.local",
                        "internal": "8080",
                        "external": "8443",
                        "m4f": "8443",
                        "rtsp": "5554",
                        "publish": "555",
                        "traffic_in": 17356,
                        "traffic_out": 0,
                        "status": 1,
                        "is_enabled": 1,
                        "is_main": 0,
                        "has_cache": 0,
                        "proxy": ".vms.local",
                        "created_at": "2021-05-27 16:16:26",
                        "updated_at": "2022-06-22 12:56:02",
                        "group_type": "all",
                        "can_delete": false,
                        "streams_limit": 6000,
                        "bitrate_limit": 600000,
                        "extra": {
                            "io": {
                                "read_rate": 0,
                                "read_bytes": 0,
                                "write_rate": 0,
                                "write_bytes": 0
                            },
                            "cpu": {
                                "total": 10,
                                "usage": 10,
                                "stime_sec": 16230,
                                "utime_sec": 16230
                            },
                            "mem": {
                                "rss": 487268352,
                                "share": 9711616,
                                "usage": 2481070080
                            },
                            "net": {
                                "in_bitrate": 17772296,
                                "out_bitrate": 0
                            },
                            "drives": {
                                "/": {
                                    "fs": "ext4",
                                    "mount": "/",
                                    "inode_free": 1475251,
                                    "inode_total": 1605632,
                                    "capacity_free": 1799950336,
                                    "capacity_total": 25759584256
                                },
                                "/boot": {
                                    "fs": "ext4",
                                    "mount": "/boot",
                                    "inode_free": 65220,
                                    "inode_total": 65536,
                                    "capacity_free": 806674432,
                                    "capacity_total": 1023303680
                                },
                                "/storage": {
                                    "fs": "ext4",
                                    "mount": "/storage",
                                    "inode_free": 32761647,
                                    "inode_total": 32768000,
                                    "capacity_free": 398892675072,
                                    "capacity_total": 527371075584
                                }
                            },
                            "server": {
                                "ip4": "192.168.200.19",
                                "name": "MS-21.03-lts",
                                "build": "44ce34f",
                                "uptime": 516417,
                                "startat": 1655375345,
                                "version": "21.03",
                                "hostname": "labMS7.vms.local",
                                "revision": "lts",
                                "timestamp": "20220616091725"
                            },
                            "cluster": {
                                "id": "3",
                                "node": "7",
                                "enable": "true",
                                "hostname": "labMS7.vms.local"
                            },
                            "license": {
                                "own": "Vms",
                                "type": "enterprise",
                                "issued": 1687427762
                            },
                            "streams": {
                                "total": 26,
                                "active": 10,
                                "clients": 0
                            },
                            "storages": {
                                "/storage": {
                                    "fs": "",
                                    "err": 0,
                                    "name": "default",
                                    "mount": "/storage",
                                    "inode_free": 32761647,
                                    "inode_total": 32768000,
                                    "capacity_free": 398892675072,
                                    "capacity_total": 527371075584
                                }
                            }
                        }
                    },
                    "sub_servers": [
                        {
                            "id": 6,
                            "type": "media_server_v2",
                            "schema": "https",
                            "domain": "labMS8.vms.local",
                            "internal": "8080",
                            "external": "8443",
                            "m4f": "8443",
                            "rtsp": "5554",
                            "publish": "555",
                            "traffic_in": 17689,
                            "traffic_out": 0,
                            "status": 1,
                            "is_enabled": 1,
                            "is_main": 0,
                            "has_cache": 0,
                            "proxy": ".vms.local",
                            "created_at": "2021-05-27 16:17:06",
                            "updated_at": "2022-06-22 12:56:02",
                            "group_type": "all",
                            "can_delete": false,
                            "streams_limit": 6000,
                            "bitrate_limit": 600000,
                            "extra": {
                                "io": {
                                    "read_rate": 0,
                                    "read_bytes": 0,
                                    "write_rate": 0,
                                    "write_bytes": 0
                                },
                                "cpu": {
                                    "total": 9,
                                    "usage": 11,
                                    "stime_sec": 11103,
                                    "utime_sec": 11103
                                },
                                "mem": {
                                    "rss": 670244864,
                                    "share": 10559488,
                                    "usage": 2751422464
                                },
                                "net": {
                                    "in_bitrate": 18113768,
                                    "out_bitrate": 0
                                },
                                "drives": {
                                    "/": {
                                        "fs": "ext4",
                                        "mount": "/",
                                        "inode_free": 1472862,
                                        "inode_total": 1605632,
                                        "capacity_free": 18185748480,
                                        "capacity_total": 25759584256
                                    },
                                    "/boot": {
                                        "fs": "ext4",
                                        "mount": "/boot",
                                        "inode_free": 65220,
                                        "inode_total": 65536,
                                        "capacity_free": 806674432,
                                        "capacity_total": 1023303680
                                    },
                                    "/storage": {
                                        "fs": "ext4",
                                        "mount": "/storage",
                                        "inode_free": 32747036,
                                        "inode_total": 32768000,
                                        "capacity_free": 353516720128,
                                        "capacity_total": 527371075584
                                    }
                                },
                                "server": {
                                    "ip4": "192.168.200.20",
                                    "name": "MS-21.03-lts",
                                    "build": "44ce34f",
                                    "uptime": 270004,
                                    "startat": 1655621758,
                                    "version": "21.03",
                                    "hostname": "labMS8.vms.local",
                                    "revision": "lts",
                                    "timestamp": "20220616091725"
                                },
                                "cluster": {
                                    "id": "3",
                                    "node": "8",
                                    "enable": "true",
                                    "hostname": "labMS8.vms.local"
                                },
                                "license": {
                                    "own": "Vms",
                                    "type": "enterprise",
                                    "issued": 1687427762
                                },
                                "streams": {
                                    "total": 26,
                                    "active": 13,
                                    "clients": 0
                                },
                                "storages": {
                                    "/storage": {
                                        "fs": "",
                                        "err": 0,
                                        "name": "default",
                                        "mount": "/storage",
                                        "inode_free": 32747036,
                                        "inode_total": 32768000,
                                        "capacity_free": 353516720128,
                                        "capacity_total": 527371075584
                                    }
                                }
                            }
                        }
                    ],
                    "transfer_servers": [],
                    "transfer_sub_servers": [],
                    "created_at": "2022-06-22 12:19:58",
                    "updated_at": "2022-06-22 12:56:04",
                    "is_preview_from_server": true,
                    "is_archive_from_server": null,
                    "is_enabled": true,
                    "source": "manual",
                    "is_sound_enabled": false,
                    "reconnect_attempt": 0,
                    "reconnect_total": 0,
                    "reconnect_time": null,
                    "disconnections_count": 0,
                    "is_actual": true,
                    "storage": {
                        "id": 1,
                        "server_id": 1,
                        "path": "/storage",
                        "usage": "20.335",
                        "is_confirmed": 1,
                        "can_delete": false,
                        "created_at": "2021-05-27 16:07:46",
                        "updated_at": "2022-08-11 13:09:02"
                    }
                }
            ],
            "attached_services": [],
            "services": {
                "ptz": false,
                "motion_detect": false
            },
            "csas": [
                {
                    "id": 24,
                    "csa": 1746706,
                    "pretty_text": ", , г. Город, ул. Улица 1",
                    "short_pretty": "г. Город, ул. Улица 1",
                    "created_at": "2022-04-21 13:01:47",
                    "updated_at": "2022-04-21 13:01:47"
                }
            ],
            "can_edit": true,
            "origin": null,
            "group_type": "public",
            "shared_from": null,
            "ip": "192.168.204.23",
            "lat": null,
            "lng": null,
            "azimuth": null,
            "is_sensitive": 0,
            "is_public": 1,
            "is_ip_reserved": false,
            "count_issues": 0,
            "source": "manual",
            "archive_storage_days": 1,
            "is_archive_recording": true,
            "archive_recording_type": "fulltime",
            "is_increased_reconnect": 0,
            "is_sound_enabled": false,
            "is_bridge": false,
            "is_auto_create_streams": false,
            "is_provisioning_enable": false,
            "is_can_manage_streams": true,
            "streams_source": "manual"
        }
    ],
    "links": {
        "first": "https://vms.local/api/admin/v1/cameras/search?per_page=1&page=1",
        "last": "https://vms.local/api/admin/v1/cameras/search?per_page=1&page=84",
        "prev": null,
        "next": "https://vms.local/api/admin/v1/cameras/search?per_page=1&page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 84,
        "links": [
            {
                "url": null,
                "label": "pagination.previous",
                "active": false
            },
            {
                "url": "https://vms.local/api/admin/v1/cameras/search?per_page=1&page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "https://vms.local/api/admin/v1/cameras/search?per_page=1&page=2",
                "label": "2",
                "active": false
            },
            {
                "url": "https://vms.local/api/admin/v1/cameras/search?per_page=1&page=3",
                "label": "3",
                "active": false
            },
            {
                "url": "https://vms.local/api/admin/v1/cameras/search?per_page=1&page=4",
                "label": "4",
                "active": false
            },
            {
                "url": "https://vms.local/api/admin/v1/cameras/search?per_page=1&page=5",
                "label": "5",
                "active": false
            },
            {
                "url": "https://vms.local/api/admin/v1/cameras/search?per_page=1&page=6",
                "label": "6",
                "active": false
            },
            {
                "url": "https://vms.local/api/admin/v1/cameras/search?per_page=1&page=7",
                "label": "7",
                "active": false
            },
            {
                "url": "https://vms.local/api/admin/v1/cameras/search?per_page=1&page=8",
                "label": "8",
                "active": false
            },
            {
                "url": "https://vms.local/api/admin/v1/cameras/search?per_page=1&page=9",
                "label": "9",
                "active": false
            },
            {
                "url": "https://vms.local/api/admin/v1/cameras/search?per_page=1&page=10",
                "label": "10",
                "active": false
            },
            {
                "url": null,
                "label": "...",
                "active": false
            },
            {
                "url": "https://vms.local/api/admin/v1/cameras/search?per_page=1&page=83",
                "label": "83",
                "active": false
            },
            {
                "url": "https://vms.local/api/admin/v1/cameras/search?per_page=1&page=84",
                "label": "84",
                "active": false
            },
            {
                "url": "https://vms.local/api/admin/v1/cameras/search?per_page=1&page=2",
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "https://vms.local/api/admin/v1/cameras/search",
        "per_page": 1,
        "to": 1,
        "total": 84
    }
}

401 Unauthorized

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

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

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

If this problem persists, please contact our support.