Whether you want to build a custom dashboard, integrate with Home Assistant, or trigger recordings from a separate sensor, the API is your key. Agent DVR runs a local web server (typically on port 8090). The API is a set of URLs that accept GET and POST commands. You don't need special libraries; any tool that can make an HTTP request (cURL, Python, Node-RED, IFTTT webhooks) will work.
Agent DVR (from iSpyConnect) is a powerful, cross-platform video surveillance solution. While its web interface is intuitive for manual control, its true potential lies in the Agent DVR API . This interface allows you to control every aspect of your system—cameras, recording, motion detection, and alerts—using simple HTTP requests.
http://YOUR_AGENT_IP:8090/
http://localhost:8090/list/CAMERA_NUM?year=2024&month=3&day=15 This returns JSON with file paths and timestamps. You can then download a file using:
Always test new commands on a non-critical camera first, and never expose the API raw to the internet. Have a specific integration in mind? Visit the iSpyConnect user forum—the community has already solved most API puzzles. agentdvr api
import requests snapshot = requests.get("http://localhost:8090/video/1/snapshot") bot_token = "YOUR_BOT_TOKEN" chat_id = "YOUR_CHAT_ID" files = "photo": ("alert.jpg", snapshot.content) requests.post(f"https://api.telegram.org/botbot_token/sendPhoto?chat_id=chat_id", files=files) Using Node-RED or ESPHome: when a magnetic door sensor opens, send:
http://localhost:8090/status For commands with parameters, use your browser’s address bar or curl : Whether you want to build a custom dashboard,
curl "http://localhost:8090/video/2/record?1" And when it closes 30 seconds later: