This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
api [2024/10/11 17:47] nightfly |
api [2026/05/19 01:45] (current) nightfly [Read-only clients apps API] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== HTTP REST API ====== | ====== HTTP REST API ====== | ||
| - | ====== | + | ====== |
| Line 214: | Line 214: | ||
| [comment] => Here some camera description | [comment] => Here some camera description | ||
| [realport] => Here is camera RTSP port that depends template or custom port if set | [realport] => Here is camera RTSP port that depends template or custom port if set | ||
| + | [maxretention] => Here is maximum retention days limit or zero if no | ||
| ) | ) | ||
| Line 240: | Line 241: | ||
| [rtspport] => 666 | [rtspport] => 666 | ||
| [keepsubalive] => 0 | [keepsubalive] => 0 | ||
| + | [maxretdays] => 0 | ||
| [order] => | [order] => | ||
| ) | ) | ||
| Line 315: | Line 317: | ||
| We hope it is clear how it works. You can also check out a sample implementation of this API at [[https:// | We hope it is clear how it works. You can also check out a sample implementation of this API at [[https:// | ||
| + | |||
| + | |||
| + | ====== Read-only clients apps API ====== | ||
| + | |||
| + | Works same way, but requires only login+password or login+authtoken(md5 hash of password) instead of WolfRecorder serial. | ||
| + | |||
| + | You can set user credentials as raw GET variables or inside keys in " | ||
| + | |||
| + | < | ||
| + | curl -s -X POST ' | ||
| + | </ | ||
| + | |||
| + | or | ||
| + | |||
| + | < | ||
| + | curl -s -X POST ' | ||
| + | </ | ||
| + | |||
| + | |||
| + | ====== Supported objects and methods list ====== | ||
| + | |||
| + | ^ Object ^ Method ^ Parameters required ^ Action/ | ||
| + | | channels | ||
| + | |||
| + | |||
| + | ====== Usage examples ====== | ||
| + | |||
| + | ===== Normal request ===== | ||
| + | < | ||
| + | curl -s -X POST ' | ||
| + | </ | ||
| + | |||
| + | <code json> | ||
| + | { | ||
| + | |||
| + | " | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ] | ||
| + | |||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== Wrong credentials ===== | ||
| + | |||
| + | < | ||
| + | curl -s -X POST ' | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | { | ||
| + | |||
| + | " | ||
| + | " | ||
| + | |||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Wrong request format ===== | ||
| + | |||
| + | < | ||
| + | curl -s -X POST ' | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | { | ||
| + | |||
| + | " | ||
| + | " | ||
| + | |||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||