API Documentation
See original GitHub issueList of current APIs of the node.js opendatacam app
Webcam: GET /webcamstream
Available after YOLO is started, this endpoint streams the webcam as a MJPEG stream. (streams the sequence of JPEG frames over HTTP).
The TCP connection is not closed as long as the client wants to receive new frames and the server wants to provide new frames
Only support one client at a time, if another one connect, the first HTTP connection is closed
Webcam: GET /videoresolution
Returns webcam resolution, example:
{
"w": 1280,
"h": 720
}
Tracker: data frame by frame: GET /tracker/sse
From the browser, you can open a SSE connection: new EventSource("/tracker/sse")
. Then it works like websocket but only the server can push data. (What are SSE : Server Side Events)
Opendatacam pushes each frame this data:
{
trackerDataForLastFrame: { someData },
counterSummary: { someData },
trackerSummary: { someData },
videoResolution: { someData },
appState: {
yoloStatus: { someData },
isListeningToYOLO: { someData },
recordingStatus: { someData }
}
}
TODO document data
Only support one client at a time, if another one connect, the first SSE connection is closed
Console: GET /console
Send the last 3000 characters of the console stoud.
Recording: Start recording GET /recording/start
Make Opendatacam start recording.
Recording: Stop recording GET /recording/stop
Make Opendatacam stops recording.
Recording: Get recordings history GET /recording/history
TODO implement pagination as for now it returns the last 30 recording
TODO document JSON return
Recording: Get single recording tracker data GET /recording/:id/trackerhistory
TODO document JSON return, can be a very large json
Recording: Get single recording counter data GET /recording/:id/counterhistory
TODO document JSON return
Counter: Register counting areas POST /counter/areas
TODO document post data
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (10 by maintainers)
Top GitHub Comments
Added more api endpoints to make it easier to build your own layer on top of opendatacam , ideas from #79 , Also added mongodb url in the config file so people can persist data on their own remote instance
Documented them in the API docs also, here is the latest version: https://apidoc-ydewpxduvy.now.sh
Ok, improved further the API and API docs for v2 release: https://opendatacam.github.io/opendatacam/apidoc/