User Tools

Site Tools


api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
api [2023/05/08 17:36]
nightfly
api [2023/07/22 12:19] (current)
nightfly
Line 48: Line 48:
 |            | getscreenshotsall |      | returns array of all available channel screenshots | |            | getscreenshotsall |      | returns array of all available channel screenshots |
 |            | getscreenshot | channelid     | returns specified channel screenshot path | |            | getscreenshot | channelid     | returns specified channel screenshot path |
-|            | getlivestream | channelid     | returns live preview stream URL (not implemented yet) |+|            | getlivestream | channelid     | returns live preview stream URL |
 | recorders  | getall |      | returns array of all running cameras recorders processes | | recorders  | getall |      | returns array of all running cameras recorders processes |
 |            | isrunning | cameraid      | check is recorder running for some camera or not | |            | isrunning | cameraid      | check is recorder running for some camera or not |
Line 210: Line 210:
                     [active] => 1                     [active] => 1
                     [storageid] => 1                     [storageid] => 1
-                    [channel] => kjqidmubme1+                    [channel] => kiqgdmrbma1
                     [comment] => Here some camera description                     [comment] => Here some camera description
                 )                 )
Line 236: Line 236:
     [33] => Array     [33] => Array
         (         (
 +        ....
 </code> </code>
 +
 +
 +===== User creation =====
 +
 +**Request**
 +<code>
 +http://yourhost.com/wr/?module=remoteapi&key=WRxxxxxxxxxxxx&action=rest&users=create
 +</code>
 +
 +**Request data**
 +<code>
 +$requestData=array(
 + 'login'=>'view666',
 + 'password'=>'PasswordHere'
 + );
 +</code>
 +
 +**POST variable 'data'**
 +<code>
 +
 +{"login":"view666","password":"PasswordHere"}
 +</code>
 +
 +**Reply**
 +<code>
 +
 +
 +Array
 +(
 +    [error] => 0
 +    [message] => Success
 +)
 +</code>
 +
 +===== Attempt to create existing user =====
 +
 +**Request**
 +<code>
 +http://yourhost.com/wr/?module=remoteapi&key=WRxxxxxxxxxxxx&action=rest&users=create
 +</code>
 +
 +**Request data**
 +<code>
 +$requestData=array(
 + 'login'=>'view666',
 + 'password'=>'PasswordHere'
 + );
 +</code>
 +
 +**POST variable 'data'**
 +<code>
 +
 +{"login":"view666","password":"PasswordHere"}
 +</code>
 +
 +**Reply**
 +<code>
 +Array
 +(
 +    [error] => 7
 +    [message] => User already exists
 +)
 +</code>
 +
 +
 +We hope it is clear how it works. You can also check out a sample implementation of this API at [[https://github.com/nightflyza/Ubilling/blob/master/api/libs/api.wolfrecorder.php|this link]].
  
api.1683556568.txt.gz ยท Last modified: 2023/05/08 17:36 by nightfly