API Reference — Media Servers
Endpoint untuk mengelola NVR Server, NVR Resource, RTMP Stream, Playback rekaman, dan kebijakan retensi video.
← Kembali ke Media Servers
Panduan operator: manajemen server, recorded streams, playback, daily playback.
Otentikasi
Cara memperoleh dan menggunakan Bearer token JWT.
Semua endpoint memerlukan header Authorization: Bearer <token>. Basis URL mengikuti variabel lingkungan VITE_API_URL yang dikonfigurasi pada instalasi Lenz. Jika Anda belum punya token, lihat halaman Otentikasi.
NVR Server
Manajemen server NVR fisik yang terdaftar di sistem. Setiap NVR Server menyimpan konfigurasi koneksi (host, port API, port playback) dan tipe backend (srs untuk Visionaire Media atau hikvision untuk NVR Hikvision).
Daftar NVR Server
Authorization
bearerAuth In: header
Query Parameters
Jika true, menggabungkan data dari semua instance (mode Federation).
Filter berdasarkan instance tertentu (mode Federation).
Response Body
application/json
application/json
curl -X GET "https://lenz.example.com/api/nvr-servers"{ "ok": true, "message": "success", "data": [ { "id": 1, "name": "NVR Gedung A", "host": "http://192.168.1.100", "type": "srs", "api_port": "9080", "playback_port": "9080", "instance": null, "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z" } ]}{ "ok": false, "message": "invalid request"}Tambah NVR Server
Authorization
bearerAuth In: header
Query Parameters
Instance target pada mode Federation.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://lenz.example.com/api/nvr-servers" \ -H "Content-Type: application/json" \ -d '{ "name": "NVR Gedung A", "host": "http://192.168.1.100", "type": "srs", "api_port": "9080", "playback_port": "9080" }'{ "ok": true, "message": "success", "data": { "id": 1, "name": "NVR Gedung A", "host": "http://192.168.1.100", "type": "srs", "api_port": "9080", "playback_port": "9080", "instance": "core", "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z" }}{ "ok": false, "message": "invalid request"}{ "ok": false, "message": "invalid request"}Detail NVR Server
Authorization
bearerAuth In: header
Path Parameters
ID NVR Server.
Query Parameters
Instance target pada mode Federation.
Response Body
application/json
application/json
curl -X GET "https://lenz.example.com/api/nvr-servers/1"{ "ok": true, "message": "success", "data": { "id": 1, "name": "NVR Gedung A", "host": "http://192.168.1.100", "type": "srs", "api_port": "9080", "playback_port": "9080", "instance": "core", "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z" }}{ "ok": false, "message": "invalid request"}Perbarui NVR Server
Authorization
bearerAuth In: header
Path Parameters
ID NVR Server.
Query Parameters
Instance target pada mode Federation.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X PUT "https://lenz.example.com/api/nvr-servers/0" \ -H "Content-Type: application/json" \ -d '{ "name": "NVR Gedung A", "host": "http://192.168.1.100", "type": "srs" }'{ "ok": true, "message": "success", "data": { "id": 1, "name": "NVR Gedung A", "host": "http://192.168.1.100", "type": "srs", "api_port": "9080", "playback_port": "9080", "instance": "core", "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z" }}{ "ok": false, "message": "invalid request"}{ "ok": false, "message": "invalid request"}Hapus NVR Server
Authorization
bearerAuth In: header
Path Parameters
ID NVR Server.
Query Parameters
Instance target pada mode Federation.
Response Body
application/json
application/json
curl -X DELETE "https://lenz.example.com/api/nvr-servers/0"{ "ok": true, "message": "success"}{ "ok": false, "message": "invalid request"}NVR Resource
NVR Resource adalah entitas yang memetakan stream Visionaire ke NVR Server — menyimpan URL kamera asli (RTSP), URL RTMP di sisi NVR, dan referensi ke stream Visionaire. Endpoint detail (GET /api/nvrs/{id}) mengembalikan objek nvr_server dan stream secara lengkap.
Daftar NVR Resource
Authorization
bearerAuth In: header
Query Parameters
Nomor halaman.
1Jumlah item per halaman.
20Filter berdasarkan ID stream.
Filter berdasarkan ID NVR Server.
Pencarian teks bebas.
Field untuk pengurutan (contoh: created_at).
Arah pengurutan.
"asc" | "desc"Instance target pada mode Federation.
Agregasi dari semua instance (mode Federation).
Response Body
application/json
application/json
curl -X GET "https://lenz.example.com/api/nvrs"{ "ok": true, "message": "success", "nvrs": [ { "id": 5, "stream_id": "abc123def456", "stream_node_number": 1, "nvr_original_url": "rtmp://192.168.1.100:1935/live/stream_001", "nvr_server_id": 1, "cam_original_url": "rtsp://192.168.1.200:554/stream1", "active": true, "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z" } ], "meta": { "limit": 20, "current_page": 1, "total_data": 1, "total_page": 1 }}{ "ok": false, "message": "invalid request"}Buat NVR Resource
Authorization
bearerAuth In: header
Query Parameters
Instance target pada mode Federation.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://lenz.example.com/api/nvrs" \ -H "Content-Type: application/json" \ -d '{ "stream_id": "abc123def456", "nvr_original_url": "rtmp://192.168.1.100:1935/live/stream_001", "nvr_server_id": 1, "cam_original_url": "rtsp://192.168.1.200:554/stream1", "stream_node_number": 1, "active": true }'{ "ok": true, "message": "success", "data": { "id": 5, "stream_id": "abc123def456", "stream_node_number": 1, "nvr_original_url": "rtmp://192.168.1.100:1935/live/stream_001", "nvr_server_id": 1, "cam_original_url": "rtsp://192.168.1.200:554/stream1", "active": true, "nvr_server": { "id": 1, "name": "NVR Gedung A", "host": "http://192.168.1.100", "type": "srs", "api_port": "9080", "playback_port": "9080", "instance": "core", "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z" }, "stream": { "stream_id": "abc123def456", "stream_name": "Kamera Lobby Utama", "stream_address": "rtmp://192.168.1.100/live/stream_001", "stream_node_num": 1, "stream_latitude": -6.2146, "stream_longitude": 106.8451, "stream_custom_data": { "location": "Main Entrance" }, "stream_stats": { "fps": 25, "frame_height": 1080, "frame_width": 1920, "last_error_msg": "", "state": "running" }, "pipelines": [ "face_recognition", "person_counting" ], "seats": [ { "analytic_id": "NFDSS-FR", "serial_number": "SN123456789" } ], "active": true, "online": true, "last_activity_ts": 1714450800 }, "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z" }}{ "ok": false, "message": "invalid request"}Detail NVR Resource
Authorization
bearerAuth In: header
Path Parameters
ID NVR resource.
Query Parameters
Instance target pada mode Federation.
Response Body
application/json
application/json
curl -X GET "https://lenz.example.com/api/nvrs/5"{ "ok": true, "message": "successfully get detail NVR", "data": { "id": 5, "stream_id": "abc123def456", "stream_node_number": 1, "nvr_original_url": "rtmp://192.168.1.100:1935/live/stream_001", "nvr_server_id": 1, "cam_original_url": "rtsp://192.168.1.200:554/stream1", "active": true, "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z", "nvr_server": { "id": 1, "name": "NVR Gedung A", "host": "http://192.168.1.100", "type": "srs", "api_port": "9080", "playback_port": "9080", "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z" }, "stream": { "stream_id": "abc123def456", "stream_name": "Kamera Lobby Utama", "stream_address": "rtmp://192.168.1.100/live/stream_001", "stream_node_num": 1, "stream_latitude": -6.2146, "stream_longitude": 106.8451, "stream_custom_data": { "location": "Main Entrance" }, "stream_stats": { "fps": 25, "frame_height": 1080, "frame_width": 1920, "last_error_msg": "", "state": "running" }, "pipelines": [ "face_recognition" ], "seats": [ { "analytic_id": "NFDSS-FR", "serial_number": "SN123456789" } ], "active": true, "online": true, "last_activity_ts": 1714450800 } }}{ "ok": false, "message": "invalid request"}Perbarui NVR Resource
Authorization
bearerAuth In: header
Path Parameters
ID NVR resource.
Query Parameters
Instance target pada mode Federation.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PUT "https://lenz.example.com/api/nvrs/0" \ -H "Content-Type: application/json" \ -d '{}'{ "ok": true, "message": "string", "data": { "id": 5, "stream_id": "abc123def456", "stream_node_number": 1, "nvr_original_url": "rtmp://192.168.1.100:1935/live/stream_001", "nvr_server_id": 1, "cam_original_url": "rtsp://192.168.1.200:554/stream1", "active": true, "nvr_server": { "id": 1, "name": "NVR Gedung A", "host": "http://192.168.1.100", "type": "srs", "api_port": "9080", "playback_port": "9080", "instance": "core", "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z" }, "stream": { "stream_id": "abc123def456", "stream_name": "Kamera Lobby Utama", "stream_address": "rtmp://192.168.1.100/live/stream_001", "stream_node_num": 1, "stream_latitude": -6.2146, "stream_longitude": 106.8451, "stream_custom_data": { "location": "Main Entrance" }, "stream_stats": { "fps": 25, "frame_height": 1080, "frame_width": 1920, "last_error_msg": "", "state": "running" }, "pipelines": [ "face_recognition", "person_counting" ], "seats": [ { "analytic_id": "NFDSS-FR", "serial_number": "SN123456789" } ], "active": true, "online": true, "last_activity_ts": 1714450800 }, "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z" }}{ "ok": false, "message": "invalid request"}Hapus NVR Resource
Authorization
bearerAuth In: header
Path Parameters
ID NVR resource.
Query Parameters
Instance target pada mode Federation.
Response Body
application/json
application/json
curl -X DELETE "https://lenz.example.com/api/nvrs/0"{ "ok": true, "message": "success"}{ "ok": false, "message": "invalid request"}NVR Resource by Stream ID
Authorization
bearerAuth In: header
Path Parameters
ID stream Visionaire.
Query Parameters
Instance target pada mode Federation.
Response Body
application/json
application/json
curl -X GET "https://lenz.example.com/api/nvrs/stream/abc123def456"{ "ok": true, "message": "string", "data": { "id": 5, "stream_id": "abc123def456", "stream_node_number": 1, "nvr_original_url": "rtmp://192.168.1.100:1935/live/stream_001", "nvr_server_id": 1, "cam_original_url": "rtsp://192.168.1.200:554/stream1", "active": true, "nvr_server": { "id": 1, "name": "NVR Gedung A", "host": "http://192.168.1.100", "type": "srs", "api_port": "9080", "playback_port": "9080", "instance": "core", "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z" }, "stream": { "stream_id": "abc123def456", "stream_name": "Kamera Lobby Utama", "stream_address": "rtmp://192.168.1.100/live/stream_001", "stream_node_num": 1, "stream_latitude": -6.2146, "stream_longitude": 106.8451, "stream_custom_data": { "location": "Main Entrance" }, "stream_stats": { "fps": 25, "frame_height": 1080, "frame_width": 1920, "last_error_msg": "", "state": "running" }, "pipelines": [ "face_recognition", "person_counting" ], "seats": [ { "analytic_id": "NFDSS-FR", "serial_number": "SN123456789" } ], "active": true, "online": true, "last_activity_ts": 1714450800 }, "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z" }}{ "ok": false, "message": "invalid request"}RTMP Stream
RTMP Stream adalah pemetaan ringan antara stream Visionaire dan NVR Server yang digunakan khusus untuk alur RTMP. Berbeda dari NVR Resource, RTMP Stream tidak menyimpan URL kamera asli — hanya stream_id dan referensi ke NVR Server tujuan.
Daftar RTMP Stream
Authorization
bearerAuth In: header
Query Parameters
Cari berdasarkan stream ID atau nama.
Urutkan berdasarkan tanggal dibuat.
"asc" | "desc"Filter berdasarkan ID NVR Server.
Response Body
application/json
application/json
curl -X GET "https://lenz.example.com/api/rtmp-streams"{ "ok": true, "message": "successfully get all rtmp streams", "data": [ { "id": 3, "stream_id": "abc123def456", "stream_node_number": 1, "nvr_server_id": 1, "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z", "nvr_server": { "id": 1, "name": "NVR Gedung A", "host": "http://192.168.1.100", "type": "srs", "api_port": "9080", "playback_port": "9080", "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z" }, "stream": { "stream_id": "abc123def456", "stream_name": "Kamera Lobby Utama", "stream_address": "rtmp://192.168.1.100/live/stream_001", "active": true, "online": true, "last_activity_ts": 1714450800 } } ]}{ "ok": false, "message": "invalid request"}Buat RTMP Stream
Authorization
bearerAuth In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://lenz.example.com/api/rtmp-streams" \ -H "Content-Type: application/json" \ -d '{ "stream_id": "abc123def456", "stream_node_number": 1, "nvr_server_id": 1 }'{ "ok": true, "message": "string", "data": { "id": 3, "stream_id": "abc123def456", "stream_node_number": 1, "nvr_server_id": 1, "nvr_server": { "id": 1, "name": "NVR Gedung A", "host": "http://192.168.1.100", "type": "srs", "api_port": "9080", "playback_port": "9080", "instance": "core", "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z" }, "stream": { "stream_id": "abc123def456", "stream_name": "Kamera Lobby Utama", "stream_address": "rtmp://192.168.1.100/live/stream_001", "stream_node_num": 1, "stream_latitude": -6.2146, "stream_longitude": 106.8451, "stream_custom_data": { "location": "Main Entrance" }, "stream_stats": { "fps": 25, "frame_height": 1080, "frame_width": 1920, "last_error_msg": "", "state": "running" }, "pipelines": [ "face_recognition", "person_counting" ], "seats": [ { "analytic_id": "NFDSS-FR", "serial_number": "SN123456789" } ], "active": true, "online": true, "last_activity_ts": 1714450800 }, "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z" }}{ "ok": false, "message": "invalid request"}{ "ok": false, "message": "Error: Stream ID already in use"}Detail RTMP Stream
Authorization
bearerAuth In: header
Path Parameters
ID RTMP stream.
Response Body
application/json
application/json
curl -X GET "https://lenz.example.com/api/rtmp-streams/3"{ "ok": true, "message": "string", "data": { "id": 3, "stream_id": "abc123def456", "stream_node_number": 1, "nvr_server_id": 1, "nvr_server": { "id": 1, "name": "NVR Gedung A", "host": "http://192.168.1.100", "type": "srs", "api_port": "9080", "playback_port": "9080", "instance": "core", "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z" }, "stream": { "stream_id": "abc123def456", "stream_name": "Kamera Lobby Utama", "stream_address": "rtmp://192.168.1.100/live/stream_001", "stream_node_num": 1, "stream_latitude": -6.2146, "stream_longitude": 106.8451, "stream_custom_data": { "location": "Main Entrance" }, "stream_stats": { "fps": 25, "frame_height": 1080, "frame_width": 1920, "last_error_msg": "", "state": "running" }, "pipelines": [ "face_recognition", "person_counting" ], "seats": [ { "analytic_id": "NFDSS-FR", "serial_number": "SN123456789" } ], "active": true, "online": true, "last_activity_ts": 1714450800 }, "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z" }}{ "ok": false, "message": "invalid request"}Perbarui RTMP Stream
Authorization
bearerAuth In: header
Path Parameters
ID RTMP stream.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X PUT "https://lenz.example.com/api/rtmp-streams/0" \ -H "Content-Type: application/json" \ -d '{ "stream_id": "abc123def456", "nvr_server_id": 1 }'{ "ok": true, "message": "string", "data": { "id": 3, "stream_id": "abc123def456", "stream_node_number": 1, "nvr_server_id": 1, "nvr_server": { "id": 1, "name": "NVR Gedung A", "host": "http://192.168.1.100", "type": "srs", "api_port": "9080", "playback_port": "9080", "instance": "core", "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z" }, "stream": { "stream_id": "abc123def456", "stream_name": "Kamera Lobby Utama", "stream_address": "rtmp://192.168.1.100/live/stream_001", "stream_node_num": 1, "stream_latitude": -6.2146, "stream_longitude": 106.8451, "stream_custom_data": { "location": "Main Entrance" }, "stream_stats": { "fps": 25, "frame_height": 1080, "frame_width": 1920, "last_error_msg": "", "state": "running" }, "pipelines": [ "face_recognition", "person_counting" ], "seats": [ { "analytic_id": "NFDSS-FR", "serial_number": "SN123456789" } ], "active": true, "online": true, "last_activity_ts": 1714450800 }, "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z" }}{ "ok": false, "message": "invalid request"}{ "ok": false, "message": "invalid request"}Hapus RTMP Stream
Authorization
bearerAuth In: header
Path Parameters
ID RTMP stream.
Response Body
application/json
application/json
curl -X DELETE "https://lenz.example.com/api/rtmp-streams/0"{ "ok": true, "message": "success"}{ "ok": false, "message": "invalid request"}RTMP Stream by Stream ID
Authorization
bearerAuth In: header
Path Parameters
ID stream Visionaire.
Response Body
application/json
application/json
curl -X GET "https://lenz.example.com/api/rtmp-streams/stream/abc123def456"{ "ok": true, "message": "string", "data": { "id": 3, "stream_id": "abc123def456", "stream_node_number": 1, "nvr_server_id": 1, "nvr_server": { "id": 1, "name": "NVR Gedung A", "host": "http://192.168.1.100", "type": "srs", "api_port": "9080", "playback_port": "9080", "instance": "core", "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z" }, "stream": { "stream_id": "abc123def456", "stream_name": "Kamera Lobby Utama", "stream_address": "rtmp://192.168.1.100/live/stream_001", "stream_node_num": 1, "stream_latitude": -6.2146, "stream_longitude": 106.8451, "stream_custom_data": { "location": "Main Entrance" }, "stream_stats": { "fps": 25, "frame_height": 1080, "frame_width": 1920, "last_error_msg": "", "state": "running" }, "pipelines": [ "face_recognition", "person_counting" ], "seats": [ { "analytic_id": "NFDSS-FR", "serial_number": "SN123456789" } ], "active": true, "online": true, "last_activity_ts": 1714450800 }, "created_at": "2025-01-15T08:00:00Z", "updated_at": "2025-01-15T08:00:00Z" }}{ "ok": false, "message": "invalid request"}Recorded Streams
Endpoint untuk mengambil daftar channel/stream yang memiliki rekaman tersimpan pada NVR Server. Digunakan sebagai sumber data tabel pada halaman Recorded Streams di dashboard.
Daftar Recorded Streams
Authorization
bearerAuth In: header
Path Parameters
ID NVR Server (Visionaire Media).
Query Parameters
Instance target pada mode Federation.
Response Body
application/json
application/json
curl -X GET "https://lenz.example.com/api/visionaire-media/1/recordings"{ "success": true, "data": { "total": 2, "recordings": [ { "app": "live", "name": "stream_001", "live": true, "available": true, "record": true }, { "app": "live", "name": "stream_002", "live": false, "available": true, "record": false } ] }}{ "ok": false, "message": "invalid request"}Playback
Endpoint untuk mengambil daftar segmen rekaman yang tersedia pada channel tertentu, serta mengunduh klip video. Gunakan respons dari endpoint Recorded Streams untuk mendapatkan path yang valid.
Daftar Segmen Playback
Authorization
bearerAuth In: header
Path Parameters
ID NVR Server.
Query Parameters
Channel path pada NVR Server (contoh: /live/stream_001).
Waktu mulai filter rekaman (RFC3339). Contoh: 2025-01-15T10:00:00Z.
date-timeDurasi filter dalam detik.
Aktifkan transcode pada server sebelum streaming.
Instance target pada mode Federation.
Response Body
application/json
application/json
curl -X GET "https://lenz.example.com/api/visionaire-media/1/playback?path=%2Flive%2Fstream_001"{ "success": true, "data": [ { "start": "2025-01-15T10:00:00Z", "duration": 3600, "url": "http://nvr.example.com:9080/live/stream_001/2025-01-15T10:00:00.m3u8", "path": "/live/stream_001" } ]}{ "ok": false, "message": "invalid request"}Unduh Klip Rekaman
Authorization
bearerAuth In: header
Path Parameters
ID NVR Server.
Query Parameters
Channel/app path pada NVR Server.
Stream path lengkap.
Waktu mulai klip (RFC3339).
date-timeDurasi klip dalam detik (sebagai string).
Aktifkan transcode sebelum unduhan.
Instance target pada mode Federation.
Response Body
video/mp4
application/json
application/json
curl -X GET "https://lenz.example.com/api/visionaire-media/1/playback/download?channel=live&path=%2Flive%2Fstream_001&start=2025-01-15T10%3A00%3A00Z&duration=300""string"{ "ok": false, "message": "invalid request"}{ "ok": false, "message": "invalid request"}Daily Playback
Endpoint distribusi rekaman yang digunakan untuk membangun timeline 24 jam di halaman Daily Playback. Endpoint daily mengembalikan ketersediaan rekaman per hari dalam satu bulan (untuk date picker), sementara endpoint hourly mengembalikan detail per jam beserta rentang menit yang memiliki rekaman (untuk timeline scrubber).
Distribusi Rekaman Harian
Authorization
bearerAuth In: header
Path Parameters
ID NVR Server.
Channel path (URL-encoded). Contoh: live%2Fstream_001.
Query Parameters
Rentang bulan format MMYY-MMYY (contoh: 0125-0325 = Jan–Mar 2025).
Instance target pada mode Federation.
Response Body
application/json
curl -X GET "https://lenz.example.com/api/visionaire-media/1/recordings/live%2Fstream_001/daily?search=0125-0325"{ "success": true, "data": [ { "year": 2025, "month": 1, "days": [ { "day": 14, "available": false, "date": "2025-01-14" }, { "day": 15, "available": true, "date": "2025-01-15" } ] } ]}Distribusi Rekaman Per Jam
Authorization
bearerAuth In: header
Path Parameters
ID NVR Server.
Channel path (URL-encoded).
Query Parameters
Tanggal format YYYY-MM-DD.
Filter rentang jam format HHMM-HHMM (contoh: 0900-1800).
Instance target pada mode Federation.
Response Body
application/json
curl -X GET "https://lenz.example.com/api/visionaire-media/1/recordings/live%2Fstream_001/hourly?date=2025-01-15&search=0800-2000"{ "success": true, "data": { "date": "2025-01-15", "hours": [ { "hour": 10, "minute": 0, "available": true, "duration": 3540, "time": "10:00", "ranges": [ { "start": "10:00", "end": "10:59" } ] } ] }}Retensi Rekaman
Endpoint untuk membaca dan memperbarui kebijakan retensi rekaman pada NVR Server. Retensi mengatur berapa lama rekaman disimpan (duration_hrs) dan batas kapasitas disk (disk_quota_mb). Jadwal cleanup dapat dikonfigurasi untuk berjalan otomatis setiap hari pada jam tertentu.
Nilai duration_hrs dan disk_quota_mb tidak boleh melebihi batas max_retention_hrs dan max_disk_quota_mb yang dikembalikan oleh endpoint GET retention. Nilai batas ini bersifat read-only dan ditentukan oleh konfigurasi NVR Server.
Konfigurasi Retensi Rekaman
Authorization
bearerAuth In: header
Path Parameters
ID NVR Server.
Response Body
application/json
application/json
curl -X GET "https://lenz.example.com/api/visionaire-media/1/retention"{ "success": true, "data": { "time": "02:00:00", "max_retention_hrs": 720, "max_disk_quota_mb": 102400, "default_retention": { "duration_hrs": 168, "disk_quota_mb": 51200 }, "channel_policies": [ { "channel": "/live/stream_001", "retention": { "duration_hrs": 72, "disk_quota_mb": 10240 } } ] }}{ "ok": false, "message": "invalid request"}Perbarui Jadwal Cleanup Retensi
Authorization
bearerAuth In: header
Path Parameters
ID NVR Server.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PUT "https://lenz.example.com/api/visionaire-media/1/retention/schedule" \ -H "Content-Type: application/json" \ -d '{ "time": "02:00:00", "default_retention": { "duration_hrs": 168, "disk_quota_mb": 51200 } }'{ "success": true, "data": { "time": "02:00:00", "max_retention_hrs": 720, "max_disk_quota_mb": 102400, "default_retention": { "duration_hrs": 168, "disk_quota_mb": 51200, "time_of_day_start": "00:00", "time_of_day_end": "06:00" }, "channel_policies": [ { "channel": "/live/stream_001", "retention": { "duration_hrs": 168, "disk_quota_mb": 51200, "time_of_day_start": "00:00", "time_of_day_end": "06:00" } } ] }}{ "ok": false, "message": "invalid request"}Perbarui Retensi Default
Authorization
bearerAuth In: header
Path Parameters
ID NVR Server.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PUT "https://lenz.example.com/api/visionaire-media/1/retention/default" \ -H "Content-Type: application/json" \ -d '{ "duration_hrs": 168, "disk_quota_mb": 51200 }'{ "success": true, "data": { "time": "02:00:00", "max_retention_hrs": 720, "max_disk_quota_mb": 102400, "default_retention": { "duration_hrs": 168, "disk_quota_mb": 51200, "time_of_day_start": "00:00", "time_of_day_end": "06:00" }, "channel_policies": [ { "channel": "/live/stream_001", "retention": { "duration_hrs": 168, "disk_quota_mb": 51200, "time_of_day_start": "00:00", "time_of_day_end": "06:00" } } ] }}{ "ok": false, "message": "invalid request"}Daily Playback
Tampilkan dan putar rekaman satu hari penuh dalam tampilan Timeline harian — identifikasi aktivitas dengan cepat tanpa harus membuka segmen per segmen.
Centralize Enrollment System (CES)
Replikasi data enrollment wajah secara terpusat ke seluruh instance Visionaire dalam satu jaringan multi-deployment.