Skip to main content

Enable HTTP POST on Cameras and NVRs

Before your server can receive AI detection events, you need to enable HTTP POST on the device that will send them. This page walks through the web interface setup for both IP cameras and NVRs.

Which device should send events?
  • IP Camera (direct) — camera sends HTTP POST directly to your server. Requires the camera to be on your local network via a PoE switch (not through NVR PoE ports).
  • NVR (forwarded) — NVR receives events from connected cameras and forwards them to your server. Use this when cameras are connected to the NVR's built-in PoE ports, or when you want a single endpoint for all cameras.
  • Both — for maximum flexibility, configure the NVR to forward alarm events with images, and configure individual cameras to send traject real-time tracking data directly. Your server receives both streams.

IP Camera Setup

Step 1: Access the Camera Web Interface

Open a web browser and navigate to your camera's IP address. Log in with administrator credentials.

Step 2: Navigate to HTTP POST Settings

In the left menu, click Network. On the Network page, click the HTTP POST tab.

Navigate to Network > HTTP POST

Step 3: Edit the Configuration

The HTTP POST screen shows a table of configured server destinations. Click the Edit button to modify the configuration.

HTTP POST server list with Edit button

Click Add to create a new server entry. Fill in your API server details:

Edit HTTP POST server settings

Configure the following settings:

SettingDescriptionExample
EnableCheck to activate HTTP POSTChecked
Protocol Typehttp or httpshttp
Domain/IPIP address of your API server192.168.0.53
Server PortPort your server listens on5002
PathURL path for the webhook endpoint/API
User Name / PasswordOptional authentication for your serverLeave unchecked unless your server requires it
Heartbeat IntervalSeconds between keepalive messages90
Send heartbeatCheck to receive periodic keepalive POSTsChecked

Step 4: Select Smart Alarm Data

Choose what data to include with each event:

OptionWhat It SendsWhen to Use
Alarm status dataAlarm on/off state changes (~660 bytes)When you need to know when detection starts and stops
Smart track dataContinuous real-time target tracking (~1.7 KB at ~7/sec)When you need live bounding box coordinates for tracking targets across the frame
Smart event dataDetection event with coordinates (~2-3 KB)When you need detection events with classification data
Original pictureFull-frame JPEG snapshot (~418 KB)When you want an overview image of the scene
Target pictureCropped target JPEG (~92 KB)When you want a close-up of the detected person, vehicle, or plate
tip

For most applications, enable Smart event data + Original picture + Target picture to receive complete detection events with images. Add Smart track data if you need continuous real-time object tracking (e.g., for PTZ auto-follow or trajectory analysis).

Step 5: Select Smart Alarm Types

Check which AI detection types should trigger HTTP POST events:

Alarm TypeDetection
Region IntrusionPerson or vehicle enters a defined zone
Line CrossingPerson or vehicle crosses a virtual tripwire
Region EntranceTarget enters a zone
Region ExitingTarget exits a zone
Target Counting by LineCount targets crossing a line
Target Counting by AreaCount targets in a zone
Motion DetectionAny motion (not AI-filtered)
Video MetadataFull-frame object detection data
Loitering DetectionPerson stays in a zone too long
Illegal Parking DetectionVehicle parked in a restricted zone
note

AI detection rules (intrusion zones, tripwires, etc.) must be configured separately in the camera's Event settings before the camera will generate these alarm types. Enabling them here only controls whether events are forwarded via HTTP POST.

Step 6: Save

Click Save to apply the configuration. The camera will begin sending HTTP POST events to your server immediately when detections occur.


NVR Setup

Step 1: Access the NVR Web Interface

Open a web browser and navigate to your NVR's IP address. Log in with administrator credentials.

Step 2: Navigate to HTTP POST Settings

Navigate to Network in the top menu bar, then click HTTP POST in the submenu. In the left sidebar, you'll find it under Integration > HTTP POST.

Step 3: Enable and Configure

Check Enable to activate HTTP POST, then enter your server details:

NVR HTTP POST Configuration

SettingDescriptionExample
Server AddressIP address of your API server192.168.0.53
PortPort your server listens on5002
PathURL path for the webhook endpoint/API
ProtocolHTTP or HTTPSHTTP
ConnectionNon-Persistent Connection or Persistent ConnectionNon-Persistent Connection
Anonymous LoginCheck if your server doesn't require authenticationChecked
Interval Time(s)Heartbeat interval in seconds10
ScheduleWhen to send events (24x7 or custom schedule)24x7

Step 4: Configure Image Options

Under Attaching Image, choose what images to include with forwarded events:

OptionWhat's SentTypical Size
Snap + OriginalCropped target + full scene overview~524 KB per event
Original onlyFull scene overview~418 KB
Snap onlyCropped target (person/vehicle/plate)~92 KB
NeitherEvent data only, no images~1 KB

Step 5: Select Event Types

Click the Configure button next to Event Type to open the event selection dialog:

NVR Event Type Selection

The left Event column shows all available event types. The right Send Event column shows which events will be forwarded via HTTP POST.

  1. Select event types from the left list (e.g., Line Crossing, Region Intrusion, Plate Recognition)
  2. Click the >> button to move them to the Send Event column
  3. Click OK
  4. Click Apply on the HTTP POST screen

Step 6: Test the Connection

If your server is running, click the Test button to verify the NVR can reach your server. A successful test confirms network connectivity between the NVR and your application.


Verify Events Are Arriving

The quickest way to verify your setup is to run the Python alarm server from the GitHub repository:

git clone https://github.com/mikehaldas/IP-Camera-API.git
cd IP-Camera-API
pip install xmltodict
python alarm-server.py

Then trigger a detection event (walk in front of a camera with an intrusion zone configured). You should see event data printed to the console within seconds.

Troubleshooting

ProblemCheck
No events receivedIs your server listening on the correct port? Can the camera/NVR reach your server's IP?
Events arrive but no imagesCheck image/picture options in the HTTP POST configuration
Intermittent eventsCheck the heartbeat interval — if your server doesn't respond to keepalives, the connection drops
Events from camera but not NVR (or vice versa)Camera direct and NVR forwarded are independent configurations — set up both if you want both
AI alarm types not firingAI detection rules (intrusion zones, tripwires) must be enabled in the camera's Event settings separately

Next Steps