Skip to main content
Skip table of contents

Включить запись архива

Включить запись архива

POST /api/admin/v1/cameras/{camera}/enable

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

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

200 OK

Возвращает объект камеры

JSON
{
    "id": 1031,
    "group_id": 207,
    "status": "active",
    "type": "media_server_v2",
    "pretty_text": ", , г. Город, ул. Улица 1",
    "short_pretty": "г. Город, ул. Улица 1",
    "start_at": "2022-07-25 12:49:47",
    "created_at": "2022-07-25 11:49:39",
    "name": "BILLING_TEST22",
    "streams": [
        {
            "id": 1061,
            "type": "high",
            "camera_id": 1031,
            "status": "active",
            "url": "rtsp://admin:456redko@192.168.204.241/Streaming/Channels/101?transportmode=unicast&profile=Profile_1",
            "bitrate": 1333,
            "resolution": "2560x1440",
            "output_rate": 0,
            "ip": "192.168.204.241",
            "uuid": "68110ede-1e2b-4c1d-86b3-c24e2418e1d0",
            "sound": "tracks-v1",
            "streams_count": 0,
            "is_can_transfer": true,
            "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": 22206,
                "traffic_out": 1043,
                "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-08-01 10:45: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": 14,
                        "usage": 16,
                        "stime_sec": 133883,
                        "utime_sec": 133883
                    },
                    "mem": {
                        "rss": 1045831680,
                        "share": 7942144,
                        "usage": 4347138048
                    },
                    "net": {
                        "in_bitrate": 22739096,
                        "out_bitrate": 1067632
                    },
                    "drives": {
                        "/": {
                            "fs": "ext4",
                            "mount": "/",
                            "inode_free": 1438731,
                            "inode_total": 1605632,
                            "capacity_free": 1658454016,
                            "capacity_total": 25759584256
                        },
                        "/boot": {
                            "fs": "ext4",
                            "mount": "/boot",
                            "inode_free": 65216,
                            "inode_total": 65536,
                            "capacity_free": 703193088,
                            "capacity_total": 1023303680
                        },
                        "/storage": {
                            "fs": "ext4",
                            "mount": "/storage",
                            "inode_free": 32750347,
                            "inode_total": 32768000,
                            "capacity_free": 65519431680,
                            "capacity_total": 527371075584
                        }
                    },
                    "server": {
                        "ip4": "192.168.200.19",
                        "name": "MS-21.03-lts",
                        "build": "44ce34f",
                        "uptime": 3964557,
                        "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": 1690875902
                    },
                    "streams": {
                        "total": 42,
                        "active": 15,
                        "clients": 1
                    },
                    "storages": {
                        "/storage": {
                            "fs": "",
                            "err": 0,
                            "name": "default",
                            "mount": "/storage",
                            "inode_free": 32750347,
                            "inode_total": 32768000,
                            "capacity_free": 65519431680,
                            "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": 21374,
                    "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-08-01 10:45: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": 12,
                            "usage": 14,
                            "stime_sec": 139710,
                            "utime_sec": 139710
                        },
                        "mem": {
                            "rss": 952643584,
                            "share": 10690560,
                            "usage": 3000676352
                        },
                        "net": {
                            "in_bitrate": 21886792,
                            "out_bitrate": 0
                        },
                        "drives": {
                            "/": {
                                "fs": "ext4",
                                "mount": "/",
                                "inode_free": 1436324,
                                "inode_total": 1605632,
                                "capacity_free": 17834098688,
                                "capacity_total": 25759584256
                            },
                            "/boot": {
                                "fs": "ext4",
                                "mount": "/boot",
                                "inode_free": 65216,
                                "inode_total": 65536,
                                "capacity_free": 703197184,
                                "capacity_total": 1023303680
                            },
                            "/storage": {
                                "fs": "ext4",
                                "mount": "/storage",
                                "inode_free": 32734809,
                                "inode_total": 32768000,
                                "capacity_free": 34241556480,
                                "capacity_total": 527371075584
                            }
                        },
                        "server": {
                            "ip4": "192.168.200.20",
                            "name": "MS-21.03-lts",
                            "build": "44ce34f",
                            "uptime": 3718144,
                            "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": 1690875902
                        },
                        "streams": {
                            "total": 43,
                            "active": 11,
                            "clients": 0
                        },
                        "storages": {
                            "/storage": {
                                "fs": "",
                                "err": 0,
                                "name": "default",
                                "mount": "/storage",
                                "inode_free": 32734809,
                                "inode_total": 32768000,
                                "capacity_free": 34241556480,
                                "capacity_total": 527371075584
                            }
                        }
                    }
                }
            ],
            "transfer_servers": [],
            "transfer_sub_servers": [],
            "created_at": "2022-07-25 12:49:12",
            "updated_at": "2022-08-01 10:45:07",
            "is_preview_from_server": true,
            "is_archive_from_server": null,
            "is_enabled": true,
            "source": "auto",
            "is_sound_enabled": false,
            "reconnect_attempt": 0,
            "reconnect_total": 2,
            "reconnect_time": null,
            "disconnections_count": 0,
            "is_actual": false
        },
        {
            "id": 1062,
            "type": "low",
            "camera_id": 1031,
            "status": "active",
            "url": "rtsp://admin:456redko@192.168.204.241/Streaming/Channels/102?transportmode=unicast&profile=Profile_2",
            "bitrate": 42,
            "resolution": "640x360",
            "output_rate": 0,
            "ip": "192.168.204.241",
            "uuid": "0a0694a9-c669-4675-952f-9270b970b5cb",
            "sound": "tracks-v1",
            "streams_count": 0,
            "is_can_transfer": true,
            "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": 22206,
                "traffic_out": 1043,
                "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-08-01 10:45: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": 14,
                        "usage": 16,
                        "stime_sec": 133883,
                        "utime_sec": 133883
                    },
                    "mem": {
                        "rss": 1045831680,
                        "share": 7942144,
                        "usage": 4347138048
                    },
                    "net": {
                        "in_bitrate": 22739096,
                        "out_bitrate": 1067632
                    },
                    "drives": {
                        "/": {
                            "fs": "ext4",
                            "mount": "/",
                            "inode_free": 1438731,
                            "inode_total": 1605632,
                            "capacity_free": 1658454016,
                            "capacity_total": 25759584256
                        },
                        "/boot": {
                            "fs": "ext4",
                            "mount": "/boot",
                            "inode_free": 65216,
                            "inode_total": 65536,
                            "capacity_free": 703193088,
                            "capacity_total": 1023303680
                        },
                        "/storage": {
                            "fs": "ext4",
                            "mount": "/storage",
                            "inode_free": 32750347,
                            "inode_total": 32768000,
                            "capacity_free": 65519431680,
                            "capacity_total": 527371075584
                        }
                    },
                    "server": {
                        "ip4": "192.168.200.19",
                        "name": "MS-21.03-lts",
                        "build": "44ce34f",
                        "uptime": 3964557,
                        "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": 1690875902
                    },
                    "streams": {
                        "total": 42,
                        "active": 15,
                        "clients": 1
                    },
                    "storages": {
                        "/storage": {
                            "fs": "",
                            "err": 0,
                            "name": "default",
                            "mount": "/storage",
                            "inode_free": 32750347,
                            "inode_total": 32768000,
                            "capacity_free": 65519431680,
                            "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": 21374,
                    "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-08-01 10:45: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": 12,
                            "usage": 14,
                            "stime_sec": 139710,
                            "utime_sec": 139710
                        },
                        "mem": {
                            "rss": 952643584,
                            "share": 10690560,
                            "usage": 3000676352
                        },
                        "net": {
                            "in_bitrate": 21886792,
                            "out_bitrate": 0
                        },
                        "drives": {
                            "/": {
                                "fs": "ext4",
                                "mount": "/",
                                "inode_free": 1436324,
                                "inode_total": 1605632,
                                "capacity_free": 17834098688,
                                "capacity_total": 25759584256
                            },
                            "/boot": {
                                "fs": "ext4",
                                "mount": "/boot",
                                "inode_free": 65216,
                                "inode_total": 65536,
                                "capacity_free": 703197184,
                                "capacity_total": 1023303680
                            },
                            "/storage": {
                                "fs": "ext4",
                                "mount": "/storage",
                                "inode_free": 32734809,
                                "inode_total": 32768000,
                                "capacity_free": 34241556480,
                                "capacity_total": 527371075584
                            }
                        },
                        "server": {
                            "ip4": "192.168.200.20",
                            "name": "MS-21.03-lts",
                            "build": "44ce34f",
                            "uptime": 3718144,
                            "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": 1690875902
                        },
                        "streams": {
                            "total": 43,
                            "active": 11,
                            "clients": 0
                        },
                        "storages": {
                            "/storage": {
                                "fs": "",
                                "err": 0,
                                "name": "default",
                                "mount": "/storage",
                                "inode_free": 32734809,
                                "inode_total": 32768000,
                                "capacity_free": 34241556480,
                                "capacity_total": 527371075584
                            }
                        }
                    }
                }
            ],
            "transfer_servers": [],
            "transfer_sub_servers": [],
            "created_at": "2022-07-25 12:49:13",
            "updated_at": "2022-08-01 10:45:08",
            "is_preview_from_server": true,
            "is_archive_from_server": null,
            "is_enabled": true,
            "source": "auto",
            "is_sound_enabled": false,
            "reconnect_attempt": 0,
            "reconnect_total": 2,
            "reconnect_time": null,
            "disconnections_count": 0,
            "is_actual": false
        }
    ],
    "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.241",
    "lat": null,
    "lng": null,
    "azimuth": null,
    "is_sensitive": 0,
    "is_public": 0,
    "issues": [],
    "archive_ranges": [
        {
            "end": 1658742597,
            "from": 1658742587,
            "duration": 10
        },
        {
            "end": 1658743079,
            "from": 1658742614,
            "duration": 465
        },
        {
            "end": 1659066173,
            "from": 1658743159,
            "duration": 323014
        },
        {
            "end": 1659312321,
            "from": 1659066253,
            "duration": 246068
        },
        {
            "end": 1659339609,
            "from": 1659312365,
            "duration": 27244
        }
    ],
    "archive_recording_timetable": null,
    "motion_detaction_timetable": [],
    "onvif_configuration": {
        "credentials": {
            "login": "admin",
            "password": "456redko"
        }
    },
    "streams_rtsp": {
        "high": "rtsp://admin:456redko@192.168.204.241/Streaming/Channels/101?transportmode=unicast&profile=Profile_1"
    },
    "is_ip_reserved": true,
    "count_issues": 0,
    "pack": {
        "id": 3,
        "name": "Группа 3",
        "parent_id": null,
        "created_at": "2021-05-27 17:15:36",
        "updated_at": "2022-05-30 13:55:43"
    },
    "source": "auto",
    "archive_storage_days": 30,
    "is_archive_recording": true,
    "archive_recording_type": "fulltime",
    "is_increased_reconnect": 0,
    "is_sound_enabled": false,
    "subnets": [],
    "model": {
        "id": 292,
        "title": "DS-2CD1043G0-I",
        "vendor": {
            "id": 1,
            "title": "HIKVISION"
        }
    },
    "network_device": {
        "uuid": "0c88affa-ca77-4e55-ba17-266b0d9743fa",
        "ip": "192.168.204.241",
        "serial_number": "DS-2CD1043G0-I",
        "mac": "AC:CB:51:54:99:10",
        "created_at": "2022-07-25 11:49:39"
    },
    "profile": {
        "id": 171,
        "service": "1.3MP",
        "data": {
            "an_key": "any value from billing"
        },
        "created_at": "2022-07-25 11:49:39"
    },
    "is_bridge": false,
    "tags": [
        {
            "id": 2,
            "name": "individual",
            "created_at": "2021-07-15 20:30:25",
            "updated_at": "2021-07-15 20:30:25"
        },
        {
            "id": 7,
            "name": "labMS8.vms.local",
            "created_at": "2021-07-15 20:30:26",
            "updated_at": "2021-07-15 20:30:26"
        },
        {
            "id": 8,
            "name": "labMS7.vms.local",
            "created_at": "2021-07-15 20:30:26",
            "updated_at": "2021-07-15 20:30:26"
        }
    ],
    "is_auto_create_streams": true,
    "is_provisioning_enable": true,
    "is_can_manage_streams": false,
    "streams_source": "auto",
    "can_change_archive_timetable": true,
    "owner": null
}

401 Unauthorized

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

cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/cameras/{camera}/enable' \
	--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' => 'POST',
		'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}/enable', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.