Skip to main content
Skip table of contents

Список избранных камер

Пагинированный список избранных камер. Избранные камеры – это любая камера, которую пользователь захотел выделить

GET/api/v1/cameras/favorites

Headers

Authorization

Bearer token

Accept

application/json

X-Client

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

X-UUID

unique device id

Body

per_pagerequired

int

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

pagerequired

int

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

Response

200

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

JSON
{
    "data": [
        {
            "id": 787,
            "group_id": 100,
            "status": "inactive",
            "type": "media_server_v2",
            "start_at": "2022-03-16 18:15:07",
            "created_at": "2022-02-03 10:30:28",
            "billing_id": null,
            "pretty_name": "new name",
            "pretty_text": "Камеры",
            "short_address": "Камеры",
            "full_address": "Камеры",
            "lat": null,
            "lng": null,
            "azimuth": null,
            "streams": [
                {
                    "id": 847,
                    "type": "low",
                    "camera_id": 787,
                    "is_preview_from_server": true,
                    "is_archive_from_server": null,
                    "status": "inactive",
                    "has_sound": false,
                    "width": 320,
                    "height": 240
                },
                {
                    "id": 848,
                    "type": "high",
                    "camera_id": 787,
                    "is_preview_from_server": true,
                    "is_archive_from_server": null,
                    "status": "inactive",
                    "has_sound": false,
                    "width": 1920,
                    "height": 1080
                }
            ],
            "has_sound": false,
            "is_archive_recording": true,
            "is_bridge": false,
            "is_favorite": true,
            "user_status": "active",
            "name": "new name"
        }
    ],
    "links": {
        "first": "https://vms.local/api/v1/cameras/favorites?per_page=25&page=1",
        "last": "https://vms.local/api/v1/cameras/favorites?per_page=25&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/v1/cameras/favorites?per_page=25&page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "https://vms.local/api/v1/cameras/favorites",
        "per_page": 25,
        "to": 1,
        "total": 1
    }
}
401

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

Пример

JSON
curl -k --location --request GET 'https://vms.local/api/v1/cameras/favorites?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.