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 [2026/05/18 15:44]
nightfly [Read-only clients apps API]
api [2026/05/19 01:45] (current)
nightfly [Read-only clients apps API]
Line 321: Line 321:
 ====== Read-only clients apps API ====== ====== Read-only clients apps API ======
  
-same way but not requires +Works same waybut 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 "data" POST array. 
 + 
 +<code> 
 +curl -s -X POST 'https://yourhost/wr/?module=remoteapi&action=clientrest&channels=getall' --data-urlencode 'data={"login":"admin","password":"demo"}' 
 +</code> 
 + 
 +or 
 + 
 +<code> 
 +curl -s -X POST 'https://yourhost/wr/?module=remoteapi&action=clientrest&channels=getall&login=admin&password=demo' 
 +</code> 
 + 
 + 
 +====== Supported objects and methods list ====== 
 + 
 +^ Object ^ Method ^ Parameters required ^ Action/Reply ^cified user | 
 +| channels   | getall |  login+password or login+authtoken   | returns array of all accessible by user channels info | 
 + 
 + 
 +====== Usage examples ====== 
 + 
 +===== Normal request ===== 
 +<code> 
 +curl -s -X POST 'https://yourhost/wr/?module=remoteapi&action=clientrest&channels=getall' --data-urlencode 'data={"login":"admin","password":"demo"}' 
 +</code>
  
 <code json> <code json>
Line 350: Line 376:
 } }
 </code> </code>
 +
 +===== Wrong credentials =====
 +
 +<code>
 +curl -s -X POST 'https://yourhost/wr/?module=remoteapi&action=clientrest&channels=getall&login=admin&password=wrongpassword'
 +</code>
 +
 +<code>
 +{
 +
 +    "error":6,
 +    "message":"Wrong credentials"
 +
 +}
 +</code>
 +
 +
 +===== Wrong request format =====
 +
 +<code>
 +curl -s -X POST 'https://yourhost/wr/?module=remoteapi&action=clientrest&channels=getall'
 +</code>
 +
 +<code>
 +{
 +
 +    "error":3,
 +    "message":"Wrong request data"
 +
 +}
 +</code>
 +
 +
 +
api.1779108246.txt.gz · Last modified: 2026/05/18 15:44 by nightfly