This is an old revision of the document!
http://yourhost.com/wr/?module=remoteapi&key=WRxxxxxxxxxxxx&action=rest&object=method
Where:
Parameters to methods may be specified as POST variable with name “data”, that contains JSON array as key⇒value inside. All request results will be returned as JSON too.
| Object | Method | Parameters required | Action/Reply |
|---|---|---|---|
| models | getall | array of all existing camera models | |
| storages | getall | array of available storages | |
| getstate | array of all storages states | ||
| cameras | getall | returs array of all available cameras data | |
| create | modelid + ip + login + password + active + storageid + description | creates new camera | |
| activate | cameraid | sets some camera as active | |
| deactivate | cameraid | deactivates specified camera | |
| setdescription | cameraid + description | sets description for specified camera | |
| delete | cameraid | deletes specified camera | |
| isregistered | ip | checks is some camera is registered by IP on NVR or not? | |
| users | getall | returns array of all available users data | |
| create | login + password | creates new limited user | |
| changepassword login + password | changes password for some user | ||
| delete | login | deletes existing user | |
| isregistered | login | checks is user registered or not | |
| checkauth | login + password | checks user credentials | |
| acls | getall | returns array of all available ACLs | |
| getallcameras | returns array of all cameras ACLs | ||
| getallchannels | returns array of all per-channel ACLs | ||
| getchannels | login | returns array of all channels available for user | |
| getcameras | login | returns array of all cameras available for user | |
| assignchannel | login + channelid | assigns some channel to user with ACL | |
| assigncamera | login + cameraid | assigns camera to user with ACL | |
| deassignchannel | login + channelid | deletes channel ACL for some user | |
| deassigncamera | login + cameraid | deletes camera ACL for specified user | |
| channels | getall | returns array of all available channels | |
| getscreenshotsall | returns array of all available channel screenshots | ||
| getscreenshot | channelid | returns specified channel screenshot path | |
| getlivestream | channelid | returns live preview stream URL (not implemented yet) | |
| recorders | getall | returns array of all running cameras recorders processes | |
| isrunning | cameraid | check is recorder running for some camera or not | |
| system | gethealth | returns array of basic system health parameters |
Request
http://yourhost.com/wr/?module=remoteapi&key=WRxxxxxxxxxxxx&action=rest&models=getall
Reply
Array
(
[12] => Array
(
[id] => 12
[modelname] => Unv
[template] => UNV_IPC2122LB-SF28-A
)
[11] => Array
(
[id] => 11
[modelname] => Hikvision DS-2CD1023G0E-I
[template] => Hikvision_DS-2CD1023G0E-I
)
[10] => Array
(
[id] => 10
[modelname] => Tyto IPC-5D28-KS-30
[template] => Tyto_IPC-5D28-KS-30
)
....