Home / Docs Center / Device API Reference / Generic Event Upload Design Notes

Generic Event Upload Design Notes

Device API Reference · Device Event Upload

Project: Device Interface Document (New Version) | page_id: 1000

  • intelligence_enabled == 2 // Custom event upload enabled

  • ai_upload_address custom upload configuration address
    Base directory: "/tmp/alarm"

Each trigger corresponds to a folder under the base directory: "/tmp/alarm/2006-01-02T15-04-05"

If "/tmp/alarm/2006-01-02T15-04-05/finish.txt" under this event folder is detected, this event is complete

Read "/tmp/alarm/2006-01-02T15-04-05/info.txt" to get the passthrough parameters: alarmType=io&customValue1=abc, etc.

The default image name is snap.jpg; do not modify it unless there is a special requirement

Upload URL parameters

[http://192.168.0.15/api/upload/address?userValue1=a&userValue2=b&id=serial number]&timeSeconds=[upload time in seconds]&alarmTime=[event time]&alarmType=io&customValue1=abc&token=[signature]

Token signature: the key uses the interface key and can be modified by yourself

userValue does not participate in the signature

Upload file:
Content-Type: multipart/form-data
Content-Disposition: form-data; name="filename"; filename="snap.jpg"
Content-Disposition: form-data; name="filename1"; filename="snap1.jpg"

If the upload fails 3 times, it is discarded

Didn't find what you need?Contact us,Talk to our engineers directly.

Request a Quote

Fill in the form and we will get back with a quote and proposal within 1 business day.

Click "Generate inquiry email" to open your mail client with the body pre-filled. If no mail client is configured, click "Copy" and paste it into webmail — recipient: sunshiyang@xstrive.com.